bsd.README revision 1.446
11.446Sriastrad# $NetBSD: bsd.README,v 1.446 2024/03/23 21:56:47 riastradh 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.444SlukemOther sources of relevant documentation are BUILDING in the top 91.444Slukemlevel of the NetBSD source tree, and the mk.conf(5) man page. 101.444Slukem 111.444SlukemNote: this file is not intended to replace reading through the .mk 121.1Scgdfiles for anything tricky. 131.1Scgd 141.1Scgd=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 151.1Scgd 161.1ScgdRANDOM THINGS WORTH KNOWING: 171.1Scgd 181.1ScgdThe files are simply C-style #include files, and pretty much behave like 191.1Scgdyou'd expect. The syntax is slightly different in that a single '.' is 201.1Scgdused instead of the hash mark, i.e. ".include <bsd.prog.mk>". 211.1Scgd 221.1ScgdOne difference that will save you lots of debugging time is that inclusion 231.1Scgdof the file is normally done at the *end* of the Makefile. The reason for 241.1Scgdthis is because .mk files often modify variables and behavior based on the 251.1Scgdvalues of variables set in the Makefile. To make this work, remember that 261.1Scgdthe FIRST target found is the target that is used, i.e. if the Makefile has: 271.1Scgd 281.1Scgd a: 291.1Scgd echo a 301.1Scgd a: 311.1Scgd echo a number two 321.1Scgd 331.1Scgdthe command "make a" will echo "a". To make things confusing, the SECOND 341.1Scgdvariable assignment is the overriding one, i.e. if the Makefile has: 351.1Scgd 361.1Scgd a= foo 371.1Scgd a= bar 381.1Scgd 391.1Scgd b: 401.1Scgd echo ${a} 411.1Scgd 421.1Scgdthe command "make b" will echo "bar". This is for compatibility with the 431.1Scgdway the V7 make behaved. 441.1Scgd 451.1ScgdIt's fairly difficult to make the BSD .mk files work when you're building 461.75Sagcmultiple programs in a single directory. It's a lot easier to split up the 471.1Scgdprograms than to deal with the problem. Most of the agony comes from making 481.36Srossthe "obj" directory stuff work right, not because we switched to a new version 491.1Scgdof make. So, don't get mad at us, figure out a better way to handle multiple 501.1Scgdarchitectures so we can quit using the symbolic link stuff. (Imake doesn't 511.1Scgdcount.) 521.1Scgd 531.1ScgdThe file .depend in the source directory is expected to contain dependencies 541.1Scgdfor the source files. This file is read automatically by make after reading 551.1Scgdthe Makefile. 561.1Scgd 571.1ScgdThe variable DESTDIR works as before. It's not set anywhere but will change 581.1Scgdthe tree where the file gets installed. 591.1Scgd 601.1ScgdThe profiled libraries are no longer built in a different directory than 611.1Scgdthe regular libraries. A new suffix, ".po", is used to denote a profiled 621.265Snjolyobject, and ".pico" denotes a shared (position-independent) object. 631.97Sitojun 641.142SlukemThere are various make variables used during the build. 651.142Slukem 661.142SlukemMany variables support a (case sensitive) value of "no" or "yes", 671.142Slukemand are tested with ${VAR} == "no" and ${VAR} != "no" . 681.142Slukem 691.142Slukem 701.172ShubertfThe basic rule for the variable naming scheme is as follows: 711.172Shubertf 721.444SlukemHOST_<cmd> A command that runs on the host machine regardless of 731.231Sapb whether or not the system is being cross compiled, or 741.445Slukem options for such a command. 751.231Sapb 761.444SlukemMK<feature> Can be set to "no" to disable feature <feature>, 771.444Slukem or "yes" to enable feature <feature>. 781.172Shubertf Usually defaults to "yes", although some variables 791.172Shubertf default to "no". 801.172Shubertf Due to make(1) implementation issues, if a temporary 811.224Slukem command-line override of a mk.conf(5) or <bsd.own.mk> 821.214Swiz setting is required whilst still honoring a particular 831.444Slukem Makefile's setting of MK<feature>, use 841.444Slukem env MK<feature>=value make 851.172Shubertf instead of 861.444Slukem make MK<feature>=value 871.172Shubertf 881.444SlukemNO<feature> If defined, disables feature <feature>, overriding 891.444Slukem a user's MK<feature>=yes configuration. 901.172Shubertf Not intended for users. 911.172Shubertf This is to allow Makefiles to disable functionality 921.172Shubertf that they don't support (such as missing man pages). 931.444Slukem NO<feature> variables must be defined before <bsd.own.mk> 941.444Slukem is included, which generally means define before 951.444Slukem any <*.mk> is included. 961.444Slukem See "Variables for a Makefile". 971.172Shubertf 981.444SlukemTOOL_<tool> A tool that is provided as part of the USETOOLS 991.231Sapb framework. When not using the USETOOLS framework, 1001.444Slukem TOOL_<tool> variables should refer to tools that are 1011.231Sapb already installed on the host system. 1021.231Sapb 1031.445SlukemVarious mk.conf(5) variables control the NetBSD system build. 1041.445SlukemThese should not be set by Makefiles; they're for the user to define 1051.445Slukemin MAKECONF (see mk.conf(5) or <bsd.own.mk> documented below) or on 1061.445Slukemthe make(1) command line. 1071.445Slukem 1081.445SlukemThe supported mk.conf(5) make variables are: 1091.445Slukem 1101.445Slukem BSDOBJDIR, BSDSRCDIR, BUILD, BUILDID, BUILDINFO, BUILDSEED, 1111.445Slukem CDEXTRA, CONFIGOPTS, COPTS, CPUFLAGS, DESTDIR, EXTERNAL_TOOLCHAIN, 1121.445Slukem INSTALLBOOT_BOARDS, INSTALLWORLDDIR, KERNARCHDIR, KERNCONFDIR, 1131.445Slukem KERNEL_DIR, KERNOBJDIR, KERNSRCDIR, LOCALTIME, MAKEVERBOSE, 1141.445Slukem MKAMDGPUFIRMWARE, MKARGON2, MKARZERO, MKATF, MKBINUTILS, MKBSDGREP, 1151.445Slukem MKBSDTAR, MKCATPAGES, MKCLEANSRC, MKCLEANVERIFY, MKCOMPAT, 1161.445Slukem MKCOMPATMODULES, MKCOMPATTESTS, MKCOMPATX11, MKCOMPLEX, MKCROSSGDB, 1171.445Slukem MKCTF, MKCVS, MKCXX, MKDEBUG, MKDEBUGKERNEL, MKDEBUGLIB, 1181.445Slukem MKDEBUGTOOLS, MKDEPINCLUDES, MKDOC, MKDTB, MKDTC, MKDTRACE, 1191.445Slukem MKDYNAMICROOT, MKFIRMWARE, MKGCC, MKGCCCMDS, MKGDB, MKGROFF, 1201.445Slukem MKGROFFHTMLDOC, MKHESIOD, MKHOSTOBJ, MKHTML, MKIEEEFP, MKINET6, 1211.445Slukem MKINFO, MKIPFILTER, MKISCSI, MKKERBEROS, MKKMOD, MKKYUA, MKLDAP, 1221.445Slukem MKLIBCSANITIZER, MKLIBCXX, MKLIBSTDCXX, MKLINKLIB, MKLINT, MKLLVM, 1231.445Slukem MKLLVMRT, MKLVM, MKMAKEMANDB, MKMAN, MKMANDOC, MKMANZ, MKMDNS, 1241.445Slukem MKNLS, MKNOUVEAUFIRMWARE, MKNPF, MKNSD, MKOBJ, MKOBJDIRS, MKPAM, 1251.445Slukem MKPCC, MKPF, MKPIC, MKPICINSTALL, MKPICLIB, MKPIE, MKPIGZGZIP, 1261.445Slukem MKPOSTFIX, MKPROFILE, MKRADEONFIRMWARE, MKRELRO, MKREPRO, 1271.445Slukem MKREPRO_TIMESTAMP, MKRUMP, MKSANITIZER, MKSHARE, MKSKEY, MKSLJIT, 1281.445Slukem MKSOFTFLOAT, MKSTATICLIB, MKSTATICPIE, MKSTRIPIDENT, MKSTRIPSYM, 1291.445Slukem MKTEGRAFIRMWARE, MKTPM, MKUNBOUND, MKUNPRIVED, MKUPDATE, MKX11, 1301.445Slukem MKX11FONTS, MKX11MOTIF, MKXORG_SERVER, MKYP, MKZFS, NETBSDSRCDIR, 1311.445Slukem NETBSD_OFFICIAL_RELEASE, NOCLEANDIR, NODISTRIBDIRS, NOINCLUDES, 1321.445Slukem OBJMACHINE, RELEASEDIR, RUMPUSER_THREADS, RUMP_CURLWP, RUMP_DEBUG, 1331.445Slukem RUMP_DIAGNOSTIC, RUMP_KTRACE, RUMP_LOCKDEBUG, RUMP_LOCKS_UP, 1341.445Slukem RUMP_NBCOMPAT, RUMP_VIRTIF, RUMP_VNODE_LOCKDEBUG, 1351.445Slukem TOOLCHAIN_MISSING, TOOLDIR, USETOOLS, USE_FORT, USE_HESIOD, 1361.445Slukem USE_INET6, USE_JEMALLOC, USE_KERBEROS, USE_LDAP, USE_LIBCSANITIZER, 1371.445Slukem USE_PAM, USE_PIGZGZIP, USE_SANITIZER, USE_SKEY, USE_SSP, 1381.445Slukem USE_XZ_SETS, USE_YP, X11MOTIFPATH, X11SRCDIR. 1391.445Slukem 1401.445SlukemThe obsolete mk.conf(5) make variables are: 1411.445Slukem 1421.445Slukem EXTSRCSRCDIR, MKBFD, MKCRYPTO, MKEXTSRC, MKKDEBUG, MKKERBEROS4, 1431.445Slukem MKLLD, MKLLDB, MKMCLINKER, MKPERFUSE, MKTOOLSDEBUG, NBUILDJOBS, 1441.445Slukem SHAREDSTRINGS, USE_COMBINE, USE_NEW_TOOLCHAIN. 1451.445Slukem 1461.445SlukemNotable variables documented in mk.conf(5) and duplicated here: 1471.445Slukem 1481.445SlukemDESTDIR Directory to contain the built NetBSD system. If set, 1491.445Slukem special options are passed to the compilation tools to 1501.445Slukem prevent their default use of the host system's 1511.445Slukem /usr/include, /usr/lib, and so forth. This pathname must 1521.445Slukem be an absolute path, and should not end with a slash (/) 1531.445Slukem character. (For installation into the system's root 1541.445Slukem directory, set DESTDIR to an empty string, not to "/"). 1551.445Slukem The directory must reside on a file system which supports 1561.445Slukem long file names and hard links. 1571.445Slukem 1581.445Slukem Note: build.sh will provide a default of 1591.445Slukem "destdir.MACHINE" (in the top-level .OBJDIR) unless run 1601.445Slukem in `expert' mode with the -E option. 1611.445Slukem 1621.445Slukem Default: Empty string if USETOOLS=yes; otherwise unset. 1631.445Slukem 1641.445SlukemRELEASEDIR If set, specifies the directory to which a release(7) 1651.445Slukem layout will be written at the end of a "make release". 1661.445Slukem If specified, must be an absolute path. 1671.445Slukem 1681.445Slukem Note: build.sh will provide a default of "releasedir" (in 1691.445Slukem the top-level .OBJDIR) unless run in `expert' mode with 1701.445Slukem the -E option. 1711.444Slukem 1721.444Slukem Default: Unset. 1731.444Slukem 1741.172ShubertfCOPTS.lib<lib> 1751.177SmrgOBJCOPTS.lib<lib> 1761.172ShubertfLDADD.lib<lib> 1771.172ShubertfCPPFLAGS.lib<lib> 1781.172ShubertfCXXFLAGS.lib<lib> 1791.172ShubertfCOPTS.<prog> 1801.428SchristosOBJCOPTS.<prog> 1811.172ShubertfLDADD.<prog> 1821.172ShubertfCPPFLAGS.<prog> 1831.444SlukemCXXFLAGS.<prog> These provide a way to specify additions to the associated 1841.172Shubertf variables in a way that applies only to a particular library 1851.172Shubertf or program. <lib> corresponds to the LIB variable set in 1861.172Shubertf the library's makefile. <prog> corresponds to either PROG 1871.172Shubertf or PROG_CXX (if set). For example, if COPTS.libcrypto is 1881.172Shubertf set to "-g", "-g" will be added to COPTS only when compiling 1891.172Shubertf the crypto library. 1901.445Slukem See bsd.prog.mk below for more details about these variables. 1911.118Slukem 1921.281SjoergThe active compiler is selected using the following variables: 1931.281SjoergAVAILABLE_COMPILER 1941.281Sjoerg List of available compiler suites. Processed in order 1951.281Sjoerg for selecting the active compiler for each frontend. 1961.281SjoergHAVE_PCC If defined, PCC is present and enabled. 1971.281SjoergHAVE_LLVM If defined, LLVM/Clang is present and enabled. 1981.444SlukemUNSUPPORTED_COMPILER.<comp> 1991.444Slukem If defined, the support for compiler <comp> is disabled. 2001.281Sjoerg 2011.281SjoergFor the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist: 2021.281SjoergACTIVE_CC Active compile suite for the CC frontend. 2031.281SjoergSUPPORTED_CC Compile suite with support for the CC frontend. 2041.444SlukemTOOL_CC.<comp> Path to the CC frontend for compiler <comp>. 2051.444Slukem 2061.444Slukem 2071.444Slukem=-=-=-=-= Variables for a Makefile =-=-=-=-= 2081.444Slukem 2091.444SlukemIf the following varialbes are defined in the Makefile before 2101.444Slukemany make(1) .include directives, they force the specific behavior. 2111.444Slukem 2121.444SlukemNOCOMPAT Force MKCOMPAT=no. 2131.444SlukemNOCTF Force MKCTF=no. 2141.444SlukemNODEBUG Force MKDEBUG=no. 2151.444SlukemNODEBUGLIB Force MKDEBUGLIB=no. 2161.444SlukemNODOC Force MKDOC=no. 2171.444SlukemNOFORT Force USE_FORT=no. 2181.444SlukemNOHTML Force MKHTML=no. 2191.444SlukemNOINFO Force MKINFO=no. 2201.444SlukemNOLIBCSANITIZER Force MKLIBCSANITIZER=no (and USE_LIBCSANITIZER=no) 2211.444SlukemNOLINKLIB Force MKLINKLIB=no. 2221.444SlukemNOLINT Force MKLINT=no. 2231.444SlukemNOMAN Force MKMAN=no. 2241.444SlukemNOMANDOC Force MKMANDOC=no. 2251.444SlukemNONLS Force MKNLS=no. 2261.444SlukemNOOBJ Force MKOBJ=no. 2271.444SlukemNOPIC Force MKPIC=no. 2281.444SlukemNOPICINSTALL Force MKPICINSTALL=no. 2291.444SlukemNOPIE Force MKPIE=no. 2301.444SlukemNOPROFILE Force MKPROFILE=no. 2311.444SlukemNORELRO Force MKREPRO=no. 2321.444SlukemNOSANITIZER Force MKSANITIZER=no (and USE_SANITIZER=no) 2331.444SlukemNOSHARE Force MKSHARE=no. 2341.444SlukemNOSSP Force USE_SSP=no. 2351.444SlukemNOSTATICLIB Force MKSTATICLIB=no. 2361.444Slukem 2371.444SlukemSpecial variations: 2381.444Slukem 2391.444SlukemNOFULLRELRO!=no Force MKRELRO=no if MKRELRO=full 2401.444Slukem 2411.444SlukemTODO: NOFULLRELRO should just be a defined test for consistency. 2421.444Slukem 2431.281Sjoerg 2441.118Slukem=-=-=-=-= sys.mk =-=-=-=-= 2451.1Scgd 2461.1ScgdThe include file <sys.mk> has the default rules for all makes, in the BSD 2471.1Scgdenvironment or otherwise. You probably don't want to touch this file. 2481.1Scgd 2491.118Slukem=-=-=-=-= bsd.own.mk =-=-=-=-= 2501.1Scgd 2511.17SthorpejThe include file <bsd.own.mk> contains source tree configuration parameters, 2521.17Sthorpejsuch as the owners, groups, etc. for both manual pages and binaries, and 2531.17Sthorpeja few global "feature configuration" parameters. 2541.1Scgd 2551.1ScgdIt has no targets. 2561.1Scgd 2571.134SlukemTo get system-specific configuration parameters, <bsd.own.mk> will try to 2581.445Slukeminclude the mk.conf(5) file specified by the MAKECONF variable, which may 2591.445Slukembe either set in the environment or provided on the make(1) command line. 2601.445SlukemMAKECONF defaults to /etc/mk.conf. mk.conf(5) may define any of the 2611.445Slukemvariables described below. 2621.17Sthorpej 2631.134Slukem<bsd.own.mk> sets the following variables, if they are not already defined 2641.17Sthorpej(defaults are in brackets): 2651.15Scgd 2661.445SlukemNETBSDSRCDIR The path to the top level of the NetBSD sources. 2671.98Slukem If _SRC_TOP_ != "", that will be used as the default, 2681.98Slukem otherwise BSDSRCDIR will be used as the default. 2691.98Slukem Various makefiles within the NetBSD source tree will 2701.98Slukem use this to reference the top level of the source tree. 2711.445Slukem Default: Top level of the NetBSD source tree (as 2721.445Slukem determined by the presence of build.sh and tools/) if 2731.445Slukem make(1) is run from within that tree; otherwise BSDSRCDIR 2741.445Slukem will be used. 2751.98Slukem 2761.95Slukem_SRC_TOP_ Top of the system source tree, as determined by <bsd.own.mk> 2771.98Slukem based on the presence of tools/ and build.sh. This variable 2781.98Slukem is "internal" to <bsd.own.mk>, although its value is only 2791.98Slukem determined once and then propagated to all sub-makes. 2801.95Slukem 2811.305Sapb_NETBSD_VERSION_DEPENDS 2821.305Sapb A list of files which contain information about 2831.305Sapb the version of the NetBSD being built. This is 2841.305Sapb defined only if the current directory appears 2851.305Sapb to be inside a NetBSD source tree. The list of 2861.305Sapb files includes ${NETBSDSRCDIR}/sys/sys/param.h 2871.305Sapb (which contains the kernel version number), 2881.305Sapb ${NETBSDSRCDIR}/sys/conf/newvers.sh and 2891.305Sapb ${NETBSDSRCDIR}/sys/conf/osrelease.sh (which 2901.305Sapb interpret the information in sys/sys/param.h), and 2911.305Sapb ${_SRC_TOP_OBJ_}/params (which is an optional file, 2921.305Sapb created by "make build" in ${_SRC_TOP_}/Makefile, 2931.305Sapb containing all the variables that may influence the 2941.305Sapb build). 2951.305Sapb 2961.305Sapb Targets that depend on the NetBSD version, or on 2971.305Sapb variables defined at build time, can declare a 2981.305Sapb dependency on ${_NETBSD_VERSION_DEPENDS}, like this: 2991.305Sapb 3001.305Sapb version.c: ${_NETBSD_VERSION_DEPENDS} 3011.305Sapb commands to create version.c 3021.305Sapb 3031.445SlukemBSDSRCDIR The real path to the NetBSD source tree, if NETBSDSRCDIR 3041.445Slukem isn't defined. 3051.445Slukem Default: "/usr/src". 3061.445Slukem 3071.445SlukemBSDOBJDIR The real path to the object directory tree for the NetBSD 3081.445Slukem source tree. 3091.445Slukem Default: "/usr/obj". 3101.15Scgd 3111.116SlukemBINGRP Binary group. [wheel] 3121.15Scgd 3131.116SlukemBINOWN Binary owner. [root] 3141.15Scgd 3151.116SlukemBINMODE Binary mode. [555] 3161.15Scgd 3171.116SlukemNONBINMODE Mode for non-executable files. [444] 3181.15Scgd 3191.415SkamilMANDIR Base path for manual installation. [/usr/share/man/cat] 3201.15Scgd 3211.116SlukemMANGRP Manual group. [wheel] 3221.15Scgd 3231.116SlukemMANOWN Manual owner. [root] 3241.15Scgd 3251.116SlukemMANMODE Manual mode. [${NONBINMODE}] 3261.15Scgd 3271.222SlukemMANINSTALL Manual installation type. Space separated list: 3281.415Skamil catinstall, htmlinstall, maninstall 3291.415Skamil Default value derived from MKCATPAGES and MKHTML. 3301.76Sfair 3311.76SfairLDSTATIC Control program linking; if set blank, link everything 3321.129Slukem dynamically. If set to "-static", link everything statically. 3331.76Sfair If not set, programs link according to their makefile. 3341.21Schristos 3351.116SlukemLIBDIR Base path for library installation. [/usr/lib] 3361.15Scgd 3371.116SlukemLINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint] 3381.15Scgd 3391.116SlukemLIBGRP Library group. [${BINGRP}] 3401.15Scgd 3411.116SlukemLIBOWN Library owner. [${BINOWN}] 3421.15Scgd 3431.116SlukemLIBMODE Library mode. [${NONBINMODE}] 3441.15Scgd 3451.15ScgdDOCDIR Base path for system documentation (e.g. PSD, USD, etc.) 3461.444Slukem installation. [/usr/share/doc] 3471.62Ssimonb 3481.116SlukemDOCGRP Documentation group. [wheel] 3491.15Scgd 3501.116SlukemDOCOWN Documentation owner. [root] 3511.15Scgd 3521.116SlukemDOCMODE Documentation mode. [${NONBINMODE}] 3531.15Scgd 3541.445SlukemGZIP_N_FLAG Options to pass to TOOL_GZIP to prevent it from inserting 3551.335Sapb file names or timestamps in the compressed output. 3561.335Sapb [-n, or -nT when TOOL_GZIP is really TOOL_PIGZ] 3571.335Sapb 3581.84SkleinkNLSDIR Base path for Native Language Support files installation. 3591.15Scgd [/usr/share/nls] 3601.1Scgd 3611.116SlukemNLSGRP Native Language Support files group. [wheel] 3621.1Scgd 3631.116SlukemNLSOWN Native Language Support files owner. [root] 3641.1Scgd 3651.116SlukemNLSMODE Native Language Support files mode. [${NONBINMODE}] 3661.1Scgd 3671.445SlukemX11SRCDIR Directory containing the modular Xorg source. If 3681.445Slukem specified, must be an absolute path. The main modular 3691.445Slukem Xorg source is found in ${X11SRCDIR}/external/mit. 3701.445Slukem 3711.445Slukem Default: ${NETBSDSRCDIR}/../xsrc, if that exists; otherwise 3721.445Slukem "/usr/xsrc". 3731.144Slukem 3741.444SlukemX11SRCDIR.local The path to the local X11 src tree. [${X11SRCDIR}/local] 3751.144Slukem 3761.221SmrgX11SRCDIR.lib<package> 3771.221SmrgX11SRCDIR.<package> 3781.425Smsaitoh The path to the xorg src tree for the specified package>. 3791.221Smrg [${X11SRCDIR}/external/mit/xorg/<package>/dist] 3801.221Smrg 3811.367SsnjX11ROOTDIR Root directory of the X11 installation. [/usr/X11R7] 3821.144Slukem 3831.144SlukemX11BINDIR X11 bin directory. [${X11ROOTDIR}/bin] 3841.144Slukem 3851.144SlukemX11FONTDIR X11 font directory. [${X11ROOTDIR}/lib/X11/fonts] 3861.144Slukem 3871.144SlukemX11INCDIR X11 include directory. [${X11ROOTDIR}/include] 3881.144Slukem 3891.144SlukemX11LIBDIR X11 lib/x11 (config) directory. [${X11ROOTDIR}/lib/X11] 3901.144Slukem 3911.144SlukemX11MANDIR X11 manual directory. [${X11ROOTDIR}/man] 3921.144Slukem 3931.144SlukemX11USRLIBDIR X11 library directory. [${X11ROOTDIR}/lib] 3941.144Slukem 3951.445SlukemSTRIPFLAG The option passed to the install program to cause the binary 3961.1Scgd to be stripped. This is to be used when building your 3971.1Scgd own install script so that the entire system can be made 3981.146Slukem stripped/not-stripped using a single knob. [] 3991.1Scgd 4001.445SlukemCOPY The option passed to the install program to cause the binary 4011.2Scgd to be copied rather than moved. This is to be used when 4021.2Scgd building our own install script so that the entire system 4031.2Scgd can either be installed with copies, or with moves using 4041.116Slukem a single knob. [-c] 4051.15Scgd 4061.310SapbMAKEDIRTARGETENV 4071.310Sapb Environment variables passed to the child make process 4081.310Sapb invoked by MAKEDIRTARGET. 4091.310Sapb 4101.150SlukemMAKEDIRTARGET dir target [params] 4111.150Slukem Runs "cd $${dir} && ${MAKE} [params] $${target}", 4121.150Slukem displaying a "pretty" message whilst doing so. 4131.150Slukem 4141.152SclRELEASEMACHINEDIR 4151.152Scl Subdirectory used below RELEASEDIR when building 4161.395Smartin a release. [${MACHINE}, 4171.395Smartin or ${MACHINE}-${MACHINE_ARCH} for evb{arm,mips,sh3}*] 4181.152Scl 4191.152SclRELEASEMACHINE Subdirectory or path component used for the following 4201.152Scl paths: 4211.152Scl distrib/${RELEASEMACHINE} 4221.152Scl distrib/notes/${RELEASEMACHINE} 4231.152Scl etc/etc.${RELEASEMACHINE} 4241.152Scl Used when building a release. [${MACHINE}] 4251.150Slukem 4261.134SlukemAdditionally, the following variables may be set by <bsd.own.mk> or in a 4271.214Swizmake configuration file to modify the behavior of the system build 4281.17Sthorpejprocess (default values are in brackets along with comments, if set by 4291.134Slukem<bsd.own.mk>): 4301.33Sjonathan 4311.445SlukemUSETOOLS Can be set to "yes" or "no". Indicates whether the tools 4321.445Slukem specified by ${TOOLDIR} should be used as part of a build in 4331.445Slukem progress. Must be set to "yes" if cross-compiling. 4341.172Shubertf Supported values: 4351.172Shubertf 4361.172Shubertf yes Use the tools from TOOLDIR. 4371.172Shubertf 4381.172Shubertf no Do not use the tools from TOOLDIR, but refuse to 4391.172Shubertf build native compilation tool components that are 4401.172Shubertf version-specific for that tool. 4411.172Shubertf 4421.172Shubertf never Do not use the tools from TOOLDIR, even when 4431.172Shubertf building native tool components. This is similar to 4441.172Shubertf the traditional NetBSD build method, but does not 4451.172Shubertf verify that the compilation tools in use are 4461.172Shubertf up-to-date enough in order to build the tree 4471.172Shubertf successfully. This may cause build or runtime 4481.172Shubertf problems when building the whole NetBSD source tree. 4491.172Shubertf 4501.445Slukem Default: "no" when using <bsd.*.mk> outside the NetBSD 4511.445Slukem source tree (detected automatically) or if 4521.445Slukem TOOLCHAIN_MISSING=yes; otherwise "yes". 4531.142Slukem 4541.116SlukemOBJECT_FMT Object file format. [set to "ELF" on architectures that 4551.199Ssimonb use ELF -- currently all architectures]. 4561.33Sjonathan 4571.103SthorpejTOOLCHAIN_MISSING 4581.445Slukem Can be set to "yes" or "no". If not "no", this 4591.445Slukem indicates that the platform "MACHINE_ARCH" being built 4601.445Slukem does not have a working in-tree toolchain. 4611.445Slukem If the ${MACHINE_ARCH} in question falls into this category, 4621.301Sabs TOOLCHAIN_MISSING is conditionally assigned the value "yes". 4631.103Sthorpej Otherwise, the variable is unconditionally assigned the 4641.103Sthorpej value "no". 4651.445Slukem 4661.445Slukem If not "no", acts as MKBINUTILS=no MKGCC=no MKGDB=no. 4671.445Slukem 4681.445Slukem Default: "no". 4691.103Sthorpej 4701.103SthorpejEXTERNAL_TOOLCHAIN 4711.103Sthorpej This variable is not directly set by <bsd.own.mk>, but 4721.103Sthorpej including <bsd.own.mk> is the canonical way to gain 4731.103Sthorpej access to this variable. The variable should be defined 4741.445Slukem either in the user's environment or in the user's mk.conf(5) 4751.445Slukem file. 4761.445Slukem 4771.445Slukem If defined, this variable indicates the root directory of 4781.103Sthorpej an external toolchain which will be used to build the 4791.142Slukem tree. For example, if a platform is a ${TOOLCHAIN_MISSING} 4801.103Sthorpej platform, EXTERNAL_TOOLCHAIN can be used to re-enable the 4811.103Sthorpej cross-compile framework. 4821.103Sthorpej 4831.445Slukem If EXTERNAL_TOOLCHAIN is defined, act as MKGCC=no, since 4841.445Slukem the external version of the compiler may not be able to build 4851.445Slukem the library components of the in-tree compiler. 4861.445Slukem 4871.445Slukem This variable should be used in conjunction with an 4881.445Slukem appropriate HAVE_GCC or HAVE_LLVM setting to control the 4891.445Slukem compiler options. 4901.371Sjoerg 4911.445Slukem Note: This variable is not yet used in as many places as 4921.103Sthorpej it should be. Expect the exact semantics of this variable 4931.103Sthorpej to change in the short term as parts of the cross-compile 4941.103Sthorpej framework continue to be cleaned up. 4951.1Scgd 4961.236SapbThe following variables are defined to commands to perform the 4971.236Sapbappropriate operation, with the default in [brackets]. Note that 4981.236Sapbthe defaults change if USETOOLS == "yes": 4991.236Sapb 5001.236SapbTOOL_AMIGAAOUT2BB aout to Amiga bootblock converter. [amiga-aout2bb] 5011.236Sapb 5021.236SapbTOOL_AMIGAELF2BB ELF to Amiga bootblock converter. [amiga-elf2bb] 5031.236Sapb 5041.387SchristosTOOL_AMIGATXLT Amiga assembly language format translator. [amiga-txlt] 5051.387Schristos 5061.387SchristosTOOL_ARMELF2AOUT ELF to a.out executable converter [arm-elf2aout} 5071.236Sapb 5081.236SapbTOOL_ASN1_COMPILE ASN1 compiler. [asn1_compile] 5091.236Sapb 5101.236SapbTOOL_AWK Pattern-directed scanning/processing language. [awk] 5111.236Sapb 5121.236SapbTOOL_CAP_MKDB Create capability database. [cap_mkdb] 5131.236Sapb 5141.236SapbTOOL_CAT Concatenate and print files. [cat] 5151.236Sapb 5161.236SapbTOOL_CKSUM Display file checksums. [cksum] 5171.236Sapb 5181.236SapbTOOL_COMPILE_ET Error table compiler. [compile_et] 5191.236Sapb 5201.236SapbTOOL_CONFIG Build kernel compilation directories. [config] 5211.236Sapb 5221.236SapbTOOL_CRUNCHGEN Generate crunched binary build environment. [crunchgen] 5231.236Sapb 5241.236SapbTOOL_CTAGS Create a tags file. [ctags] 5251.236Sapb 5261.236SapbTOOL_DB Manipulate db(3) databases. [db] 5271.236Sapb 5281.236SapbTOOL_DISKLABEL Read and write disk pack label. [disklabel] 5291.236Sapb 5301.236SapbTOOL_EQN Format equations for groff. [eqn] 5311.236Sapb 5321.236SapbTOOL_FDISK MS-DOS partition maintenance program. [fdisk] 5331.236Sapb 5341.236SapbTOOL_FGEN IEEE 1275 Open Firmware FCode Tokenizer. [fgen] 5351.236Sapb 5361.236SapbTOOL_GENASSYM Generate constants for assembly files. [genassym] 5371.236Sapb 5381.236SapbTOOL_GENCAT Generate NLS message catalogs. [gencat] 5391.236Sapb 5401.236SapbTOOL_GMAKE GNU make utility. [gmake] 5411.236Sapb 5421.247SsketchTOOL_GREP Print lines matching a pattern. [grep] 5431.247Ssketch 5441.236SapbTOOL_GROFF Front end for groff document formatting system. [groff] 5451.236Sapb 5461.327SapbTOOL_GZIP Compression/decompression tool. [gzip] 5471.327Sapb 5481.335SapbTOOL_GZIP_N Same as TOOL_GZIP, plus a command line option to 5491.335Sapb prevent it from inserting file names or timestamps 5501.335Sapb into the compressed output. 5511.335Sapb [${TOOL_GZIP} ${GZIP_N_FLAG}] 5521.335Sapb 5531.236SapbTOOL_HEXDUMP Ascii, decimal, hexadecimal, octal dump. [hexdump] 5541.236Sapb 5551.236SapbTOOL_HP300MKBOOT Make bootable image for hp300. [hp300-mkboot] 5561.236Sapb 5571.328SskrllTOOL_HPPAMKBOOT Make bootable image for hppa. [hppa-mkboot] 5581.236Sapb 5591.236SapbTOOL_INDXBIB Make bibliographic database's inverted index. [indxbib] 5601.236Sapb 5611.236SapbTOOL_INSTALLBOOT Install disk bootstrap software. [installboot] 5621.236Sapb 5631.236SapbTOOL_INSTALL_INFO Update info/dir entries. [install-info] 5641.236Sapb 5651.236SapbTOOL_JOIN Relational database operator. [join] 5661.236Sapb 5671.236SapbTOOL_M4 M4 macro language processor. [m4] 5681.236Sapb 5691.387SchristosTOOL_M68KELF2AOUT ELF to a.out executable converter [m68k-elf2aout} 5701.387Schristos 5711.236SapbTOOL_MACPPCFIXCOFF Fix up xcoff headers for macppc. [macppc-fixcoff] 5721.236Sapb 5731.236SapbTOOL_MAKEFS Create file system image from directory tree. [makefs] 5741.236Sapb 5751.236SapbTOOL_MAKEINFO Translate Texinfo documents. [makeinfo] 5761.236Sapb 5771.236SapbTOOL_MAKEWHATIS Create a whatis.db database. [makewhatis] 5781.236Sapb 5791.236SapbTOOL_MDSETIMAGE Set kernel RAM disk image. [mdsetimage] 5801.236Sapb 5811.236SapbTOOL_MENUC Menu compiler. [menuc] 5821.236Sapb 5831.236SapbTOOL_MIPSELF2ECOFF Convert ELF-format executable to ECOFF for mips. 5841.236Sapb [mips-elf2ecoff] 5851.236Sapb 5861.236SapbTOOL_MKCSMAPPER Make charset mapping table. [mkcsmapper] 5871.236Sapb 5881.236SapbTOOL_MKESDB Make encoding scheme database. [mkesdb] 5891.236Sapb 5901.236SapbTOOL_MKLOCALE Make LC_CTYPE locale files. [mklocale] 5911.236Sapb 5921.236SapbTOOL_MKMAGIC Create database for file(1). [file] 5931.236Sapb 5941.311SjmcneillTOOL_MKNOD Make device special file. [mknod] 5951.311Sjmcneill 5961.236SapbTOOL_MKTEMP Make (unique) temporary file name. [mktemp] 5971.236Sapb 5981.236SapbTOOL_MSGC Simple message list compiler. [msgc] 5991.236Sapb 6001.236SapbTOOL_MTREE Map a directory hierarchy. [mtree] 6011.236Sapb 6021.332SphxTOOL_NCDCS Turn ELF kernel into a NCD firmware image. [ncdcs] 6031.332Sphx 6041.236SapbTOOL_PAX Manipulate file archives and copy directories. [pax] 6051.236Sapb 6061.236SapbTOOL_PIC Compile pictures for groff. [pic] 6071.236Sapb 6081.273SmrgTOOL_PIGZ Parallel compressor. [pigz] 6091.273Smrg 6101.444SlukemTOOL_POWERPCMKBOOTIMAGE Make bootable image for powerpc. [powerpc-mkbootimage] 6111.236Sapb 6121.236SapbTOOL_PWD_MKDB Generate the password databases. [pwd_mkdb] 6131.236Sapb 6141.236SapbTOOL_REFER Preprocess bibliographic references for groff. [refer] 6151.236Sapb 6161.236SapbTOOL_ROFF_ASCII Generate ASCII groff output. [nroff] 6171.236Sapb 6181.236SapbTOOL_ROFF_DVI Generate DVI groff output. [${TOOL_GROFF} -Tdvi] 6191.236Sapb 6201.236SapbTOOL_ROFF_HTML Generate HTML groff output. 6211.236Sapb [${TOOL_GROFF} -Tlatin1 -mdoc2html] 6221.236Sapb 6231.236SapbTOOL_ROFF_PS Generate PS groff output. [${TOOL_GROFF} -Tps] 6241.236Sapb 6251.236SapbTOOL_ROFF_RAW Generate "raw" groff output. [${TOOL_GROFF} -Z] 6261.236Sapb 6271.236SapbTOOL_RPCGEN Remote Procedure Call (RPC) protocol compiler. [rpcgen] 6281.236Sapb 6291.236SapbTOOL_SED Stream editor. [sed] 6301.236Sapb 6311.236SapbTOOL_SOELIM Eliminate .so's from groff input. [soelim] 6321.236Sapb 6331.236SapbTOOL_SPARKCRC Generate a crc suitable for use in a sparkive file. 6341.236Sapb [sparkcrc] 6351.236Sapb 6361.236SapbTOOL_STAT Display file status. [stat] 6371.236Sapb 6381.236SapbTOOL_STRFILE Create a random access file for storing strings. 6391.236Sapb [strfile] 6401.236Sapb 6411.236SapbTOOL_SUNLABEL Read or modify a SunOS disk label. [sunlabel] 6421.236Sapb 6431.236SapbTOOL_TBL Format tables for groff. [tbl] 6441.236Sapb 6451.236SapbTOOL_UUDECODE Uudecode a binary file. [uudecode] 6461.236Sapb 6471.236SapbTOOL_VGRIND Grind nice listings of programs. [vgrind -f] 6481.236Sapb 6491.236SapbTOOL_ZIC Time zone compiler. [zic] 6501.236Sapb 6511.323SmattFor each possible value of MACHINE_CPU, MACHINES.${MACHINE_CPU} contain a 6521.323Smattlist of what ports can be built for it. This keeps those definitions in 6531.323Smattcentralized place. 6541.323Smatt 6551.134Slukem<bsd.own.mk> is generally useful when building your own Makefiles so that 6561.1Scgdthey use the same default owners etc. as the rest of the tree. 6571.131Slukem 6581.131Slukem 6591.286Sapb=-=-=-=-= bsd.clean.mk =-=-=-=-= 6601.286Sapb 6611.286SapbThe include file <bsd.clean.mk> defines the clean and cleandir 6621.286Sapbtargets. It uses the following variables: 6631.286Sapb 6641.286SapbCLEANFILES Files to remove for both the clean and cleandir targets. 6651.286Sapb 6661.286SapbCLEANDIRFILES Files to remove for the cleandir target, but not for 6671.286Sapb the clean target. 6681.286Sapb 6691.287SapbMKCLEANSRC Controls whether or not the clean and cleandir targets 6701.287Sapb will delete files from both the object directory, 6711.287Sapb ${.OBJDIR}, and the source directory, ${.CURDIR}. 6721.287Sapb 6731.287Sapb If MKCLEANSRC is set to "no", then the file names in 6741.287Sapb CLEANFILES or CLEANDIRFILES are interpreted relative 6751.287Sapb to the object directory, ${.OBJDIR}. This is the 6761.287Sapb traditional behaviour. 6771.287Sapb 6781.287Sapb If MKCLEANSRC is set to "yes", then the file deletion 6791.287Sapb is performed relative to both the object directory, 6801.287Sapb ${.OBJDIR}, and the source directory, ${.CURDIR}. (This 6811.287Sapb has no effect if ${.OBJDIR} is the same as ${.CURDIR}.) 6821.287Sapb Deleting files from ${.CURDIR} is intended to remove 6831.287Sapb stray output files that had been left in the source 6841.287Sapb directory by an earlier build that did not use object 6851.287Sapb directories. 6861.287Sapb 6871.287Sapb The default is MKCLEANSRC=yes. If you always build with 6881.287Sapb separate object directories, and you are sure that there 6891.287Sapb are no stray files in the source directories, then you 6901.287Sapb may set MKCLEANSRC=no to save some time. 6911.287Sapb 6921.287SapbMKCLEANVERIFY Controls whether or not the clean and cleandir targets 6931.287Sapb will verify that files have been deleted. 6941.287Sapb 6951.287Sapb If MKCLEANVERIFY is set to "no", then the files will 6961.287Sapb be deleted using a "rm -f" command, and its success or 6971.287Sapb failure will be ignored. 6981.287Sapb 6991.287Sapb If MKCLEANVERIFY is set to "yes", then the success of 7001.287Sapb the "rm -f" command will be verified using an "ls" 7011.287Sapb command. 7021.287Sapb 7031.287Sapb The default is MKCLEANVERIFY=yes. If you are sure that 7041.287Sapb there will be no problems caused by file permissions, 7051.287Sapb read-only file systems, or the like, then you may set 7061.287Sapb MKCLEANVERIFY=no to save some time. 7071.286Sapb 7081.286SapbTo use the clean and cleandir targets defined in <bsd.clean.mk>, other 7091.286SapbMakefiles or bsd.*.mk files should append file names to the CLEANFILES 7101.286Sapbor CLEANDIRFILES variables. For example: 7111.286Sapb 7121.286Sapb CLEANFILES+= a.out 7131.286Sapb CLEANDIRFILES+= .depend 7141.286Sapb 7151.286Sapb .include <bsd.clean.mk> 7161.286Sapb 7171.308SapbThe files listed in CLEANFILES and CLEANDIRFILES must not be 7181.308Sapbdirectories, because the potential risk from running "rm -rf" commands 7191.308Sapbin bsd.clean.mk is considered too great. If you want to recursively 7201.308Sapbdelete a directory as part of "make clean" or "make cleandir" then you 7211.308Sapbneed to provide your own target. 7221.286Sapb 7231.131Slukem=-=-=-=-= bsd.dep.mk =-=-=-=-= 7241.131Slukem 7251.131SlukemThe include file <bsd.dep.mk> contains the default targets for building 7261.133Slukem.depend files. It creates .d files from entries in SRCS and DPSRCS 7271.133Slukemthat are C, C++, or Objective C source files, and builds .depend from the 7281.133Slukem.d files. All other files in SRCS and all of DPSRCS will be used as 7291.133Slukemdependencies for the .d files. In order for this to function correctly, 7301.132Slukemit should be .included after all other .mk files and directives that may 7311.132Slukemmodify SRCS or DPSRCS. It uses the following variables: 7321.132Slukem 7331.132SlukemSRCS List of source files to build the program. 7341.132Slukem 7351.132SlukemDPSRCS List of source files which are needed for generating 7361.132Slukem dependencies, but are not needed in ${SRCS}. 7371.1Scgd 7381.444SlukemNODPSRCS TODO 7391.1Scgd 7401.118Slukem=-=-=-=-= bsd.files.mk =-=-=-=-= 7411.106Sthorpej 7421.118SlukemThe include file <bsd.files.mk> handles the FILES variables and is included 7431.134Slukemfrom <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables: 7441.124Slukem 7451.124SlukemFILES The list of files to install. 7461.124Slukem 7471.153SlukemCONFIGFILES Similar semantics to FILES, except that the files 7481.153Slukem are installed by the `configinstall' target, 7491.153Slukem not the `install' target. 7501.153Slukem The FILES* variables documented below also apply. 7511.153Slukem 7521.124SlukemFILESOWN File owner. [${BINOWN}] 7531.124Slukem 7541.124SlukemFILESGRP File group. [${BINGRP}] 7551.124Slukem 7561.203SdhollandFILESMODE File mode. [${NONBINMODE}] 7571.124Slukem 7581.124SlukemFILESDIR The location to install the files. 7591.124Slukem 7601.124SlukemFILESNAME Optional name to install each file as. 7611.124Slukem 7621.153SlukemFILESOWN_<fn> File owner of the specific file <fn>. 7631.153Slukem 7641.153SlukemFILESGRP_<fn> File group of the specific file <fn>. 7651.153Slukem 7661.153SlukemFILESMODE_<fn> File mode of the specific file <fn>. 7671.153Slukem 7681.202SuweFILESDIR_<fn> The location to install the specific file <fn>. 7691.153Slukem 7701.153SlukemFILESNAME_<fn> Optional name to install <fn> as. 7711.124Slukem 7721.285SapbFILESBUILD If this variable is defined, then its value will be 7731.285Sapb used as the default for all FILESBUILD_<fn> variables. 7741.285Sapb Otherwise, the default will be "no". 7751.285Sapb 7761.444SlukemFILESBUILD_<fn> A value different from "no" will add the file to the list of 7771.243Scube targets to be built by `realall'. Users of that variable 7781.243Scube should provide a target to build the file. 7791.243Scube 7801.135Slukem 7811.139SlukemBUILDSYMLINKS List of two word items: 7821.135Slukem lnsrc lntgt 7831.135Slukem For each lnsrc item, create a symlink named lntgt. 7841.135Slukem The lntgt symlinks are removed by the cleandir target. 7851.106Sthorpej 7861.148SjmcUUDECODE_FILES List of files which are stored as <file>.uue in the source 7871.148Sjmc tree. Each one will be decoded with ${TOOL_UUDECODE}. 7881.301Sabs The source files have a `.uue' suffix, the generated files do 7891.148Sjmc not. 7901.149Sjmc 7911.202SuweUUDECODE_FILES_RENAME_<fn> 7921.202Suwe Rename the output from the decode to the provided name. 7931.382Schristos 7941.445Slukem Note: These files are simply decoded, with no install or other 7951.445Slukem rule applying implicitly except being added to the clean 7961.445Slukem target. 7971.106Sthorpej 7981.118Slukem=-=-=-=-= bsd.gcc.mk =-=-=-=-= 7991.113Sthorpej 8001.113SthorpejThe include file <bsd.gcc.mk> computes various parameters related to GCC 8011.113Sthorpejsupport libraries. It defines no targets. <bsd.own.mk> MUST be included 8021.134Slukembefore <bsd.gcc.mk>. 8031.113Sthorpej 8041.134SlukemThe primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each 8051.113Sthorpejof which need to know where to find certain GCC support libraries. 8061.113Sthorpej 8071.134SlukemThe behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable, 8081.113Sthorpejwhich is generally set by the user. If EXTERNAL_TOOLCHAIN it set, then 8091.113Sthorpejthe compiler is asked where to find the support libraries, otherwise the 8101.113Sthorpejsupport libraries are found in ${DESTDIR}/usr/lib. 8111.113Sthorpej 8121.134Slukem<bsd.gcc.mk> sets the following variables: 8131.113Sthorpej 8141.118Slukem_GCC_CRTBEGIN The full path name to crtbegin.o. 8151.118Slukem 8161.118Slukem_GCC_CRTBEGINS The full path name to crtbeginS.o. 8171.118Slukem 8181.118Slukem_GCC_CRTEND The full path name to crtend.o. 8191.118Slukem 8201.118Slukem_GCC_CRTENDS The full path name to crtendS.o. 8211.118Slukem 8221.118Slukem_GCC_LIBGCCDIR The directory where libgcc.a is located. 8231.118Slukem 8241.118Slukem 8251.118Slukem=-=-=-=-= bsd.inc.mk =-=-=-=-= 8261.118Slukem 8271.134SlukemThe include file <bsd.inc.mk> defines the includes target and uses the 8281.118Slukemvariables: 8291.118Slukem 8301.124SlukemINCS The list of include files. 8311.118Slukem 8321.118SlukemINCSDIR The location to install the include files. 8331.118Slukem 8341.118SlukemINCSNAME Target name of the include file, if only one; same as 8351.118Slukem FILESNAME, but for include files. 8361.118Slukem 8371.134SlukemINCSYMLINKS Similar to SYMLINKS in <bsd.links.mk>, except that these 8381.134Slukem are installed in the 'includes' target and not the 8391.134Slukem (much later) 'install' target. 8401.134Slukem 8411.444SlukemINCSNAME_<file> The name file <file> should be installed as, if not <file>, 8421.118Slukem same as FILESNAME_<file>, but for include files. 8431.118Slukem 8441.118Slukem 8451.118Slukem=-=-=-=-= bsd.info.mk =-=-=-=-= 8461.118Slukem 8471.118SlukemThe include file <bsd.info.mk> is used to generate and install GNU Info 8481.118Slukemdocumentation from respective Texinfo source files. It defines three 8491.118Slukemimplicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the 8501.118Slukemfollowing variables: 8511.118Slukem 8521.118SlukemTEXINFO List of Texinfo source files. Info documentation will 8531.118Slukem consist of single files with the extension replaced by 8541.118Slukem .info. 8551.118Slukem 8561.445SlukemINFOFLAGS Options to pass to makeinfo. [] 8571.118Slukem 8581.118Slukem 8591.118Slukem=-=-=-=-= bsd.kernobj.mk =-=-=-=-= 8601.118Slukem 8611.118SlukemThe include file <bsd.kernobj.mk> defines variables related to the 8621.118Slukemlocation of kernel sources and object directories. 8631.118Slukem 8641.445SlukemKERNSRCDIR Directory at the top of the kernel source.. 8651.445Slukem [${NETBSDSRCDIR}/sys] 8661.118Slukem 8671.445SlukemKERNARCHDIR Directory under KERNSRCDIR containing the machine 8681.445Slukem dependent kernel sources. 8691.124Slukem [arch/${MACHINE}] 8701.120Slukem 8711.445SlukemKERNCONFDIR Directory containing the kernel configuration files. 8721.124Slukem [${KERNSRCDIR}/${KERNARCHDIR}/conf] 8731.118Slukem 8741.445SlukemKERNOBJDIR Directory for kernel builds. For example, the kernel 8751.445Slukem GENERIC will be compiled in KERNOBJDIR/GENERIC. 8761.445Slukem Default: 8771.118Slukem ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile 8781.445Slukem if it exists or the make(1) target 'obj' is being made; 8791.445Slukem otherwise ${KERNSRCDIR}/${KERNARCHDIR}/compile. 8801.118Slukem 8811.118SlukemIt is important that Makefiles (such as those under src/distrib) that 8821.134Slukemwish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR} 8831.118Slukemrather than make assumptions about the location of the compiled kernel. 8841.118Slukem 8851.118Slukem 8861.118Slukem=-=-=-=-= bsd.kinc.mk =-=-=-=-= 8871.118Slukem 8881.118SlukemThe include file <bsd.kinc.mk> defines the many targets (includes, 8891.118Slukemsubdirectories, etc.), and is used by kernel makefiles to handle 8901.118Slukeminclude file installation. It is intended to be included alone, by 8911.134Slukemkernel Makefiles. It uses similar variables to <bsd.inc.mk>. 8921.134SlukemPlease see <bsd.kinc.mk> for more details, and keep the documentation 8931.134Slukemin that file up to date. 8941.118Slukem 8951.325Schristos=-=-=-=-= bsd.syscall.mk =-=-=-=-= 8961.325Schristos 8971.325SchristosThe include file <bsd.syscall.mk> contains the logic to create syscall 8981.325Schristosfiles for various emulations. It includes <bsd.kinc.mk> to handle the 8991.325Schristosrest of the targets. 9001.118Slukem 9011.118Slukem=-=-=-=-= bsd.lib.mk =-=-=-=-= 9021.118Slukem 9031.118SlukemThe include file <bsd.lib.mk> has support for building libraries. It has 9041.118Slukemthe same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend, 9051.118Slukemincludes, install, lint, and tags. Additionally, it has a checkver target 9061.118Slukemwhich checks for installed shared object libraries whose version is greater 9071.118Slukemthat the version of the source. It has a limited number of suffixes, 9081.134Slukemconsistent with the current needs of the BSD tree. <bsd.lib.mk> includes 9091.118Slukem<bsd.shlib.mk> to get shared library parameters. 9101.118Slukem 9111.118SlukemIt sets/uses the following variables: 9121.118Slukem 9131.118SlukemLIB The name of the library to build. 9141.118Slukem 9151.118SlukemLIBDIR Target directory for libraries. 9161.118Slukem 9171.444SlukemSHLIBINSTALLDIR Target directory for shared libraries if ${USE_SHLIBDIR} 9181.300Sjoerg is not "no". 9191.300Sjoerg 9201.263SabsSHLIB_MAJOR 9211.263SabsSHLIB_MINOR 9221.263SabsSHLIB_TEENY Major, minor, and teeny version numbers of shared library 9231.263Sabs 9241.300SjoergUSE_SHLIBDIR If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR} 9251.118Slukem as the path to install shared libraries to. 9261.118Slukem USE_SHLIBDIR must be defined before <bsd.own.mk> is included. 9271.130Slukem Default: no 9281.118Slukem 9291.218SlukemLIBISMODULE If not "no", install as ${LIB}.so (without the "lib" prefix), 9301.423Schristos and act as "MKDEBUGLIB=no MKPICINSTALL=no MKPROFILE=no 9311.423Schristos MKSTATICLIB=no". Also do not install the lint library. 9321.218Slukem Default: no 9331.218Slukem 9341.423SchristosLIBISPRIVATE If not "no", act as "MKDEBUGLIB=no MKPIC=no MKPROFILE=no", 9351.423Schristos and don't install the (.a) library or the lint library. 9361.154Slukem This is useful for "build only" helper libraries. 9371.406Schristos If set to "pic", then a _pic.a library is also produced, 9381.406Schristos so that it can be incorporated into other shared objects. 9391.154Slukem Default: no 9401.154Slukem 9411.244SmrgLIBISCXX If not "no", Use ${CXX} instead of ${CC} to link 9421.244Smrg shared libraries. 9431.244Smrg This is useful for C++ libraries. 9441.244Smrg Default: no 9451.244Smrg 9461.118SlukemLINTLIBDIR Target directory for lint libraries. 9471.118Slukem 9481.118SlukemLIBGRP Library group. 9491.118Slukem 9501.118SlukemLIBOWN Library owner. 9511.118Slukem 9521.118SlukemLIBMODE Library mode. 9531.118Slukem 9541.118SlukemLDADD Additional loader objects. 9551.118Slukem 9561.118SlukemMAN The manual pages to be installed (use a .1 - .9 suffix). 9571.118Slukem 9581.118SlukemNOCHECKVER_<library> 9591.118SlukemNOCHECKVER If set, disables checking for installed shared object 9601.118Slukem libraries with versions greater than the source. A 9611.118Slukem particular library name, without the "lib" prefix, may 9621.118Slukem be appended to the variable name to disable the check for 9631.118Slukem only that library. 9641.118Slukem 9651.118SlukemSRCS List of source files to build the library. Suffix types 9661.118Slukem .s, .c, and .f are supported. Note, .s files are preferred 9671.118Slukem to .c files of the same name. (This is not the default for 9681.118Slukem versions of make.) 9691.118Slukem 9701.383SchristosLIBDPLIBS/ 9711.383SchristosPROGDPLIBS A list of the tuples: 9721.444Slukem libname path-to-srcdir-of-libname 9731.157Slukem 9741.384Schristos Instead of depending on installed versions of the libraries, 9751.384Schristos one can depend on their built version in the source directory. 9761.384Schristos This is useful for finding private libraries (LIBISPRIVATE). 9771.384Schristos 9781.157Slukem For each tuple; 9791.157Slukem * LIBDO.libname contains the .OBJDIR of the library 9801.157Slukem `libname', and if it is not set it is determined 9811.157Slukem from the srcdir and added to MAKEOVERRIDES (the 9821.157Slukem latter is to allow for build time optimization). 9831.157Slukem * LDADD gets -L${LIBDO.libname} -llibname added. 9841.157Slukem * DPADD gets ${LIBDO.libname}/liblibname.so or 9851.157Slukem ${LIBDO.libname}/liblibname.a added. 9861.157Slukem 9871.307Spooka The special value "_external" for LIBDO.lib makes the 9881.307Spooka build system to assume the library comes from outside 9891.307Spooka of the NetBSD source tree and only causes -llibname 9901.307Spooka to be added to LDADD. 9911.307Spooka 9921.383Schristos This variable may be used for individual libraries/programs, 9931.383Schristos as well as in parent directories to cache common libraries 9941.157Slukem as a build-time optimization. 9951.157Slukem 9961.446SriastradLIB_EXPSYM File listing all symbols expected to be defined by the 9971.446Sriastrad library. Each line has a single symbol. If the symbol 9981.446Sriastrad is versioned, it is followed by `@@', if it is the 9991.446Sriastrad default version, or `@', if not, and the symbol 10001.446Sriastrad version. The lines must be sorted in LANG=C. 10011.446Sriastrad 10021.446Sriastrad bsd.lib.mk checks to make sure exactly the set of 10031.446Sriastrad symbols in this file is defined when the library is 10041.446Sriastrad built; if not, the build will fail and print a diff 10051.446Sriastrad from the expected symbols to the actual symbols. 10061.446Sriastrad During development, you can update the expected symbols 10071.446Sriastrad from the actual ones with `make update-symbols'. 10081.446Sriastrad 10091.446Sriastrad 10101.118SlukemThe include file <bsd.lib.mk> includes the file named "../Makefile.inc" 10111.118Slukemif it exists, as well as the include file <bsd.man.mk>. 10121.118Slukem 10131.118SlukemIt has rules for building profiled objects; profiled libraries are 10141.118Slukembuilt by default. 10151.118Slukem 10161.118SlukemLibraries are ranlib'd when made. 10171.118Slukem 10181.118Slukem 10191.118Slukem=-=-=-=-= bsd.links.mk =-=-=-=-= 10201.118Slukem 10211.118SlukemThe include file <bsd.links.mk> handles the LINKS and SYMLINKS variables 10221.424Smsaitohand is included from <bsd.lib.mk> and <bsd.prog.mk>. 10231.134Slukem 10241.249SapbLINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log 10251.249Sapbis used. The defaults may be modified by other bsd.*.mk files which 10261.249Sapbinclude bsd.links.mk. In the future, these variables may be replaced 10271.249Sapbby a method for explicitly recording hard links in a metadata log. 10281.249Sapb 10291.134SlukemLINKS The list of hard links, consisting of pairs of paths: 10301.134Slukem source-file target-file 10311.134Slukem ${DESTDIR} is prepended to both paths before linking. 10321.134Slukem For example, to link /bin/test and /bin/[, use: 10331.134Slukem LINKS=/bin/test /bin/[ 10341.134Slukem 10351.153SlukemCONFIGLINKS Similar semantics to LINKS, except that the links 10361.153Slukem are installed by the `configinstall' target, 10371.153Slukem not the `install' target. 10381.153Slukem 10391.134SlukemSYMLINKS The list of symbolic links, consisting of pairs of paths: 10401.134Slukem source-file target-file 10411.134Slukem ${DESTDIR} is only prepended to target-file before linking. 10421.134Slukem For example, to symlink /usr/bin/tar to /bin/tar resulting 10431.134Slukem in ${DESTDIR}/usr/bin/tar -> /bin/tar: 10441.134Slukem SYMLINKS=/bin/tar /usr/bin/tar 10451.118Slukem 10461.153SlukemCONFIGSYMLINKS Similar semantics to SYMLINKS, except that the symbolic links 10471.153Slukem are installed by the `configinstall' target, 10481.153Slukem not the `install' target. 10491.153Slukem 10501.249SapbLINKSOWN Link owner. [${BINOWN}] 10511.249Sapb 10521.249SapbLINKSGRP Link group. [${BINGRP}] 10531.249Sapb 10541.249SapbLINKSMODE Link mode. [${NONBINMODE}] 10551.249Sapb 10561.249SapbLINKSOWN_<fn> Link owner of the specific file <fn>. 10571.249Sapb 10581.249SapbLINKSGRP_<fn> Link group of the specific file <fn>. 10591.249Sapb 10601.249SapbLINKSMODE_<fn> Link mode of the specific file <fn>. 10611.249Sapb 10621.118Slukem 10631.118Slukem=-=-=-=-= bsd.man.mk =-=-=-=-= 10641.118Slukem 10651.118SlukemThe include file <bsd.man.mk> handles installing manual pages and their 10661.118Slukemlinks. 10671.118Slukem 10681.222SlukemIt has a three targets: 10691.118Slukem 10701.415Skamil catinstall: 10711.415Skamil Install the preformatted manual pages and their links. 10721.222Slukem htmlinstall: 10731.222Slukem Install the HTML manual pages and their links. 10741.118Slukem maninstall: 10751.118Slukem Install the manual page sources and their links. 10761.118Slukem 10771.118SlukemIt sets/uses the following variables: 10781.118Slukem 10791.118SlukemMANDIR Base path for manual installation. 10801.118Slukem 10811.118SlukemMANGRP Manual group. 10821.118Slukem 10831.118SlukemMANOWN Manual owner. 10841.118Slukem 10851.118SlukemMANMODE Manual mode. 10861.118Slukem 10871.118SlukemMANSUBDIR Subdirectory under the manual page section, i.e. "/vax" 10881.118Slukem or "/tahoe" for machine specific manual pages. 10891.118Slukem 10901.118SlukemMAN The manual pages to be installed (use a .1 - .9 suffix). 10911.118Slukem 10921.118SlukemMLINKS List of manual page links (using a .1 - .9 suffix). The 10931.118Slukem linked-to file must come first, the linked file second, 10941.276Sreed and there may be multiple pairs. 10951.118Slukem 10961.118SlukemThe include file <bsd.man.mk> includes a file named "../Makefile.inc" if 10971.118Slukemit exists. 10981.118Slukem 10991.118Slukem 11001.118Slukem=-=-=-=-= bsd.obj.mk =-=-=-=-= 11011.118Slukem 11021.118SlukemThe include file <bsd.obj.mk> defines targets related to the creation 11031.118Slukemand use of separated object and source directories. 11041.118Slukem 11051.118SlukemIf an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses 11061.118Slukem${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if 11071.118Slukemit exists. Otherwise make(1) looks for the existence of a 11081.118Slukemsubdirectory (or a symlink to a directory) of the source directory 11091.118Slukeminto which built targets should be placed. If an environment variable 11101.118Slukemnamed MAKEOBJDIR is set, make(1) uses its value as the name of the 11111.118Slukemobject directory; failing that, make first looks for a subdirectory 11121.118Slukemnamed "obj.${MACHINE}", and if that doesn't exist, it looks for "obj". 11131.118Slukem 11141.118SlukemObject directories are not created automatically by make(1) if they 11151.118Slukemdon't exist; you need to run a separate "make obj". (This will happen 11161.118Slukemduring a top-level build if "MKOBJDIRS" is set to a value other than 11171.118Slukem"no"). When the source directory is a subdirectory of ${BSDSRCDIR} -- 11181.118Slukemand this is determined by a simple string prefix comparison -- object 11191.118Slukemdirectories are created in a separate object directory tree, and a 11201.118Slukemsymlink to the object directory in that tree is created in the source 11211.118Slukemdirectory; otherwise, "make obj" assumes that you're not in the main 11221.118Slukemsource tree and that it's not safe to use a separate object tree. 11231.118Slukem 11241.118SlukemSeveral variables used by <bsd.obj.mk> control exactly what 11251.118Slukemdirectories and links get created during a "make obj": 11261.118Slukem 11271.118SlukemMAKEOBJDIR If set, this is the component name of the object 11281.118Slukem directory. 11291.118Slukem 11301.118SlukemOBJMACHINE If this is set but MAKEOBJDIR is not set, creates 11311.118Slukem object directories or links named "obj.${MACHINE}"; 11321.118Slukem otherwise, just creates ones named "obj". 11331.118Slukem 11341.444SlukemOBJMACHINE_ARCH If set with OBJMACHINE, creates object directories or 11351.409Sjmcneill links named "obj.${MACHINE}-${MACHINE_ARCH}". 11361.409Sjmcneill 11371.444SlukemUSR_OBJMACHINE If set, and the current directory is a subdirectory of 11381.118Slukem ${BSDSRCDIR}, create object directory in the 11391.118Slukem corresponding subdirectory of ${BSDOBJDIR}.${MACHINE}; 11401.118Slukem otherwise, create it in the corresponding subdirectory 11411.118Slukem of ${BSDOBJDIR} 11421.113Sthorpej 11431.445SlukemBUILDID Identifier for the build. If set, this should be a short 11441.445Slukem string that is suitable for use as part of a file or 11451.445Slukem directory name. The identifier will be appended to 11461.445Slukem object directory names; if OBJMACHINE is also set, then 11471.445Slukem .BUILDID is appended after .MACHINE. The identifier will 11481.445Slukem also be used as part of the kernel version string, which 11491.445Slukem can be shown by “uname -v”. 11501.445Slukem 11511.445Slukem Default: Unset. 11521.113Sthorpej 11531.106Sthorpej 11541.118Slukem=-=-=-=-= bsd.prog.mk =-=-=-=-= 11551.106Sthorpej 11561.1ScgdThe include file <bsd.prog.mk> handles building programs from one or 11571.1Scgdmore source files, along with their manual pages. It has a limited number 11581.301Sabsof suffixes, consistent with the current needs of the BSD tree. 11591.134Slukem<bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters. 11601.1Scgd 11611.16SjtcIt has eight targets: 11621.1Scgd 11631.1Scgd all: 11641.102Sthorpej build the program and its manual page. This also 11651.102Sthorpej creates a GDB initialization file (.gdbinit) in 11661.102Sthorpej the objdir. The .gdbinit file sets the shared library 11671.102Sthorpej prefix to ${DESTDIR} to facilitate cross-debugging. 11681.1Scgd clean: 11691.1Scgd remove the program, any object files and the files a.out, 11701.24Smikel Errs, errs, mklog, and ${PROG}.core. 11711.1Scgd cleandir: 11721.1Scgd remove all of the files removed by the target clean, as 11731.1Scgd well as .depend, tags, and any manual pages. 11741.42Slukem `distclean' is a synonym for `cleandir'. 11751.1Scgd depend: 11761.1Scgd make the dependencies for the source files, and store 11771.1Scgd them in the file .depend. 11781.16Sjtc includes: 11791.16Sjtc install any header files. 11801.1Scgd install: 11811.1Scgd install the program and its manual pages; if the Makefile 11821.1Scgd does not itself define the target install, the targets 11831.1Scgd beforeinstall and afterinstall may also be used to cause 11841.1Scgd actions immediately before and after the install target 11851.1Scgd is executed. 11861.1Scgd lint: 11871.1Scgd run lint on the source files 11881.1Scgd tags: 11891.1Scgd create a tags file for the source files. 11901.1Scgd 11911.1ScgdIt sets/uses the following variables: 11921.1Scgd 11931.1ScgdBINGRP Binary group. 11941.1Scgd 11951.1ScgdBINOWN Binary owner. 11961.1Scgd 11971.1ScgdBINMODE Binary mode. 11981.1Scgd 11991.286SapbCLEANDIRFILES Additional files to remove for the cleandir target. 12001.286Sapb 12011.1ScgdCLEANFILES Additional files to remove for the clean and cleandir targets. 12021.1Scgd 12031.445SlukemCONFIGOPTS Additional options to config(1) when building kernels. 12041.445Slukem 12051.445Slukem Default: Unset. 12061.445Slukem 12071.445SlukemCOPTS Extra options for the C compiler. Should be appended to 12081.445Slukem (e.g., COPTS+=-g), rather than explicitly set. 12091.337Suebayasi 12101.445Slukem Note: CPUFLAGS, not COPTS, should be used for compiler 12111.445Slukem options that select CPU-related options. 12121.112Sthorpej 12131.445SlukemCOPTS.<fn> Extra options for the C compiler when creating the 12141.125Slukem C objects for <fn>. 12151.125Slukem For <fn>.[ly], "<fn>.c" must be used. 12161.125Slukem 12171.445SlukemCPUFLAGS Additional options passed to the compiler/assembler to 12181.445Slukem select CPU instruction set options, CPU tuning options, 12191.445Slukem etc. 12201.445Slukem 12211.445Slukem Note: Such options should not be specified in COPTS, 12221.445Slukem because some parts of the build process need to override 12231.445Slukem CPU-related compiler options. 12241.35Slukem 12251.445Slukem Default: Unset. 12261.445Slukem 12271.445SlukemCPUFLAGS.<fn> Additional options to the compiler/assembler for <fn>. 12281.125Slukem For <fn>.[ly], "<fn>.c" must be used. 12291.125Slukem 12301.445SlukemCPPFLAGS Additional options to the C pre-processor. 12311.125Slukem 12321.445SlukemCPPFLAGS.<fn> Additional options to the C pre-processor for <fn>. 12331.125Slukem For <fn>.[ly], "<fn>.c" must be used. 12341.102Sthorpej 12351.102SthorpejGDBINIT List of GDB initialization files to add to "source" 12361.102Sthorpej directives in the .gdbinit file that is created in the 12371.102Sthorpej objdir. 12381.1Scgd 12391.1ScgdLDADD Additional loader objects. Usually used for libraries. 12401.1Scgd For example, to load with the compatibility and utility 12411.1Scgd libraries, use: 12421.1Scgd 12431.5Sjtc LDADD+=-lutil -lcompat 12441.1Scgd 12451.445SlukemLDFLAGS Additional linker options (passed to ${CC} during link). 12461.1Scgd 12471.134SlukemLINKS See <bsd.links.mk> 12481.134Slukem 12491.445SlukemOBJCOPTS Additional options to the compiler when creating ObjC objects. 12501.177Smrg 12511.445SlukemOBJCOPTS.<fn> Additional options to the compiler when creating the 12521.177Smrg ObjC objects for <fn>. 12531.177Smrg For <fn>.[ly], "<fn>.c" must be used. 12541.177Smrg 12551.134SlukemSYMLINKS See <bsd.links.mk> 12561.1Scgd 12571.15ScgdMAN Manual pages (should end in .1 - .9). If no MAN variable is 12581.8Scgd defined, "MAN=${PROG}.1" is assumed. 12591.1Scgd 12601.214SwizPAXCTL_FLAGS If defined, run paxctl(1) on the program binary after link 12611.445Slukem time, with the value of this variable as options to paxctl(1). 12621.193Sperry 12631.193SperryPAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS. 12641.193Sperry 12651.1ScgdPROG The name of the program to build. If not supplied, nothing 12661.1Scgd is built. 12671.1Scgd 12681.88SthorpejPROG_CXX If defined, the name of the program to build. Also 12691.88Sthorpej causes <bsd.prog.mk> to link the program with the C++ 12701.88Sthorpej compiler rather than the C compiler. PROG_CXX overrides 12711.88Sthorpej the value of PROG if PROG is also set. 12721.87Sthorpej 12731.21SchristosPROGNAME The name that the above program will be installed as, if 12741.21Schristos different from ${PROG}. 12751.21Schristos 12761.408SlukemPROGS Multiple programs to build from a single directory. 12771.408Slukem Defaults to PROG. For each program ${_P} in ${PROGS}, 12781.408Slukem uses SRCS.${_P}, defaulting to ${_P}.c. 12791.408Slukem 12801.408SlukemPROGS_CXX Multiple C++ programs to build from a single directory. 12811.408Slukem Defaults to PROG_CXX. For each program ${_P} in ${PROGS_CXX}, 12821.408Slukem uses SRCS.${_P}, defaulting to ${_P}.cc. 12831.408Slukem 12841.37StvSRCS List of source files to build the program. If SRCS is not 12851.408Slukem defined, it's assumed to be ${PROG}.c or ${PROG_CXX}.cc. 12861.108Sjwise 12871.108SjwiseDPSRCS List of source files which are needed for generating 12881.108Sjwise dependencies, but are not needed in ${SRCS}. 12891.1Scgd 12901.1ScgdDPADD Additional dependencies for the program. Usually used for 12911.1Scgd libraries. For example, to depend on the compatibility and 12921.1Scgd utility libraries use: 12931.1Scgd 12941.5Sjtc DPADD+=${LIBCOMPAT} ${LIBUTIL} 12951.1Scgd 12961.288Schristos The following system libraries are predefined for DPADD: 12971.1Scgd 12981.382Schristos LIBARCHIVE?= ${DESTDIR}/usr/lib/libarchive.a 12991.382Schristos LIBASN1?= ${DESTDIR}/usr/lib/libasn1.a 13001.382Schristos LIBATF_C?= ${DESTDIR}/usr/lib/libatf-c.a 13011.382Schristos LIBATF_CXX?= ${DESTDIR}/usr/lib/libatf-c++.a 13021.382Schristos LIBBIND9?= ${DESTDIR}/usr/lib/libbind9.a 13031.407Schristos LIBBLOCKLIST?= ${DESTDIR}/usr/lib/libblocklist.a 13041.382Schristos LIBBLUETOOTH?= ${DESTDIR}/usr/lib/libbluetooth.a 13051.382Schristos LIBBSDMALLOC?= ${DESTDIR}/usr/lib/libbsdmalloc.a 13061.382Schristos LIBBZ2?= ${DESTDIR}/usr/lib/libbz2.a 13071.396Schristos LIBC?= ${DESTDIR}/usr/lib/libc.a 13081.382Schristos LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a 13091.398Schristos LIBCBOR?= ${DESTDIR}/usr/lib/libcbor.a 13101.382Schristos LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a 13111.382Schristos LIBCOM_ERR?= ${DESTDIR}/usr/lib/libcom_err.a 13121.382Schristos LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a 13131.382Schristos LIBCRYPTO?= ${DESTDIR}/usr/lib/libcrypto.a 13141.382Schristos LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a 13151.396Schristos LIBCXX?= ${DESTDIR}/usr/lib/libc++.a 13161.382Schristos LIBDES?= ${DESTDIR}/usr/lib/libdes.a 13171.382Schristos LIBDNS?= ${DESTDIR}/usr/lib/libdns.a 13181.382Schristos LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a 13191.382Schristos LIBEVENT?= ${DESTDIR}/usr/lib/libevent.a 13201.315Schristos LIBEVENT_OPENSSL?= ${DESTDIR}/usr/lib/libevent_openssl.a 13211.315Schristos LIBEVENT_PTHREADS?= ${DESTDIR}/usr/lib/libevent_pthreads.a 13221.382Schristos LIBEXECINFO?= ${DESTDIR}/usr/lib/libexecinfo.a 13231.382Schristos LIBEXPAT?= ${DESTDIR}/usr/lib/libexpat.a 13241.382Schristos LIBFETCH?= ${DESTDIR}/usr/lib/libfetch.a 13251.398Schristos LIBFIDO2?= ${DESTDIR}/usr/lib/libfido2.a 13261.382Schristos LIBFL?= ${DESTDIR}/usr/lib/libfl.a 13271.382Schristos LIBFORM?= ${DESTDIR}/usr/lib/libform.a 13281.382Schristos LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a 13291.400Schristos LIBGNUCTF?= ${DESTDIR}/usr/lib/libgnuctf.a 13301.382Schristos LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a 13311.382Schristos LIBGSSAPI?= ${DESTDIR}/usr/lib/libgssapi.a 13321.382Schristos LIBHDB?= ${DESTDIR}/usr/lib/libhdb.a 13331.382Schristos LIBHEIMBASE?= ${DESTDIR}/usr/lib/libheimbase.a 13341.382Schristos LIBHEIMNTLM?= ${DESTDIR}/usr/lib/libheimntlm.a 13351.382Schristos LIBHX500?= ${DESTDIR}/usr/lib/libhx500.a 13361.382Schristos LIBINTL?= ${DESTDIR}/usr/lib/libintl.a 13371.382Schristos LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a 13381.382Schristos LIBISC?= ${DESTDIR}/usr/lib/libisc.a 13391.382Schristos LIBISCCC?= ${DESTDIR}/usr/lib/libisccc.a 13401.382Schristos LIBISCFG?= ${DESTDIR}/usr/lib/libiscfg.a 13411.382Schristos LIBKADM5CLNT?= ${DESTDIR}/usr/lib/libkadm5clnt.a 13421.382Schristos LIBKADM5SRV?= ${DESTDIR}/usr/lib/libkadm5srv.a 13431.382Schristos LIBKAFS?= ${DESTDIR}/usr/lib/libkafs.a 13441.382Schristos LIBKRB5?= ${DESTDIR}/usr/lib/libkrb5.a 13451.382Schristos LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a 13461.382Schristos LIBL?= ${DESTDIR}/usr/lib/libl.a 13471.382Schristos LIBLBER?= ${DESTDIR}/usr/lib/liblber.a 13481.382Schristos LIBLDAP?= ${DESTDIR}/usr/lib/libldap.a 13491.382Schristos LIBLDAP_R?= ${DESTDIR}/usr/lib/libldap_r.a 13501.382Schristos LIBLUA?= ${DESTDIR}/usr/lib/liblua.a 13511.382Schristos LIBM?= ${DESTDIR}/usr/lib/libm.a 13521.382Schristos LIBMAGIC?= ${DESTDIR}/usr/lib/libmagic.a 13531.382Schristos LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a 13541.382Schristos LIBNETPGPVERIFY?= ${DESTDIR}/usr/lib/libnetpgpverify.a 13551.382Schristos LIBNS?= ${DESTDIR}/usr/lib/libns.a 13561.382Schristos LIBOBJC?= ${DESTDIR}/usr/lib/libobjc.a 13571.382Schristos LIBOSSAUDIO?= ${DESTDIR}/usr/lib/libossaudio.a 13581.382Schristos LIBPAM?= ${DESTDIR}/usr/lib/libpam.a 13591.382Schristos LIBPANEL?= ${DESTDIR}/usr/lib/libpanel.a 13601.382Schristos LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a 13611.382Schristos LIBPCI?= ${DESTDIR}/usr/lib/libpci.a 13621.382Schristos LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a 13631.382Schristos LIBPTHREAD?= ${DESTDIR}/usr/lib/libpthread.a 13641.382Schristos LIBPUFFS?= ${DESTDIR}/usr/lib/libpuffs.a 13651.382Schristos LIBQUOTA?= ${DESTDIR}/usr/lib/libquota.a 13661.382Schristos LIBRADIUS?= ${DESTDIR}/usr/lib/libradius.a 13671.382Schristos LIBREFUSE?= ${DESTDIR}/usr/lib/librefuse.a 13681.382Schristos LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a 13691.382Schristos LIBRMT?= ${DESTDIR}/usr/lib/librmt.a 13701.382Schristos LIBROKEN?= ${DESTDIR}/usr/lib/libroken.a 13711.382Schristos LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a 13721.382Schristos LIBRT?= ${DESTDIR}/usr/lib/librt.a 13731.382Schristos LIBRUMP?= ${DESTDIR}/usr/lib/librump.a 13741.396Schristos LIBRUMPFS_CD9660?= ${DESTDIR}/usr/lib/librumpfs_cd9660.a 13751.382Schristos LIBRUMPFS_EFS?= ${DESTDIR}/usr/lib/librumpfs_efs.a 13761.382Schristos LIBRUMPFS_EXT2FS?= ${DESTDIR}/usr/lib/librumpfs_ext2fs.a 13771.382Schristos LIBRUMPFS_FFS?= ${DESTDIR}/usr/lib/librumpfs_ffs.a 13781.382Schristos LIBRUMPFS_HFS?= ${DESTDIR}/usr/lib/librumpfs_hfs.a 13791.382Schristos LIBRUMPFS_LFS?= ${DESTDIR}/usr/lib/librumpfs_lfs.a 13801.396Schristos LIBRUMPFS_MSDOS?= ${DESTDIR}/usr/lib/librumpfs_msdos.a 13811.382Schristos LIBRUMPFS_NFS?= ${DESTDIR}/usr/lib/librumpfs_nfs.a 13821.382Schristos LIBRUMPFS_NTFS?= ${DESTDIR}/usr/lib/librumpfs_ntfs.a 13831.382Schristos LIBRUMPFS_SYSPUFFS?= ${DESTDIR}/usr/lib/librumpfs_syspuffs.a 13841.382Schristos LIBRUMPFS_TMPFS?= ${DESTDIR}/usr/lib/librumpfs_tmpfs.a 13851.382Schristos LIBRUMPFS_UDF?= ${DESTDIR}/usr/lib/librumpfs_udf.a 13861.382Schristos LIBRUMPUSER?= ${DESTDIR}/usr/lib/librumpuser.a 13871.382Schristos LIBSASLC?= ${DESTDIR}/usr/lib/libsaslc.a 13881.382Schristos LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a 13891.382Schristos LIBSL?= ${DESTDIR}/usr/lib/libsl.a 13901.382Schristos LIBSQLITE3?= ${DESTDIR}/usr/lib/libsqlite3.a 13911.382Schristos LIBSSH?= ${DESTDIR}/usr/lib/libssh.a 13921.382Schristos LIBSSL?= ${DESTDIR}/usr/lib/libssl.a 13931.382Schristos LIBSTDCXX?= ${DESTDIR}/usr/lib/libstdc++.a 13941.382Schristos LIBSUPCXX?= ${DESTDIR}/usr/lib/libsupc++.a 13951.382Schristos LIBTERMINFO?= ${DESTDIR}/usr/lib/libterminfo.a 13961.382Schristos LIBTRE?= ${DESTDIR}/usr/lib/libtre.a 13971.382Schristos LIBUNBOUND?= ${DESTDIR}/usr/lib/libunbound.a 13981.382Schristos LIBUSBHID?= ${DESTDIR}/usr/lib/libusbhid.a 13991.382Schristos LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a 14001.382Schristos LIBWIND?= ${DESTDIR}/usr/lib/libwind.a 14011.382Schristos LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a 14021.382Schristos LIBY?= ${DESTDIR}/usr/lib/liby.a 14031.382Schristos LIBZ?= ${DESTDIR}/usr/lib/libz.a 14041.382Schristos 14051.382Schristos The following c startup files. 14061.382Schristos 14071.382Schristos LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o 14081.382Schristos LIBCRTI?= ${DESTDIR}/usr/lib/crti.o 14091.382Schristos LIBCRTBEGIN?= ${DESTDIR}/usr/lib/crti.o 14101.382Schristos LIBCRTEND?= ${DESTDIR}/usr/lib/crtn.o 14111.1Scgd 14121.288Schristos The following X-Windows libraries are predefined for DPADD: 14131.288Schristos 14141.394Schristos LIBDPS?= ${DESTDIR}/usr/X11R7/lib/libdps.a 14151.394Schristos LIBFNTSTUBS?= ${DESTDIR}/usr/X11R7/lib/libfntstubs.a 14161.394Schristos LIBFONTCACHE?= ${DESTDIR}/usr/X11R7/lib/libfontcache.a 14171.394Schristos LIBFONTCONFIG?= ${DESTDIR}/usr/X11R7/lib/libfontconfig.a 14181.394Schristos LIBFONTENC?= ${DESTDIR}/usr/X11R7/lib/libfontenc.a 14191.394Schristos LIBFREETYPE?= ${DESTDIR}/usr/X11R7/lib/libfreetype.a 14201.382Schristos LIBFS?= ${DESTDIR}/usr/X11R7/lib/libFS.a 14211.382Schristos LIBGL?= ${DESTDIR}/usr/X11R7/lib/libGL.a 14221.382Schristos LIBGLU?= ${DESTDIR}/usr/X11R7/lib/libGLU.a 14231.382Schristos LIBICE?= ${DESTDIR}/usr/X11R7/lib/libICE.a 14241.394Schristos LIBLBXUTIL?= ${DESTDIR}/usr/X11R7/lib/liblbxutil.a 14251.382Schristos LIBSM?= ${DESTDIR}/usr/X11R7/lib/libSM.a 14261.382Schristos LIBX11?= ${DESTDIR}/usr/X11R7/lib/libX11.a 14271.382Schristos LIBX11_XCB?= ${DESTDIR}/usr/X11R7/lib/libX11-xcb.a 14281.382Schristos LIBXAU?= ${DESTDIR}/usr/X11R7/lib/libXau.a 14291.382Schristos LIBXAW?= ${DESTDIR}/usr/X11R7/lib/libXaw.a 14301.382Schristos LIBXCB?= ${DESTDIR}/usr/X11R7/lib/libxcb.a 14311.412Snia LIBXCOMPOSITE?= ${DESTDIR}/usr/X11R7/lib/libXcomposite.a 14321.440Smrg LIBXCVT?= ${DESTDIR}/usr/X11R7/lib/libxcvt.a 14331.412Snia LIBXDAMAGE?= ${DESTDIR}/usr/X11R7/lib/libXdamage.a 14341.382Schristos LIBXDMCP?= ${DESTDIR}/usr/X11R7/lib/libXdmcp.a 14351.382Schristos LIBXEXT?= ${DESTDIR}/usr/X11R7/lib/libXext.a 14361.412Snia LIBXFIXES?= ${DESTDIR}/usr/X11R7/lib/libXfixes.a 14371.394Schristos LIBXFONT2?= ${DESTDIR}/usr/X11R7/lib/libXfont2.a 14381.382Schristos LIBXFONT?= ${DESTDIR}/usr/X11R7/lib/libXfont.a 14391.382Schristos LIBXFT?= ${DESTDIR}/usr/X11R7/lib/libXft.a 14401.382Schristos LIBXI?= ${DESTDIR}/usr/X11R7/lib/libXi.a 14411.382Schristos LIBXINERAMA?= ${DESTDIR}/usr/X11R7/lib/libXinerama.a 14421.394Schristos LIBXKBFILE?= ${DESTDIR}/usr/X11R7/lib/libxkbfile.a 14431.382Schristos LIBXMU?= ${DESTDIR}/usr/X11R7/lib/libXmu.a 14441.382Schristos LIBXMUU?= ${DESTDIR}/usr/X11R7/lib/libXmuu.a 14451.382Schristos LIBXPM?= ${DESTDIR}/usr/X11R7/lib/libXpm.a 14461.382Schristos LIBXRANDR?= ${DESTDIR}/usr/X11R7/lib/libXrandr.a 14471.382Schristos LIBXRENDER?= ${DESTDIR}/usr/X11R7/lib/libXrender.a 14481.382Schristos LIBXSS?= ${DESTDIR}/usr/X11R7/lib/libXss.a 14491.382Schristos LIBXT?= ${DESTDIR}/usr/X11R7/lib/libXt.a 14501.394Schristos LIBXTRAP?= ${DESTDIR}/usr/X11R7/lib/libXTrap.a 14511.382Schristos LIBXTST?= ${DESTDIR}/usr/X11R7/lib/libXtst.a 14521.382Schristos LIBXV?= ${DESTDIR}/usr/X11R7/lib/libXv.a 14531.382Schristos LIBXXF86DGA?= ${DESTDIR}/usr/X11R7/lib/libXxf86dga.a 14541.382Schristos LIBXXF86MISC?= ${DESTDIR}/usr/X11R7/lib/libXxf86misc.a 14551.382Schristos LIBXXF86VM?= ${DESTDIR}/usr/X11R7/lib/libXxf86vm.a 14561.288Schristos 14571.445SlukemSTRIPFLAG The option passed to the install program to cause the binary 14581.1Scgd to be stripped. 14591.1Scgd 14601.1ScgdSUBDIR A list of subdirectories that should be built as well. 14611.1Scgd Each of the targets will execute the same target in the 14621.1Scgd subdirectories. 14631.1Scgd 14641.21SchristosSCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}]. 14651.21Schristos These are installed exactly like programs. 14661.21Schristos 14671.166SrtrSCRIPTSDIR The location to install the scripts. Each script can be 14681.166Srtr installed to a separate path by setting SCRIPTSDIR_<script>. 14691.166Srtr 14701.21SchristosSCRIPTSNAME The name that the above program will be installed as, if 14711.21Schristos different from ${SCRIPTS}. These can be further specialized 14721.21Schristos by setting SCRIPTSNAME_<script>. 14731.21Schristos 14741.124SlukemFILES See description of <bsd.files.mk>. 14751.21Schristos 14761.106SthorpejSHLINKDIR Target directory for shared linker. See description of 14771.106Sthorpej <bsd.own.mk> for additional information about this variable. 14781.130Slukem 14791.1ScgdThe include file <bsd.prog.mk> includes the file named "../Makefile.inc" 14801.1Scgdif it exists, as well as the include file <bsd.man.mk>. 14811.1Scgd 14821.1ScgdSome simple examples: 14831.1Scgd 14841.1ScgdTo build foo from foo.c with a manual page foo.1, use: 14851.1Scgd 14861.1Scgd PROG= foo 14871.1Scgd 14881.1Scgd .include <bsd.prog.mk> 14891.1Scgd 14901.1ScgdTo build foo from foo.c with a manual page foo.2, add the line: 14911.1Scgd 14921.9Scgd MAN= foo.2 14931.1Scgd 14941.445SlukemIf foo does not have a manual page at all, add the line 14951.445Slukembefore any make(1) .include directives: 14961.1Scgd 14971.445Slukem NOMAN= 14981.1Scgd 14991.1ScgdIf foo has multiple source files, add the line: 15001.1Scgd 15011.1Scgd SRCS= a.c b.c c.c d.c 15021.1Scgd 15031.1Scgd 15041.118Slukem=-=-=-=-= bsd.rpc.mk =-=-=-=-= 15051.118Slukem 15061.118SlukemThe include file <bsd.rpc.mk> contains a makefile fragment used to 15071.118Slukemconstruct source files built by rpcgen. 15081.72Ssommerfe 15091.118SlukemThe following macros may be defined in makefiles which include 15101.118Slukem<bsd.rpc.mk> in order to control which files get built and how they 15111.118Slukemare to be built: 15121.21Schristos 15131.444SlukemRPC_INCS construct .h file from .x file 15141.444SlukemRPC_XDRFILES construct _xdr.c from .x file 15151.118Slukem (for marshalling/unmarshalling data types) 15161.444SlukemRPC_SVCFILES construct _svc.c from .x file 15171.118Slukem (server-side stubs) 15181.445SlukemRPC_SVCFLAGS Additional options passed to builds of RPC_SVCFILES. 15191.21Schristos 15201.444SlukemRPC_XDIR Directory containing .x/.h files 15211.23Schristos 15221.23Schristos 15231.118Slukem=-=-=-=-= bsd.shlib.mk =-=-=-=-= 15241.21Schristos 15251.118SlukemThe include file <bsd.shlib.mk> computes parameters for shared library 15261.118Slukeminstallation and use. It defines no targets. <bsd.own.mk> MUST be 15271.134Slukemincluded before <bsd.shlib.mk>. 15281.21Schristos 15291.134Slukem<bsd.own.mk> sets the following variables, if they are not already defined 15301.118Slukem(defaults are in brackets): 15311.21Schristos 15321.444SlukemSHLIBINSTALLDIR If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR} 15331.300Sjoerg instead of ${LIBDIR} as the base path for shared library 15341.300Sjoerg installation. [/lib] 15351.300Sjoerg 15361.118SlukemSHLIBDIR The path to USE_SHLIBDIR shared libraries to use when building 15371.118Slukem a program. [/lib for programs in /bin and /sbin, /usr/lib 15381.118Slukem for all others.] 15391.81Swiz 15401.300Sjoerg_LIBSODIR Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no", 15411.118Slukem otherwise set to ${LIBDIR} 15421.81Swiz 15431.300SjoergSHLINKINSTALLDIR Base path for shared linker. [/libexec] 15441.300Sjoerg 15451.118SlukemSHLINKDIR Path to use for shared linker when building a program. 15461.118Slukem [/libexec for programs in /bin and /sbin, /usr/libexec for 15471.118Slukem all others.] 15481.39Scgd 15491.13Schristos 15501.118Slukem=-=-=-=-= bsd.subdir.mk =-=-=-=-= 15511.13Schristos 15521.118SlukemThe include file <bsd.subdir.mk> contains the default targets for building 15531.120Slukemsubdirectories. It has the same eight targets as <bsd.prog.mk>: all, 15541.233Sapbclean, cleandir, depend, includes, install, lint, and tags. It uses the 15551.233Sapbfollowing variables: 15561.233Sapb 15571.233SapbNOSUBDIR If this variable is defined, then the SUBDIR variable 15581.233Sapb will be ignored and subdirectories will not be processed. 15591.233Sapb 15601.233SapbSUBDIR For all of the directories listed in ${SUBDIR}, the 15611.233Sapb specified directory will be visited and the target made. 15621.233Sapb 15631.233Sapb As a special case, the use of a token .WAIT as an 15641.233Sapb entry in SUBDIR acts as a synchronization barrier 15651.233Sapb when multiple make jobs are run; subdirs before the 15661.233Sapb .WAIT must complete before any subdirs after .WAIT are 15671.233Sapb started. See make(1) for some caveats on use of .WAIT 15681.233Sapb and other special sources. 15691.47Stv 15701.47Stv 15711.326Schristos=-=-=-=-= bsd.x11.mk =-=-=-=-= 15721.326Schristos 15731.326SchristosThe include file <bsd.x11.mk> contains parameters and targets for 15741.346Smrgcross-building X11 from ${X11SRCDIR.<package>}. It should be included 15751.346Smrgafter the general Makefile contents but before the include files such as 15761.346Smrg<bsd.prog.mk> and <bsd.lib.mk>. 15771.326Schristos 15781.326SchristosIt provides the following targets: 15791.326Schristos .man.1 .man.3 .man.4 .man.5 .man.7: 15801.326Schristos If ${MAN} or ${PROG} is set and ${MKMAN} != "no", 15811.326Schristos these rules convert from X11's manual page source 15821.326Schristos into an mdoc.old source file. 15831.326Schristos 15841.326SchristosIt sets the following variables: 15851.326Schristos 15861.326SchristosBINDIR Set to ${X11BINDIR}. 15871.326Schristos To override, define after including <bsd.x11.mk> 15881.326Schristos 15891.326SchristosLIBDIR Set to ${X11USRLIBDIR}. 15901.326Schristos To override, define after including <bsd.x11.mk> 15911.326Schristos 15921.326SchristosMANDIR Set to ${X11MANDIR}. 15931.326Schristos To override, define after including <bsd.x11.mk> 15941.326Schristos 15951.326SchristosCPPFLAGS Appended with definitions to include from 15961.326Schristos ${DESTDIR}${X11INCDIR} 15971.326Schristos 15981.326SchristosLDFLAGS Appended with definitions to link from 15991.326Schristos ${DESTDIR}${X11USRLIBDIR} 16001.326Schristos 16011.326SchristosX11FLAGS.CONNECTION Equivalent to X11's CONNECTION_FLAGS. 16021.326Schristos 16031.326SchristosX11FLAGS.EXTENSION Equivalent to X11's EXT_DEFINES. 16041.326Schristos 16051.326SchristosX11FLAGS.LOADABLE Equivalent to X11's LOADABLE. 16061.326Schristos 16071.326SchristosX11FLAGS.OS_DEFINES Equivalent to X11's OS_DEFINES. 16081.326Schristos 16091.326SchristosX11FLAGS.SERVER Equivalent to X11's ServerDefines. 16101.326Schristos 16111.326SchristosX11FLAGS.THREADLIB Equivalent to X11's THREADS_DEFINES for libraries. 16121.326Schristos 16131.326SchristosX11FLAGS.THREADS Equivalent to X11's THREADS_DEFINES. 16141.326Schristos 16151.326SchristosX11FLAGS.VERSION cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION. 16161.326Schristos 16171.326SchristosX11FLAGS.DIX Equivalent to X11's DIX_DEFINES. 16181.326Schristos 16191.326SchristosX11TOOL_UNXCOMM Commandline to convert `XCOMM' comments to `#' 16201.326Schristos 16211.326SchristosIt uses the following variables: 16221.326Schristos 16231.326SchristosAPPDEFS List of app-default files to install. 16241.326Schristos 16251.326SchristosCPPSCRIPTS List of files/scripts to run through cpp(1) 16261.326Schristos and then ${X11TOOL_UNXCOMM}. The source files 16271.326Schristos have a `.cpp' suffix, the generated files do not. 16281.326Schristos 16291.445SlukemCPPSCRIPTFLAGS Additional options to cpp(1) when building CPPSCRIPTS. 16301.326Schristos 16311.445SlukemCPPSCRIPTFLAGS_<fn> Additional options to cpp(1) when building CPPSCRIPT <fn>. 16321.326Schristos 16331.326Schristos 16341.326Schristos=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 16351.326Schristos 16361.326SchristosThe following files are described here for completion, but they are not 16371.326Schristossupposed to be included directly from other Makefiles; they are used 16381.326Schristosinternally by other system files. 16391.326Schristos 16401.118Slukem=-=-=-=-= bsd.sys.mk =-=-=-=-= 16411.47Stv 16421.326SchristosThe include file <bsd.sys.mk> is used by other system mk files and 16431.326Schristosit is not intended to be included standalone. It contains rules and 16441.326Schristossystem build variables. It requires bsd.own.mk to be included first. 16451.326SchristosIt contains overrides that are used when building the NetBSD source tree. 16461.133Slukem 16471.133SlukemThe following variables control how various files are compiled/built. 16481.142Slukem(Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"): 16491.133Slukem 16501.133SlukemAR Create, modify, and extract from archives. [ar] 16511.133Slukem 16521.133SlukemARFLAGS Options to ${AR}. [rl] 16531.133Slukem 16541.387SchristosARM_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout] 16551.387Schristos 16561.151SlukemAS Assembler. [as] 16571.151Slukem 16581.211SlukemAFLAGS Options to ${CC} when compiling or linking .s or .S 16591.211Slukem assembly source files. [] 16601.151Slukem 16611.445SlukemBUILDSEED g++(1) uses random numbers when compiling C++ code. This 16621.445Slukem variable seeds the g++(1) random number generator using 16631.445Slukem -frandom-seed with this value. By default, it is set to 16641.445Slukem "NetBSD-(majorversion)". Using a fixed value causes C++ 16651.445Slukem binaries to be the same when built from the same sources, 16661.445Slukem resulting in identical (reproducible) builds. Additional 16671.445Slukem information is available in the g++(1) documentation of 16681.445Slukem -frandom-seed. 16691.445Slukem 16701.445Slukem Default: Unset. 16711.217Sjoerg 16721.133SlukemCC C compiler. [cc] 16731.133Slukem 16741.133SlukemCFLAGS Options to ${CC}. [Usually -O or -O2] 16751.445Slukem Note: CFLAGS should never be set in mk.conf(5). 16761.133Slukem 16771.133SlukemCPP C Pre-Processor. [cpp] 16781.133Slukem 16791.133SlukemCPPFLAGS Options to ${CPP}. [] 16801.133Slukem 16811.445SlukemCPUFLAGS Optimization options for ${CC}. [] 16821.133Slukem 16831.133SlukemCXX C++ compiler. [c++] 16841.133Slukem 16851.133SlukemCXXFLAGS Options to ${CXX}. [${CFLAGS}] 16861.133Slukem 16871.387SchristosM68K_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout] 16881.387Schristos 16891.387SchristosMIPS_ELF2ECOFF Convert ELF-format executable to ECOFF. [elf2ecoff] 16901.133Slukem 16911.133SlukemFC Fortran compiler. [f77] 16921.133Slukem 16931.133SlukemFFLAGS Options to {$FC}. [-O] 16941.133Slukem 16951.444SlukemHOST_SH Shell. This must be an absolute path, because it may be 16961.444Slukem substituted into "#!" lines in scripts. [/bin/sh] 16971.235Sapb 16981.133SlukemINSTALL install(1) command. [install] 16991.133Slukem 17001.133SlukemLEX Lexical analyzer. [lex] 17011.133Slukem 17021.133SlukemLFLAGS Options to ${LEX}. [] 17031.133Slukem 17041.145SjwiseLPREFIX Symbol prefix for ${LEX} (see -P option in lex(1)) [yy] 17051.145Sjwise 17061.133SlukemLD Linker. [ld] 17071.133Slukem 17081.178SlukemLDFLAGS Options to ${CC} during the link process. [] 17091.133Slukem 17101.133SlukemLINT C program verifier. [lint] 17111.133Slukem 17121.390SchristosLINTFLAGS Options to ${LINT}. [-chapbrxzgFS] 17131.133Slukem 17141.133SlukemLORDER List dependencies for object files. [lorder] 17151.133Slukem 17161.133SlukemMAKE make(1). [make] 17171.133Slukem 17181.133SlukemMKDEP Construct Makefile dependency list. [mkdep] 17191.133Slukem 17201.321SmrgMKDEPCXX Construct Makefile dependency list for C++ files. [mkdep] 17211.321Smrg 17221.133SlukemNM List symbols from object files. [nm] 17231.133Slukem 17241.444SlukemPC Pascal compiler. [pc] (Not present) 17251.133Slukem 17261.133SlukemPFLAGS Options to ${PC}. [] 17271.133Slukem 17281.133SlukemOBJC Objective C compiler. [${CC}] 17291.133Slukem 17301.133SlukemOBJCFLAGS Options to ${OBJC}. [${CFLAGS}] 17311.133Slukem 17321.133SlukemOBJCOPY Copy and translate object files. [objcopy] 17331.133Slukem 17341.445SlukemOBJCOPYLIBFLAGS Options to pass to objcopy when library objects are 17351.291Schristos being built. [${.TARGET} =~ "*.po" ? -X : -x] 17361.291Schristos 17371.168SrizOBJDUMP Display information from object files. [objdump] 17381.168Sriz 17391.133SlukemRANLIB Generate index to archive. [ranlib] 17401.133Slukem 17411.343SpookaREADELF Display information from ELF object files. [readelf] 17421.343Spooka 17431.133SlukemSIZE List section sizes and total size. [size] 17441.133Slukem 17451.343SpookaSTRINGS Display printable character sequences in files. [strings] 17461.343Spooka 17471.133SlukemSTRIP Discard symbols from object files. [strip] 17481.133Slukem 17491.133SlukemTSORT Topological sort of a directed graph. [tsort -q] 17501.133Slukem 17511.133SlukemYACC LALR(1) parser generator. [yacc] 17521.133Slukem 17531.133SlukemYFLAGS Options to ${YACC}. [] 17541.133Slukem 17551.133SlukemYHEADER If defined, add "-d" to YFLAGS, and add dependencies 17561.133Slukem from <file>.y to <file>.h and <file>.c, and add 17571.133Slukem <foo>.h to CLEANFILES. 17581.133Slukem 17591.133SlukemYPREFIX If defined, add "-p ${YPREFIX}" to YFLAGS. 17601.133Slukem 17611.116Slukem 17621.69SsommerfeOther variables of note (incomplete list): 17631.69Ssommerfe 17641.444SlukemNOCLANGERROR If defined and clang is used as C compiler, -Werror is not 17651.444Slukem passed to it. 17661.444Slukem 17671.213SlukemNOGCCERROR If defined, prevents passing certain ${CFLAGS} to GCC 17681.213Slukem that cause warnings to be fatal, such as: 17691.213Slukem -Werror -Wa,--fatal-warnings 17701.213Slukem (The latter being for as(1).) 17711.212Slukem 17721.296SplunkyWARNS Crank up compiler warning options; the distinct levels are: 17731.82Slukem WARNS=1 17741.82Slukem WARNS=2 17751.82Slukem WARNS=3 17761.164Smatt WARNS=4 17771.296Splunky WARNS=5 17781.336Schristos WARNS=6 17791.69Ssommerfe 17801.444Slukem=-=-=-=-= bsd.host.mk =-=-=-=-= 17811.144Slukem 17821.326SchristosThis file is automatically included from bsd.own.mk. It contains settings 17831.326Schristosfor all the HOST_* variables that are used in host programs and libraries. 17841.144Slukem 17851.326SchristosHOST_AR The host archive processing command 17861.144Slukem 17871.326SchristosHOST_CC The host c compiler 17881.144Slukem 17891.445SlukemHOST_CFLAGS The host c compiler options 17901.144Slukem 17911.445SlukemHOST_COMPILE.c The host c compiler line with options 17921.144Slukem 17931.445SlukemHOST_COMPILE.cc The host c++ compiler line with options 17941.144Slukem 17951.326SchristosHOST_CPP The host c pre-processor 17961.144Slukem 17971.445SlukemHOST_CPPFLAGS The host c pre-processor options 17981.144Slukem 17991.326SchristosHOST_CXX The host c++ compiler 18001.144Slukem 18011.445SlukemHOST_CXXFLAGS The host c++ compiler options 18021.144Slukem 18031.326SchristosHOST_INSTALL_DIR The host command to install a directory 18041.144Slukem 18051.326SchristosHOST_INSTALL_FILE The host command to install a file 18061.144Slukem 18071.326SchristosHOST_INSTALL_SYMLINK The host command to install a symlink 18081.144Slukem 18091.326SchristosHOST_LD The host linker command 18101.144Slukem 18111.445SlukemHOST_LDFLAGS The host linker options 18121.144Slukem 18131.445SlukemHOST_LINK.c The host c linker line with options 18141.221Smrg 18151.445SlukemHOST_LINK.cc The host c++ linker line with options 18161.144Slukem 18171.326SchristosHOST_LN The host command to link two files 18181.144Slukem 18191.326SchristosHOST_MKDEP The host command to create dependencies for c programs 18201.144Slukem 18211.326SchristosHOST_MKDEPCXX The host command to create dependencies for c++ programs 18221.144Slukem 18231.326SchristosHOST_OSTYPE The host OSNAME-RELEASE-ARCH tupple 18241.144Slukem 18251.326SchristosHOST_RANLIB The host command to create random access archives 18261.144Slukem 18271.326SchristosHOST_SH The host Bourne shell interpreter name (absolute path) 18281.144Slukem 18291.30Sagc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 1830