bsd.README revision 1.447
11.447Schristos# $NetBSD: bsd.README,v 1.447 2024/04/05 01:16:00 christos 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.447SchristosMAKELINKLIB Defaults to ${MKLINKLIB} but can be overriden by Makefiles 3321.447Schristos 3331.447SchristosMAKESTATICLIB Defaults to ${MKSTATICLIB} but can be overriden by Makefiles 3341.447Schristos 3351.76SfairLDSTATIC Control program linking; if set blank, link everything 3361.129Slukem dynamically. If set to "-static", link everything statically. 3371.76Sfair If not set, programs link according to their makefile. 3381.21Schristos 3391.116SlukemLIBDIR Base path for library installation. [/usr/lib] 3401.15Scgd 3411.116SlukemLINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint] 3421.15Scgd 3431.116SlukemLIBGRP Library group. [${BINGRP}] 3441.15Scgd 3451.116SlukemLIBOWN Library owner. [${BINOWN}] 3461.15Scgd 3471.116SlukemLIBMODE Library mode. [${NONBINMODE}] 3481.15Scgd 3491.447SchristosLINKINSTALL Install libraries used by users to link against (.a/.so) 3501.447Schristos defaults to ${MAKELINKLIB} 3511.447Schristos 3521.15ScgdDOCDIR Base path for system documentation (e.g. PSD, USD, etc.) 3531.444Slukem installation. [/usr/share/doc] 3541.62Ssimonb 3551.116SlukemDOCGRP Documentation group. [wheel] 3561.15Scgd 3571.116SlukemDOCOWN Documentation owner. [root] 3581.15Scgd 3591.116SlukemDOCMODE Documentation mode. [${NONBINMODE}] 3601.15Scgd 3611.445SlukemGZIP_N_FLAG Options to pass to TOOL_GZIP to prevent it from inserting 3621.335Sapb file names or timestamps in the compressed output. 3631.335Sapb [-n, or -nT when TOOL_GZIP is really TOOL_PIGZ] 3641.335Sapb 3651.84SkleinkNLSDIR Base path for Native Language Support files installation. 3661.15Scgd [/usr/share/nls] 3671.1Scgd 3681.116SlukemNLSGRP Native Language Support files group. [wheel] 3691.1Scgd 3701.116SlukemNLSOWN Native Language Support files owner. [root] 3711.1Scgd 3721.116SlukemNLSMODE Native Language Support files mode. [${NONBINMODE}] 3731.1Scgd 3741.445SlukemX11SRCDIR Directory containing the modular Xorg source. If 3751.445Slukem specified, must be an absolute path. The main modular 3761.445Slukem Xorg source is found in ${X11SRCDIR}/external/mit. 3771.445Slukem 3781.445Slukem Default: ${NETBSDSRCDIR}/../xsrc, if that exists; otherwise 3791.445Slukem "/usr/xsrc". 3801.144Slukem 3811.444SlukemX11SRCDIR.local The path to the local X11 src tree. [${X11SRCDIR}/local] 3821.144Slukem 3831.221SmrgX11SRCDIR.lib<package> 3841.221SmrgX11SRCDIR.<package> 3851.425Smsaitoh The path to the xorg src tree for the specified package>. 3861.221Smrg [${X11SRCDIR}/external/mit/xorg/<package>/dist] 3871.221Smrg 3881.367SsnjX11ROOTDIR Root directory of the X11 installation. [/usr/X11R7] 3891.144Slukem 3901.144SlukemX11BINDIR X11 bin directory. [${X11ROOTDIR}/bin] 3911.144Slukem 3921.144SlukemX11FONTDIR X11 font directory. [${X11ROOTDIR}/lib/X11/fonts] 3931.144Slukem 3941.144SlukemX11INCDIR X11 include directory. [${X11ROOTDIR}/include] 3951.144Slukem 3961.144SlukemX11LIBDIR X11 lib/x11 (config) directory. [${X11ROOTDIR}/lib/X11] 3971.144Slukem 3981.144SlukemX11MANDIR X11 manual directory. [${X11ROOTDIR}/man] 3991.144Slukem 4001.144SlukemX11USRLIBDIR X11 library directory. [${X11ROOTDIR}/lib] 4011.144Slukem 4021.445SlukemSTRIPFLAG The option passed to the install program to cause the binary 4031.1Scgd to be stripped. This is to be used when building your 4041.1Scgd own install script so that the entire system can be made 4051.146Slukem stripped/not-stripped using a single knob. [] 4061.1Scgd 4071.445SlukemCOPY The option passed to the install program to cause the binary 4081.2Scgd to be copied rather than moved. This is to be used when 4091.2Scgd building our own install script so that the entire system 4101.2Scgd can either be installed with copies, or with moves using 4111.116Slukem a single knob. [-c] 4121.15Scgd 4131.310SapbMAKEDIRTARGETENV 4141.310Sapb Environment variables passed to the child make process 4151.310Sapb invoked by MAKEDIRTARGET. 4161.310Sapb 4171.150SlukemMAKEDIRTARGET dir target [params] 4181.150Slukem Runs "cd $${dir} && ${MAKE} [params] $${target}", 4191.150Slukem displaying a "pretty" message whilst doing so. 4201.150Slukem 4211.152SclRELEASEMACHINEDIR 4221.152Scl Subdirectory used below RELEASEDIR when building 4231.395Smartin a release. [${MACHINE}, 4241.395Smartin or ${MACHINE}-${MACHINE_ARCH} for evb{arm,mips,sh3}*] 4251.152Scl 4261.152SclRELEASEMACHINE Subdirectory or path component used for the following 4271.152Scl paths: 4281.152Scl distrib/${RELEASEMACHINE} 4291.152Scl distrib/notes/${RELEASEMACHINE} 4301.152Scl etc/etc.${RELEASEMACHINE} 4311.152Scl Used when building a release. [${MACHINE}] 4321.150Slukem 4331.134SlukemAdditionally, the following variables may be set by <bsd.own.mk> or in a 4341.214Swizmake configuration file to modify the behavior of the system build 4351.17Sthorpejprocess (default values are in brackets along with comments, if set by 4361.134Slukem<bsd.own.mk>): 4371.33Sjonathan 4381.445SlukemUSETOOLS Can be set to "yes" or "no". Indicates whether the tools 4391.445Slukem specified by ${TOOLDIR} should be used as part of a build in 4401.445Slukem progress. Must be set to "yes" if cross-compiling. 4411.172Shubertf Supported values: 4421.172Shubertf 4431.172Shubertf yes Use the tools from TOOLDIR. 4441.172Shubertf 4451.172Shubertf no Do not use the tools from TOOLDIR, but refuse to 4461.172Shubertf build native compilation tool components that are 4471.172Shubertf version-specific for that tool. 4481.172Shubertf 4491.172Shubertf never Do not use the tools from TOOLDIR, even when 4501.172Shubertf building native tool components. This is similar to 4511.172Shubertf the traditional NetBSD build method, but does not 4521.172Shubertf verify that the compilation tools in use are 4531.172Shubertf up-to-date enough in order to build the tree 4541.172Shubertf successfully. This may cause build or runtime 4551.172Shubertf problems when building the whole NetBSD source tree. 4561.172Shubertf 4571.445Slukem Default: "no" when using <bsd.*.mk> outside the NetBSD 4581.445Slukem source tree (detected automatically) or if 4591.445Slukem TOOLCHAIN_MISSING=yes; otherwise "yes". 4601.142Slukem 4611.116SlukemOBJECT_FMT Object file format. [set to "ELF" on architectures that 4621.199Ssimonb use ELF -- currently all architectures]. 4631.33Sjonathan 4641.103SthorpejTOOLCHAIN_MISSING 4651.445Slukem Can be set to "yes" or "no". If not "no", this 4661.445Slukem indicates that the platform "MACHINE_ARCH" being built 4671.445Slukem does not have a working in-tree toolchain. 4681.445Slukem If the ${MACHINE_ARCH} in question falls into this category, 4691.301Sabs TOOLCHAIN_MISSING is conditionally assigned the value "yes". 4701.103Sthorpej Otherwise, the variable is unconditionally assigned the 4711.103Sthorpej value "no". 4721.445Slukem 4731.445Slukem If not "no", acts as MKBINUTILS=no MKGCC=no MKGDB=no. 4741.445Slukem 4751.445Slukem Default: "no". 4761.103Sthorpej 4771.103SthorpejEXTERNAL_TOOLCHAIN 4781.103Sthorpej This variable is not directly set by <bsd.own.mk>, but 4791.103Sthorpej including <bsd.own.mk> is the canonical way to gain 4801.103Sthorpej access to this variable. The variable should be defined 4811.445Slukem either in the user's environment or in the user's mk.conf(5) 4821.445Slukem file. 4831.445Slukem 4841.445Slukem If defined, this variable indicates the root directory of 4851.103Sthorpej an external toolchain which will be used to build the 4861.142Slukem tree. For example, if a platform is a ${TOOLCHAIN_MISSING} 4871.103Sthorpej platform, EXTERNAL_TOOLCHAIN can be used to re-enable the 4881.103Sthorpej cross-compile framework. 4891.103Sthorpej 4901.445Slukem If EXTERNAL_TOOLCHAIN is defined, act as MKGCC=no, since 4911.445Slukem the external version of the compiler may not be able to build 4921.445Slukem the library components of the in-tree compiler. 4931.445Slukem 4941.445Slukem This variable should be used in conjunction with an 4951.445Slukem appropriate HAVE_GCC or HAVE_LLVM setting to control the 4961.445Slukem compiler options. 4971.371Sjoerg 4981.445Slukem Note: This variable is not yet used in as many places as 4991.103Sthorpej it should be. Expect the exact semantics of this variable 5001.103Sthorpej to change in the short term as parts of the cross-compile 5011.103Sthorpej framework continue to be cleaned up. 5021.1Scgd 5031.236SapbThe following variables are defined to commands to perform the 5041.236Sapbappropriate operation, with the default in [brackets]. Note that 5051.236Sapbthe defaults change if USETOOLS == "yes": 5061.236Sapb 5071.236SapbTOOL_AMIGAAOUT2BB aout to Amiga bootblock converter. [amiga-aout2bb] 5081.236Sapb 5091.236SapbTOOL_AMIGAELF2BB ELF to Amiga bootblock converter. [amiga-elf2bb] 5101.236Sapb 5111.387SchristosTOOL_AMIGATXLT Amiga assembly language format translator. [amiga-txlt] 5121.387Schristos 5131.387SchristosTOOL_ARMELF2AOUT ELF to a.out executable converter [arm-elf2aout} 5141.236Sapb 5151.236SapbTOOL_ASN1_COMPILE ASN1 compiler. [asn1_compile] 5161.236Sapb 5171.236SapbTOOL_AWK Pattern-directed scanning/processing language. [awk] 5181.236Sapb 5191.236SapbTOOL_CAP_MKDB Create capability database. [cap_mkdb] 5201.236Sapb 5211.236SapbTOOL_CAT Concatenate and print files. [cat] 5221.236Sapb 5231.236SapbTOOL_CKSUM Display file checksums. [cksum] 5241.236Sapb 5251.236SapbTOOL_COMPILE_ET Error table compiler. [compile_et] 5261.236Sapb 5271.236SapbTOOL_CONFIG Build kernel compilation directories. [config] 5281.236Sapb 5291.236SapbTOOL_CRUNCHGEN Generate crunched binary build environment. [crunchgen] 5301.236Sapb 5311.236SapbTOOL_CTAGS Create a tags file. [ctags] 5321.236Sapb 5331.236SapbTOOL_DB Manipulate db(3) databases. [db] 5341.236Sapb 5351.236SapbTOOL_DISKLABEL Read and write disk pack label. [disklabel] 5361.236Sapb 5371.236SapbTOOL_EQN Format equations for groff. [eqn] 5381.236Sapb 5391.236SapbTOOL_FDISK MS-DOS partition maintenance program. [fdisk] 5401.236Sapb 5411.236SapbTOOL_FGEN IEEE 1275 Open Firmware FCode Tokenizer. [fgen] 5421.236Sapb 5431.236SapbTOOL_GENASSYM Generate constants for assembly files. [genassym] 5441.236Sapb 5451.236SapbTOOL_GENCAT Generate NLS message catalogs. [gencat] 5461.236Sapb 5471.236SapbTOOL_GMAKE GNU make utility. [gmake] 5481.236Sapb 5491.247SsketchTOOL_GREP Print lines matching a pattern. [grep] 5501.247Ssketch 5511.236SapbTOOL_GROFF Front end for groff document formatting system. [groff] 5521.236Sapb 5531.327SapbTOOL_GZIP Compression/decompression tool. [gzip] 5541.327Sapb 5551.335SapbTOOL_GZIP_N Same as TOOL_GZIP, plus a command line option to 5561.335Sapb prevent it from inserting file names or timestamps 5571.335Sapb into the compressed output. 5581.335Sapb [${TOOL_GZIP} ${GZIP_N_FLAG}] 5591.335Sapb 5601.236SapbTOOL_HEXDUMP Ascii, decimal, hexadecimal, octal dump. [hexdump] 5611.236Sapb 5621.236SapbTOOL_HP300MKBOOT Make bootable image for hp300. [hp300-mkboot] 5631.236Sapb 5641.328SskrllTOOL_HPPAMKBOOT Make bootable image for hppa. [hppa-mkboot] 5651.236Sapb 5661.236SapbTOOL_INDXBIB Make bibliographic database's inverted index. [indxbib] 5671.236Sapb 5681.236SapbTOOL_INSTALLBOOT Install disk bootstrap software. [installboot] 5691.236Sapb 5701.236SapbTOOL_INSTALL_INFO Update info/dir entries. [install-info] 5711.236Sapb 5721.236SapbTOOL_JOIN Relational database operator. [join] 5731.236Sapb 5741.236SapbTOOL_M4 M4 macro language processor. [m4] 5751.236Sapb 5761.387SchristosTOOL_M68KELF2AOUT ELF to a.out executable converter [m68k-elf2aout} 5771.387Schristos 5781.236SapbTOOL_MACPPCFIXCOFF Fix up xcoff headers for macppc. [macppc-fixcoff] 5791.236Sapb 5801.236SapbTOOL_MAKEFS Create file system image from directory tree. [makefs] 5811.236Sapb 5821.236SapbTOOL_MAKEINFO Translate Texinfo documents. [makeinfo] 5831.236Sapb 5841.236SapbTOOL_MAKEWHATIS Create a whatis.db database. [makewhatis] 5851.236Sapb 5861.236SapbTOOL_MDSETIMAGE Set kernel RAM disk image. [mdsetimage] 5871.236Sapb 5881.236SapbTOOL_MENUC Menu compiler. [menuc] 5891.236Sapb 5901.236SapbTOOL_MIPSELF2ECOFF Convert ELF-format executable to ECOFF for mips. 5911.236Sapb [mips-elf2ecoff] 5921.236Sapb 5931.236SapbTOOL_MKCSMAPPER Make charset mapping table. [mkcsmapper] 5941.236Sapb 5951.236SapbTOOL_MKESDB Make encoding scheme database. [mkesdb] 5961.236Sapb 5971.236SapbTOOL_MKLOCALE Make LC_CTYPE locale files. [mklocale] 5981.236Sapb 5991.236SapbTOOL_MKMAGIC Create database for file(1). [file] 6001.236Sapb 6011.311SjmcneillTOOL_MKNOD Make device special file. [mknod] 6021.311Sjmcneill 6031.236SapbTOOL_MKTEMP Make (unique) temporary file name. [mktemp] 6041.236Sapb 6051.236SapbTOOL_MSGC Simple message list compiler. [msgc] 6061.236Sapb 6071.236SapbTOOL_MTREE Map a directory hierarchy. [mtree] 6081.236Sapb 6091.332SphxTOOL_NCDCS Turn ELF kernel into a NCD firmware image. [ncdcs] 6101.332Sphx 6111.236SapbTOOL_PAX Manipulate file archives and copy directories. [pax] 6121.236Sapb 6131.236SapbTOOL_PIC Compile pictures for groff. [pic] 6141.236Sapb 6151.273SmrgTOOL_PIGZ Parallel compressor. [pigz] 6161.273Smrg 6171.444SlukemTOOL_POWERPCMKBOOTIMAGE Make bootable image for powerpc. [powerpc-mkbootimage] 6181.236Sapb 6191.236SapbTOOL_PWD_MKDB Generate the password databases. [pwd_mkdb] 6201.236Sapb 6211.236SapbTOOL_REFER Preprocess bibliographic references for groff. [refer] 6221.236Sapb 6231.236SapbTOOL_ROFF_ASCII Generate ASCII groff output. [nroff] 6241.236Sapb 6251.236SapbTOOL_ROFF_DVI Generate DVI groff output. [${TOOL_GROFF} -Tdvi] 6261.236Sapb 6271.236SapbTOOL_ROFF_HTML Generate HTML groff output. 6281.236Sapb [${TOOL_GROFF} -Tlatin1 -mdoc2html] 6291.236Sapb 6301.236SapbTOOL_ROFF_PS Generate PS groff output. [${TOOL_GROFF} -Tps] 6311.236Sapb 6321.236SapbTOOL_ROFF_RAW Generate "raw" groff output. [${TOOL_GROFF} -Z] 6331.236Sapb 6341.236SapbTOOL_RPCGEN Remote Procedure Call (RPC) protocol compiler. [rpcgen] 6351.236Sapb 6361.236SapbTOOL_SED Stream editor. [sed] 6371.236Sapb 6381.236SapbTOOL_SOELIM Eliminate .so's from groff input. [soelim] 6391.236Sapb 6401.236SapbTOOL_SPARKCRC Generate a crc suitable for use in a sparkive file. 6411.236Sapb [sparkcrc] 6421.236Sapb 6431.236SapbTOOL_STAT Display file status. [stat] 6441.236Sapb 6451.236SapbTOOL_STRFILE Create a random access file for storing strings. 6461.236Sapb [strfile] 6471.236Sapb 6481.236SapbTOOL_SUNLABEL Read or modify a SunOS disk label. [sunlabel] 6491.236Sapb 6501.236SapbTOOL_TBL Format tables for groff. [tbl] 6511.236Sapb 6521.236SapbTOOL_UUDECODE Uudecode a binary file. [uudecode] 6531.236Sapb 6541.236SapbTOOL_VGRIND Grind nice listings of programs. [vgrind -f] 6551.236Sapb 6561.236SapbTOOL_ZIC Time zone compiler. [zic] 6571.236Sapb 6581.323SmattFor each possible value of MACHINE_CPU, MACHINES.${MACHINE_CPU} contain a 6591.323Smattlist of what ports can be built for it. This keeps those definitions in 6601.323Smattcentralized place. 6611.323Smatt 6621.134Slukem<bsd.own.mk> is generally useful when building your own Makefiles so that 6631.1Scgdthey use the same default owners etc. as the rest of the tree. 6641.131Slukem 6651.131Slukem 6661.286Sapb=-=-=-=-= bsd.clean.mk =-=-=-=-= 6671.286Sapb 6681.286SapbThe include file <bsd.clean.mk> defines the clean and cleandir 6691.286Sapbtargets. It uses the following variables: 6701.286Sapb 6711.286SapbCLEANFILES Files to remove for both the clean and cleandir targets. 6721.286Sapb 6731.286SapbCLEANDIRFILES Files to remove for the cleandir target, but not for 6741.286Sapb the clean target. 6751.286Sapb 6761.287SapbMKCLEANSRC Controls whether or not the clean and cleandir targets 6771.287Sapb will delete files from both the object directory, 6781.287Sapb ${.OBJDIR}, and the source directory, ${.CURDIR}. 6791.287Sapb 6801.287Sapb If MKCLEANSRC is set to "no", then the file names in 6811.287Sapb CLEANFILES or CLEANDIRFILES are interpreted relative 6821.287Sapb to the object directory, ${.OBJDIR}. This is the 6831.287Sapb traditional behaviour. 6841.287Sapb 6851.287Sapb If MKCLEANSRC is set to "yes", then the file deletion 6861.287Sapb is performed relative to both the object directory, 6871.287Sapb ${.OBJDIR}, and the source directory, ${.CURDIR}. (This 6881.287Sapb has no effect if ${.OBJDIR} is the same as ${.CURDIR}.) 6891.287Sapb Deleting files from ${.CURDIR} is intended to remove 6901.287Sapb stray output files that had been left in the source 6911.287Sapb directory by an earlier build that did not use object 6921.287Sapb directories. 6931.287Sapb 6941.287Sapb The default is MKCLEANSRC=yes. If you always build with 6951.287Sapb separate object directories, and you are sure that there 6961.287Sapb are no stray files in the source directories, then you 6971.287Sapb may set MKCLEANSRC=no to save some time. 6981.287Sapb 6991.287SapbMKCLEANVERIFY Controls whether or not the clean and cleandir targets 7001.287Sapb will verify that files have been deleted. 7011.287Sapb 7021.287Sapb If MKCLEANVERIFY is set to "no", then the files will 7031.287Sapb be deleted using a "rm -f" command, and its success or 7041.287Sapb failure will be ignored. 7051.287Sapb 7061.287Sapb If MKCLEANVERIFY is set to "yes", then the success of 7071.287Sapb the "rm -f" command will be verified using an "ls" 7081.287Sapb command. 7091.287Sapb 7101.287Sapb The default is MKCLEANVERIFY=yes. If you are sure that 7111.287Sapb there will be no problems caused by file permissions, 7121.287Sapb read-only file systems, or the like, then you may set 7131.287Sapb MKCLEANVERIFY=no to save some time. 7141.286Sapb 7151.286SapbTo use the clean and cleandir targets defined in <bsd.clean.mk>, other 7161.286SapbMakefiles or bsd.*.mk files should append file names to the CLEANFILES 7171.286Sapbor CLEANDIRFILES variables. For example: 7181.286Sapb 7191.286Sapb CLEANFILES+= a.out 7201.286Sapb CLEANDIRFILES+= .depend 7211.286Sapb 7221.286Sapb .include <bsd.clean.mk> 7231.286Sapb 7241.308SapbThe files listed in CLEANFILES and CLEANDIRFILES must not be 7251.308Sapbdirectories, because the potential risk from running "rm -rf" commands 7261.308Sapbin bsd.clean.mk is considered too great. If you want to recursively 7271.308Sapbdelete a directory as part of "make clean" or "make cleandir" then you 7281.308Sapbneed to provide your own target. 7291.286Sapb 7301.131Slukem=-=-=-=-= bsd.dep.mk =-=-=-=-= 7311.131Slukem 7321.131SlukemThe include file <bsd.dep.mk> contains the default targets for building 7331.133Slukem.depend files. It creates .d files from entries in SRCS and DPSRCS 7341.133Slukemthat are C, C++, or Objective C source files, and builds .depend from the 7351.133Slukem.d files. All other files in SRCS and all of DPSRCS will be used as 7361.133Slukemdependencies for the .d files. In order for this to function correctly, 7371.132Slukemit should be .included after all other .mk files and directives that may 7381.132Slukemmodify SRCS or DPSRCS. It uses the following variables: 7391.132Slukem 7401.132SlukemSRCS List of source files to build the program. 7411.132Slukem 7421.132SlukemDPSRCS List of source files which are needed for generating 7431.132Slukem dependencies, but are not needed in ${SRCS}. 7441.1Scgd 7451.444SlukemNODPSRCS TODO 7461.1Scgd 7471.118Slukem=-=-=-=-= bsd.files.mk =-=-=-=-= 7481.106Sthorpej 7491.118SlukemThe include file <bsd.files.mk> handles the FILES variables and is included 7501.134Slukemfrom <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables: 7511.124Slukem 7521.124SlukemFILES The list of files to install. 7531.124Slukem 7541.153SlukemCONFIGFILES Similar semantics to FILES, except that the files 7551.153Slukem are installed by the `configinstall' target, 7561.153Slukem not the `install' target. 7571.153Slukem The FILES* variables documented below also apply. 7581.153Slukem 7591.124SlukemFILESOWN File owner. [${BINOWN}] 7601.124Slukem 7611.124SlukemFILESGRP File group. [${BINGRP}] 7621.124Slukem 7631.203SdhollandFILESMODE File mode. [${NONBINMODE}] 7641.124Slukem 7651.124SlukemFILESDIR The location to install the files. 7661.124Slukem 7671.124SlukemFILESNAME Optional name to install each file as. 7681.124Slukem 7691.153SlukemFILESOWN_<fn> File owner of the specific file <fn>. 7701.153Slukem 7711.153SlukemFILESGRP_<fn> File group of the specific file <fn>. 7721.153Slukem 7731.153SlukemFILESMODE_<fn> File mode of the specific file <fn>. 7741.153Slukem 7751.202SuweFILESDIR_<fn> The location to install the specific file <fn>. 7761.153Slukem 7771.153SlukemFILESNAME_<fn> Optional name to install <fn> as. 7781.124Slukem 7791.285SapbFILESBUILD If this variable is defined, then its value will be 7801.285Sapb used as the default for all FILESBUILD_<fn> variables. 7811.285Sapb Otherwise, the default will be "no". 7821.285Sapb 7831.444SlukemFILESBUILD_<fn> A value different from "no" will add the file to the list of 7841.243Scube targets to be built by `realall'. Users of that variable 7851.243Scube should provide a target to build the file. 7861.243Scube 7871.135Slukem 7881.139SlukemBUILDSYMLINKS List of two word items: 7891.135Slukem lnsrc lntgt 7901.135Slukem For each lnsrc item, create a symlink named lntgt. 7911.135Slukem The lntgt symlinks are removed by the cleandir target. 7921.106Sthorpej 7931.148SjmcUUDECODE_FILES List of files which are stored as <file>.uue in the source 7941.148Sjmc tree. Each one will be decoded with ${TOOL_UUDECODE}. 7951.301Sabs The source files have a `.uue' suffix, the generated files do 7961.148Sjmc not. 7971.149Sjmc 7981.202SuweUUDECODE_FILES_RENAME_<fn> 7991.202Suwe Rename the output from the decode to the provided name. 8001.382Schristos 8011.445Slukem Note: These files are simply decoded, with no install or other 8021.445Slukem rule applying implicitly except being added to the clean 8031.445Slukem target. 8041.106Sthorpej 8051.118Slukem=-=-=-=-= bsd.gcc.mk =-=-=-=-= 8061.113Sthorpej 8071.113SthorpejThe include file <bsd.gcc.mk> computes various parameters related to GCC 8081.113Sthorpejsupport libraries. It defines no targets. <bsd.own.mk> MUST be included 8091.134Slukembefore <bsd.gcc.mk>. 8101.113Sthorpej 8111.134SlukemThe primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each 8121.113Sthorpejof which need to know where to find certain GCC support libraries. 8131.113Sthorpej 8141.134SlukemThe behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable, 8151.113Sthorpejwhich is generally set by the user. If EXTERNAL_TOOLCHAIN it set, then 8161.113Sthorpejthe compiler is asked where to find the support libraries, otherwise the 8171.113Sthorpejsupport libraries are found in ${DESTDIR}/usr/lib. 8181.113Sthorpej 8191.134Slukem<bsd.gcc.mk> sets the following variables: 8201.113Sthorpej 8211.118Slukem_GCC_CRTBEGIN The full path name to crtbegin.o. 8221.118Slukem 8231.118Slukem_GCC_CRTBEGINS The full path name to crtbeginS.o. 8241.118Slukem 8251.118Slukem_GCC_CRTEND The full path name to crtend.o. 8261.118Slukem 8271.118Slukem_GCC_CRTENDS The full path name to crtendS.o. 8281.118Slukem 8291.118Slukem_GCC_LIBGCCDIR The directory where libgcc.a is located. 8301.118Slukem 8311.118Slukem 8321.118Slukem=-=-=-=-= bsd.inc.mk =-=-=-=-= 8331.118Slukem 8341.134SlukemThe include file <bsd.inc.mk> defines the includes target and uses the 8351.118Slukemvariables: 8361.118Slukem 8371.124SlukemINCS The list of include files. 8381.118Slukem 8391.118SlukemINCSDIR The location to install the include files. 8401.118Slukem 8411.118SlukemINCSNAME Target name of the include file, if only one; same as 8421.118Slukem FILESNAME, but for include files. 8431.118Slukem 8441.134SlukemINCSYMLINKS Similar to SYMLINKS in <bsd.links.mk>, except that these 8451.134Slukem are installed in the 'includes' target and not the 8461.134Slukem (much later) 'install' target. 8471.134Slukem 8481.444SlukemINCSNAME_<file> The name file <file> should be installed as, if not <file>, 8491.118Slukem same as FILESNAME_<file>, but for include files. 8501.118Slukem 8511.118Slukem 8521.118Slukem=-=-=-=-= bsd.info.mk =-=-=-=-= 8531.118Slukem 8541.118SlukemThe include file <bsd.info.mk> is used to generate and install GNU Info 8551.118Slukemdocumentation from respective Texinfo source files. It defines three 8561.118Slukemimplicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the 8571.118Slukemfollowing variables: 8581.118Slukem 8591.118SlukemTEXINFO List of Texinfo source files. Info documentation will 8601.118Slukem consist of single files with the extension replaced by 8611.118Slukem .info. 8621.118Slukem 8631.445SlukemINFOFLAGS Options to pass to makeinfo. [] 8641.118Slukem 8651.118Slukem 8661.118Slukem=-=-=-=-= bsd.kernobj.mk =-=-=-=-= 8671.118Slukem 8681.118SlukemThe include file <bsd.kernobj.mk> defines variables related to the 8691.118Slukemlocation of kernel sources and object directories. 8701.118Slukem 8711.445SlukemKERNSRCDIR Directory at the top of the kernel source.. 8721.445Slukem [${NETBSDSRCDIR}/sys] 8731.118Slukem 8741.445SlukemKERNARCHDIR Directory under KERNSRCDIR containing the machine 8751.445Slukem dependent kernel sources. 8761.124Slukem [arch/${MACHINE}] 8771.120Slukem 8781.445SlukemKERNCONFDIR Directory containing the kernel configuration files. 8791.124Slukem [${KERNSRCDIR}/${KERNARCHDIR}/conf] 8801.118Slukem 8811.445SlukemKERNOBJDIR Directory for kernel builds. For example, the kernel 8821.445Slukem GENERIC will be compiled in KERNOBJDIR/GENERIC. 8831.445Slukem Default: 8841.118Slukem ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile 8851.445Slukem if it exists or the make(1) target 'obj' is being made; 8861.445Slukem otherwise ${KERNSRCDIR}/${KERNARCHDIR}/compile. 8871.118Slukem 8881.118SlukemIt is important that Makefiles (such as those under src/distrib) that 8891.134Slukemwish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR} 8901.118Slukemrather than make assumptions about the location of the compiled kernel. 8911.118Slukem 8921.118Slukem 8931.118Slukem=-=-=-=-= bsd.kinc.mk =-=-=-=-= 8941.118Slukem 8951.118SlukemThe include file <bsd.kinc.mk> defines the many targets (includes, 8961.118Slukemsubdirectories, etc.), and is used by kernel makefiles to handle 8971.118Slukeminclude file installation. It is intended to be included alone, by 8981.134Slukemkernel Makefiles. It uses similar variables to <bsd.inc.mk>. 8991.134SlukemPlease see <bsd.kinc.mk> for more details, and keep the documentation 9001.134Slukemin that file up to date. 9011.118Slukem 9021.325Schristos=-=-=-=-= bsd.syscall.mk =-=-=-=-= 9031.325Schristos 9041.325SchristosThe include file <bsd.syscall.mk> contains the logic to create syscall 9051.325Schristosfiles for various emulations. It includes <bsd.kinc.mk> to handle the 9061.325Schristosrest of the targets. 9071.118Slukem 9081.118Slukem=-=-=-=-= bsd.lib.mk =-=-=-=-= 9091.118Slukem 9101.118SlukemThe include file <bsd.lib.mk> has support for building libraries. It has 9111.118Slukemthe same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend, 9121.118Slukemincludes, install, lint, and tags. Additionally, it has a checkver target 9131.118Slukemwhich checks for installed shared object libraries whose version is greater 9141.118Slukemthat the version of the source. It has a limited number of suffixes, 9151.134Slukemconsistent with the current needs of the BSD tree. <bsd.lib.mk> includes 9161.118Slukem<bsd.shlib.mk> to get shared library parameters. 9171.118Slukem 9181.118SlukemIt sets/uses the following variables: 9191.118Slukem 9201.118SlukemLIB The name of the library to build. 9211.118Slukem 9221.118SlukemLIBDIR Target directory for libraries. 9231.118Slukem 9241.444SlukemSHLIBINSTALLDIR Target directory for shared libraries if ${USE_SHLIBDIR} 9251.300Sjoerg is not "no". 9261.300Sjoerg 9271.263SabsSHLIB_MAJOR 9281.263SabsSHLIB_MINOR 9291.263SabsSHLIB_TEENY Major, minor, and teeny version numbers of shared library 9301.263Sabs 9311.300SjoergUSE_SHLIBDIR If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR} 9321.118Slukem as the path to install shared libraries to. 9331.118Slukem USE_SHLIBDIR must be defined before <bsd.own.mk> is included. 9341.130Slukem Default: no 9351.118Slukem 9361.218SlukemLIBISMODULE If not "no", install as ${LIB}.so (without the "lib" prefix), 9371.423Schristos and act as "MKDEBUGLIB=no MKPICINSTALL=no MKPROFILE=no 9381.423Schristos MKSTATICLIB=no". Also do not install the lint library. 9391.218Slukem Default: no 9401.218Slukem 9411.423SchristosLIBISPRIVATE If not "no", act as "MKDEBUGLIB=no MKPIC=no MKPROFILE=no", 9421.423Schristos and don't install the (.a) library or the lint library. 9431.154Slukem This is useful for "build only" helper libraries. 9441.406Schristos If set to "pic", then a _pic.a library is also produced, 9451.406Schristos so that it can be incorporated into other shared objects. 9461.154Slukem Default: no 9471.154Slukem 9481.244SmrgLIBISCXX If not "no", Use ${CXX} instead of ${CC} to link 9491.244Smrg shared libraries. 9501.244Smrg This is useful for C++ libraries. 9511.244Smrg Default: no 9521.244Smrg 9531.118SlukemLINTLIBDIR Target directory for lint libraries. 9541.118Slukem 9551.118SlukemLIBGRP Library group. 9561.118Slukem 9571.118SlukemLIBOWN Library owner. 9581.118Slukem 9591.118SlukemLIBMODE Library mode. 9601.118Slukem 9611.118SlukemLDADD Additional loader objects. 9621.118Slukem 9631.118SlukemMAN The manual pages to be installed (use a .1 - .9 suffix). 9641.118Slukem 9651.118SlukemNOCHECKVER_<library> 9661.118SlukemNOCHECKVER If set, disables checking for installed shared object 9671.118Slukem libraries with versions greater than the source. A 9681.118Slukem particular library name, without the "lib" prefix, may 9691.118Slukem be appended to the variable name to disable the check for 9701.118Slukem only that library. 9711.118Slukem 9721.118SlukemSRCS List of source files to build the library. Suffix types 9731.118Slukem .s, .c, and .f are supported. Note, .s files are preferred 9741.118Slukem to .c files of the same name. (This is not the default for 9751.118Slukem versions of make.) 9761.118Slukem 9771.383SchristosLIBDPLIBS/ 9781.383SchristosPROGDPLIBS A list of the tuples: 9791.444Slukem libname path-to-srcdir-of-libname 9801.157Slukem 9811.384Schristos Instead of depending on installed versions of the libraries, 9821.384Schristos one can depend on their built version in the source directory. 9831.384Schristos This is useful for finding private libraries (LIBISPRIVATE). 9841.384Schristos 9851.157Slukem For each tuple; 9861.157Slukem * LIBDO.libname contains the .OBJDIR of the library 9871.157Slukem `libname', and if it is not set it is determined 9881.157Slukem from the srcdir and added to MAKEOVERRIDES (the 9891.157Slukem latter is to allow for build time optimization). 9901.157Slukem * LDADD gets -L${LIBDO.libname} -llibname added. 9911.157Slukem * DPADD gets ${LIBDO.libname}/liblibname.so or 9921.157Slukem ${LIBDO.libname}/liblibname.a added. 9931.157Slukem 9941.307Spooka The special value "_external" for LIBDO.lib makes the 9951.307Spooka build system to assume the library comes from outside 9961.307Spooka of the NetBSD source tree and only causes -llibname 9971.307Spooka to be added to LDADD. 9981.307Spooka 9991.383Schristos This variable may be used for individual libraries/programs, 10001.383Schristos as well as in parent directories to cache common libraries 10011.157Slukem as a build-time optimization. 10021.157Slukem 10031.446SriastradLIB_EXPSYM File listing all symbols expected to be defined by the 10041.446Sriastrad library. Each line has a single symbol. If the symbol 10051.446Sriastrad is versioned, it is followed by `@@', if it is the 10061.446Sriastrad default version, or `@', if not, and the symbol 10071.446Sriastrad version. The lines must be sorted in LANG=C. 10081.446Sriastrad 10091.446Sriastrad bsd.lib.mk checks to make sure exactly the set of 10101.446Sriastrad symbols in this file is defined when the library is 10111.446Sriastrad built; if not, the build will fail and print a diff 10121.446Sriastrad from the expected symbols to the actual symbols. 10131.446Sriastrad During development, you can update the expected symbols 10141.446Sriastrad from the actual ones with `make update-symbols'. 10151.446Sriastrad 10161.446Sriastrad 10171.118SlukemThe include file <bsd.lib.mk> includes the file named "../Makefile.inc" 10181.118Slukemif it exists, as well as the include file <bsd.man.mk>. 10191.118Slukem 10201.118SlukemIt has rules for building profiled objects; profiled libraries are 10211.118Slukembuilt by default. 10221.118Slukem 10231.118SlukemLibraries are ranlib'd when made. 10241.118Slukem 10251.118Slukem 10261.118Slukem=-=-=-=-= bsd.links.mk =-=-=-=-= 10271.118Slukem 10281.118SlukemThe include file <bsd.links.mk> handles the LINKS and SYMLINKS variables 10291.424Smsaitohand is included from <bsd.lib.mk> and <bsd.prog.mk>. 10301.134Slukem 10311.249SapbLINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log 10321.249Sapbis used. The defaults may be modified by other bsd.*.mk files which 10331.249Sapbinclude bsd.links.mk. In the future, these variables may be replaced 10341.249Sapbby a method for explicitly recording hard links in a metadata log. 10351.249Sapb 10361.134SlukemLINKS The list of hard links, consisting of pairs of paths: 10371.134Slukem source-file target-file 10381.134Slukem ${DESTDIR} is prepended to both paths before linking. 10391.134Slukem For example, to link /bin/test and /bin/[, use: 10401.134Slukem LINKS=/bin/test /bin/[ 10411.134Slukem 10421.153SlukemCONFIGLINKS Similar semantics to LINKS, except that the links 10431.153Slukem are installed by the `configinstall' target, 10441.153Slukem not the `install' target. 10451.153Slukem 10461.134SlukemSYMLINKS The list of symbolic links, consisting of pairs of paths: 10471.134Slukem source-file target-file 10481.134Slukem ${DESTDIR} is only prepended to target-file before linking. 10491.134Slukem For example, to symlink /usr/bin/tar to /bin/tar resulting 10501.134Slukem in ${DESTDIR}/usr/bin/tar -> /bin/tar: 10511.134Slukem SYMLINKS=/bin/tar /usr/bin/tar 10521.118Slukem 10531.153SlukemCONFIGSYMLINKS Similar semantics to SYMLINKS, except that the symbolic links 10541.153Slukem are installed by the `configinstall' target, 10551.153Slukem not the `install' target. 10561.153Slukem 10571.249SapbLINKSOWN Link owner. [${BINOWN}] 10581.249Sapb 10591.249SapbLINKSGRP Link group. [${BINGRP}] 10601.249Sapb 10611.249SapbLINKSMODE Link mode. [${NONBINMODE}] 10621.249Sapb 10631.249SapbLINKSOWN_<fn> Link owner of the specific file <fn>. 10641.249Sapb 10651.249SapbLINKSGRP_<fn> Link group of the specific file <fn>. 10661.249Sapb 10671.249SapbLINKSMODE_<fn> Link mode of the specific file <fn>. 10681.249Sapb 10691.118Slukem 10701.118Slukem=-=-=-=-= bsd.man.mk =-=-=-=-= 10711.118Slukem 10721.118SlukemThe include file <bsd.man.mk> handles installing manual pages and their 10731.118Slukemlinks. 10741.118Slukem 10751.222SlukemIt has a three targets: 10761.118Slukem 10771.415Skamil catinstall: 10781.415Skamil Install the preformatted manual pages and their links. 10791.222Slukem htmlinstall: 10801.222Slukem Install the HTML manual pages and their links. 10811.118Slukem maninstall: 10821.118Slukem Install the manual page sources and their links. 10831.118Slukem 10841.118SlukemIt sets/uses the following variables: 10851.118Slukem 10861.118SlukemMANDIR Base path for manual installation. 10871.118Slukem 10881.118SlukemMANGRP Manual group. 10891.118Slukem 10901.118SlukemMANOWN Manual owner. 10911.118Slukem 10921.118SlukemMANMODE Manual mode. 10931.118Slukem 10941.118SlukemMANSUBDIR Subdirectory under the manual page section, i.e. "/vax" 10951.118Slukem or "/tahoe" for machine specific manual pages. 10961.118Slukem 10971.118SlukemMAN The manual pages to be installed (use a .1 - .9 suffix). 10981.118Slukem 10991.118SlukemMLINKS List of manual page links (using a .1 - .9 suffix). The 11001.118Slukem linked-to file must come first, the linked file second, 11011.276Sreed and there may be multiple pairs. 11021.118Slukem 11031.118SlukemThe include file <bsd.man.mk> includes a file named "../Makefile.inc" if 11041.118Slukemit exists. 11051.118Slukem 11061.118Slukem 11071.118Slukem=-=-=-=-= bsd.obj.mk =-=-=-=-= 11081.118Slukem 11091.118SlukemThe include file <bsd.obj.mk> defines targets related to the creation 11101.118Slukemand use of separated object and source directories. 11111.118Slukem 11121.118SlukemIf an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses 11131.118Slukem${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if 11141.118Slukemit exists. Otherwise make(1) looks for the existence of a 11151.118Slukemsubdirectory (or a symlink to a directory) of the source directory 11161.118Slukeminto which built targets should be placed. If an environment variable 11171.118Slukemnamed MAKEOBJDIR is set, make(1) uses its value as the name of the 11181.118Slukemobject directory; failing that, make first looks for a subdirectory 11191.118Slukemnamed "obj.${MACHINE}", and if that doesn't exist, it looks for "obj". 11201.118Slukem 11211.118SlukemObject directories are not created automatically by make(1) if they 11221.118Slukemdon't exist; you need to run a separate "make obj". (This will happen 11231.118Slukemduring a top-level build if "MKOBJDIRS" is set to a value other than 11241.118Slukem"no"). When the source directory is a subdirectory of ${BSDSRCDIR} -- 11251.118Slukemand this is determined by a simple string prefix comparison -- object 11261.118Slukemdirectories are created in a separate object directory tree, and a 11271.118Slukemsymlink to the object directory in that tree is created in the source 11281.118Slukemdirectory; otherwise, "make obj" assumes that you're not in the main 11291.118Slukemsource tree and that it's not safe to use a separate object tree. 11301.118Slukem 11311.118SlukemSeveral variables used by <bsd.obj.mk> control exactly what 11321.118Slukemdirectories and links get created during a "make obj": 11331.118Slukem 11341.118SlukemMAKEOBJDIR If set, this is the component name of the object 11351.118Slukem directory. 11361.118Slukem 11371.118SlukemOBJMACHINE If this is set but MAKEOBJDIR is not set, creates 11381.118Slukem object directories or links named "obj.${MACHINE}"; 11391.118Slukem otherwise, just creates ones named "obj". 11401.118Slukem 11411.444SlukemOBJMACHINE_ARCH If set with OBJMACHINE, creates object directories or 11421.409Sjmcneill links named "obj.${MACHINE}-${MACHINE_ARCH}". 11431.409Sjmcneill 11441.444SlukemUSR_OBJMACHINE If set, and the current directory is a subdirectory of 11451.118Slukem ${BSDSRCDIR}, create object directory in the 11461.118Slukem corresponding subdirectory of ${BSDOBJDIR}.${MACHINE}; 11471.118Slukem otherwise, create it in the corresponding subdirectory 11481.118Slukem of ${BSDOBJDIR} 11491.113Sthorpej 11501.445SlukemBUILDID Identifier for the build. If set, this should be a short 11511.445Slukem string that is suitable for use as part of a file or 11521.445Slukem directory name. The identifier will be appended to 11531.445Slukem object directory names; if OBJMACHINE is also set, then 11541.445Slukem .BUILDID is appended after .MACHINE. The identifier will 11551.445Slukem also be used as part of the kernel version string, which 11561.445Slukem can be shown by “uname -v”. 11571.445Slukem 11581.445Slukem Default: Unset. 11591.113Sthorpej 11601.106Sthorpej 11611.118Slukem=-=-=-=-= bsd.prog.mk =-=-=-=-= 11621.106Sthorpej 11631.1ScgdThe include file <bsd.prog.mk> handles building programs from one or 11641.1Scgdmore source files, along with their manual pages. It has a limited number 11651.301Sabsof suffixes, consistent with the current needs of the BSD tree. 11661.134Slukem<bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters. 11671.1Scgd 11681.16SjtcIt has eight targets: 11691.1Scgd 11701.1Scgd all: 11711.102Sthorpej build the program and its manual page. This also 11721.102Sthorpej creates a GDB initialization file (.gdbinit) in 11731.102Sthorpej the objdir. The .gdbinit file sets the shared library 11741.102Sthorpej prefix to ${DESTDIR} to facilitate cross-debugging. 11751.1Scgd clean: 11761.1Scgd remove the program, any object files and the files a.out, 11771.24Smikel Errs, errs, mklog, and ${PROG}.core. 11781.1Scgd cleandir: 11791.1Scgd remove all of the files removed by the target clean, as 11801.1Scgd well as .depend, tags, and any manual pages. 11811.42Slukem `distclean' is a synonym for `cleandir'. 11821.1Scgd depend: 11831.1Scgd make the dependencies for the source files, and store 11841.1Scgd them in the file .depend. 11851.16Sjtc includes: 11861.16Sjtc install any header files. 11871.1Scgd install: 11881.1Scgd install the program and its manual pages; if the Makefile 11891.1Scgd does not itself define the target install, the targets 11901.1Scgd beforeinstall and afterinstall may also be used to cause 11911.1Scgd actions immediately before and after the install target 11921.1Scgd is executed. 11931.1Scgd lint: 11941.1Scgd run lint on the source files 11951.1Scgd tags: 11961.1Scgd create a tags file for the source files. 11971.1Scgd 11981.1ScgdIt sets/uses the following variables: 11991.1Scgd 12001.1ScgdBINGRP Binary group. 12011.1Scgd 12021.1ScgdBINOWN Binary owner. 12031.1Scgd 12041.1ScgdBINMODE Binary mode. 12051.1Scgd 12061.286SapbCLEANDIRFILES Additional files to remove for the cleandir target. 12071.286Sapb 12081.1ScgdCLEANFILES Additional files to remove for the clean and cleandir targets. 12091.1Scgd 12101.445SlukemCONFIGOPTS Additional options to config(1) when building kernels. 12111.445Slukem 12121.445Slukem Default: Unset. 12131.445Slukem 12141.445SlukemCOPTS Extra options for the C compiler. Should be appended to 12151.445Slukem (e.g., COPTS+=-g), rather than explicitly set. 12161.337Suebayasi 12171.445Slukem Note: CPUFLAGS, not COPTS, should be used for compiler 12181.445Slukem options that select CPU-related options. 12191.112Sthorpej 12201.445SlukemCOPTS.<fn> Extra options for the C compiler when creating the 12211.125Slukem C objects for <fn>. 12221.125Slukem For <fn>.[ly], "<fn>.c" must be used. 12231.125Slukem 12241.445SlukemCPUFLAGS Additional options passed to the compiler/assembler to 12251.445Slukem select CPU instruction set options, CPU tuning options, 12261.445Slukem etc. 12271.445Slukem 12281.445Slukem Note: Such options should not be specified in COPTS, 12291.445Slukem because some parts of the build process need to override 12301.445Slukem CPU-related compiler options. 12311.35Slukem 12321.445Slukem Default: Unset. 12331.445Slukem 12341.445SlukemCPUFLAGS.<fn> Additional options to the compiler/assembler for <fn>. 12351.125Slukem For <fn>.[ly], "<fn>.c" must be used. 12361.125Slukem 12371.445SlukemCPPFLAGS Additional options to the C pre-processor. 12381.125Slukem 12391.445SlukemCPPFLAGS.<fn> Additional options to the C pre-processor for <fn>. 12401.125Slukem For <fn>.[ly], "<fn>.c" must be used. 12411.102Sthorpej 12421.102SthorpejGDBINIT List of GDB initialization files to add to "source" 12431.102Sthorpej directives in the .gdbinit file that is created in the 12441.102Sthorpej objdir. 12451.1Scgd 12461.1ScgdLDADD Additional loader objects. Usually used for libraries. 12471.1Scgd For example, to load with the compatibility and utility 12481.1Scgd libraries, use: 12491.1Scgd 12501.5Sjtc LDADD+=-lutil -lcompat 12511.1Scgd 12521.445SlukemLDFLAGS Additional linker options (passed to ${CC} during link). 12531.1Scgd 12541.134SlukemLINKS See <bsd.links.mk> 12551.134Slukem 12561.445SlukemOBJCOPTS Additional options to the compiler when creating ObjC objects. 12571.177Smrg 12581.445SlukemOBJCOPTS.<fn> Additional options to the compiler when creating the 12591.177Smrg ObjC objects for <fn>. 12601.177Smrg For <fn>.[ly], "<fn>.c" must be used. 12611.177Smrg 12621.134SlukemSYMLINKS See <bsd.links.mk> 12631.1Scgd 12641.15ScgdMAN Manual pages (should end in .1 - .9). If no MAN variable is 12651.8Scgd defined, "MAN=${PROG}.1" is assumed. 12661.1Scgd 12671.214SwizPAXCTL_FLAGS If defined, run paxctl(1) on the program binary after link 12681.445Slukem time, with the value of this variable as options to paxctl(1). 12691.193Sperry 12701.193SperryPAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS. 12711.193Sperry 12721.1ScgdPROG The name of the program to build. If not supplied, nothing 12731.1Scgd is built. 12741.1Scgd 12751.88SthorpejPROG_CXX If defined, the name of the program to build. Also 12761.88Sthorpej causes <bsd.prog.mk> to link the program with the C++ 12771.88Sthorpej compiler rather than the C compiler. PROG_CXX overrides 12781.88Sthorpej the value of PROG if PROG is also set. 12791.87Sthorpej 12801.21SchristosPROGNAME The name that the above program will be installed as, if 12811.21Schristos different from ${PROG}. 12821.21Schristos 12831.408SlukemPROGS Multiple programs to build from a single directory. 12841.408Slukem Defaults to PROG. For each program ${_P} in ${PROGS}, 12851.408Slukem uses SRCS.${_P}, defaulting to ${_P}.c. 12861.408Slukem 12871.408SlukemPROGS_CXX Multiple C++ programs to build from a single directory. 12881.408Slukem Defaults to PROG_CXX. For each program ${_P} in ${PROGS_CXX}, 12891.408Slukem uses SRCS.${_P}, defaulting to ${_P}.cc. 12901.408Slukem 12911.37StvSRCS List of source files to build the program. If SRCS is not 12921.408Slukem defined, it's assumed to be ${PROG}.c or ${PROG_CXX}.cc. 12931.108Sjwise 12941.108SjwiseDPSRCS List of source files which are needed for generating 12951.108Sjwise dependencies, but are not needed in ${SRCS}. 12961.1Scgd 12971.1ScgdDPADD Additional dependencies for the program. Usually used for 12981.1Scgd libraries. For example, to depend on the compatibility and 12991.1Scgd utility libraries use: 13001.1Scgd 13011.5Sjtc DPADD+=${LIBCOMPAT} ${LIBUTIL} 13021.1Scgd 13031.288Schristos The following system libraries are predefined for DPADD: 13041.1Scgd 13051.382Schristos LIBARCHIVE?= ${DESTDIR}/usr/lib/libarchive.a 13061.382Schristos LIBASN1?= ${DESTDIR}/usr/lib/libasn1.a 13071.382Schristos LIBATF_C?= ${DESTDIR}/usr/lib/libatf-c.a 13081.382Schristos LIBATF_CXX?= ${DESTDIR}/usr/lib/libatf-c++.a 13091.382Schristos LIBBIND9?= ${DESTDIR}/usr/lib/libbind9.a 13101.407Schristos LIBBLOCKLIST?= ${DESTDIR}/usr/lib/libblocklist.a 13111.382Schristos LIBBLUETOOTH?= ${DESTDIR}/usr/lib/libbluetooth.a 13121.382Schristos LIBBSDMALLOC?= ${DESTDIR}/usr/lib/libbsdmalloc.a 13131.382Schristos LIBBZ2?= ${DESTDIR}/usr/lib/libbz2.a 13141.396Schristos LIBC?= ${DESTDIR}/usr/lib/libc.a 13151.382Schristos LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a 13161.398Schristos LIBCBOR?= ${DESTDIR}/usr/lib/libcbor.a 13171.382Schristos LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a 13181.382Schristos LIBCOM_ERR?= ${DESTDIR}/usr/lib/libcom_err.a 13191.382Schristos LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a 13201.382Schristos LIBCRYPTO?= ${DESTDIR}/usr/lib/libcrypto.a 13211.382Schristos LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a 13221.396Schristos LIBCXX?= ${DESTDIR}/usr/lib/libc++.a 13231.382Schristos LIBDES?= ${DESTDIR}/usr/lib/libdes.a 13241.382Schristos LIBDNS?= ${DESTDIR}/usr/lib/libdns.a 13251.382Schristos LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a 13261.382Schristos LIBEVENT?= ${DESTDIR}/usr/lib/libevent.a 13271.315Schristos LIBEVENT_OPENSSL?= ${DESTDIR}/usr/lib/libevent_openssl.a 13281.315Schristos LIBEVENT_PTHREADS?= ${DESTDIR}/usr/lib/libevent_pthreads.a 13291.382Schristos LIBEXECINFO?= ${DESTDIR}/usr/lib/libexecinfo.a 13301.382Schristos LIBEXPAT?= ${DESTDIR}/usr/lib/libexpat.a 13311.382Schristos LIBFETCH?= ${DESTDIR}/usr/lib/libfetch.a 13321.398Schristos LIBFIDO2?= ${DESTDIR}/usr/lib/libfido2.a 13331.382Schristos LIBFL?= ${DESTDIR}/usr/lib/libfl.a 13341.382Schristos LIBFORM?= ${DESTDIR}/usr/lib/libform.a 13351.382Schristos LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a 13361.400Schristos LIBGNUCTF?= ${DESTDIR}/usr/lib/libgnuctf.a 13371.382Schristos LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a 13381.382Schristos LIBGSSAPI?= ${DESTDIR}/usr/lib/libgssapi.a 13391.382Schristos LIBHDB?= ${DESTDIR}/usr/lib/libhdb.a 13401.382Schristos LIBHEIMBASE?= ${DESTDIR}/usr/lib/libheimbase.a 13411.382Schristos LIBHEIMNTLM?= ${DESTDIR}/usr/lib/libheimntlm.a 13421.382Schristos LIBHX500?= ${DESTDIR}/usr/lib/libhx500.a 13431.382Schristos LIBINTL?= ${DESTDIR}/usr/lib/libintl.a 13441.382Schristos LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a 13451.382Schristos LIBISC?= ${DESTDIR}/usr/lib/libisc.a 13461.382Schristos LIBISCCC?= ${DESTDIR}/usr/lib/libisccc.a 13471.382Schristos LIBISCFG?= ${DESTDIR}/usr/lib/libiscfg.a 13481.382Schristos LIBKADM5CLNT?= ${DESTDIR}/usr/lib/libkadm5clnt.a 13491.382Schristos LIBKADM5SRV?= ${DESTDIR}/usr/lib/libkadm5srv.a 13501.382Schristos LIBKAFS?= ${DESTDIR}/usr/lib/libkafs.a 13511.382Schristos LIBKRB5?= ${DESTDIR}/usr/lib/libkrb5.a 13521.382Schristos LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a 13531.382Schristos LIBL?= ${DESTDIR}/usr/lib/libl.a 13541.382Schristos LIBLBER?= ${DESTDIR}/usr/lib/liblber.a 13551.382Schristos LIBLDAP?= ${DESTDIR}/usr/lib/libldap.a 13561.382Schristos LIBLDAP_R?= ${DESTDIR}/usr/lib/libldap_r.a 13571.382Schristos LIBLUA?= ${DESTDIR}/usr/lib/liblua.a 13581.382Schristos LIBM?= ${DESTDIR}/usr/lib/libm.a 13591.382Schristos LIBMAGIC?= ${DESTDIR}/usr/lib/libmagic.a 13601.382Schristos LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a 13611.382Schristos LIBNETPGPVERIFY?= ${DESTDIR}/usr/lib/libnetpgpverify.a 13621.382Schristos LIBNS?= ${DESTDIR}/usr/lib/libns.a 13631.382Schristos LIBOBJC?= ${DESTDIR}/usr/lib/libobjc.a 13641.382Schristos LIBOSSAUDIO?= ${DESTDIR}/usr/lib/libossaudio.a 13651.382Schristos LIBPAM?= ${DESTDIR}/usr/lib/libpam.a 13661.382Schristos LIBPANEL?= ${DESTDIR}/usr/lib/libpanel.a 13671.382Schristos LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a 13681.382Schristos LIBPCI?= ${DESTDIR}/usr/lib/libpci.a 13691.382Schristos LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a 13701.382Schristos LIBPTHREAD?= ${DESTDIR}/usr/lib/libpthread.a 13711.382Schristos LIBPUFFS?= ${DESTDIR}/usr/lib/libpuffs.a 13721.382Schristos LIBQUOTA?= ${DESTDIR}/usr/lib/libquota.a 13731.382Schristos LIBRADIUS?= ${DESTDIR}/usr/lib/libradius.a 13741.382Schristos LIBREFUSE?= ${DESTDIR}/usr/lib/librefuse.a 13751.382Schristos LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a 13761.382Schristos LIBRMT?= ${DESTDIR}/usr/lib/librmt.a 13771.382Schristos LIBROKEN?= ${DESTDIR}/usr/lib/libroken.a 13781.382Schristos LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a 13791.382Schristos LIBRT?= ${DESTDIR}/usr/lib/librt.a 13801.382Schristos LIBRUMP?= ${DESTDIR}/usr/lib/librump.a 13811.396Schristos LIBRUMPFS_CD9660?= ${DESTDIR}/usr/lib/librumpfs_cd9660.a 13821.382Schristos LIBRUMPFS_EFS?= ${DESTDIR}/usr/lib/librumpfs_efs.a 13831.382Schristos LIBRUMPFS_EXT2FS?= ${DESTDIR}/usr/lib/librumpfs_ext2fs.a 13841.382Schristos LIBRUMPFS_FFS?= ${DESTDIR}/usr/lib/librumpfs_ffs.a 13851.382Schristos LIBRUMPFS_HFS?= ${DESTDIR}/usr/lib/librumpfs_hfs.a 13861.382Schristos LIBRUMPFS_LFS?= ${DESTDIR}/usr/lib/librumpfs_lfs.a 13871.396Schristos LIBRUMPFS_MSDOS?= ${DESTDIR}/usr/lib/librumpfs_msdos.a 13881.382Schristos LIBRUMPFS_NFS?= ${DESTDIR}/usr/lib/librumpfs_nfs.a 13891.382Schristos LIBRUMPFS_NTFS?= ${DESTDIR}/usr/lib/librumpfs_ntfs.a 13901.382Schristos LIBRUMPFS_SYSPUFFS?= ${DESTDIR}/usr/lib/librumpfs_syspuffs.a 13911.382Schristos LIBRUMPFS_TMPFS?= ${DESTDIR}/usr/lib/librumpfs_tmpfs.a 13921.382Schristos LIBRUMPFS_UDF?= ${DESTDIR}/usr/lib/librumpfs_udf.a 13931.382Schristos LIBRUMPUSER?= ${DESTDIR}/usr/lib/librumpuser.a 13941.382Schristos LIBSASLC?= ${DESTDIR}/usr/lib/libsaslc.a 13951.382Schristos LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a 13961.382Schristos LIBSL?= ${DESTDIR}/usr/lib/libsl.a 13971.382Schristos LIBSQLITE3?= ${DESTDIR}/usr/lib/libsqlite3.a 13981.382Schristos LIBSSH?= ${DESTDIR}/usr/lib/libssh.a 13991.382Schristos LIBSSL?= ${DESTDIR}/usr/lib/libssl.a 14001.382Schristos LIBSTDCXX?= ${DESTDIR}/usr/lib/libstdc++.a 14011.382Schristos LIBSUPCXX?= ${DESTDIR}/usr/lib/libsupc++.a 14021.382Schristos LIBTERMINFO?= ${DESTDIR}/usr/lib/libterminfo.a 14031.382Schristos LIBTRE?= ${DESTDIR}/usr/lib/libtre.a 14041.382Schristos LIBUNBOUND?= ${DESTDIR}/usr/lib/libunbound.a 14051.382Schristos LIBUSBHID?= ${DESTDIR}/usr/lib/libusbhid.a 14061.382Schristos LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a 14071.382Schristos LIBWIND?= ${DESTDIR}/usr/lib/libwind.a 14081.382Schristos LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a 14091.382Schristos LIBY?= ${DESTDIR}/usr/lib/liby.a 14101.382Schristos LIBZ?= ${DESTDIR}/usr/lib/libz.a 14111.382Schristos 14121.382Schristos The following c startup files. 14131.382Schristos 14141.382Schristos LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o 14151.382Schristos LIBCRTI?= ${DESTDIR}/usr/lib/crti.o 14161.382Schristos LIBCRTBEGIN?= ${DESTDIR}/usr/lib/crti.o 14171.382Schristos LIBCRTEND?= ${DESTDIR}/usr/lib/crtn.o 14181.1Scgd 14191.288Schristos The following X-Windows libraries are predefined for DPADD: 14201.288Schristos 14211.394Schristos LIBDPS?= ${DESTDIR}/usr/X11R7/lib/libdps.a 14221.394Schristos LIBFNTSTUBS?= ${DESTDIR}/usr/X11R7/lib/libfntstubs.a 14231.394Schristos LIBFONTCACHE?= ${DESTDIR}/usr/X11R7/lib/libfontcache.a 14241.394Schristos LIBFONTCONFIG?= ${DESTDIR}/usr/X11R7/lib/libfontconfig.a 14251.394Schristos LIBFONTENC?= ${DESTDIR}/usr/X11R7/lib/libfontenc.a 14261.394Schristos LIBFREETYPE?= ${DESTDIR}/usr/X11R7/lib/libfreetype.a 14271.382Schristos LIBFS?= ${DESTDIR}/usr/X11R7/lib/libFS.a 14281.382Schristos LIBGL?= ${DESTDIR}/usr/X11R7/lib/libGL.a 14291.382Schristos LIBGLU?= ${DESTDIR}/usr/X11R7/lib/libGLU.a 14301.382Schristos LIBICE?= ${DESTDIR}/usr/X11R7/lib/libICE.a 14311.394Schristos LIBLBXUTIL?= ${DESTDIR}/usr/X11R7/lib/liblbxutil.a 14321.382Schristos LIBSM?= ${DESTDIR}/usr/X11R7/lib/libSM.a 14331.382Schristos LIBX11?= ${DESTDIR}/usr/X11R7/lib/libX11.a 14341.382Schristos LIBX11_XCB?= ${DESTDIR}/usr/X11R7/lib/libX11-xcb.a 14351.382Schristos LIBXAU?= ${DESTDIR}/usr/X11R7/lib/libXau.a 14361.382Schristos LIBXAW?= ${DESTDIR}/usr/X11R7/lib/libXaw.a 14371.382Schristos LIBXCB?= ${DESTDIR}/usr/X11R7/lib/libxcb.a 14381.412Snia LIBXCOMPOSITE?= ${DESTDIR}/usr/X11R7/lib/libXcomposite.a 14391.440Smrg LIBXCVT?= ${DESTDIR}/usr/X11R7/lib/libxcvt.a 14401.412Snia LIBXDAMAGE?= ${DESTDIR}/usr/X11R7/lib/libXdamage.a 14411.382Schristos LIBXDMCP?= ${DESTDIR}/usr/X11R7/lib/libXdmcp.a 14421.382Schristos LIBXEXT?= ${DESTDIR}/usr/X11R7/lib/libXext.a 14431.412Snia LIBXFIXES?= ${DESTDIR}/usr/X11R7/lib/libXfixes.a 14441.394Schristos LIBXFONT2?= ${DESTDIR}/usr/X11R7/lib/libXfont2.a 14451.382Schristos LIBXFONT?= ${DESTDIR}/usr/X11R7/lib/libXfont.a 14461.382Schristos LIBXFT?= ${DESTDIR}/usr/X11R7/lib/libXft.a 14471.382Schristos LIBXI?= ${DESTDIR}/usr/X11R7/lib/libXi.a 14481.382Schristos LIBXINERAMA?= ${DESTDIR}/usr/X11R7/lib/libXinerama.a 14491.394Schristos LIBXKBFILE?= ${DESTDIR}/usr/X11R7/lib/libxkbfile.a 14501.382Schristos LIBXMU?= ${DESTDIR}/usr/X11R7/lib/libXmu.a 14511.382Schristos LIBXMUU?= ${DESTDIR}/usr/X11R7/lib/libXmuu.a 14521.382Schristos LIBXPM?= ${DESTDIR}/usr/X11R7/lib/libXpm.a 14531.382Schristos LIBXRANDR?= ${DESTDIR}/usr/X11R7/lib/libXrandr.a 14541.382Schristos LIBXRENDER?= ${DESTDIR}/usr/X11R7/lib/libXrender.a 14551.382Schristos LIBXSS?= ${DESTDIR}/usr/X11R7/lib/libXss.a 14561.382Schristos LIBXT?= ${DESTDIR}/usr/X11R7/lib/libXt.a 14571.394Schristos LIBXTRAP?= ${DESTDIR}/usr/X11R7/lib/libXTrap.a 14581.382Schristos LIBXTST?= ${DESTDIR}/usr/X11R7/lib/libXtst.a 14591.382Schristos LIBXV?= ${DESTDIR}/usr/X11R7/lib/libXv.a 14601.382Schristos LIBXXF86DGA?= ${DESTDIR}/usr/X11R7/lib/libXxf86dga.a 14611.382Schristos LIBXXF86MISC?= ${DESTDIR}/usr/X11R7/lib/libXxf86misc.a 14621.382Schristos LIBXXF86VM?= ${DESTDIR}/usr/X11R7/lib/libXxf86vm.a 14631.288Schristos 14641.445SlukemSTRIPFLAG The option passed to the install program to cause the binary 14651.1Scgd to be stripped. 14661.1Scgd 14671.1ScgdSUBDIR A list of subdirectories that should be built as well. 14681.1Scgd Each of the targets will execute the same target in the 14691.1Scgd subdirectories. 14701.1Scgd 14711.21SchristosSCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}]. 14721.21Schristos These are installed exactly like programs. 14731.21Schristos 14741.166SrtrSCRIPTSDIR The location to install the scripts. Each script can be 14751.166Srtr installed to a separate path by setting SCRIPTSDIR_<script>. 14761.166Srtr 14771.21SchristosSCRIPTSNAME The name that the above program will be installed as, if 14781.21Schristos different from ${SCRIPTS}. These can be further specialized 14791.21Schristos by setting SCRIPTSNAME_<script>. 14801.21Schristos 14811.124SlukemFILES See description of <bsd.files.mk>. 14821.21Schristos 14831.106SthorpejSHLINKDIR Target directory for shared linker. See description of 14841.106Sthorpej <bsd.own.mk> for additional information about this variable. 14851.130Slukem 14861.1ScgdThe include file <bsd.prog.mk> includes the file named "../Makefile.inc" 14871.1Scgdif it exists, as well as the include file <bsd.man.mk>. 14881.1Scgd 14891.1ScgdSome simple examples: 14901.1Scgd 14911.1ScgdTo build foo from foo.c with a manual page foo.1, use: 14921.1Scgd 14931.1Scgd PROG= foo 14941.1Scgd 14951.1Scgd .include <bsd.prog.mk> 14961.1Scgd 14971.1ScgdTo build foo from foo.c with a manual page foo.2, add the line: 14981.1Scgd 14991.9Scgd MAN= foo.2 15001.1Scgd 15011.445SlukemIf foo does not have a manual page at all, add the line 15021.445Slukembefore any make(1) .include directives: 15031.1Scgd 15041.445Slukem NOMAN= 15051.1Scgd 15061.1ScgdIf foo has multiple source files, add the line: 15071.1Scgd 15081.1Scgd SRCS= a.c b.c c.c d.c 15091.1Scgd 15101.1Scgd 15111.118Slukem=-=-=-=-= bsd.rpc.mk =-=-=-=-= 15121.118Slukem 15131.118SlukemThe include file <bsd.rpc.mk> contains a makefile fragment used to 15141.118Slukemconstruct source files built by rpcgen. 15151.72Ssommerfe 15161.118SlukemThe following macros may be defined in makefiles which include 15171.118Slukem<bsd.rpc.mk> in order to control which files get built and how they 15181.118Slukemare to be built: 15191.21Schristos 15201.444SlukemRPC_INCS construct .h file from .x file 15211.444SlukemRPC_XDRFILES construct _xdr.c from .x file 15221.118Slukem (for marshalling/unmarshalling data types) 15231.444SlukemRPC_SVCFILES construct _svc.c from .x file 15241.118Slukem (server-side stubs) 15251.445SlukemRPC_SVCFLAGS Additional options passed to builds of RPC_SVCFILES. 15261.21Schristos 15271.444SlukemRPC_XDIR Directory containing .x/.h files 15281.23Schristos 15291.23Schristos 15301.118Slukem=-=-=-=-= bsd.shlib.mk =-=-=-=-= 15311.21Schristos 15321.118SlukemThe include file <bsd.shlib.mk> computes parameters for shared library 15331.118Slukeminstallation and use. It defines no targets. <bsd.own.mk> MUST be 15341.134Slukemincluded before <bsd.shlib.mk>. 15351.21Schristos 15361.134Slukem<bsd.own.mk> sets the following variables, if they are not already defined 15371.118Slukem(defaults are in brackets): 15381.21Schristos 15391.444SlukemSHLIBINSTALLDIR If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR} 15401.300Sjoerg instead of ${LIBDIR} as the base path for shared library 15411.300Sjoerg installation. [/lib] 15421.300Sjoerg 15431.118SlukemSHLIBDIR The path to USE_SHLIBDIR shared libraries to use when building 15441.118Slukem a program. [/lib for programs in /bin and /sbin, /usr/lib 15451.118Slukem for all others.] 15461.81Swiz 15471.300Sjoerg_LIBSODIR Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no", 15481.118Slukem otherwise set to ${LIBDIR} 15491.81Swiz 15501.300SjoergSHLINKINSTALLDIR Base path for shared linker. [/libexec] 15511.300Sjoerg 15521.118SlukemSHLINKDIR Path to use for shared linker when building a program. 15531.118Slukem [/libexec for programs in /bin and /sbin, /usr/libexec for 15541.118Slukem all others.] 15551.39Scgd 15561.13Schristos 15571.118Slukem=-=-=-=-= bsd.subdir.mk =-=-=-=-= 15581.13Schristos 15591.118SlukemThe include file <bsd.subdir.mk> contains the default targets for building 15601.120Slukemsubdirectories. It has the same eight targets as <bsd.prog.mk>: all, 15611.233Sapbclean, cleandir, depend, includes, install, lint, and tags. It uses the 15621.233Sapbfollowing variables: 15631.233Sapb 15641.233SapbNOSUBDIR If this variable is defined, then the SUBDIR variable 15651.233Sapb will be ignored and subdirectories will not be processed. 15661.233Sapb 15671.233SapbSUBDIR For all of the directories listed in ${SUBDIR}, the 15681.233Sapb specified directory will be visited and the target made. 15691.233Sapb 15701.233Sapb As a special case, the use of a token .WAIT as an 15711.233Sapb entry in SUBDIR acts as a synchronization barrier 15721.233Sapb when multiple make jobs are run; subdirs before the 15731.233Sapb .WAIT must complete before any subdirs after .WAIT are 15741.233Sapb started. See make(1) for some caveats on use of .WAIT 15751.233Sapb and other special sources. 15761.47Stv 15771.47Stv 15781.326Schristos=-=-=-=-= bsd.x11.mk =-=-=-=-= 15791.326Schristos 15801.326SchristosThe include file <bsd.x11.mk> contains parameters and targets for 15811.346Smrgcross-building X11 from ${X11SRCDIR.<package>}. It should be included 15821.346Smrgafter the general Makefile contents but before the include files such as 15831.346Smrg<bsd.prog.mk> and <bsd.lib.mk>. 15841.326Schristos 15851.326SchristosIt provides the following targets: 15861.326Schristos .man.1 .man.3 .man.4 .man.5 .man.7: 15871.326Schristos If ${MAN} or ${PROG} is set and ${MKMAN} != "no", 15881.326Schristos these rules convert from X11's manual page source 15891.326Schristos into an mdoc.old source file. 15901.326Schristos 15911.326SchristosIt sets the following variables: 15921.326Schristos 15931.326SchristosBINDIR Set to ${X11BINDIR}. 15941.326Schristos To override, define after including <bsd.x11.mk> 15951.326Schristos 15961.326SchristosLIBDIR Set to ${X11USRLIBDIR}. 15971.326Schristos To override, define after including <bsd.x11.mk> 15981.326Schristos 15991.326SchristosMANDIR Set to ${X11MANDIR}. 16001.326Schristos To override, define after including <bsd.x11.mk> 16011.326Schristos 16021.326SchristosCPPFLAGS Appended with definitions to include from 16031.326Schristos ${DESTDIR}${X11INCDIR} 16041.326Schristos 16051.326SchristosLDFLAGS Appended with definitions to link from 16061.326Schristos ${DESTDIR}${X11USRLIBDIR} 16071.326Schristos 16081.326SchristosX11FLAGS.CONNECTION Equivalent to X11's CONNECTION_FLAGS. 16091.326Schristos 16101.326SchristosX11FLAGS.EXTENSION Equivalent to X11's EXT_DEFINES. 16111.326Schristos 16121.326SchristosX11FLAGS.LOADABLE Equivalent to X11's LOADABLE. 16131.326Schristos 16141.326SchristosX11FLAGS.OS_DEFINES Equivalent to X11's OS_DEFINES. 16151.326Schristos 16161.326SchristosX11FLAGS.SERVER Equivalent to X11's ServerDefines. 16171.326Schristos 16181.326SchristosX11FLAGS.THREADLIB Equivalent to X11's THREADS_DEFINES for libraries. 16191.326Schristos 16201.326SchristosX11FLAGS.THREADS Equivalent to X11's THREADS_DEFINES. 16211.326Schristos 16221.326SchristosX11FLAGS.VERSION cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION. 16231.326Schristos 16241.326SchristosX11FLAGS.DIX Equivalent to X11's DIX_DEFINES. 16251.326Schristos 16261.326SchristosX11TOOL_UNXCOMM Commandline to convert `XCOMM' comments to `#' 16271.326Schristos 16281.326SchristosIt uses the following variables: 16291.326Schristos 16301.326SchristosAPPDEFS List of app-default files to install. 16311.326Schristos 16321.326SchristosCPPSCRIPTS List of files/scripts to run through cpp(1) 16331.326Schristos and then ${X11TOOL_UNXCOMM}. The source files 16341.326Schristos have a `.cpp' suffix, the generated files do not. 16351.326Schristos 16361.445SlukemCPPSCRIPTFLAGS Additional options to cpp(1) when building CPPSCRIPTS. 16371.326Schristos 16381.445SlukemCPPSCRIPTFLAGS_<fn> Additional options to cpp(1) when building CPPSCRIPT <fn>. 16391.326Schristos 16401.326Schristos 16411.326Schristos=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 16421.326Schristos 16431.326SchristosThe following files are described here for completion, but they are not 16441.326Schristossupposed to be included directly from other Makefiles; they are used 16451.326Schristosinternally by other system files. 16461.326Schristos 16471.118Slukem=-=-=-=-= bsd.sys.mk =-=-=-=-= 16481.47Stv 16491.326SchristosThe include file <bsd.sys.mk> is used by other system mk files and 16501.326Schristosit is not intended to be included standalone. It contains rules and 16511.326Schristossystem build variables. It requires bsd.own.mk to be included first. 16521.326SchristosIt contains overrides that are used when building the NetBSD source tree. 16531.133Slukem 16541.133SlukemThe following variables control how various files are compiled/built. 16551.142Slukem(Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"): 16561.133Slukem 16571.133SlukemAR Create, modify, and extract from archives. [ar] 16581.133Slukem 16591.133SlukemARFLAGS Options to ${AR}. [rl] 16601.133Slukem 16611.387SchristosARM_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout] 16621.387Schristos 16631.151SlukemAS Assembler. [as] 16641.151Slukem 16651.211SlukemAFLAGS Options to ${CC} when compiling or linking .s or .S 16661.211Slukem assembly source files. [] 16671.151Slukem 16681.445SlukemBUILDSEED g++(1) uses random numbers when compiling C++ code. This 16691.445Slukem variable seeds the g++(1) random number generator using 16701.445Slukem -frandom-seed with this value. By default, it is set to 16711.445Slukem "NetBSD-(majorversion)". Using a fixed value causes C++ 16721.445Slukem binaries to be the same when built from the same sources, 16731.445Slukem resulting in identical (reproducible) builds. Additional 16741.445Slukem information is available in the g++(1) documentation of 16751.445Slukem -frandom-seed. 16761.445Slukem 16771.445Slukem Default: Unset. 16781.217Sjoerg 16791.133SlukemCC C compiler. [cc] 16801.133Slukem 16811.133SlukemCFLAGS Options to ${CC}. [Usually -O or -O2] 16821.445Slukem Note: CFLAGS should never be set in mk.conf(5). 16831.133Slukem 16841.133SlukemCPP C Pre-Processor. [cpp] 16851.133Slukem 16861.133SlukemCPPFLAGS Options to ${CPP}. [] 16871.133Slukem 16881.445SlukemCPUFLAGS Optimization options for ${CC}. [] 16891.133Slukem 16901.133SlukemCXX C++ compiler. [c++] 16911.133Slukem 16921.133SlukemCXXFLAGS Options to ${CXX}. [${CFLAGS}] 16931.133Slukem 16941.387SchristosM68K_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout] 16951.387Schristos 16961.387SchristosMIPS_ELF2ECOFF Convert ELF-format executable to ECOFF. [elf2ecoff] 16971.133Slukem 16981.133SlukemFC Fortran compiler. [f77] 16991.133Slukem 17001.133SlukemFFLAGS Options to {$FC}. [-O] 17011.133Slukem 17021.444SlukemHOST_SH Shell. This must be an absolute path, because it may be 17031.444Slukem substituted into "#!" lines in scripts. [/bin/sh] 17041.235Sapb 17051.133SlukemINSTALL install(1) command. [install] 17061.133Slukem 17071.133SlukemLEX Lexical analyzer. [lex] 17081.133Slukem 17091.133SlukemLFLAGS Options to ${LEX}. [] 17101.133Slukem 17111.145SjwiseLPREFIX Symbol prefix for ${LEX} (see -P option in lex(1)) [yy] 17121.145Sjwise 17131.133SlukemLD Linker. [ld] 17141.133Slukem 17151.178SlukemLDFLAGS Options to ${CC} during the link process. [] 17161.133Slukem 17171.133SlukemLINT C program verifier. [lint] 17181.133Slukem 17191.390SchristosLINTFLAGS Options to ${LINT}. [-chapbrxzgFS] 17201.133Slukem 17211.133SlukemLORDER List dependencies for object files. [lorder] 17221.133Slukem 17231.133SlukemMAKE make(1). [make] 17241.133Slukem 17251.133SlukemMKDEP Construct Makefile dependency list. [mkdep] 17261.133Slukem 17271.321SmrgMKDEPCXX Construct Makefile dependency list for C++ files. [mkdep] 17281.321Smrg 17291.133SlukemNM List symbols from object files. [nm] 17301.133Slukem 17311.444SlukemPC Pascal compiler. [pc] (Not present) 17321.133Slukem 17331.133SlukemPFLAGS Options to ${PC}. [] 17341.133Slukem 17351.133SlukemOBJC Objective C compiler. [${CC}] 17361.133Slukem 17371.133SlukemOBJCFLAGS Options to ${OBJC}. [${CFLAGS}] 17381.133Slukem 17391.133SlukemOBJCOPY Copy and translate object files. [objcopy] 17401.133Slukem 17411.445SlukemOBJCOPYLIBFLAGS Options to pass to objcopy when library objects are 17421.291Schristos being built. [${.TARGET} =~ "*.po" ? -X : -x] 17431.291Schristos 17441.168SrizOBJDUMP Display information from object files. [objdump] 17451.168Sriz 17461.133SlukemRANLIB Generate index to archive. [ranlib] 17471.133Slukem 17481.343SpookaREADELF Display information from ELF object files. [readelf] 17491.343Spooka 17501.133SlukemSIZE List section sizes and total size. [size] 17511.133Slukem 17521.343SpookaSTRINGS Display printable character sequences in files. [strings] 17531.343Spooka 17541.133SlukemSTRIP Discard symbols from object files. [strip] 17551.133Slukem 17561.133SlukemTSORT Topological sort of a directed graph. [tsort -q] 17571.133Slukem 17581.133SlukemYACC LALR(1) parser generator. [yacc] 17591.133Slukem 17601.133SlukemYFLAGS Options to ${YACC}. [] 17611.133Slukem 17621.133SlukemYHEADER If defined, add "-d" to YFLAGS, and add dependencies 17631.133Slukem from <file>.y to <file>.h and <file>.c, and add 17641.133Slukem <foo>.h to CLEANFILES. 17651.133Slukem 17661.133SlukemYPREFIX If defined, add "-p ${YPREFIX}" to YFLAGS. 17671.133Slukem 17681.116Slukem 17691.69SsommerfeOther variables of note (incomplete list): 17701.69Ssommerfe 17711.444SlukemNOCLANGERROR If defined and clang is used as C compiler, -Werror is not 17721.444Slukem passed to it. 17731.444Slukem 17741.213SlukemNOGCCERROR If defined, prevents passing certain ${CFLAGS} to GCC 17751.213Slukem that cause warnings to be fatal, such as: 17761.213Slukem -Werror -Wa,--fatal-warnings 17771.213Slukem (The latter being for as(1).) 17781.212Slukem 17791.296SplunkyWARNS Crank up compiler warning options; the distinct levels are: 17801.82Slukem WARNS=1 17811.82Slukem WARNS=2 17821.82Slukem WARNS=3 17831.164Smatt WARNS=4 17841.296Splunky WARNS=5 17851.336Schristos WARNS=6 17861.69Ssommerfe 17871.444Slukem=-=-=-=-= bsd.host.mk =-=-=-=-= 17881.144Slukem 17891.326SchristosThis file is automatically included from bsd.own.mk. It contains settings 17901.326Schristosfor all the HOST_* variables that are used in host programs and libraries. 17911.144Slukem 17921.326SchristosHOST_AR The host archive processing command 17931.144Slukem 17941.326SchristosHOST_CC The host c compiler 17951.144Slukem 17961.445SlukemHOST_CFLAGS The host c compiler options 17971.144Slukem 17981.445SlukemHOST_COMPILE.c The host c compiler line with options 17991.144Slukem 18001.445SlukemHOST_COMPILE.cc The host c++ compiler line with options 18011.144Slukem 18021.326SchristosHOST_CPP The host c pre-processor 18031.144Slukem 18041.445SlukemHOST_CPPFLAGS The host c pre-processor options 18051.144Slukem 18061.326SchristosHOST_CXX The host c++ compiler 18071.144Slukem 18081.445SlukemHOST_CXXFLAGS The host c++ compiler options 18091.144Slukem 18101.326SchristosHOST_INSTALL_DIR The host command to install a directory 18111.144Slukem 18121.326SchristosHOST_INSTALL_FILE The host command to install a file 18131.144Slukem 18141.326SchristosHOST_INSTALL_SYMLINK The host command to install a symlink 18151.144Slukem 18161.326SchristosHOST_LD The host linker command 18171.144Slukem 18181.445SlukemHOST_LDFLAGS The host linker options 18191.144Slukem 18201.445SlukemHOST_LINK.c The host c linker line with options 18211.221Smrg 18221.445SlukemHOST_LINK.cc The host c++ linker line with options 18231.144Slukem 18241.326SchristosHOST_LN The host command to link two files 18251.144Slukem 18261.326SchristosHOST_MKDEP The host command to create dependencies for c programs 18271.144Slukem 18281.326SchristosHOST_MKDEPCXX The host command to create dependencies for c++ programs 18291.144Slukem 18301.326SchristosHOST_OSTYPE The host OSNAME-RELEASE-ARCH tupple 18311.144Slukem 18321.326SchristosHOST_RANLIB The host command to create random access archives 18331.144Slukem 18341.326SchristosHOST_SH The host Bourne shell interpreter name (absolute path) 18351.144Slukem 18361.30Sagc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 1837