bsd.README revision 1.313
11.313Sjmmv# $NetBSD: bsd.README,v 1.313 2013/02/16 21:40:45 jmmv Exp $ 21.24Smikel# @(#)bsd.README 8.2 (Berkeley) 4/2/94 31.1Scgd 41.213SlukemThis is the README file for the make "include" files for the NetBSD 51.213Slukemsource tree. The files are installed in /usr/share/mk, and are, 61.213Slukemby convention, named with the suffix ".mk". 71.1Scgd 81.1ScgdNote, this file is not intended to replace reading through the .mk 91.1Scgdfiles for anything tricky. 101.1Scgd 111.1Scgd=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 121.1Scgd 131.1ScgdRANDOM THINGS WORTH KNOWING: 141.1Scgd 151.1ScgdThe files are simply C-style #include files, and pretty much behave like 161.1Scgdyou'd expect. The syntax is slightly different in that a single '.' is 171.1Scgdused instead of the hash mark, i.e. ".include <bsd.prog.mk>". 181.1Scgd 191.1ScgdOne difference that will save you lots of debugging time is that inclusion 201.1Scgdof the file is normally done at the *end* of the Makefile. The reason for 211.1Scgdthis is because .mk files often modify variables and behavior based on the 221.1Scgdvalues of variables set in the Makefile. To make this work, remember that 231.1Scgdthe FIRST target found is the target that is used, i.e. if the Makefile has: 241.1Scgd 251.1Scgd a: 261.1Scgd echo a 271.1Scgd a: 281.1Scgd echo a number two 291.1Scgd 301.1Scgdthe command "make a" will echo "a". To make things confusing, the SECOND 311.1Scgdvariable assignment is the overriding one, i.e. if the Makefile has: 321.1Scgd 331.1Scgd a= foo 341.1Scgd a= bar 351.1Scgd 361.1Scgd b: 371.1Scgd echo ${a} 381.1Scgd 391.1Scgdthe command "make b" will echo "bar". This is for compatibility with the 401.1Scgdway the V7 make behaved. 411.1Scgd 421.1ScgdIt's fairly difficult to make the BSD .mk files work when you're building 431.75Sagcmultiple programs in a single directory. It's a lot easier to split up the 441.1Scgdprograms than to deal with the problem. Most of the agony comes from making 451.36Srossthe "obj" directory stuff work right, not because we switched to a new version 461.1Scgdof make. So, don't get mad at us, figure out a better way to handle multiple 471.1Scgdarchitectures so we can quit using the symbolic link stuff. (Imake doesn't 481.1Scgdcount.) 491.1Scgd 501.1ScgdThe file .depend in the source directory is expected to contain dependencies 511.1Scgdfor the source files. This file is read automatically by make after reading 521.1Scgdthe Makefile. 531.1Scgd 541.1ScgdThe variable DESTDIR works as before. It's not set anywhere but will change 551.1Scgdthe tree where the file gets installed. 561.1Scgd 571.1ScgdThe profiled libraries are no longer built in a different directory than 581.1Scgdthe regular libraries. A new suffix, ".po", is used to denote a profiled 591.265Snjolyobject, and ".pico" denotes a shared (position-independent) object. 601.97Sitojun 611.142SlukemThere are various make variables used during the build. 621.142Slukem 631.142SlukemMany variables support a (case sensitive) value of "no" or "yes", 641.142Slukemand are tested with ${VAR} == "no" and ${VAR} != "no" . 651.142Slukem 661.142Slukem 671.172ShubertfThe basic rule for the variable naming scheme is as follows: 681.172Shubertf 691.231SapbHOST_xxx A command that runs on the host machine regardless of 701.231Sapb whether or not the system is being cross compiled, or 711.231Sapb flags for such a command. 721.231Sapb 731.172ShubertfMKxxx Can be set to "no" to disable functionality, or 741.172Shubertf "yes" to enable it. 751.172Shubertf Usually defaults to "yes", although some variables 761.172Shubertf default to "no". 771.172Shubertf Due to make(1) implementation issues, if a temporary 781.224Slukem command-line override of a mk.conf(5) or <bsd.own.mk> 791.214Swiz setting is required whilst still honoring a particular 801.172Shubertf Makefile's setting of MKxxx, use 811.172Shubertf env MKxxx=value make 821.172Shubertf instead of 831.172Shubertf make MKxxx=value 841.172Shubertf 851.172ShubertfNOxxx If defined, disables a feature. 861.172Shubertf Not intended for users. 871.172Shubertf This is to allow Makefiles to disable functionality 881.172Shubertf that they don't support (such as missing man pages). 891.172Shubertf NOxxx variables must be defined before <bsd.own.mk> 901.172Shubertf is included. 911.172Shubertf 921.231SapbTOOL_xxx A tool that is provided as part of the USETOOLS 931.231Sapb framework. When not using the USETOOLS framework, 941.231Sapb TOOL_xxx variables should refer to tools that are 951.231Sapb already installed on the host system. 961.231Sapb 971.172ShubertfThe following variables that control how things are made/installed that 981.172Shubertfare not set by default. These should not be set by Makefiles; they're for 991.224Slukemthe user to define in MAKECONF (see <bsd.own.mk>, below, or mk.conf(5)) 1001.224Slukemor on the make(1) command line: 1011.172Shubertf 1021.172ShubertfBUILD If defined, 'make install' checks that the targets in the 1031.172Shubertf source directories are up-to-date and remakes them if they 1041.172Shubertf are out of date, instead of blindly trying to install 1051.172Shubertf out of date or non-existent targets. 1061.172Shubertf 1071.172ShubertfMAKEVERBOSE Control how "verbose" the standard make(1) rules are. 1081.172Shubertf Default: 2 1091.172Shubertf Supported values: 1101.172Shubertf 0 Minimal output ("quiet") 1111.172Shubertf 1 Describe what is occurring 1121.172Shubertf 2 Describe what is occurring and echo the actual command 1131.241Sapb 3 Ignore the effect of the "@" prefix in make commands 1141.241Sapb 4 Trace shell commands using the shell's -x flag 1151.172Shubertf 1161.312SjmmvMKATF If "no", don't build the Automated Testing Framework (ATF), 1171.312Sjmmv which includes the libatf-c, libatf-c++ and libatf-sh libraries 1181.312Sjmmv and the various command line tools. Also, because the build of 1191.312Sjmmv the libraries is disabled, don't build the NetBSD test suite 1201.312Sjmmv either. 1211.210Sgmcgarry Default: yes 1221.210Sgmcgarry 1231.252SskrllMKBFD Obsolete, use MKBINUTILS 1241.252Sskrll 1251.266SjoergMKBINUTILS If "no", don't build binutils (gas, ld, etc and libbfd, 1261.266Sjoerg libopcodes) 1271.172Shubertf Default: yes 1281.172Shubertf 1291.266SjoergMKBSDTAR If "yes", use the libarchive based cpio and tar instead of 1301.266Sjoerg the pax frontends. 1311.266Sjoerg Default: no 1321.266Sjoerg 1331.172ShubertfMKCATPAGES If "no", don't build or install the catman pages. 1341.292Sjoerg Default: no 1351.172Shubertf 1361.234SmrgMKCOMPAT If "no", don't build or install the src/compat. 1371.303Sjkoshy Default: yes on amd64/mips64/sparc64, no elsewhere. 1381.234Smrg 1391.210SgmcgarryMKCOMPLEX If "no", don't build libm support for <complex.h> 1401.210Sgmcgarry Default: yes 1411.210Sgmcgarry 1421.172ShubertfMKCRYPTO If "no", no cryptography support will be built into the system, 1431.174Schristos and also acts as "MKKERBEROS=no". 1441.172Shubertf Default: yes 1451.172Shubertf 1461.297SspzMKCRYPTO_RC5 If not "no", RC5 support will be built into libcrypto_rc5 1471.172Shubertf Default: no 1481.172Shubertf 1491.172ShubertfMKCVS If "no", don't build or install cvs(1). 1501.172Shubertf Default: yes 1511.172Shubertf 1521.184SlukemMKDEBUG If "no", don't build and install separate debugging symbols 1531.184Slukem into /usr/libdata/debug. 1541.184Slukem Default: no 1551.184Slukem 1561.219SlukemMKDEBUGLIB Build *_g.a debugging libraries, which are compiled 1571.219Slukem with -DDEBUG. 1581.176Schristos Default: no 1591.176Schristos 1601.172ShubertfMKDOC If "no", don't build or install the documentation. 1611.172Shubertf Default: yes 1621.172Shubertf 1631.302SjkoshyMKDTRACE If "no", do not build and install the kernel modules, 1641.302Sjkoshy utilities and libraries used to implement the dtrace(1) 1651.302Sjkoshy facility. 1661.302Sjkoshy Default: no 1671.302Sjkoshy 1681.172ShubertfMKDYNAMICROOT If "no", build programs in /bin and /sbin statically, 1691.172Shubertf don't install certain libraries in /lib, and don't 1701.172Shubertf install the shared linker into /libexec. 1711.172Shubertf Default: yes 1721.172Shubertf 1731.260SuebayasiMKEXTSRC If not "no", 'make build' also descends into either src/extsrc 1741.260Suebayasi to cross-build programs and libraries externally added by 1751.260Suebayasi users, and automatically enables creation of those sets. 1761.260Suebayasi Default: no 1771.260Suebayasi 1781.201SlukemMKGCC If "no", don't build gcc(1) or any of the GCC-related 1791.186Smrg libraries (libgcc, libobjc, libstdc++). 1801.172Shubertf Default: yes 1811.172Shubertf 1821.201SlukemMKGCCCMDS If "no", don't build gcc(1), but do build the GCC-related 1831.201Slukem libraries (libgcc, libobjc, libstdc++). 1841.172Shubertf Default: yes 1851.172Shubertf 1861.172ShubertfMKGDB If "no", don't build gdb(1). 1871.172Shubertf Default: yes 1881.172Shubertf 1891.172ShubertfMKHESIOD If "no", disables building of Hesiod infrastructure 1901.172Shubertf (libraries and support programs). 1911.172Shubertf Default: yes 1921.172Shubertf 1931.172ShubertfMKHOSTOBJ If not "no", for programs intended to be run on the compile 1941.172Shubertf host, the name, release, and architecture of the host 1951.172Shubertf operating system will be suffixed to the name of the object 1961.172Shubertf directory created by "make obj". 1971.172Shubertf Default: no 1981.172Shubertf 1991.222SlukemMKHTML If "no", don't build or install the HTML man pages. 2001.222Slukem Default: yes 2011.172Shubertf 2021.172ShubertfMKIEEEFP If "no", don't add code for IEEE754/IEC60559 conformance. 2031.172Shubertf Has no effect on most platforms. 2041.172Shubertf Default: yes 2051.172Shubertf 2061.225SjoergMKSTRIPIDENT Strip the RCS IDs from program binaries and shared libraries. 2071.225Sjoerg Default: no 2081.225Sjoerg 2091.172ShubertfMKINET6 If "no", disables building of INET6 (IPv6) infrastructure 2101.273Smrg (libraries and support programs). This option must not be 2111.273Smrg set to "no" if MKX11 is not "no". 2121.172Shubertf Default: yes 2131.172Shubertf 2141.172ShubertfMKINFO If "no", don't build or install Info documentation from 2151.172Shubertf Texinfo source files. 2161.172Shubertf Default: yes 2171.172Shubertf 2181.172ShubertfMKIPFILTER If "no", don't build or install the IP Filter programs and LKM. 2191.172Shubertf Default: yes 2201.172Shubertf 2211.208SlukemMKISCSI If "no", don't build or install iSCSI library or applications 2221.181Smrg (depends on libpthread.) 2231.181Smrg Default: yes 2241.181Smrg 2251.172ShubertfMKKERBEROS If "no", disables building of Kerberos v5 2261.172Shubertf infrastructure (libraries and support programs). 2271.172Shubertf Default: yes 2281.172Shubertf 2291.304SjkoshyMKKMOD If "no", disables building of kernel modules. 2301.304Sjkoshy Default: yes 2311.304Sjkoshy 2321.312SjmmvMKKYUA If "no", don't build Kyua nor its dependent library Lutok. 2331.312Sjmmv Note that setting this to "no" does not disable the build of 2341.312Sjmmv the NetBSD test suite itself; the build of the tests is 2351.312Sjmmv controlled by the MKATF knob. 2361.312Sjmmv Default: no (until the import is done and validated) 2371.312Sjmmv 2381.208SlukemMKLDAP If "no", disables building of LDAP infrastructure 2391.208Slukem (libraries and support programs). 2401.208Slukem Default: yes 2411.208Slukem 2421.206SlukemMKLINKLIB If "no", act as "MKLINT=no MKPICINSTALL=no MKPROFILE=no". 2431.172Shubertf Also: 2441.172Shubertf - don't install the .a libraries 2451.172Shubertf - don't install _pic.a libraries on PIC systems 2461.172Shubertf - don't build .a libraries on PIC systems 2471.172Shubertf - don't install the .so symlink on ELF systems 2481.172Shubertf I.e, only install the shared library (and the .so.major 2491.172Shubertf symlink on ELF). 2501.172Shubertf Default: yes 2511.172Shubertf 2521.172ShubertfMKLINT If "no", don't build or install the lint libraries. 2531.172Shubertf Default: yes 2541.172Shubertf 2551.261StronMKLVM If "no", don't build or install the logical volume manager 2561.245Sagc and device mapper tools and libraries 2571.262Stron Default: yes 2581.245Sagc 2591.172ShubertfMKMAN If "no", don't build or install the man or catman pages, 2601.172Shubertf and also acts as "MKCATPAGES=no MKHTML=no". 2611.172Shubertf Default: yes 2621.172Shubertf 2631.256SjoergMKMANDOC If "yes", mandoc is built as tool and used to compile 2641.256Sjoerg catman or html pages. A directory can be exempted by 2651.256Sjoerg defining NOMANDOC. Individual man pages are exempted 2661.278Sjoerg if NOMANDOC.${target} is set to "yes". 2671.292Sjoerg Default: yes 2681.256Sjoerg 2691.172ShubertfMKMANZ If not "no", compress manual pages at installation time. 2701.172Shubertf Default: no 2711.172Shubertf 2721.253StsarnaMKMDNS If "no", disables building of mDNS infrastructure 2731.253Stsarna (libraries and support programs). 2741.253Stsarna Default: yes 2751.253Stsarna 2761.172ShubertfMKNLS If "no", don't build or install the NLS files and locale 2771.172Shubertf definition files. 2781.172Shubertf Default: yes 2791.172Shubertf 2801.275SrmindMKNPF If "no", don't build or install the NPF and its modules. 2811.275Srmind Default: yes 2821.275Srmind 2831.172ShubertfMKOBJ If "no", don't enable the rule which creates objdirs, 2841.172Shubertf and also acts as "MKOBJDIRS=no". 2851.172Shubertf Default: yes 2861.172Shubertf 2871.172ShubertfMKOBJDIRS If "no", don't create objdirs during a "make build". 2881.172Shubertf Default: no 2891.172Shubertf 2901.172ShubertfMKPAM If "no", disables building of PAM authentication 2911.172Shubertf infrastructure (libraries and support programs). 2921.182Speter Default: yes 2931.172Shubertf 2941.210SgmcgarryMKPCC If "no", don't build pcc(1) or any of the PCC-related 2951.210Sgmcgarry libraries (libpcc, libpccsoftfloat). 2961.210Sgmcgarry Default: no 2971.210Sgmcgarry 2981.172ShubertfMKPF If "no", don't build or install the pf programs and LKM. 2991.172Shubertf Default: yes 3001.172Shubertf 3011.172ShubertfMKPIC If "no", don't build or install shared libraries, and 3021.172Shubertf also acts as "MKPICLIB=no" 3031.301Sabs Default: yes (for MACHINE_ARCHs that support it) 3041.172Shubertf 3051.172ShubertfMKPICINSTALL If "no", don't install the *_pic.a libraries. 3061.172Shubertf Default: yes 3071.172Shubertf 3081.172ShubertfMKPICLIB If "no", don't build *_pic.a libraries, and build the 3091.172Shubertf shared object libraries from the .a libraries. 3101.172Shubertf A symlink is installed in ${DESTDIR}/usr/lib for the 3111.172Shubertf _pic.a library pointing to the .a library. 3121.172Shubertf Default: yes 3131.172Shubertf 3141.198SchristosMKPIE If "no", create regular executables. Otherwise create 3151.198Schristos PIE (Position Independent Executables). 3161.198Schristos Default: no 3171.198Schristos 3181.272SmrgMKPIGZGZIP If "no", only install pigz as pigz, not gzip. 3191.271Smrg Default: no 3201.271Smrg 3211.172ShubertfMKPOSTFIX If "no", don't build or install postfix(1). 3221.172Shubertf Default: yes 3231.172Shubertf 3241.172ShubertfMKPROFILE If "no", don't build or install the profiling (*_p.a) libraries. 3251.172Shubertf Default: yes 3261.172Shubertf 3271.295SwizMKREPRO If "yes", create reproducable builds. This enables 3281.295Swiz different switches to make two builds from the same source tree 3291.295Swiz result in the same build results. 3301.295Swiz Default: no 3311.295Swiz 3321.172ShubertfMKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no 3331.172Shubertf MKMAN=no MKNLS=no". 3341.172Shubertf I.e, don't build catman pages, documentation, Info 3351.172Shubertf documentation, man pages, NLS files, ... 3361.172Shubertf Default: yes 3371.172Shubertf 3381.172ShubertfMKSKEY If "no", disables building of S/key authentication 3391.172Shubertf infrastructure (libraries and support programs). 3401.172Shubertf Default: yes 3411.172Shubertf 3421.309SalnsnMKSLJIT If "no", disables buildin of sljit (stack-less platform 3431.309Salnsn independent JIT compiler) private library and tests. 3441.309Salnsn Default: yes on amd64, i386 and sparc, no elsewhere. 3451.309Salnsn 3461.172ShubertfMKSOFTFLOAT If not "no", build with options to enable the compiler to 3471.172Shubertf generate output containing library calls for floating 3481.172Shubertf point and possibly soft-float library support. 3491.172Shubertf Default: no 3501.172Shubertf 3511.172ShubertfMKSTATICLIB If "no", don't build or install the normal static (*.a) 3521.172Shubertf libraries. 3531.172Shubertf Default: yes 3541.172Shubertf 3551.306SchristosMKTPM If "no" then don't build the Trusted Platform Module 3561.306Schristos infrastructure. 3571.306Schristos Default: no 3581.306Schristos 3591.172ShubertfMKUNPRIVED If not "no", don't set the owner/group/mode when installing 3601.172Shubertf files or directories, and keep a metadata log of what 3611.172Shubertf the owner/group/mode should be. This allows a 3621.172Shubertf non-root "make install". 3631.172Shubertf Default: no 3641.172Shubertf 3651.172ShubertfMKUPDATE If not "no", 'make install' only installs targets that are 3661.172Shubertf more recently modified in the source directories that their 3671.172Shubertf installed counterparts. 3681.172Shubertf Default: no 3691.172Shubertf 3701.237SmrgMKX11 If not "no", depending on the value of ${X11FLAVOUR}, 3711.237Smrg 'make build' also descends into either src/x11 (XFree86) or 3721.237Smrg src/external/mit/xorg (modular Xorg) to cross-build X11 and 3731.237Smrg automatically enables creation of X sets. 3741.216Smrg Default: no 3751.216Smrg 3761.251SmrgMKX11FONTS If not "no", if ${X11FLAVOUR} is "Xorg", do not build or 3771.251Smrg install the X fonts. The xfont set is still created but 3781.251Smrg will be empty. 3791.251Smrg Default: yes 3801.251Smrg 3811.172ShubertfMKYP If "no", disables building of YP (NIS) 3821.172Shubertf infrastructure (libraries and support programs). 3831.172Shubertf Default: yes 3841.172Shubertf 3851.301SabsMKZFS If "no", do not build and install utilities and libraries 3861.301Sabs used to manage ZFS file system. Do not build zfs and solaris 3871.254Shaad compatibility kernel modules. 3881.270Sriz Default: yes on i386/amd64, no elsewhere. 3891.254Shaad 3901.298SchristosMKRUMP If "no", do not build and install rump related headers, 3911.298Schristos libraries, and programs. 3921.298Schristos Default: yes 3931.298Schristos 3941.172ShubertfUSE_HESIOD If "no", disables building Hesiod support into 3951.172Shubertf various system utilities/libraries that support it. 3961.172Shubertf If ${MKHESIOD} is "no", USE_HESIOD will also be 3971.172Shubertf forced to "no". 3981.172Shubertf 3991.172ShubertfUSE_INET6 If "no", disables building INET6 (IPv6) support into 4001.172Shubertf various system utilities/libraries that support it. 4011.172Shubertf If ${MKINET6} is "no", USE_INET6 will also be 4021.172Shubertf forced to "no". 4031.172Shubertf 4041.197SadUSE_JEMALLOC If "no", disables building the "jemalloc" allocator 4051.197Sad designed for improved performance with threaded 4061.197Sad applications. The "phkmalloc" allocator as used up 4071.197Sad before NetBSD-5.0 will be substituted. 4081.197Sad 4091.175SchristosUSE_KERBEROS If "no", disables building Kerberos v5 4101.172Shubertf support into various system utilities/libraries that 4111.172Shubertf support it. If ${MKKERBEROS} is "no", USE_KERBEROS 4121.172Shubertf will also be forced to "no". 4131.172Shubertf 4141.208SlukemUSE_LDAP If "no", disables building LDAP support into various 4151.208Slukem system utilities/libraries that support it. 4161.208Slukem If ${MKLDAP} is "no", USE_LDAP will also be forced to "no". 4171.208Slukem 4181.172ShubertfUSE_PAM If "no", disables building PAM authentication support 4191.172Shubertf into various system utilities/libraries that support it. 4201.172Shubertf If ${MKPAM} is "no", USE_PAM will also be forced to "no". 4211.172Shubertf 4221.172ShubertfUSE_SKEY If "no", disables building S/key authentication 4231.172Shubertf support into various system utilities/libraries that 4241.172Shubertf support it. If ${MKSKEY} is "no", USE_SKEY will 4251.172Shubertf also be forced to "no". 4261.204Slukem Default: no 4271.172Shubertf 4281.201SlukemUSE_SSP If "no", disables GCC stack protection code, which 4291.257Stron detects stack overflows and aborts the program. The 4301.268Snjoly stack protection code imposes a performance penalty 4311.259Spgoyette of about 5%. 4321.258Stron Default: "no", unless "USE_FORT" is set to "yes" 4331.187Schristos 4341.246SchristosUSE_FORT If "yes" turns on substitute wrappers for commonly used 4351.246Schristos functions that do not do bounds checking regularly, but 4361.246Schristos they could in some cases by using the gcc 4371.301Sabs __builtin_object_size() function to determine the buffer 4381.246Schristos size where it is known and detect buffer overflows. 4391.246Schristos These substitute functions are in /usr/include/ssp. 4401.257Stron Default: depends on the part of the source tree 4411.246Schristos 4421.172ShubertfUSE_YP If "no", disables building YP (NIS) support into 4431.172Shubertf various system utilities/libraries that support it. 4441.172Shubertf If ${MKYP} is "no", USE_YP will also be forced to "no". 4451.172Shubertf 4461.284SmattUSE_PIGZGZIP If "no", use the host "gzip" program to compress things. 4471.274Smrg Otherwise, build tools/pigz and use nbpigz to compress 4481.284Smatt things. 4491.274Smrg Default: "no". 4501.274Smrg 4511.237SmrgX11FLAVOUR Set to "Xorg" or "XFree86", depending on whether to build 4521.237Smrg XFree86 or modular Xorg. Only matters if MKX11!=no. 4531.242Smrg Default: "Xorg" on amd64, i386, macppc, shark and sparc64, 4541.242Smrg "XFree86" on everything else. 4551.237Smrg 4561.172ShubertfCOPTS.lib<lib> 4571.177SmrgOBJCOPTS.lib<lib> 4581.172ShubertfLDADD.lib<lib> 4591.172ShubertfCPPFLAGS.lib<lib> 4601.172ShubertfCXXFLAGS.lib<lib> 4611.172ShubertfCOPTS.<prog> 4621.177SmrgOBJCCOPTS.<prog> 4631.172ShubertfLDADD.<prog> 4641.172ShubertfCPPFLAGS.<prog> 4651.172ShubertfCXXFLAGS.<prog> These provide a way to specify additions to the associated 4661.172Shubertf variables in a way that applies only to a particular library 4671.172Shubertf or program. <lib> corresponds to the LIB variable set in 4681.172Shubertf the library's makefile. <prog> corresponds to either PROG 4691.172Shubertf or PROG_CXX (if set). For example, if COPTS.libcrypto is 4701.172Shubertf set to "-g", "-g" will be added to COPTS only when compiling 4711.172Shubertf the crypto library. 4721.118Slukem 4731.281SjoergThe active compiler is selected using the following variables: 4741.281SjoergAVAILABLE_COMPILER 4751.281Sjoerg List of available compiler suites. Processed in order 4761.281Sjoerg for selecting the active compiler for each frontend. 4771.281SjoergHAVE_PCC If defined, PCC is present and enabled. 4781.281SjoergHAVE_LLVM If defined, LLVM/Clang is present and enabled. 4791.281SjoergUNSUPPORTED_COMPILER.xxx 4801.281Sjoerg If defined, the support for compiler "xxx" is disabled. 4811.281Sjoerg 4821.281SjoergFor the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist: 4831.281SjoergACTIVE_CC Active compile suite for the CC frontend. 4841.281SjoergSUPPORTED_CC Compile suite with support for the CC frontend. 4851.281SjoergTOOL_CC.xxx Path to the CC frontend for compiler "xxx" 4861.281Sjoerg 4871.118Slukem=-=-=-=-= sys.mk =-=-=-=-= 4881.1Scgd 4891.1ScgdThe include file <sys.mk> has the default rules for all makes, in the BSD 4901.1Scgdenvironment or otherwise. You probably don't want to touch this file. 4911.1Scgd 4921.118Slukem=-=-=-=-= bsd.own.mk =-=-=-=-= 4931.1Scgd 4941.17SthorpejThe include file <bsd.own.mk> contains source tree configuration parameters, 4951.17Sthorpejsuch as the owners, groups, etc. for both manual pages and binaries, and 4961.17Sthorpeja few global "feature configuration" parameters. 4971.1Scgd 4981.1ScgdIt has no targets. 4991.1Scgd 5001.134SlukemTo get system-specific configuration parameters, <bsd.own.mk> will try to 5011.29Scjsinclude the file specified by the "MAKECONF" variable. If MAKECONF is not 5021.29Scjsset, or no such file exists, the system make configuration file, /etc/mk.conf 5031.29Scjsis included. These files may define any of the variables described below. 5041.17Sthorpej 5051.134Slukem<bsd.own.mk> sets the following variables, if they are not already defined 5061.17Sthorpej(defaults are in brackets): 5071.15Scgd 5081.98SlukemNETBSDSRCDIR Top of the NetBSD source tree. 5091.98Slukem If _SRC_TOP_ != "", that will be used as the default, 5101.98Slukem otherwise BSDSRCDIR will be used as the default. 5111.98Slukem Various makefiles within the NetBSD source tree will 5121.98Slukem use this to reference the top level of the source tree. 5131.98Slukem 5141.95Slukem_SRC_TOP_ Top of the system source tree, as determined by <bsd.own.mk> 5151.98Slukem based on the presence of tools/ and build.sh. This variable 5161.98Slukem is "internal" to <bsd.own.mk>, although its value is only 5171.98Slukem determined once and then propagated to all sub-makes. 5181.95Slukem 5191.305Sapb_NETBSD_VERSION_DEPENDS 5201.305Sapb A list of files which contain information about 5211.305Sapb the version of the NetBSD being built. This is 5221.305Sapb defined only if the current directory appears 5231.305Sapb to be inside a NetBSD source tree. The list of 5241.305Sapb files includes ${NETBSDSRCDIR}/sys/sys/param.h 5251.305Sapb (which contains the kernel version number), 5261.305Sapb ${NETBSDSRCDIR}/sys/conf/newvers.sh and 5271.305Sapb ${NETBSDSRCDIR}/sys/conf/osrelease.sh (which 5281.305Sapb interpret the information in sys/sys/param.h), and 5291.305Sapb ${_SRC_TOP_OBJ_}/params (which is an optional file, 5301.305Sapb created by "make build" in ${_SRC_TOP_}/Makefile, 5311.305Sapb containing all the variables that may influence the 5321.305Sapb build). 5331.305Sapb 5341.305Sapb Targets that depend on the NetBSD version, or on 5351.305Sapb variables defined at build time, can declare a 5361.305Sapb dependency on ${_NETBSD_VERSION_DEPENDS}, like this: 5371.305Sapb 5381.305Sapb version.c: ${_NETBSD_VERSION_DEPENDS} 5391.305Sapb commands to create version.c 5401.305Sapb 5411.15ScgdBSDSRCDIR The real path to the system sources, so that 'make obj' 5421.116Slukem will work correctly. [/usr/src] 5431.15Scgd 5441.15ScgdBSDOBJDIR The real path to the system 'obj' tree, so that 'make obj' 5451.116Slukem will work correctly. [/usr/obj] 5461.15Scgd 5471.116SlukemBINGRP Binary group. [wheel] 5481.15Scgd 5491.116SlukemBINOWN Binary owner. [root] 5501.15Scgd 5511.116SlukemBINMODE Binary mode. [555] 5521.15Scgd 5531.116SlukemNONBINMODE Mode for non-executable files. [444] 5541.15Scgd 5551.116SlukemMANDIR Base path for manual installation. [/usr/share/man/cat] 5561.15Scgd 5571.116SlukemMANGRP Manual group. [wheel] 5581.15Scgd 5591.116SlukemMANOWN Manual owner. [root] 5601.15Scgd 5611.116SlukemMANMODE Manual mode. [${NONBINMODE}] 5621.15Scgd 5631.222SlukemMANINSTALL Manual installation type. Space separated list: 5641.222Slukem catinstall, htmlinstall, maninstall 5651.293Sjoerg Default value derived from MKCATPAGES and MKHTML. 5661.76Sfair 5671.76SfairLDSTATIC Control program linking; if set blank, link everything 5681.129Slukem dynamically. If set to "-static", link everything statically. 5691.76Sfair If not set, programs link according to their makefile. 5701.21Schristos 5711.116SlukemLIBDIR Base path for library installation. [/usr/lib] 5721.15Scgd 5731.116SlukemLINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint] 5741.15Scgd 5751.116SlukemLIBGRP Library group. [${BINGRP}] 5761.15Scgd 5771.116SlukemLIBOWN Library owner. [${BINOWN}] 5781.15Scgd 5791.116SlukemLIBMODE Library mode. [${NONBINMODE}] 5801.15Scgd 5811.15ScgdDOCDIR Base path for system documentation (e.g. PSD, USD, etc.) 5821.116Slukem installation. [/usr/share/doc] 5831.62Ssimonb 5841.62SsimonbHTMLDOCDIR Base path for html system documentation installation. 5851.62Ssimonb [/usr/share/doc/html] 5861.15Scgd 5871.116SlukemDOCGRP Documentation group. [wheel] 5881.15Scgd 5891.116SlukemDOCOWN Documentation owner. [root] 5901.15Scgd 5911.116SlukemDOCMODE Documentation mode. [${NONBINMODE}] 5921.15Scgd 5931.84SkleinkNLSDIR Base path for Native Language Support files installation. 5941.15Scgd [/usr/share/nls] 5951.1Scgd 5961.116SlukemNLSGRP Native Language Support files group. [wheel] 5971.1Scgd 5981.116SlukemNLSOWN Native Language Support files owner. [root] 5991.1Scgd 6001.116SlukemNLSMODE Native Language Support files mode. [${NONBINMODE}] 6011.1Scgd 6021.255SapbX11SRCDIR The path to the xsrc tree. [${NETBSDSRCDIR}/../xsrc, 6031.255Sapb if that exists; otherwise /usr/xsrc] 6041.144Slukem 6051.221SmrgX11SRCDIR.xc The path to the (old) X11 xc src tree. [${X11SRCDIR}/xfree/xc] 6061.144Slukem 6071.221SmrgX11SRCDIR.local The path to the local X11 src tree. [${X11SRCDIR}/local] 6081.144Slukem 6091.221SmrgX11SRCDIR.lib<package> 6101.221SmrgX11SRCDIR.<package> 6111.221Smrg The path to the xorg src tree for the specificed package>. 6121.221Smrg [${X11SRCDIR}/external/mit/xorg/<package>/dist] 6131.221Smrg 6141.221SmrgX11ROOTDIR Root directory of the X11 installation. [/usr/X11R6 or 6151.221Smrg [/usr/X11R7] 6161.144Slukem 6171.144SlukemX11BINDIR X11 bin directory. [${X11ROOTDIR}/bin] 6181.144Slukem 6191.144SlukemX11FONTDIR X11 font directory. [${X11ROOTDIR}/lib/X11/fonts] 6201.144Slukem 6211.144SlukemX11INCDIR X11 include directory. [${X11ROOTDIR}/include] 6221.144Slukem 6231.144SlukemX11LIBDIR X11 lib/x11 (config) directory. [${X11ROOTDIR}/lib/X11] 6241.144Slukem 6251.144SlukemX11MANDIR X11 manual directory. [${X11ROOTDIR}/man] 6261.144Slukem 6271.144SlukemX11USRLIBDIR X11 library directory. [${X11ROOTDIR}/lib] 6281.144Slukem 6291.32SmikelSTRIPFLAG The flag passed to the install program to cause the binary 6301.1Scgd to be stripped. This is to be used when building your 6311.1Scgd own install script so that the entire system can be made 6321.146Slukem stripped/not-stripped using a single knob. [] 6331.1Scgd 6341.2ScgdCOPY The flag passed to the install program to cause the binary 6351.2Scgd to be copied rather than moved. This is to be used when 6361.2Scgd building our own install script so that the entire system 6371.2Scgd can either be installed with copies, or with moves using 6381.116Slukem a single knob. [-c] 6391.15Scgd 6401.310SapbMAKEDIRTARGETENV 6411.310Sapb Environment variables passed to the child make process 6421.310Sapb invoked by MAKEDIRTARGET. 6431.310Sapb 6441.150SlukemMAKEDIRTARGET dir target [params] 6451.150Slukem Runs "cd $${dir} && ${MAKE} [params] $${target}", 6461.150Slukem displaying a "pretty" message whilst doing so. 6471.150Slukem 6481.152SclRELEASEMACHINEDIR 6491.152Scl Subdirectory used below RELEASEDIR when building 6501.152Scl a release. [${MACHINE}] 6511.152Scl 6521.152SclRELEASEMACHINE Subdirectory or path component used for the following 6531.152Scl paths: 6541.152Scl distrib/${RELEASEMACHINE} 6551.152Scl distrib/notes/${RELEASEMACHINE} 6561.152Scl etc/etc.${RELEASEMACHINE} 6571.152Scl Used when building a release. [${MACHINE}] 6581.150Slukem 6591.134SlukemAdditionally, the following variables may be set by <bsd.own.mk> or in a 6601.214Swizmake configuration file to modify the behavior of the system build 6611.17Sthorpejprocess (default values are in brackets along with comments, if set by 6621.134Slukem<bsd.own.mk>): 6631.33Sjonathan 6641.172ShubertfUSETOOLS Indicates whether the tools specified by ${TOOLDIR} should 6651.172Shubertf be used as part of a build in progress. 6661.172Shubertf Supported values: 6671.172Shubertf 6681.172Shubertf yes Use the tools from TOOLDIR. 6691.172Shubertf Must be set to this if cross-compiling. 6701.172Shubertf 6711.172Shubertf no Do not use the tools from TOOLDIR, but refuse to 6721.172Shubertf build native compilation tool components that are 6731.172Shubertf version-specific for that tool. 6741.172Shubertf 6751.172Shubertf never Do not use the tools from TOOLDIR, even when 6761.172Shubertf building native tool components. This is similar to 6771.172Shubertf the traditional NetBSD build method, but does not 6781.172Shubertf verify that the compilation tools in use are 6791.172Shubertf up-to-date enough in order to build the tree 6801.172Shubertf successfully. This may cause build or runtime 6811.172Shubertf problems when building the whole NetBSD source tree. 6821.172Shubertf 6831.172Shubertf Default: "yes" if building all or part of a whole NetBSD 6841.172Shubertf source tree (detected automatically); "no" otherwise 6851.172Shubertf (to preserve traditional semantics of the <bsd.*.mk> 6861.172Shubertf make(1) include files). 6871.142Slukem 6881.116SlukemOBJECT_FMT Object file format. [set to "ELF" on architectures that 6891.199Ssimonb use ELF -- currently all architectures]. 6901.33Sjonathan 6911.103SthorpejTOOLCHAIN_MISSING 6921.142Slukem If not "no", this indicates that the platform being built 6931.103Sthorpej does not have a working in-tree toolchain. If the 6941.142Slukem ${MACHINE_ARCH} in question falls into this category, 6951.301Sabs TOOLCHAIN_MISSING is conditionally assigned the value "yes". 6961.103Sthorpej Otherwise, the variable is unconditionally assigned the 6971.103Sthorpej value "no". 6981.252Sskrll If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are 6991.142Slukem unconditionally assigned the value "no". 7001.103Sthorpej 7011.103SthorpejEXTERNAL_TOOLCHAIN 7021.103Sthorpej This variable is not directly set by <bsd.own.mk>, but 7031.103Sthorpej including <bsd.own.mk> is the canonical way to gain 7041.103Sthorpej access to this variable. The variable should be defined 7051.103Sthorpej either in the user's environment or in the user's mk.conf 7061.103Sthorpej file. If defined, this variable indicates the root of 7071.103Sthorpej an external toolchain which will be used to build the 7081.142Slukem tree. For example, if a platform is a ${TOOLCHAIN_MISSING} 7091.103Sthorpej platform, EXTERNAL_TOOLCHAIN can be used to re-enable the 7101.103Sthorpej cross-compile framework. 7111.103Sthorpej 7121.142Slukem If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally 7131.142Slukem assigned the value "no", since the external version of the 7141.142Slukem compiler may not be able to build the library components of 7151.142Slukem the in-tree compiler. 7161.103Sthorpej 7171.103Sthorpej NOTE: This variable is not yet used in as many places as 7181.103Sthorpej it should be. Expect the exact semantics of this variable 7191.103Sthorpej to change in the short term as parts of the cross-compile 7201.103Sthorpej framework continue to be cleaned up. 7211.1Scgd 7221.236SapbThe following variables are defined to commands to perform the 7231.236Sapbappropriate operation, with the default in [brackets]. Note that 7241.236Sapbthe defaults change if USETOOLS == "yes": 7251.236Sapb 7261.236SapbTOOL_AMIGAAOUT2BB aout to Amiga bootblock converter. [amiga-aout2bb] 7271.236Sapb 7281.236SapbTOOL_AMIGAELF2BB ELF to Amiga bootblock converter. [amiga-elf2bb] 7291.236Sapb 7301.236SapbTOOL_AMIGATXLT Amige assembly language format translator. [amiga-txlt] 7311.236Sapb 7321.236SapbTOOL_ASN1_COMPILE ASN1 compiler. [asn1_compile] 7331.236Sapb 7341.236SapbTOOL_AWK Pattern-directed scanning/processing language. [awk] 7351.236Sapb 7361.236SapbTOOL_CAP_MKDB Create capability database. [cap_mkdb] 7371.236Sapb 7381.236SapbTOOL_CAT Concatenate and print files. [cat] 7391.236Sapb 7401.236SapbTOOL_CKSUM Display file checksums. [cksum] 7411.236Sapb 7421.236SapbTOOL_COMPILE_ET Error table compiler. [compile_et] 7431.236Sapb 7441.236SapbTOOL_CONFIG Build kernel compilation directories. [config] 7451.236Sapb 7461.236SapbTOOL_CRUNCHGEN Generate crunched binary build environment. [crunchgen] 7471.236Sapb 7481.236SapbTOOL_CTAGS Create a tags file. [ctags] 7491.236Sapb 7501.236SapbTOOL_DB Manipulate db(3) databases. [db] 7511.236Sapb 7521.236SapbTOOL_DISKLABEL Read and write disk pack label. [disklabel] 7531.236Sapb 7541.236SapbTOOL_EQN Format equations for groff. [eqn] 7551.236Sapb 7561.236SapbTOOL_FDISK MS-DOS partition maintenance program. [fdisk] 7571.236Sapb 7581.236SapbTOOL_FGEN IEEE 1275 Open Firmware FCode Tokenizer. [fgen] 7591.236Sapb 7601.236SapbTOOL_GENASSYM Generate constants for assembly files. [genassym] 7611.236Sapb 7621.236SapbTOOL_GENCAT Generate NLS message catalogs. [gencat] 7631.236Sapb 7641.236SapbTOOL_GMAKE GNU make utility. [gmake] 7651.236Sapb 7661.247SsketchTOOL_GREP Print lines matching a pattern. [grep] 7671.247Ssketch 7681.236SapbTOOL_GROFF Front end for groff document formatting system. [groff] 7691.236Sapb 7701.236SapbTOOL_HEXDUMP Ascii, decimal, hexadecimal, octal dump. [hexdump] 7711.236Sapb 7721.236SapbTOOL_HP300MKBOOT Make bootable image for hp300. [hp300-mkboot] 7731.236Sapb 7741.236SapbTOOL_HP700MKBOOT Make bootable image for hp700. [hp700-mkboot] 7751.236Sapb 7761.236SapbTOOL_INDXBIB Make bibliographic database's inverted index. [indxbib] 7771.236Sapb 7781.236SapbTOOL_INSTALLBOOT Install disk bootstrap software. [installboot] 7791.236Sapb 7801.236SapbTOOL_INSTALL_INFO Update info/dir entries. [install-info] 7811.236Sapb 7821.236SapbTOOL_JOIN Relational database operator. [join] 7831.236Sapb 7841.236SapbTOOL_M4 M4 macro language processor. [m4] 7851.236Sapb 7861.236SapbTOOL_MACPPCFIXCOFF Fix up xcoff headers for macppc. [macppc-fixcoff] 7871.236Sapb 7881.236SapbTOOL_MAKEFS Create file system image from directory tree. [makefs] 7891.236Sapb 7901.236SapbTOOL_MAKEINFO Translate Texinfo documents. [makeinfo] 7911.236Sapb 7921.236SapbTOOL_MAKEWHATIS Create a whatis.db database. [makewhatis] 7931.236Sapb 7941.236SapbTOOL_MDSETIMAGE Set kernel RAM disk image. [mdsetimage] 7951.236Sapb 7961.236SapbTOOL_MENUC Menu compiler. [menuc] 7971.236Sapb 7981.236SapbTOOL_MIPSELF2ECOFF Convert ELF-format executable to ECOFF for mips. 7991.236Sapb [mips-elf2ecoff] 8001.236Sapb 8011.236SapbTOOL_MKCSMAPPER Make charset mapping table. [mkcsmapper] 8021.236Sapb 8031.236SapbTOOL_MKESDB Make encoding scheme database. [mkesdb] 8041.236Sapb 8051.236SapbTOOL_MKLOCALE Make LC_CTYPE locale files. [mklocale] 8061.236Sapb 8071.236SapbTOOL_MKMAGIC Create database for file(1). [file] 8081.236Sapb 8091.311SjmcneillTOOL_MKNOD Make device special file. [mknod] 8101.311Sjmcneill 8111.236SapbTOOL_MKTEMP Make (unique) temporary file name. [mktemp] 8121.236Sapb 8131.236SapbTOOL_MSGC Simple message list compiler. [msgc] 8141.236Sapb 8151.236SapbTOOL_MTREE Map a directory hierarchy. [mtree] 8161.236Sapb 8171.236SapbTOOL_PAX Manipulate file archives and copy directories. [pax] 8181.236Sapb 8191.236SapbTOOL_PIC Compile pictures for groff. [pic] 8201.236Sapb 8211.273SmrgTOOL_PIGZ Parallel compressor. [pigz] 8221.273Smrg 8231.236SapbTOOL_POWERPCMKBOOTIMAGE Make bootable image for powerpc. [powerpc-mkbootimage] 8241.236Sapb 8251.236SapbTOOL_PWD_MKDB Generate the password databases. [pwd_mkdb] 8261.236Sapb 8271.236SapbTOOL_REFER Preprocess bibliographic references for groff. [refer] 8281.236Sapb 8291.236SapbTOOL_ROFF_ASCII Generate ASCII groff output. [nroff] 8301.236Sapb 8311.236SapbTOOL_ROFF_DVI Generate DVI groff output. [${TOOL_GROFF} -Tdvi] 8321.236Sapb 8331.236SapbTOOL_ROFF_HTML Generate HTML groff output. 8341.236Sapb [${TOOL_GROFF} -Tlatin1 -mdoc2html] 8351.236Sapb 8361.236SapbTOOL_ROFF_PS Generate PS groff output. [${TOOL_GROFF} -Tps] 8371.236Sapb 8381.236SapbTOOL_ROFF_RAW Generate "raw" groff output. [${TOOL_GROFF} -Z] 8391.236Sapb 8401.236SapbTOOL_RPCGEN Remote Procedure Call (RPC) protocol compiler. [rpcgen] 8411.236Sapb 8421.236SapbTOOL_SED Stream editor. [sed] 8431.236Sapb 8441.236SapbTOOL_SOELIM Eliminate .so's from groff input. [soelim] 8451.236Sapb 8461.236SapbTOOL_SPARKCRC Generate a crc suitable for use in a sparkive file. 8471.236Sapb [sparkcrc] 8481.236Sapb 8491.236SapbTOOL_STAT Display file status. [stat] 8501.236Sapb 8511.236SapbTOOL_STRFILE Create a random access file for storing strings. 8521.236Sapb [strfile] 8531.236Sapb 8541.236SapbTOOL_SUNLABEL Read or modify a SunOS disk label. [sunlabel] 8551.236Sapb 8561.236SapbTOOL_TBL Format tables for groff. [tbl] 8571.236Sapb 8581.236SapbTOOL_UUDECODE Uudecode a binary file. [uudecode] 8591.236Sapb 8601.236SapbTOOL_VGRIND Grind nice listings of programs. [vgrind -f] 8611.236Sapb 8621.236SapbTOOL_ZIC Time zone compiler. [zic] 8631.236Sapb 8641.134Slukem<bsd.own.mk> is generally useful when building your own Makefiles so that 8651.1Scgdthey use the same default owners etc. as the rest of the tree. 8661.131Slukem 8671.131Slukem 8681.286Sapb=-=-=-=-= bsd.clean.mk =-=-=-=-= 8691.286Sapb 8701.286SapbThe include file <bsd.clean.mk> defines the clean and cleandir 8711.286Sapbtargets. It uses the following variables: 8721.286Sapb 8731.286SapbCLEANFILES Files to remove for both the clean and cleandir targets. 8741.286Sapb 8751.286SapbCLEANDIRFILES Files to remove for the cleandir target, but not for 8761.286Sapb the clean target. 8771.286Sapb 8781.287SapbMKCLEANSRC Controls whether or not the clean and cleandir targets 8791.287Sapb will delete files from both the object directory, 8801.287Sapb ${.OBJDIR}, and the source directory, ${.CURDIR}. 8811.287Sapb 8821.287Sapb If MKCLEANSRC is set to "no", then the file names in 8831.287Sapb CLEANFILES or CLEANDIRFILES are interpreted relative 8841.287Sapb to the object directory, ${.OBJDIR}. This is the 8851.287Sapb traditional behaviour. 8861.287Sapb 8871.287Sapb If MKCLEANSRC is set to "yes", then the file deletion 8881.287Sapb is performed relative to both the object directory, 8891.287Sapb ${.OBJDIR}, and the source directory, ${.CURDIR}. (This 8901.287Sapb has no effect if ${.OBJDIR} is the same as ${.CURDIR}.) 8911.287Sapb Deleting files from ${.CURDIR} is intended to remove 8921.287Sapb stray output files that had been left in the source 8931.287Sapb directory by an earlier build that did not use object 8941.287Sapb directories. 8951.287Sapb 8961.287Sapb The default is MKCLEANSRC=yes. If you always build with 8971.287Sapb separate object directories, and you are sure that there 8981.287Sapb are no stray files in the source directories, then you 8991.287Sapb may set MKCLEANSRC=no to save some time. 9001.287Sapb 9011.287SapbMKCLEANVERIFY Controls whether or not the clean and cleandir targets 9021.287Sapb will verify that files have been deleted. 9031.287Sapb 9041.287Sapb If MKCLEANVERIFY is set to "no", then the files will 9051.287Sapb be deleted using a "rm -f" command, and its success or 9061.287Sapb failure will be ignored. 9071.287Sapb 9081.287Sapb If MKCLEANVERIFY is set to "yes", then the success of 9091.287Sapb the "rm -f" command will be verified using an "ls" 9101.287Sapb command. 9111.287Sapb 9121.287Sapb The default is MKCLEANVERIFY=yes. If you are sure that 9131.287Sapb there will be no problems caused by file permissions, 9141.287Sapb read-only file systems, or the like, then you may set 9151.287Sapb MKCLEANVERIFY=no to save some time. 9161.286Sapb 9171.286SapbTo use the clean and cleandir targets defined in <bsd.clean.mk>, other 9181.286SapbMakefiles or bsd.*.mk files should append file names to the CLEANFILES 9191.286Sapbor CLEANDIRFILES variables. For example: 9201.286Sapb 9211.286Sapb CLEANFILES+= a.out 9221.286Sapb CLEANDIRFILES+= .depend 9231.286Sapb 9241.286Sapb .include <bsd.clean.mk> 9251.286Sapb 9261.308SapbThe files listed in CLEANFILES and CLEANDIRFILES must not be 9271.308Sapbdirectories, because the potential risk from running "rm -rf" commands 9281.308Sapbin bsd.clean.mk is considered too great. If you want to recursively 9291.308Sapbdelete a directory as part of "make clean" or "make cleandir" then you 9301.308Sapbneed to provide your own target. 9311.286Sapb 9321.131Slukem=-=-=-=-= bsd.dep.mk =-=-=-=-= 9331.131Slukem 9341.131SlukemThe include file <bsd.dep.mk> contains the default targets for building 9351.133Slukem.depend files. It creates .d files from entries in SRCS and DPSRCS 9361.133Slukemthat are C, C++, or Objective C source files, and builds .depend from the 9371.133Slukem.d files. All other files in SRCS and all of DPSRCS will be used as 9381.133Slukemdependencies for the .d files. In order for this to function correctly, 9391.132Slukemit should be .included after all other .mk files and directives that may 9401.132Slukemmodify SRCS or DPSRCS. It uses the following variables: 9411.132Slukem 9421.132SlukemSRCS List of source files to build the program. 9431.132Slukem 9441.132SlukemDPSRCS List of source files which are needed for generating 9451.132Slukem dependencies, but are not needed in ${SRCS}. 9461.1Scgd 9471.1Scgd 9481.118Slukem=-=-=-=-= bsd.files.mk =-=-=-=-= 9491.106Sthorpej 9501.118SlukemThe include file <bsd.files.mk> handles the FILES variables and is included 9511.134Slukemfrom <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables: 9521.124Slukem 9531.124SlukemFILES The list of files to install. 9541.124Slukem 9551.153SlukemCONFIGFILES Similar semantics to FILES, except that the files 9561.153Slukem are installed by the `configinstall' target, 9571.153Slukem not the `install' target. 9581.153Slukem The FILES* variables documented below also apply. 9591.153Slukem 9601.124SlukemFILESOWN File owner. [${BINOWN}] 9611.124Slukem 9621.124SlukemFILESGRP File group. [${BINGRP}] 9631.124Slukem 9641.203SdhollandFILESMODE File mode. [${NONBINMODE}] 9651.124Slukem 9661.124SlukemFILESDIR The location to install the files. 9671.124Slukem 9681.124SlukemFILESNAME Optional name to install each file as. 9691.124Slukem 9701.153SlukemFILESOWN_<fn> File owner of the specific file <fn>. 9711.153Slukem 9721.153SlukemFILESGRP_<fn> File group of the specific file <fn>. 9731.153Slukem 9741.153SlukemFILESMODE_<fn> File mode of the specific file <fn>. 9751.153Slukem 9761.202SuweFILESDIR_<fn> The location to install the specific file <fn>. 9771.153Slukem 9781.153SlukemFILESNAME_<fn> Optional name to install <fn> as. 9791.124Slukem 9801.285SapbFILESBUILD If this variable is defined, then its value will be 9811.285Sapb used as the default for all FILESBUILD_<fn> variables. 9821.285Sapb Otherwise, the default will be "no". 9831.285Sapb 9841.243ScubeFILESBUILD_<fn> A value different from "no" will add the file to the list of 9851.243Scube targets to be built by `realall'. Users of that variable 9861.243Scube should provide a target to build the file. 9871.243Scube 9881.135Slukem 9891.139SlukemBUILDSYMLINKS List of two word items: 9901.135Slukem lnsrc lntgt 9911.135Slukem For each lnsrc item, create a symlink named lntgt. 9921.135Slukem The lntgt symlinks are removed by the cleandir target. 9931.106Sthorpej 9941.148SjmcUUDECODE_FILES List of files which are stored as <file>.uue in the source 9951.148Sjmc tree. Each one will be decoded with ${TOOL_UUDECODE}. 9961.301Sabs The source files have a `.uue' suffix, the generated files do 9971.148Sjmc not. 9981.149Sjmc 9991.202SuweUUDECODE_FILES_RENAME_<fn> 10001.202Suwe Rename the output from the decode to the provided name. 10011.148Sjmc 10021.148Sjmc *NOTE: These files are simply decoded, with no install or other 10031.148Sjmc rule applying implicitly except being added to the clean 10041.148Sjmc target. 10051.106Sthorpej 10061.118Slukem=-=-=-=-= bsd.gcc.mk =-=-=-=-= 10071.113Sthorpej 10081.113SthorpejThe include file <bsd.gcc.mk> computes various parameters related to GCC 10091.113Sthorpejsupport libraries. It defines no targets. <bsd.own.mk> MUST be included 10101.134Slukembefore <bsd.gcc.mk>. 10111.113Sthorpej 10121.134SlukemThe primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each 10131.113Sthorpejof which need to know where to find certain GCC support libraries. 10141.113Sthorpej 10151.134SlukemThe behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable, 10161.113Sthorpejwhich is generally set by the user. If EXTERNAL_TOOLCHAIN it set, then 10171.113Sthorpejthe compiler is asked where to find the support libraries, otherwise the 10181.113Sthorpejsupport libraries are found in ${DESTDIR}/usr/lib. 10191.113Sthorpej 10201.134Slukem<bsd.gcc.mk> sets the following variables: 10211.113Sthorpej 10221.118Slukem_GCC_CRTBEGIN The full path name to crtbegin.o. 10231.118Slukem 10241.118Slukem_GCC_CRTBEGINS The full path name to crtbeginS.o. 10251.118Slukem 10261.118Slukem_GCC_CRTEND The full path name to crtend.o. 10271.118Slukem 10281.118Slukem_GCC_CRTENDS The full path name to crtendS.o. 10291.118Slukem 10301.118Slukem_GCC_LIBGCCDIR The directory where libgcc.a is located. 10311.118Slukem 10321.118Slukem 10331.118Slukem=-=-=-=-= bsd.inc.mk =-=-=-=-= 10341.118Slukem 10351.134SlukemThe include file <bsd.inc.mk> defines the includes target and uses the 10361.118Slukemvariables: 10371.118Slukem 10381.124SlukemINCS The list of include files. 10391.118Slukem 10401.118SlukemINCSDIR The location to install the include files. 10411.118Slukem 10421.118SlukemINCSNAME Target name of the include file, if only one; same as 10431.118Slukem FILESNAME, but for include files. 10441.118Slukem 10451.134SlukemINCSYMLINKS Similar to SYMLINKS in <bsd.links.mk>, except that these 10461.134Slukem are installed in the 'includes' target and not the 10471.134Slukem (much later) 'install' target. 10481.134Slukem 10491.118SlukemINCSNAME_<file> The name file <file> should be installed as, if not <file>, 10501.118Slukem same as FILESNAME_<file>, but for include files. 10511.118Slukem 10521.118Slukem 10531.118Slukem=-=-=-=-= bsd.info.mk =-=-=-=-= 10541.118Slukem 10551.118SlukemThe include file <bsd.info.mk> is used to generate and install GNU Info 10561.118Slukemdocumentation from respective Texinfo source files. It defines three 10571.118Slukemimplicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the 10581.118Slukemfollowing variables: 10591.118Slukem 10601.118SlukemTEXINFO List of Texinfo source files. Info documentation will 10611.118Slukem consist of single files with the extension replaced by 10621.118Slukem .info. 10631.118Slukem 10641.118SlukemINFOFLAGS Flags to pass to makeinfo. [] 10651.118Slukem 10661.118Slukem 10671.118Slukem=-=-=-=-= bsd.kernobj.mk =-=-=-=-= 10681.118Slukem 10691.118SlukemThe include file <bsd.kernobj.mk> defines variables related to the 10701.118Slukemlocation of kernel sources and object directories. 10711.118Slukem 10721.118SlukemKERNSRCDIR Is the location of the top of the kernel src. 10731.124Slukem [${_SRC_TOP_}/sys] 10741.118Slukem 10751.124SlukemKERNARCHDIR Is the location of the machine dependent kernel sources. 10761.124Slukem [arch/${MACHINE}] 10771.120Slukem 10781.124SlukemKERNCONFDIR Is where the configuration files for kernels are found. 10791.124Slukem [${KERNSRCDIR}/${KERNARCHDIR}/conf] 10801.118Slukem 10811.118SlukemKERNOBJDIR Is the kernel build directory. The kernel GENERIC for 10821.118Slukem instance will be compiled in ${KERNOBJDIR}/GENERIC. 10831.118Slukem The default value is 10841.118Slukem ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile 10851.118Slukem if it exists or the target 'obj' is being made. 10861.118Slukem Otherwise the default is 10871.118Slukem ${KERNSRCDIR}/${KERNARCHDIR}/compile. 10881.118Slukem 10891.118SlukemIt is important that Makefiles (such as those under src/distrib) that 10901.134Slukemwish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR} 10911.118Slukemrather than make assumptions about the location of the compiled kernel. 10921.118Slukem 10931.118Slukem 10941.118Slukem=-=-=-=-= bsd.kinc.mk =-=-=-=-= 10951.118Slukem 10961.118SlukemThe include file <bsd.kinc.mk> defines the many targets (includes, 10971.118Slukemsubdirectories, etc.), and is used by kernel makefiles to handle 10981.118Slukeminclude file installation. It is intended to be included alone, by 10991.134Slukemkernel Makefiles. It uses similar variables to <bsd.inc.mk>. 11001.134SlukemPlease see <bsd.kinc.mk> for more details, and keep the documentation 11011.134Slukemin that file up to date. 11021.118Slukem 11031.118Slukem 11041.118Slukem=-=-=-=-= bsd.lib.mk =-=-=-=-= 11051.118Slukem 11061.118SlukemThe include file <bsd.lib.mk> has support for building libraries. It has 11071.118Slukemthe same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend, 11081.118Slukemincludes, install, lint, and tags. Additionally, it has a checkver target 11091.118Slukemwhich checks for installed shared object libraries whose version is greater 11101.118Slukemthat the version of the source. It has a limited number of suffixes, 11111.134Slukemconsistent with the current needs of the BSD tree. <bsd.lib.mk> includes 11121.118Slukem<bsd.shlib.mk> to get shared library parameters. 11131.118Slukem 11141.118SlukemIt sets/uses the following variables: 11151.118Slukem 11161.118SlukemLIB The name of the library to build. 11171.118Slukem 11181.118SlukemLIBDIR Target directory for libraries. 11191.118Slukem 11201.248SperryMKARZERO Normally, ar(1) sets the timestamps, uid, gid and 11211.248Sperry permissions in files inside its archives to those of 11221.248Sperry the file it was fed. This leads to non-reproduceable 11231.248Sperry builds. If MKARZERO is set to "yes" (default is "no") 11241.248Sperry then the "D" flag is passed to ar, causing the 11251.248Sperry timestamp, uid and gid to be zeroed and the file 11261.248Sperry permissions to be set to 644. This allows .a files 11271.248Sperry from different builds to be bit identical. 11281.248Sperry 11291.300SjoergSHLIBINSTALLDIR Target directory for shared libraries if ${USE_SHLIBDIR} 11301.300Sjoerg is not "no". 11311.300Sjoerg 11321.263SabsSHLIB_MAJOR 11331.263SabsSHLIB_MINOR 11341.263SabsSHLIB_TEENY Major, minor, and teeny version numbers of shared library 11351.263Sabs 11361.300SjoergUSE_SHLIBDIR If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR} 11371.118Slukem as the path to install shared libraries to. 11381.118Slukem USE_SHLIBDIR must be defined before <bsd.own.mk> is included. 11391.130Slukem Default: no 11401.118Slukem 11411.218SlukemLIBISMODULE If not "no", install as ${LIB}.so (without the "lib" prefix), 11421.218Slukem and act as "MKDEBUGLIB=no MKLINT=no MKPICINSTALL=no 11431.218Slukem MKPROFILE=no MKSTATICLIB=no". 11441.218Slukem Default: no 11451.218Slukem 11461.211SlukemLIBISPRIVATE If not "no", act as "MKDEBUGLIB=no MKLINT=no MKPIC=no 11471.211Slukem MKPROFILE=no", and don't install the (.a) library. 11481.154Slukem This is useful for "build only" helper libraries. 11491.154Slukem Default: no 11501.154Slukem 11511.244SmrgLIBISCXX If not "no", Use ${CXX} instead of ${CC} to link 11521.244Smrg shared libraries. 11531.244Smrg This is useful for C++ libraries. 11541.244Smrg Default: no 11551.244Smrg 11561.118SlukemLINTLIBDIR Target directory for lint libraries. 11571.118Slukem 11581.118SlukemLIBGRP Library group. 11591.118Slukem 11601.118SlukemLIBOWN Library owner. 11611.118Slukem 11621.118SlukemLIBMODE Library mode. 11631.118Slukem 11641.118SlukemLDADD Additional loader objects. 11651.118Slukem 11661.118SlukemMAN The manual pages to be installed (use a .1 - .9 suffix). 11671.118Slukem 11681.118SlukemNOCHECKVER_<library> 11691.118SlukemNOCHECKVER If set, disables checking for installed shared object 11701.118Slukem libraries with versions greater than the source. A 11711.118Slukem particular library name, without the "lib" prefix, may 11721.118Slukem be appended to the variable name to disable the check for 11731.118Slukem only that library. 11741.118Slukem 11751.118SlukemSRCS List of source files to build the library. Suffix types 11761.118Slukem .s, .c, and .f are supported. Note, .s files are preferred 11771.118Slukem to .c files of the same name. (This is not the default for 11781.118Slukem versions of make.) 11791.118Slukem 11801.157SlukemLIBDPLIBS A list of the tuples: 11811.157Slukem libname path-to-srcdir-of-libname 11821.157Slukem 11831.157Slukem For each tuple; 11841.157Slukem * LIBDO.libname contains the .OBJDIR of the library 11851.157Slukem `libname', and if it is not set it is determined 11861.157Slukem from the srcdir and added to MAKEOVERRIDES (the 11871.157Slukem latter is to allow for build time optimization). 11881.157Slukem * LDADD gets -L${LIBDO.libname} -llibname added. 11891.157Slukem * DPADD gets ${LIBDO.libname}/liblibname.so or 11901.157Slukem ${LIBDO.libname}/liblibname.a added. 11911.157Slukem 11921.307Spooka The special value "_external" for LIBDO.lib makes the 11931.307Spooka build system to assume the library comes from outside 11941.307Spooka of the NetBSD source tree and only causes -llibname 11951.307Spooka to be added to LDADD. 11961.307Spooka 11971.157Slukem This variable may be used for individual libraries, as 11981.301Sabs well as in parent directories to cache common libraries 11991.157Slukem as a build-time optimization. 12001.157Slukem 12011.118SlukemThe include file <bsd.lib.mk> includes the file named "../Makefile.inc" 12021.118Slukemif it exists, as well as the include file <bsd.man.mk>. 12031.118Slukem 12041.118SlukemIt has rules for building profiled objects; profiled libraries are 12051.118Slukembuilt by default. 12061.118Slukem 12071.118SlukemLibraries are ranlib'd when made. 12081.118Slukem 12091.118Slukem 12101.118Slukem=-=-=-=-= bsd.links.mk =-=-=-=-= 12111.118Slukem 12121.118SlukemThe include file <bsd.links.mk> handles the LINKS and SYMLINKS variables 12131.134Slukemand is included from from <bsd.lib.mk> and <bsd.prog.mk>. 12141.134Slukem 12151.249SapbLINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log 12161.249Sapbis used. The defaults may be modified by other bsd.*.mk files which 12171.249Sapbinclude bsd.links.mk. In the future, these variables may be replaced 12181.249Sapbby a method for explicitly recording hard links in a metadata log. 12191.249Sapb 12201.134SlukemLINKS The list of hard links, consisting of pairs of paths: 12211.134Slukem source-file target-file 12221.134Slukem ${DESTDIR} is prepended to both paths before linking. 12231.134Slukem For example, to link /bin/test and /bin/[, use: 12241.134Slukem LINKS=/bin/test /bin/[ 12251.134Slukem 12261.153SlukemCONFIGLINKS Similar semantics to LINKS, except that the links 12271.153Slukem are installed by the `configinstall' target, 12281.153Slukem not the `install' target. 12291.153Slukem 12301.134SlukemSYMLINKS The list of symbolic links, consisting of pairs of paths: 12311.134Slukem source-file target-file 12321.134Slukem ${DESTDIR} is only prepended to target-file before linking. 12331.134Slukem For example, to symlink /usr/bin/tar to /bin/tar resulting 12341.134Slukem in ${DESTDIR}/usr/bin/tar -> /bin/tar: 12351.134Slukem SYMLINKS=/bin/tar /usr/bin/tar 12361.118Slukem 12371.153SlukemCONFIGSYMLINKS Similar semantics to SYMLINKS, except that the symbolic links 12381.153Slukem are installed by the `configinstall' target, 12391.153Slukem not the `install' target. 12401.153Slukem 12411.249SapbLINKSOWN Link owner. [${BINOWN}] 12421.249Sapb 12431.249SapbLINKSGRP Link group. [${BINGRP}] 12441.249Sapb 12451.249SapbLINKSMODE Link mode. [${NONBINMODE}] 12461.249Sapb 12471.249SapbLINKSOWN_<fn> Link owner of the specific file <fn>. 12481.249Sapb 12491.249SapbLINKSGRP_<fn> Link group of the specific file <fn>. 12501.249Sapb 12511.249SapbLINKSMODE_<fn> Link mode of the specific file <fn>. 12521.249Sapb 12531.118Slukem 12541.118Slukem=-=-=-=-= bsd.man.mk =-=-=-=-= 12551.118Slukem 12561.118SlukemThe include file <bsd.man.mk> handles installing manual pages and their 12571.118Slukemlinks. 12581.118Slukem 12591.222SlukemIt has a three targets: 12601.118Slukem 12611.222Slukem catinstall: 12621.222Slukem Install the preformatted manual pages and their links. 12631.222Slukem htmlinstall: 12641.222Slukem Install the HTML manual pages and their links. 12651.118Slukem maninstall: 12661.118Slukem Install the manual page sources and their links. 12671.118Slukem 12681.118SlukemIt sets/uses the following variables: 12691.118Slukem 12701.118SlukemMANDIR Base path for manual installation. 12711.118Slukem 12721.118SlukemMANGRP Manual group. 12731.118Slukem 12741.118SlukemMANOWN Manual owner. 12751.118Slukem 12761.118SlukemMANMODE Manual mode. 12771.118Slukem 12781.118SlukemMANSUBDIR Subdirectory under the manual page section, i.e. "/vax" 12791.118Slukem or "/tahoe" for machine specific manual pages. 12801.118Slukem 12811.118SlukemMAN The manual pages to be installed (use a .1 - .9 suffix). 12821.118Slukem 12831.118SlukemMLINKS List of manual page links (using a .1 - .9 suffix). The 12841.118Slukem linked-to file must come first, the linked file second, 12851.276Sreed and there may be multiple pairs. 12861.118Slukem 12871.118SlukemThe include file <bsd.man.mk> includes a file named "../Makefile.inc" if 12881.118Slukemit exists. 12891.118Slukem 12901.118Slukem 12911.118Slukem=-=-=-=-= bsd.obj.mk =-=-=-=-= 12921.118Slukem 12931.118SlukemThe include file <bsd.obj.mk> defines targets related to the creation 12941.118Slukemand use of separated object and source directories. 12951.118Slukem 12961.118SlukemIf an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses 12971.118Slukem${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if 12981.118Slukemit exists. Otherwise make(1) looks for the existence of a 12991.118Slukemsubdirectory (or a symlink to a directory) of the source directory 13001.118Slukeminto which built targets should be placed. If an environment variable 13011.118Slukemnamed MAKEOBJDIR is set, make(1) uses its value as the name of the 13021.118Slukemobject directory; failing that, make first looks for a subdirectory 13031.118Slukemnamed "obj.${MACHINE}", and if that doesn't exist, it looks for "obj". 13041.118Slukem 13051.118SlukemObject directories are not created automatically by make(1) if they 13061.118Slukemdon't exist; you need to run a separate "make obj". (This will happen 13071.118Slukemduring a top-level build if "MKOBJDIRS" is set to a value other than 13081.118Slukem"no"). When the source directory is a subdirectory of ${BSDSRCDIR} -- 13091.118Slukemand this is determined by a simple string prefix comparison -- object 13101.118Slukemdirectories are created in a separate object directory tree, and a 13111.118Slukemsymlink to the object directory in that tree is created in the source 13121.118Slukemdirectory; otherwise, "make obj" assumes that you're not in the main 13131.118Slukemsource tree and that it's not safe to use a separate object tree. 13141.118Slukem 13151.118SlukemSeveral variables used by <bsd.obj.mk> control exactly what 13161.118Slukemdirectories and links get created during a "make obj": 13171.118Slukem 13181.118SlukemMAKEOBJDIR If set, this is the component name of the object 13191.118Slukem directory. 13201.118Slukem 13211.118SlukemOBJMACHINE If this is set but MAKEOBJDIR is not set, creates 13221.118Slukem object directories or links named "obj.${MACHINE}"; 13231.118Slukem otherwise, just creates ones named "obj". 13241.118Slukem 13251.118SlukemUSR_OBJMACHINE If set, and the current directory is a subdirectory of 13261.118Slukem ${BSDSRCDIR}, create object directory in the 13271.118Slukem corresponding subdirectory of ${BSDOBJDIR}.${MACHINE}; 13281.118Slukem otherwise, create it in the corresponding subdirectory 13291.118Slukem of ${BSDOBJDIR} 13301.113Sthorpej 13311.118SlukemBUILDID If set, the contents of this variable are appended 13321.118Slukem to the object directory name. If OBJMACHINE is also 13331.118Slukem set, ".${BUILDID}" is added after ".${MACHINE}". 13341.113Sthorpej 13351.106Sthorpej 13361.118Slukem=-=-=-=-= bsd.prog.mk =-=-=-=-= 13371.106Sthorpej 13381.1ScgdThe include file <bsd.prog.mk> handles building programs from one or 13391.1Scgdmore source files, along with their manual pages. It has a limited number 13401.301Sabsof suffixes, consistent with the current needs of the BSD tree. 13411.134Slukem<bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters. 13421.1Scgd 13431.16SjtcIt has eight targets: 13441.1Scgd 13451.1Scgd all: 13461.102Sthorpej build the program and its manual page. This also 13471.102Sthorpej creates a GDB initialization file (.gdbinit) in 13481.102Sthorpej the objdir. The .gdbinit file sets the shared library 13491.102Sthorpej prefix to ${DESTDIR} to facilitate cross-debugging. 13501.1Scgd clean: 13511.1Scgd remove the program, any object files and the files a.out, 13521.24Smikel Errs, errs, mklog, and ${PROG}.core. 13531.1Scgd cleandir: 13541.1Scgd remove all of the files removed by the target clean, as 13551.1Scgd well as .depend, tags, and any manual pages. 13561.42Slukem `distclean' is a synonym for `cleandir'. 13571.1Scgd depend: 13581.1Scgd make the dependencies for the source files, and store 13591.1Scgd them in the file .depend. 13601.16Sjtc includes: 13611.16Sjtc install any header files. 13621.1Scgd install: 13631.1Scgd install the program and its manual pages; if the Makefile 13641.1Scgd does not itself define the target install, the targets 13651.1Scgd beforeinstall and afterinstall may also be used to cause 13661.1Scgd actions immediately before and after the install target 13671.1Scgd is executed. 13681.1Scgd lint: 13691.1Scgd run lint on the source files 13701.1Scgd tags: 13711.1Scgd create a tags file for the source files. 13721.1Scgd 13731.1ScgdIt sets/uses the following variables: 13741.1Scgd 13751.1ScgdBINGRP Binary group. 13761.1Scgd 13771.1ScgdBINOWN Binary owner. 13781.1Scgd 13791.1ScgdBINMODE Binary mode. 13801.1Scgd 13811.286SapbCLEANDIRFILES Additional files to remove for the cleandir target. 13821.286Sapb 13831.1ScgdCLEANFILES Additional files to remove for the clean and cleandir targets. 13841.1Scgd 13851.1ScgdCOPTS Additional flags to the compiler when creating C objects. 13861.112Sthorpej 13871.125SlukemCOPTS.<fn> Additional flags to the compiler when creating the 13881.125Slukem C objects for <fn>. 13891.125Slukem For <fn>.[ly], "<fn>.c" must be used. 13901.125Slukem 13911.112SthorpejCPUFLAGS Additional flags to the compiler/assembler to select 13921.112Sthorpej CPU instruction set options, CPU tuning options, etc. 13931.35Slukem 13941.125SlukemCPUFLAGS.<fn> Additional flags to the compiler/assembler for <fn>. 13951.125Slukem For <fn>.[ly], "<fn>.c" must be used. 13961.125Slukem 13971.124SlukemCPPFLAGS Additional flags to the C pre-processor. 13981.125Slukem 13991.125SlukemCPPFLAGS.<fn> Additional flags to the C pre-processor for <fn>. 14001.125Slukem For <fn>.[ly], "<fn>.c" must be used. 14011.102Sthorpej 14021.102SthorpejGDBINIT List of GDB initialization files to add to "source" 14031.102Sthorpej directives in the .gdbinit file that is created in the 14041.102Sthorpej objdir. 14051.1Scgd 14061.1ScgdLDADD Additional loader objects. Usually used for libraries. 14071.1Scgd For example, to load with the compatibility and utility 14081.1Scgd libraries, use: 14091.1Scgd 14101.5Sjtc LDADD+=-lutil -lcompat 14111.1Scgd 14121.178SlukemLDFLAGS Additional linker flags (passed to ${CC} during link). 14131.1Scgd 14141.134SlukemLINKS See <bsd.links.mk> 14151.134Slukem 14161.177SmrgOBJCOPTS Additional flags to the compiler when creating ObjC objects. 14171.177Smrg 14181.177SmrgOBJCOPTS.<fn> Additional flags to the compiler when creating the 14191.177Smrg ObjC objects for <fn>. 14201.177Smrg For <fn>.[ly], "<fn>.c" must be used. 14211.177Smrg 14221.134SlukemSYMLINKS See <bsd.links.mk> 14231.1Scgd 14241.15ScgdMAN Manual pages (should end in .1 - .9). If no MAN variable is 14251.8Scgd defined, "MAN=${PROG}.1" is assumed. 14261.1Scgd 14271.214SwizPAXCTL_FLAGS If defined, run paxctl(1) on the program binary after link 14281.212Slukem time, with the value of this variable as args to paxctl(1). 14291.193Sperry 14301.193SperryPAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS. 14311.193Sperry 14321.1ScgdPROG The name of the program to build. If not supplied, nothing 14331.1Scgd is built. 14341.1Scgd 14351.88SthorpejPROG_CXX If defined, the name of the program to build. Also 14361.88Sthorpej causes <bsd.prog.mk> to link the program with the C++ 14371.88Sthorpej compiler rather than the C compiler. PROG_CXX overrides 14381.88Sthorpej the value of PROG if PROG is also set. 14391.87Sthorpej 14401.21SchristosPROGNAME The name that the above program will be installed as, if 14411.21Schristos different from ${PROG}. 14421.21Schristos 14431.37StvSRCS List of source files to build the program. If SRCS is not 14441.1Scgd defined, it's assumed to be ${PROG}.c. 14451.108Sjwise 14461.108SjwiseDPSRCS List of source files which are needed for generating 14471.108Sjwise dependencies, but are not needed in ${SRCS}. 14481.1Scgd 14491.1ScgdDPADD Additional dependencies for the program. Usually used for 14501.1Scgd libraries. For example, to depend on the compatibility and 14511.1Scgd utility libraries use: 14521.1Scgd 14531.5Sjtc DPADD+=${LIBCOMPAT} ${LIBUTIL} 14541.1Scgd 14551.288Schristos The following system libraries are predefined for DPADD: 14561.1Scgd 14571.196Sjoerg LIBARCHIVE?= ${DESTDIR}/usr/lib/libarchive.a 14581.159Slukem LIBASN1?= ${DESTDIR}/usr/lib/libasn1.a 14591.279Sjmmv LIBATF_C?= ${DESTDIR}/usr/lib/libatf-c.a 14601.279Sjmmv LIBATF_CXX?= ${DESTDIR}/usr/lib/libatf-c++.a 14611.288Schristos LIBBIND9?= ${DESTDIR}/usr/lib/libbind9.a 14621.180Sgdamore LIBBLUETOOTH?= ${DESTDIR}/usr/lib/libbluetooth.a 14631.159Slukem LIBBSDMALLOC?= ${DESTDIR}/usr/lib/libbsdmalloc.a 14641.99Sitojun LIBBZ2?= ${DESTDIR}/usr/lib/libbz2.a 14651.21Schristos LIBC?= ${DESTDIR}/usr/lib/libc.a 14661.288Schristos LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a 14671.99Sitojun LIBCOM_ERR?= ${DESTDIR}/usr/lib/libcom_err.a 14681.288Schristos LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o 14691.21Schristos LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a 14701.99Sitojun LIBCRYPTO?= ${DESTDIR}/usr/lib/libcrypto.a 14711.99Sitojun LIBCRYPTO_IDEA?=${DESTDIR}/usr/lib/libcrypto_idea.a 14721.105Sitojun LIBCRYPTO_MDC2?=${DESTDIR}/usr/lib/libcrypto_mdc2.a 14731.99Sitojun LIBCRYPTO_RC5?= ${DESTDIR}/usr/lib/libcrypto_rc5.a 14741.21Schristos LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a 14751.288Schristos LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a 14761.21Schristos LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a 14771.21Schristos LIBDES?= ${DESTDIR}/usr/lib/libdes.a 14781.288Schristos LIBDNS?= ${DESTDIR}/usr/lib/libdns.a 14791.21Schristos LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a 14801.114Sprovos LIBEVENT?= ${DESTDIR}/usr/lib/libevent.a 14811.294Stron LIBEXPAT?= ${DESTDIR}/usr/lib/libexpat.a 14821.227Sjoerg LIBFETCH?= ${DESTDIR}/usr/lib/libfetch.a 14831.73Sblymn LIBFORM?= ${DESTDIR}/usr/lib/libform.a 14841.288Schristos LIBFL?= ${DESTDIR}/usr/lib/libfl.a 14851.288Schristos LIBG2C?= ${DESTDIR}/usr/lib/libg2c.a 14861.21Schristos LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a 14871.21Schristos LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a 14881.99Sitojun LIBGSSAPI?= ${DESTDIR}/usr/lib/libgssapi.a 14891.99Sitojun LIBHDB?= ${DESTDIR}/usr/lib/libhdb.a 14901.288Schristos LIBHEIMBASE?= ${DESTDIR}/usr/lib/libheimbase.a 14911.288Schristos LIBHEIMNTLM?= ${DESTDIR}/usr/lib/libheimntlm.a 14921.288Schristos LIBHX500?= ${DESTDIR}/usr/lib/libhx500.a 14931.70Sitojun LIBINTL?= ${DESTDIR}/usr/lib/libintl.a 14941.49Sitojun LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a 14951.288Schristos LIBISC?= ${DESTDIR}/usr/lib/libisc.a 14961.288Schristos LIBISCCC?= ${DESTDIR}/usr/lib/libisccc.a 14971.288Schristos LIBISCFG?= ${DESTDIR}/usr/lib/libiscfg.a 14981.99Sitojun LIBKADM5CLNT?= ${DESTDIR}/usr/lib/libkadm5clnt.a 14991.99Sitojun LIBKADM5SRV?= ${DESTDIR}/usr/lib/libkadm5srv.a 15001.99Sitojun LIBKAFS?= ${DESTDIR}/usr/lib/libkafs.a 15011.99Sitojun LIBKRB5?= ${DESTDIR}/usr/lib/libkrb5.a 15021.21Schristos LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a 15031.21Schristos LIBL?= ${DESTDIR}/usr/lib/libl.a 15041.208Slukem LIBLBER?= ${DESTDIR}/usr/lib/liblber.a 15051.208Slukem LIBLDAP?= ${DESTDIR}/usr/lib/libldap.a 15061.209Slukem LIBLDAP_R?= ${DESTDIR}/usr/lib/libldap_r.a 15071.277Smbalmer LIBLUA?= ${DESTDIR}/usr/lib/liblua.a 15081.313Sjmmv LIBLUTOK?= ${DESTDIR}/usr/lib/liblutok.a 15091.288Schristos LIBLWRES?= ${DESTDIR}/usr/lib/liblwres.a 15101.21Schristos LIBM?= ${DESTDIR}/usr/lib/libm.a 15111.288Schristos LIBMAGIC?= ${DESTDIR}/usr/lib/libmagic.a 15121.53Sblymn LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a 15131.99Sitojun LIBOBJC?= ${DESTDIR}/usr/lib/libobjc.a 15141.99Sitojun LIBOSSAUDIO?= ${DESTDIR}/usr/lib/libossaudio.a 15151.159Slukem LIBPAM?= ${DESTDIR}/usr/lib/libpam.a 15161.21Schristos LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a 15171.99Sitojun LIBPCI?= ${DESTDIR}/usr/lib/libpci.a 15181.100Sthorpej LIBPMC?= ${DESTDIR}/usr/lib/libpmc.a 15191.26Skleink LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a 15201.110Sthorpej LIBPTHREAD?= ${DESTDIR}/usr/lib/libpthread.a 15211.110Sthorpej LIBPTHREAD_DBG?=${DESTDIR}/usr/lib/libpthread_dbg.a 15221.288Schristos LIBPUFFS?= ${DESTDIR}/usr/lib/libpuffs.a 15231.288Schristos LIBQUOTA?= ${DESTDIR}/usr/lib/libquota.a 15241.163Schristos LIBRADIUS?= ${DESTDIR}/usr/lib/libradius.a 15251.21Schristos LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a 15261.99Sitojun LIBRMT?= ${DESTDIR}/usr/lib/librmt.a 15271.99Sitojun LIBROKEN?= ${DESTDIR}/usr/lib/libroken.a 15281.21Schristos LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a 15291.110Sthorpej LIBRT?= ${DESTDIR}/usr/lib/librt.a 15301.288Schristos LIBRUMP?= ${DESTDIR}/usr/lib/librump.a 15311.289Schristos LIBRUMPFS_CD9660FS?=${DESTDIR}/usr/lib/librumpfs_cd9660fs.a 15321.289Schristos LIBRUMPFS_EFS?= ${DESTDIR}/usr/lib/librumpfs_efs.a 15331.289Schristos LIBRUMPFS_EXT2FS?=${DESTDIR}/usr/lib/librumpfs_ext2fs.a 15341.289Schristos LIBRUMPFS_FFS?= ${DESTDIR}/usr/lib/librumpfs_ffs.a 15351.289Schristos LIBRUMPFS_HFS?= ${DESTDIR}/usr/lib/librumpfs_hfs.a 15361.289Schristos LIBRUMPFS_LFS?= ${DESTDIR}/usr/lib/librumpfs_lfs.a 15371.289Schristos LIBRUMPFS_MSDOSFS?=${DESTDIR}/usr/lib/librumpfs_msdosfs.a 15381.289Schristos LIBRUMPFS_NFS?= ${DESTDIR}/usr/lib/librumpfs_nfs.a 15391.289Schristos LIBRUMPFS_NTFS?=${DESTDIR}/usr/lib/librumpfs_ntfs.a 15401.289Schristos LIBRUMPFS_SYSPUFFS?=${DESTDIR}/usr/lib/librumpfs_syspuffs.a 15411.289Schristos LIBRUMPFS_TMPFS?=${DESTDIR}/usr/lib/librumpfs_tmpfs.a 15421.289Schristos LIBRUMPFS_UDF?= ${DESTDIR}/usr/lib/librumpfs_udf.a 15431.289Schristos LIBRUMPFS_UFS?= ${DESTDIR}/usr/lib/librumpfs_ufs.a 15441.288Schristos LIBRUMPUSER?= ${DESTDIR}/usr/lib/librumpuser.a 15451.288Schristos LIBSASLC?= ${DESTDIR}/usr/lib/libsaslc.a 15461.21Schristos LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a 15471.140Slukem LIBSL?= ${DESTDIR}/usr/lib/libsl.a 15481.288Schristos LIBSQLITE3?= ${DESTDIR}/usr/lib/libsqlite3.a 15491.99Sitojun LIBSS?= ${DESTDIR}/usr/lib/libss.a 15501.159Slukem LIBSSH?= ${DESTDIR}/usr/lib/libssh.a 15511.99Sitojun LIBSSL?= ${DESTDIR}/usr/lib/libssl.a 15521.187Schristos LIBSSP?= ${DESTDIR}/usr/lib/libssp.a 15531.140Slukem LIBSTDCXX?= ${DESTDIR}/usr/lib/libstdc++.a 15541.186Smrg LIBSUPCXX?= ${DESTDIR}/usr/lib/libsupc++.a 15551.264Sroy LIBTERMINFO?= ${DESTDIR}/usr/lib/libterminfo.a 15561.290Schristos LIBTRE?= ${DESTDIR}/usr/lib/libtre.a 15571.99Sitojun LIBUSBHID?= ${DESTDIR}/usr/lib/libusbhid.a 15581.21Schristos LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a 15591.288Schristos LIBWIND?= ${DESTDIR}/usr/lib/libwind.a 15601.21Schristos LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a 15611.21Schristos LIBY?= ${DESTDIR}/usr/lib/liby.a 15621.21Schristos LIBZ?= ${DESTDIR}/usr/lib/libz.a 15631.1Scgd 15641.288Schristos The following X-Windows libraries are predefined for DPADD: 15651.288Schristos 15661.288Schristos LIBFS?= ${DESTDIR}/usr/X11R7/lib/libFS.a 15671.288Schristos LIBGL?= ${DESTDIR}/usr/X11R7/lib/libGL.a 15681.288Schristos LIBGLU?= ${DESTDIR}/usr/X11R7/lib/libGLU.a 15691.288Schristos LIBICE?= ${DESTDIR}/usr/X11R7/lib/libICE.a 15701.288Schristos LIBSM?= ${DESTDIR}/usr/X11R7/lib/libSM.a 15711.288Schristos LIBX11?= ${DESTDIR}/usr/X11R7/lib/libX11.a 15721.288Schristos LIBXTRAP?= ${DESTDIR}/usr/X11R7/lib/libXTrap.a 15731.288Schristos LIBXAU?= ${DESTDIR}/usr/X11R7/lib/libXau.a 15741.288Schristos LIBXAW?= ${DESTDIR}/usr/X11R7/lib/libXaw.a 15751.288Schristos LIBXDMCP?= ${DESTDIR}/usr/X11R7/lib/libXdmcp.a 15761.288Schristos LIBXEXT?= ${DESTDIR}/usr/X11R7/lib/libXext.a 15771.288Schristos LIBXFONT?= ${DESTDIR}/usr/X11R7/lib/libXfont.a 15781.288Schristos LIBXFT?= ${DESTDIR}/usr/X11R7/lib/libXft.a 15791.288Schristos LIBXI?= ${DESTDIR}/usr/X11R7/lib/libXi.a 15801.288Schristos LIBXINERAMA?= ${DESTDIR}/usr/X11R7/lib/libXinerama.a 15811.288Schristos LIBXMU?= ${DESTDIR}/usr/X11R7/lib/libXmu.a 15821.288Schristos LIBXMUU?= ${DESTDIR}/usr/X11R7/lib/libXmuu.a 15831.288Schristos LIBXPM?= ${DESTDIR}/usr/X11R7/lib/libXpm.a 15841.288Schristos LIBXRANDR?= ${DESTDIR}/usr/X11R7/lib/libXrandr.a 15851.288Schristos LIBXRENDER?= ${DESTDIR}/usr/X11R7/lib/libXrender.a 15861.288Schristos LIBXSS?= ${DESTDIR}/usr/X11R7/lib/libXss.a 15871.288Schristos LIBXT?= ${DESTDIR}/usr/X11R7/lib/libXt.a 15881.288Schristos LIBXTST?= ${DESTDIR}/usr/X11R7/lib/libXtst.a 15891.288Schristos LIBXV?= ${DESTDIR}/usr/X11R7/lib/libXv.a 15901.288Schristos LIBXXF86DGA?= ${DESTDIR}/usr/X11R7/lib/libXxf86dga.a 15911.288Schristos LIBXXF86MISC?= ${DESTDIR}/usr/X11R7/lib/libXxf86misc.a 15921.288Schristos LIBXXF86VM?= ${DESTDIR}/usr/X11R7/lib/libXxf86vm.a 15931.288Schristos LIBDPS?= ${DESTDIR}/usr/X11R7/lib/libdps.a 15941.288Schristos LIBFNTSTUBS?= ${DESTDIR}/usr/X11R7/lib/libfntstubs.a 15951.288Schristos LIBFONTCACHE?= ${DESTDIR}/usr/X11R7/lib/libfontcache.a 15961.288Schristos LIBFONTCONFIG?= ${DESTDIR}/usr/X11R7/lib/libfontconfig.a 15971.288Schristos LIBFONTENC?= ${DESTDIR}/usr/X11R7/lib/libfontenc.a 15981.288Schristos LIBFREETYPE?= ${DESTDIR}/usr/X11R7/lib/libfreetype.a 15991.288Schristos LIBLBXUTIL?= ${DESTDIR}/usr/X11R7/lib/liblbxutil.a 16001.288Schristos LIBXKBFILE?= ${DESTDIR}/usr/X11R7/lib/libxkbfile.a 16011.288Schristos 16021.1ScgdSHAREDSTRINGS If defined, a new .c.o rule is used that results in shared 16031.12Schristos strings, using xstr(1). Note that this will not work with 16041.12Schristos parallel makes. 16051.1Scgd 16061.59SjlamSTRIPFLAG The flag passed to the install program to cause the binary 16071.1Scgd to be stripped. 16081.1Scgd 16091.1ScgdSUBDIR A list of subdirectories that should be built as well. 16101.1Scgd Each of the targets will execute the same target in the 16111.1Scgd subdirectories. 16121.1Scgd 16131.21SchristosSCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}]. 16141.21Schristos These are installed exactly like programs. 16151.21Schristos 16161.166SrtrSCRIPTSDIR The location to install the scripts. Each script can be 16171.166Srtr installed to a separate path by setting SCRIPTSDIR_<script>. 16181.166Srtr 16191.21SchristosSCRIPTSNAME The name that the above program will be installed as, if 16201.21Schristos different from ${SCRIPTS}. These can be further specialized 16211.21Schristos by setting SCRIPTSNAME_<script>. 16221.21Schristos 16231.124SlukemFILES See description of <bsd.files.mk>. 16241.21Schristos 16251.106SthorpejSHLINKDIR Target directory for shared linker. See description of 16261.106Sthorpej <bsd.own.mk> for additional information about this variable. 16271.130Slukem 16281.1ScgdThe include file <bsd.prog.mk> includes the file named "../Makefile.inc" 16291.1Scgdif it exists, as well as the include file <bsd.man.mk>. 16301.1Scgd 16311.1ScgdSome simple examples: 16321.1Scgd 16331.1ScgdTo build foo from foo.c with a manual page foo.1, use: 16341.1Scgd 16351.1Scgd PROG= foo 16361.1Scgd 16371.1Scgd .include <bsd.prog.mk> 16381.1Scgd 16391.1ScgdTo build foo from foo.c with a manual page foo.2, add the line: 16401.1Scgd 16411.9Scgd MAN= foo.2 16421.1Scgd 16431.1ScgdIf foo does not have a manual page at all, add the line: 16441.1Scgd 16451.75Sagc MKMAN= no 16461.1Scgd 16471.1ScgdIf foo has multiple source files, add the line: 16481.1Scgd 16491.1Scgd SRCS= a.c b.c c.c d.c 16501.1Scgd 16511.1Scgd 16521.118Slukem=-=-=-=-= bsd.rpc.mk =-=-=-=-= 16531.118Slukem 16541.118SlukemThe include file <bsd.rpc.mk> contains a makefile fragment used to 16551.118Slukemconstruct source files built by rpcgen. 16561.72Ssommerfe 16571.118SlukemThe following macros may be defined in makefiles which include 16581.118Slukem<bsd.rpc.mk> in order to control which files get built and how they 16591.118Slukemare to be built: 16601.21Schristos 16611.118SlukemRPC_INCS: construct .h file from .x file 16621.120SlukemRPC_XDRFILES: construct _xdr.c from .x file 16631.118Slukem (for marshalling/unmarshalling data types) 16641.118SlukemRPC_SVCFILES: construct _svc.c from .x file 16651.118Slukem (server-side stubs) 16661.118SlukemRPC_SVCFLAGS: Additional flags passed to builds of RPC_SVCFILES. 16671.21Schristos 16681.118SlukemRPC_XDIR: Directory containing .x/.h files 16691.23Schristos 16701.23Schristos 16711.118Slukem=-=-=-=-= bsd.shlib.mk =-=-=-=-= 16721.21Schristos 16731.118SlukemThe include file <bsd.shlib.mk> computes parameters for shared library 16741.118Slukeminstallation and use. It defines no targets. <bsd.own.mk> MUST be 16751.134Slukemincluded before <bsd.shlib.mk>. 16761.21Schristos 16771.134Slukem<bsd.own.mk> sets the following variables, if they are not already defined 16781.118Slukem(defaults are in brackets): 16791.21Schristos 16801.300SjoergSHLIBINSTALLDIR If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR} 16811.300Sjoerg instead of ${LIBDIR} as the base path for shared library 16821.300Sjoerg installation. [/lib] 16831.300Sjoerg 16841.118SlukemSHLIBDIR The path to USE_SHLIBDIR shared libraries to use when building 16851.118Slukem a program. [/lib for programs in /bin and /sbin, /usr/lib 16861.118Slukem for all others.] 16871.81Swiz 16881.300Sjoerg_LIBSODIR Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no", 16891.118Slukem otherwise set to ${LIBDIR} 16901.81Swiz 16911.300SjoergSHLINKINSTALLDIR Base path for shared linker. [/libexec] 16921.300Sjoerg 16931.118SlukemSHLINKDIR Path to use for shared linker when building a program. 16941.118Slukem [/libexec for programs in /bin and /sbin, /usr/libexec for 16951.118Slukem all others.] 16961.39Scgd 16971.13Schristos 16981.118Slukem=-=-=-=-= bsd.subdir.mk =-=-=-=-= 16991.13Schristos 17001.118SlukemThe include file <bsd.subdir.mk> contains the default targets for building 17011.120Slukemsubdirectories. It has the same eight targets as <bsd.prog.mk>: all, 17021.233Sapbclean, cleandir, depend, includes, install, lint, and tags. It uses the 17031.233Sapbfollowing variables: 17041.233Sapb 17051.233SapbNOSUBDIR If this variable is defined, then the SUBDIR variable 17061.233Sapb will be ignored and subdirectories will not be processed. 17071.233Sapb 17081.233SapbSUBDIR For all of the directories listed in ${SUBDIR}, the 17091.233Sapb specified directory will be visited and the target made. 17101.233Sapb 17111.233Sapb As a special case, the use of a token .WAIT as an 17121.233Sapb entry in SUBDIR acts as a synchronization barrier 17131.233Sapb when multiple make jobs are run; subdirs before the 17141.233Sapb .WAIT must complete before any subdirs after .WAIT are 17151.233Sapb started. See make(1) for some caveats on use of .WAIT 17161.233Sapb and other special sources. 17171.47Stv 17181.47Stv 17191.118Slukem=-=-=-=-= bsd.sys.mk =-=-=-=-= 17201.47Stv 17211.13SchristosThe include file <bsd.sys.mk> is used by <bsd.prog.mk> and 17221.14Scgd<bsd.lib.mk>. It contains overrides that are used when building 17231.133Slukemthe NetBSD source tree. 17241.133Slukem 17251.133SlukemThe following variables control how various files are compiled/built. 17261.142Slukem(Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"): 17271.133Slukem 17281.133SlukemAR Create, modify, and extract from archives. [ar] 17291.133Slukem 17301.133SlukemARFLAGS Options to ${AR}. [rl] 17311.133Slukem 17321.151SlukemAS Assembler. [as] 17331.151Slukem 17341.211SlukemAFLAGS Options to ${CC} when compiling or linking .s or .S 17351.211Slukem assembly source files. [] 17361.151Slukem 17371.217SjoergBUILDSEED GCC uses random numbers when compiling C++ code. 17381.217Sjoerg If this option is present, seed the random number 17391.217Sjoerg generator based on the value, source file names and 17401.217Sjoerg the output file name to make builds more deterministic. 17411.217Sjoerg Additional information is available in the GCC 17421.217Sjoerg documentation of -frandom-seed. 17431.217Sjoerg 17441.133SlukemCC C compiler. [cc] 17451.133Slukem 17461.133SlukemCFLAGS Options to ${CC}. [Usually -O or -O2] 17471.133Slukem 17481.133SlukemCPP C Pre-Processor. [cpp] 17491.133Slukem 17501.133SlukemCPPFLAGS Options to ${CPP}. [] 17511.133Slukem 17521.151SlukemCPUFLAGS Optimization flags for ${CC}. [] 17531.133Slukem 17541.133SlukemCXX C++ compiler. [c++] 17551.133Slukem 17561.133SlukemCXXFLAGS Options to ${CXX}. [${CFLAGS}] 17571.133Slukem 17581.133SlukemELF2ECOFF Convert ELF-format executable to ECOFF. [elf2ecoff] 17591.133Slukem 17601.133SlukemFC Fortran compiler. [f77] 17611.133Slukem 17621.133SlukemFFLAGS Options to {$FC}. [-O] 17631.133Slukem 17641.235SapbHOST_SH Shell. This must be an absolute path, because it may be 17651.235Sapb substituted into "#!" lines in scripts. [/bin/sh] 17661.235Sapb 17671.133SlukemINSTALL install(1) command. [install] 17681.133Slukem 17691.133SlukemLEX Lexical analyzer. [lex] 17701.133Slukem 17711.133SlukemLFLAGS Options to ${LEX}. [] 17721.133Slukem 17731.145SjwiseLPREFIX Symbol prefix for ${LEX} (see -P option in lex(1)) [yy] 17741.145Sjwise 17751.133SlukemLD Linker. [ld] 17761.133Slukem 17771.178SlukemLDFLAGS Options to ${CC} during the link process. [] 17781.133Slukem 17791.133SlukemLINT C program verifier. [lint] 17801.133Slukem 17811.173SperryLINTFLAGS Options to ${LINT}. [-chapbxzFS] 17821.133Slukem 17831.133SlukemLORDER List dependencies for object files. [lorder] 17841.133Slukem 17851.133SlukemMAKE make(1). [make] 17861.133Slukem 17871.133SlukemMKDEP Construct Makefile dependency list. [mkdep] 17881.133Slukem 17891.133SlukemNM List symbols from object files. [nm] 17901.133Slukem 17911.133SlukemPC Pascal compiler. [pc] (Not present) 17921.133Slukem 17931.133SlukemPFLAGS Options to ${PC}. [] 17941.133Slukem 17951.133SlukemOBJC Objective C compiler. [${CC}] 17961.133Slukem 17971.133SlukemOBJCFLAGS Options to ${OBJC}. [${CFLAGS}] 17981.133Slukem 17991.133SlukemOBJCOPY Copy and translate object files. [objcopy] 18001.133Slukem 18011.291SchristosOBJCOPYLIBFLAGS Flags to pass to objcopy when library objects are 18021.291Schristos being built. [${.TARGET} =~ "*.po" ? -X : -x] 18031.291Schristos 18041.168SrizOBJDUMP Display information from object files. [objdump] 18051.168Sriz 18061.133SlukemRANLIB Generate index to archive. [ranlib] 18071.133Slukem 18081.133SlukemSIZE List section sizes and total size. [size] 18091.133Slukem 18101.133SlukemSTRIP Discard symbols from object files. [strip] 18111.133Slukem 18121.133SlukemTSORT Topological sort of a directed graph. [tsort -q] 18131.133Slukem 18141.133SlukemYACC LALR(1) parser generator. [yacc] 18151.133Slukem 18161.133SlukemYFLAGS Options to ${YACC}. [] 18171.133Slukem 18181.133SlukemYHEADER If defined, add "-d" to YFLAGS, and add dependencies 18191.133Slukem from <file>.y to <file>.h and <file>.c, and add 18201.133Slukem <foo>.h to CLEANFILES. 18211.133Slukem 18221.133SlukemYPREFIX If defined, add "-p ${YPREFIX}" to YFLAGS. 18231.133Slukem 18241.116Slukem 18251.69SsommerfeOther variables of note (incomplete list): 18261.69Ssommerfe 18271.213SlukemNOGCCERROR If defined, prevents passing certain ${CFLAGS} to GCC 18281.213Slukem that cause warnings to be fatal, such as: 18291.213Slukem -Werror -Wa,--fatal-warnings 18301.213Slukem (The latter being for as(1).) 18311.212Slukem 18321.283SjoergNOCLANGERROR If defined and clang is used as C compiler, -Werror is not 18331.283Sjoerg passed to it. 18341.283Sjoerg 18351.296SplunkyWARNS Crank up compiler warning options; the distinct levels are: 18361.82Slukem WARNS=1 18371.82Slukem WARNS=2 18381.82Slukem WARNS=3 18391.164Smatt WARNS=4 18401.296Splunky WARNS=5 18411.69Ssommerfe 18421.144Slukem=-=-=-=-= bsd.x11.mk =-=-=-=-= 18431.144Slukem 18441.144SlukemThe include file <bsd.x11.mk> contains parameters and targets for 18451.221Smrgcross-building X11 from ${X11SRCDIR.xc} / ${X11MITSRCDIR.*}. 18461.144SlukemIt should be included after the general Makefile contents but before 18471.144Slukemthe include files such as <bsd.prog.mk> and <bsd.lib.mk>. 18481.144Slukem 18491.144SlukemIt provides the following targets: 18501.144Slukem .man.1 .man.3 .man.4 .man.5 .man.7: 18511.144Slukem If ${MAN} or ${PROG} is set and ${MKMAN} != "no", 18521.221Smrg these rules convert from X11's manual page source 18531.144Slukem into an mdoc.old source file. 18541.144Slukem 18551.144SlukemIt sets the following variables: 18561.144Slukem 18571.144SlukemBINDIR Set to ${X11BINDIR}. 18581.144Slukem To override, define after including <bsd.x11.mk> 18591.144Slukem 18601.144SlukemLIBDIR Set to ${X11USRLIBDIR}. 18611.144Slukem To override, define after including <bsd.x11.mk> 18621.144Slukem 18631.144SlukemMANDIR Set to ${X11MANDIR}. 18641.144Slukem To override, define after including <bsd.x11.mk> 18651.144Slukem 18661.144SlukemCPPFLAGS Appended with definitions to include from 18671.144Slukem ${DESTDIR}${X11INCDIR} 18681.144Slukem 18691.144SlukemLDFLAGS Appended with definitions to link from 18701.144Slukem ${DESTDIR}${X11USRLIBDIR} 18711.144Slukem 18721.221SmrgX11FLAGS.CONNECTION Equivalent to X11's CONNECTION_FLAGS. 18731.144Slukem 18741.221SmrgX11FLAGS.EXTENSION Equivalent to X11's EXT_DEFINES. 18751.144Slukem 18761.221SmrgX11FLAGS.LOADABLE Equivalent to X11's LOADABLE. 18771.144Slukem 18781.221SmrgX11FLAGS.OS_DEFINES Equivalent to X11's OS_DEFINES. 18791.144Slukem 18801.221SmrgX11FLAGS.SERVER Equivalent to X11's ServerDefines. 18811.144Slukem 18821.221SmrgX11FLAGS.THREADLIB Equivalent to X11's THREADS_DEFINES for libraries. 18831.144Slukem 18841.221SmrgX11FLAGS.THREADS Equivalent to X11's THREADS_DEFINES. 18851.144Slukem 18861.144SlukemX11FLAGS.VERSION cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION. 18871.144Slukem 18881.221SmrgX11FLAGS.DIX Equivalent to X11's DIX_DEFINES. 18891.221Smrg 18901.144SlukemX11TOOL_UNXCOMM Commandline to convert `XCOMM' comments to `#' 18911.144Slukem 18921.144SlukemIt uses the following variables: 18931.144Slukem 18941.144SlukemAPPDEFS List of app-default files to install. 18951.144Slukem 18961.144SlukemCPPSCRIPTS List of files/scripts to run through cpp(1) 18971.144Slukem and then ${X11TOOL_UNXCOMM}. The source files 18981.144Slukem have a `.cpp' suffix, the generated files do not. 18991.144Slukem 19001.144SlukemCPPSCRIPTFLAGS Additional flags to cpp(1) when building CPPSCRIPTS. 19011.144Slukem 19021.144SlukemCPPSCRIPTFLAGS_<fn> Additional flags to cpp(1) when building CPPSCRIPT <fn>. 19031.144Slukem 19041.144Slukem 19051.30Sagc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 1906