bsd.README revision 1.304
11.247Schristos#	$NetBSD: bsd.README,v 1.304 2012/10/02 04:53:11 jkoshy Exp $
21.215Sad#	@(#)bsd.README	8.2 (Berkeley) 4/2/94
31.215Sad
41.215SadThis is the README file for the make "include" files for the NetBSD
51.215Sadsource tree.  The files are installed in /usr/share/mk, and are,
61.215Sadby convention, named with the suffix ".mk".
71.215Sad
81.215SadNote, this file is not intended to replace reading through the .mk
91.215Sadfiles for anything tricky.
101.215Sad
111.215Sad=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
121.215Sad
131.215SadRANDOM THINGS WORTH KNOWING:
141.215Sad
151.215SadThe files are simply C-style #include files, and pretty much behave like
161.215Sadyou'd expect.  The syntax is slightly different in that a single '.' is
171.215Sadused instead of the hash mark, i.e. ".include <bsd.prog.mk>".
181.215Sad
191.215SadOne difference that will save you lots of debugging time is that inclusion
201.215Sadof the file is normally done at the *end* of the Makefile.  The reason for
211.215Sadthis is because .mk files often modify variables and behavior based on the
221.215Sadvalues of variables set in the Makefile.  To make this work, remember that
231.215Sadthe FIRST target found is the target that is used, i.e. if the Makefile has:
241.215Sad
251.215Sad	a:
261.215Sad		echo a
271.215Sad	a:
281.49Scgd		echo a number two
291.49Scgd
301.49Scgdthe command "make a" will echo "a".  To make things confusing, the SECOND
311.49Scgdvariable assignment is the overriding one, i.e. if the Makefile has:
321.49Scgd
331.49Scgd	a=	foo
341.49Scgd	a=	bar
351.49Scgd
361.49Scgd	b:
371.49Scgd		echo ${a}
381.49Scgd
391.49Scgdthe command "make b" will echo "bar".  This is for compatibility with the
401.49Scgdway the V7 make behaved.
411.49Scgd
421.49ScgdIt's fairly difficult to make the BSD .mk files work when you're building
431.49Scgdmultiple programs in a single directory.  It's a lot easier to split up the
441.49Scgdprograms than to deal with the problem.  Most of the agony comes from making
451.49Scgdthe "obj" directory stuff work right, not because we switched to a new version
461.155Sagcof make.  So, don't get mad at us, figure out a better way to handle multiple
471.49Scgdarchitectures so we can quit using the symbolic link stuff.  (Imake doesn't
481.49Scgdcount.)
491.49Scgd
501.49ScgdThe file .depend in the source directory is expected to contain dependencies
511.49Scgdfor the source files.  This file is read automatically by make after reading
521.49Scgdthe Makefile.
531.49Scgd
541.49ScgdThe variable DESTDIR works as before.  It's not set anywhere but will change
551.49Scgdthe tree where the file gets installed.
561.49Scgd
571.49ScgdThe profiled libraries are no longer built in a different directory than
581.49Scgdthe regular libraries.  A new suffix, ".po", is used to denote a profiled
591.49Scgdobject, and ".pico" denotes a shared (position-independent) object.
601.49Scgd
611.49ScgdThere are various make variables used during the build.
621.105Sfvdl
631.49ScgdMany variables support a (case sensitive) value of "no" or "yes",
641.129Slukemand are tested with  ${VAR} == "no"  and  ${VAR} != "no" .
651.129Slukem
661.247Schristos
671.49ScgdThe basic rule for the variable naming scheme is as follows:
681.49Scgd
691.49ScgdHOST_xxx	A command that runs on the host machine regardless of
701.49Scgd		whether or not the system is being cross compiled, or
711.49Scgd		flags for such a command.
721.49Scgd
731.49ScgdMKxxx		Can be set to "no" to disable functionality, or
741.49Scgd		"yes" to enable it.
751.49Scgd		Usually defaults to "yes", although some variables
761.49Scgd		default to "no".
771.240Smatt		Due to make(1) implementation issues, if a temporary
781.49Scgd		command-line override of a mk.conf(5) or <bsd.own.mk>
791.49Scgd		setting is required whilst still honoring a particular
801.49Scgd		Makefile's setting of MKxxx, use
811.49Scgd			env MKxxx=value make
821.49Scgd		instead of
831.216Sad			make MKxxx=value
841.65Schristos
851.65SchristosNOxxx		If defined, disables a feature.
861.74Smycroft		Not intended for users.
871.149Schristos		This is to allow Makefiles to disable functionality
881.151Schristos		that they don't support (such as missing man pages).
891.159Satatat		NOxxx variables must be defined before <bsd.own.mk>
901.182Selad		is included.
911.201Sad
921.228SadTOOL_xxx	A tool that is provided as part of the USETOOLS
931.228Sad		framework.  When not using the USETOOLS framework,
941.149Schristos		TOOL_xxx variables should refer to tools that are
951.126Slukem		already installed on the host system.
961.126Slukem
971.126SlukemThe following variables that control how things are made/installed that
981.126Slukemare not set by default. These should not be set by Makefiles; they're for
991.149Schristosthe user to define in MAKECONF (see <bsd.own.mk>, below, or mk.conf(5))
1001.149Schristosor on the make(1) command line:
1011.126Slukem
1021.201SadBUILD 		If defined, 'make install' checks that the targets in the
1031.49Scgd		source directories are up-to-date and remakes them if they
1041.49Scgd                are out of date, instead of blindly trying to install
1051.98Smycroft                out of date or non-existent targets.
1061.98Smycroft
1071.98SmycroftMAKEVERBOSE	Control how "verbose" the standard make(1) rules are.
1081.98Smycroft		Default: 2
1091.98Smycroft		Supported values:
1101.49Scgd		    0	Minimal output ("quiet")
1111.49Scgd		    1	Describe what is occurring
1121.83Smycroft		    2	Describe what is occurring and echo the actual command
1131.83Smycroft		    3	Ignore the effect of the "@" prefix in make commands
1141.83Smycroft		    4	Trace shell commands using the shell's -x flag
1151.83Smycroft
1161.83SmycroftMKATF		If "no", don't build libatf-c, libatf-c++ libraries associated
1171.83Smycroft		with the Automated Testing Framework (ATF).
1181.83Smycroft		Default: yes
1191.83Smycroft
1201.83SmycroftMKBFD		Obsolete, use MKBINUTILS
1211.83Smycroft
1221.49ScgdMKBINUTILS	If "no", don't build binutils (gas, ld, etc and libbfd,
1231.49Scgd		libopcodes)
1241.49Scgd		Default: yes
1251.49Scgd
1261.49ScgdMKBSDTAR	If "yes", use the libarchive based cpio and tar instead of
1271.49Scgd		the pax frontends.
1281.49Scgd		Default: no
1291.49Scgd
1301.49ScgdMKCATPAGES	If "no", don't build or install the catman pages.
1311.49Scgd		Default: no
1321.49Scgd
1331.49ScgdMKCOMPAT  	If "no", don't build or install the src/compat.
1341.49Scgd		Default: yes on amd64/mips64/sparc64, no elsewhere.
1351.49Scgd
1361.49ScgdMKCOMPLEX	If "no", don't build libm support for <complex.h>
1371.49Scgd		Default: yes
1381.49Scgd
1391.49ScgdMKCRYPTO	If "no", no cryptography support will be built into the system,
1401.49Scgd		and also acts as "MKKERBEROS=no".
1411.49Scgd		Default: yes
1421.49Scgd
1431.49ScgdMKCRYPTO_RC5	If not "no", RC5 support will be built into libcrypto_rc5
1441.49Scgd		Default: no
1451.49Scgd
1461.49ScgdMKCVS		If "no", don't build or install cvs(1).
1471.146Ssimonb		Default: yes
1481.49Scgd
1491.137SsimonbMKDEBUG		If "no", don't build and install separate debugging symbols
1501.138Senami		into /usr/libdata/debug.
1511.138Senami		Default: no
1521.138Senami
1531.138SenamiMKDEBUGLIB	Build *_g.a debugging libraries, which are compiled
1541.138Senami		with -DDEBUG.
1551.138Senami		Default: no
1561.138Senami
1571.138SenamiMKDOC		If "no", don't build or install the documentation.
1581.138Senami		Default: yes
1591.138Senami
1601.138SenamiMKDTRACE	If "no", do not build and install the kernel modules,
1611.138Senami		utilities and libraries used to implement the dtrace(1)
1621.138Senami		facility.
1631.138Senami		Default: no
1641.49Scgd
1651.49ScgdMKDYNAMICROOT	If "no", build programs in /bin and /sbin statically,
1661.49Scgd		don't install certain libraries in /lib, and don't
1671.49Scgd		install the shared linker into /libexec.
1681.49Scgd		Default: yes
1691.49Scgd
1701.49ScgdMKEXTSRC        If not "no", 'make build' also descends into either src/extsrc
1711.49Scgd		to cross-build programs and libraries externally added by
1721.49Scgd		users, and automatically enables creation of those sets.
1731.49Scgd		Default: no
1741.49Scgd
1751.49ScgdMKGCC		If "no", don't build gcc(1) or any of the GCC-related
1761.49Scgd		libraries (libgcc, libobjc, libstdc++).
1771.49Scgd		Default: yes
1781.49Scgd
1791.49ScgdMKGCCCMDS	If "no", don't build gcc(1), but do build the GCC-related
1801.49Scgd		libraries (libgcc, libobjc, libstdc++).
1811.49Scgd		Default: yes
1821.49Scgd
1831.49ScgdMKGDB		If "no", don't build gdb(1).
1841.49Scgd		Default: yes
1851.49Scgd
1861.49ScgdMKHESIOD	If "no", disables building of Hesiod infrastructure
1871.49Scgd		(libraries and support programs).
1881.49Scgd		Default: yes
1891.49Scgd
1901.49ScgdMKHOSTOBJ	If not "no", for programs intended to be run on the compile
1911.49Scgd		host, the name, release, and architecture of the host
1921.49Scgd		operating system will be suffixed to the name of the object
1931.49Scgd		directory created by "make obj".
1941.201Sad		Default: no
1951.201Sad
1961.201SadMKHTML		If "no", don't build or install the HTML man pages.
1971.169Sthorpej		Default: yes
1981.69Smrg
1991.201SadMKIEEEFP	If "no", don't add code for IEEE754/IEC60559 conformance.
2001.228Sad		Has no effect on most platforms.
2011.228Sad		Default: yes
2021.69Smrg
2031.179SperryMKSTRIPIDENT	Strip the RCS IDs from program binaries and shared libraries.
2041.179Sperry		Default: no
2051.179Sperry
2061.179SperryMKINET6		If "no", disables building of INET6 (IPv6) infrastructure
2071.159Satatat		(libraries and support programs).  This option must not be
2081.233Selad		set to "no" if MKX11 is not "no".
2091.233Selad		Default: yes
2101.235Spooka
2111.235SpookaMKINFO		If "no", don't build or install Info documentation from
2121.235Spooka		Texinfo source files.
2131.235Spooka		Default: yes
2141.159Satatat
2151.159SatatatMKIPFILTER	If "no", don't build or install the IP Filter programs and LKM.
2161.235Spooka		Default: yes
2171.165Satatat
2181.159SatatatMKISCSI		If "no", don't build or install iSCSI library or applications
2191.159Satatat		(depends on libpthread.)
2201.159Satatat		Default: yes
2211.235Spooka
2221.165SatatatMKKERBEROS	If "no", disables building of Kerberos v5
2231.168Satatat		infrastructure (libraries and support programs).
2241.168Satatat		Default: yes
2251.168Satatat
2261.159SatatatMKKMOD		If "no", disables building of kernel modules.
2271.159Satatat		Default: yes
2281.159Satatat
2291.235SpookaMKLDAP		If "no", disables building of LDAP infrastructure
2301.165Satatat		(libraries and support programs).
2311.168Satatat		Default: yes
2321.168Satatat
2331.159SatatatMKLINKLIB	If "no", act as "MKLINT=no MKPICINSTALL=no MKPROFILE=no".
2341.159Satatat		Also:
2351.235Spooka			- don't install the .a libraries
2361.165Satatat			- don't install _pic.a libraries on PIC systems
2371.168Satatat			- don't build .a libraries on PIC systems
2381.168Satatat			- don't install the .so symlink on ELF systems
2391.159Satatat		I.e, only install the shared library (and the .so.major
2401.159Satatat		symlink on ELF).
2411.235Spooka		Default: yes
2421.165Satatat
2431.168SatatatMKLINT		If "no", don't build or install the lint libraries.
2441.168Satatat		Default: yes
2451.159Satatat
2461.159SatatatMKLVM		If "no", don't build or install the logical volume manager
2471.235Spooka		and device mapper tools and libraries
2481.165Satatat		Default: yes
2491.168Satatat
2501.168SatatatMKMAN		If "no", don't build or install the man or catman pages,
2511.159Satatat		and also acts as "MKCATPAGES=no MKHTML=no".
2521.159Satatat		Default: yes
2531.159Satatat
2541.111SthorpejMKMANDOC	If "yes", mandoc is built as tool and used to compile
2551.107Smycroft		catman or html pages.  A directory can be exempted by
2561.126Slukem		defining NOMANDOC.  Individual man pages are exempted
2571.107Smycroft		if NOMANDOC.${target} is set to "yes".
2581.201Sad		Default: yes
2591.107Smycroft
2601.147SpkMKMANZ		If not "no", compress manual pages at installation time.
2611.147Spk		Default: no
2621.201Sad
2631.107SmycroftMKMDNS		If "no", disables building of mDNS infrastructure
2641.107Smycroft		(libraries and support programs).
2651.107Smycroft		Default: yes
2661.107Smycroft
2671.107SmycroftMKNLS		If "no", don't build or install the NLS files and locale
2681.107Smycroft		definition files.
2691.107Smycroft		Default: yes
2701.107Smycroft
2711.107SmycroftMKNPF		If "no", don't build or install the NPF and its modules.
2721.147Spk		Default: yes
2731.147Spk
2741.107SmycroftMKOBJ		If "no", don't enable the rule which creates objdirs,
2751.107Smycroft		and also acts as "MKOBJDIRS=no".
2761.107Smycroft		Default: yes
2771.107Smycroft
2781.107SmycroftMKOBJDIRS	If "no", don't create objdirs during a "make build".
2791.107Smycroft		Default: no
2801.107Smycroft
2811.107SmycroftMKPAM		If "no", disables building of PAM authentication
2821.107Smycroft		infrastructure (libraries and support programs).
2831.147Spk		Default: yes
2841.107Smycroft
2851.224SadMKPCC		If "no", don't build pcc(1) or any of the PCC-related
2861.107Smycroft		libraries (libpcc, libpccsoftfloat).
2871.147Spk		Default: no
2881.147Spk
2891.107SmycroftMKPF		If "no", don't build or install the pf programs and LKM.
2901.107Smycroft		Default: yes
2911.107Smycroft
2921.107SmycroftMKPIC		If "no", don't build or install shared libraries, and
2931.107Smycroft		also acts as "MKPICLIB=no"
2941.107Smycroft		Default: yes (for MACHINE_ARCHs that support it)
2951.138Senami
2961.147SpkMKPICINSTALL	If "no", don't install the *_pic.a libraries.
2971.147Spk		Default: yes
2981.107Smycroft
2991.107SmycroftMKPICLIB	If "no", don't build *_pic.a libraries, and build the
3001.107Smycroft		shared object libraries from the .a libraries.
3011.107Smycroft		A symlink is installed in ${DESTDIR}/usr/lib for the
3021.147Spk		_pic.a library pointing to the .a library.
3031.201Sad		Default: yes
3041.147Spk
3051.107SmycroftMKPIE		If "no", create regular executables. Otherwise create
3061.107Smycroft		PIE (Position Independent Executables).
3071.49Scgd		Default: no
3081.49Scgd
3091.49ScgdMKPIGZGZIP	If "no", only install pigz as pigz, not gzip.
3101.49Scgd		Default: no
3111.126Slukem
3121.49ScgdMKPOSTFIX	If "no", don't build or install postfix(1).
3131.49Scgd		Default: yes
3141.201Sad
3151.49ScgdMKPROFILE	If "no", don't build or install the profiling (*_p.a) libraries.
3161.49Scgd		Default: yes
3171.49Scgd
3181.109SperryMKREPRO         If "yes", create reproducable builds. This enables
3191.50Smycroft		different switches to make two builds from the same source tree
3201.49Scgd		result in the same build results.
3211.201Sad		Default: no
3221.49Scgd
3231.49ScgdMKSHARE		If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no
3241.49Scgd		MKMAN=no MKNLS=no".
3251.49Scgd		I.e, don't build catman pages, documentation, Info
3261.49Scgd		documentation, man pages, NLS files, ...
3271.49Scgd		Default: yes
3281.49Scgd
3291.49ScgdMKSKEY		If "no", disables building of S/key authentication
3301.49Scgd		infrastructure (libraries and support programs).
3311.126Slukem		Default: yes
3321.49Scgd
3331.49ScgdMKSOFTFLOAT	If not "no", build with options to enable the compiler to
3341.201Sad		generate output containing library calls for floating
3351.147Spk		point and possibly soft-float library support.
3361.201Sad		Default: no
3371.49Scgd
3381.49ScgdMKSTATICLIB	If "no", don't build or install the normal static (*.a)
3391.49Scgd		libraries.
3401.49Scgd		Default: yes
3411.49Scgd
3421.49ScgdMKUNPRIVED	If not "no", don't set the owner/group/mode when installing
3431.49Scgd		files or directories, and keep a metadata log of what
3441.49Scgd		the owner/group/mode should be.  This allows a
3451.190Sad		non-root "make install".
3461.209Sad		Default: no
3471.209Sad
3481.190SadMKUPDATE 	If not "no", 'make install' only installs targets that are
3491.201Sad		more recently modified in the source directories that their
3501.190Sad		installed counterparts.
3511.231Srmind		Default: no
3521.231Srmind
3531.231SrmindMKX11		If not "no", depending on the value of ${X11FLAVOUR},
3541.231Srmind		'make build' also descends into either src/x11 (XFree86) or
3551.231Srmind		src/external/mit/xorg (modular Xorg) to cross-build X11 and
3561.49Scgd		automatically enables creation of X sets.
3571.49Scgd		Default: no
3581.49Scgd
3591.49ScgdMKX11FONTS	If not "no", if ${X11FLAVOUR} is "Xorg", do not build or
3601.49Scgd		install the X fonts.  The xfont set is still created but
3611.49Scgd		will be empty.
3621.49Scgd		Default: yes
3631.49Scgd
3641.88SkleinkMKYP		If "no", disables building of YP (NIS)
3651.88Skleink		infrastructure (libraries and support programs).
3661.88Skleink		Default: yes
3671.88Skleink
3681.88SkleinkMKZFS		If "no", do not build and install utilities and libraries
3691.88Skleink		used to manage ZFS file system. Do not build zfs and solaris
3701.88Skleink		compatibility kernel modules.
3711.85Skleink		Default: yes on i386/amd64, no elsewhere.
3721.87Scgd
3731.85SkleinkMKRUMP		If "no", do not build and install rump related headers,
3741.49Scgd		libraries, and programs.
3751.49Scgd		Default: yes
3761.147Spk
3771.49ScgdUSE_HESIOD	If "no", disables building Hesiod support into
3781.147Spk		various system utilities/libraries that support it.
3791.201Sad		If ${MKHESIOD} is "no", USE_HESIOD will also be
3801.49Scgd		forced to "no".
3811.230Sdrochner
3821.147SpkUSE_INET6	If "no", disables building INET6 (IPv6) support into
3831.49Scgd		various system utilities/libraries that support it.
3841.126Slukem		If ${MKINET6} is "no", USE_INET6 will also be
3851.126Slukem		forced to "no".
3861.78Schristos
3871.201SadUSE_JEMALLOC	If "no", disables building the "jemalloc" allocator
3881.201Sad		designed for improved performance with threaded
3891.78Schristos		applications.  The "phkmalloc" allocator as used up
3901.49Scgd		before NetBSD-5.0 will be substituted.
3911.49Scgd
3921.49ScgdUSE_KERBEROS	If "no", disables building Kerberos v5
3931.49Scgd		support into various system utilities/libraries that
3941.49Scgd		support it.  If ${MKKERBEROS} is "no", USE_KERBEROS
3951.49Scgd		will also be forced to "no".
3961.49Scgd
3971.49ScgdUSE_LDAP	If "no", disables building LDAP support into various
3981.49Scgd		system utilities/libraries that support it.
3991.49Scgd		If ${MKLDAP} is "no", USE_LDAP will also be forced to "no".
4001.49Scgd
4011.49ScgdUSE_PAM		If "no", disables building PAM authentication support
4021.49Scgd		into various system utilities/libraries that support it.
4031.49Scgd		If ${MKPAM} is "no", USE_PAM will also be forced to "no".
4041.49Scgd
4051.49ScgdUSE_SKEY	If "no", disables building S/key authentication
4061.49Scgd		support into various system utilities/libraries that
4071.49Scgd		support it.  If ${MKSKEY} is "no", USE_SKEY will
4081.94Skleink		also be forced to "no".
4091.94Skleink		Default: no
4101.94Skleink
4111.94SkleinkUSE_SSP		If "no", disables GCC stack protection code, which
4121.49Scgd		detects stack overflows and aborts the program. The
4131.65Schristos		stack protection code imposes a performance penalty
4141.49Scgd		of about 5%.
4151.94Skleink		Default: "no", unless "USE_FORT" is set to "yes"
4161.49Scgd
4171.94SkleinkUSE_FORT 	If "yes" turns on substitute wrappers for commonly used
4181.94Skleink		functions that do not do bounds checking regularly, but
4191.94Skleink		they could in some cases by using the gcc
4201.201Sad		__builtin_object_size() function to determine the buffer
4211.94Skleink		size where it is known and detect buffer overflows.
4221.138Senami		These substitute functions are in /usr/include/ssp.
4231.49Scgd		Default: depends on the part of the source tree
4241.138Senami
4251.94SkleinkUSE_YP		If "no", disables building YP (NIS) support into
4261.49Scgd		various system utilities/libraries that support it.
4271.94Skleink		If ${MKYP} is "no", USE_YP will also be forced to "no".
4281.49Scgd
4291.126SlukemUSE_PIGZGZIP	If "no", use the host "gzip" program to compress things.
4301.94Skleink		Otherwise, build tools/pigz and use nbpigz to compress
4311.94Skleink		things.
4321.94Skleink		Default: "no".
4331.138Senami
4341.49ScgdX11FLAVOUR	Set to "Xorg" or "XFree86", depending on whether to build
4351.49Scgd		XFree86 or modular Xorg.  Only matters if MKX11!=no.
4361.138Senami		Default: "Xorg" on amd64, i386, macppc, shark and sparc64,
4371.94Skleink		"XFree86" on everything else.
4381.94Skleink
4391.94SkleinkCOPTS.lib<lib>
4401.94SkleinkOBJCOPTS.lib<lib>
4411.94SkleinkLDADD.lib<lib>
4421.94SkleinkCPPFLAGS.lib<lib>
4431.94SkleinkCXXFLAGS.lib<lib>
4441.49ScgdCOPTS.<prog>
4451.49ScgdOBJCCOPTS.<prog>
4461.49ScgdLDADD.<prog>
4471.49ScgdCPPFLAGS.<prog>
4481.49ScgdCXXFLAGS.<prog>	These provide a way to specify additions to the associated
4491.49Scgd		variables in a way that applies only to a particular library
4501.49Scgd		or program.  <lib> corresponds to the LIB variable set in
4511.49Scgd		the library's makefile.  <prog> corresponds to either PROG
4521.49Scgd		or PROG_CXX (if set).  For example, if COPTS.libcrypto is
4531.49Scgd		set to "-g", "-g" will be added to COPTS only when compiling
4541.49Scgd		the crypto library.
4551.49Scgd
4561.49ScgdThe active compiler is selected using the following variables:
4571.49ScgdAVAILABLE_COMPILER
4581.49Scgd		List of available compiler suites.  Processed in order
4591.49Scgd		for selecting the active compiler for each frontend.
4601.49ScgdHAVE_PCC	If defined, PCC is present and enabled.
4611.49ScgdHAVE_LLVM	If defined, LLVM/Clang is present and enabled.
4621.49ScgdUNSUPPORTED_COMPILER.xxx
4631.49Scgd		If defined, the support for compiler "xxx" is disabled.
4641.49Scgd
4651.49ScgdFor the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist:
4661.49ScgdACTIVE_CC	Active compile suite for the CC frontend.
4671.49ScgdSUPPORTED_CC	Compile suite with support for the CC frontend.
4681.49ScgdTOOL_CC.xxx	Path to the CC frontend for compiler "xxx"
4691.49Scgd
4701.49Scgd=-=-=-=-=   sys.mk   =-=-=-=-=
4711.49Scgd
4721.49ScgdThe include file <sys.mk> has the default rules for all makes, in the BSD
4731.49Scgdenvironment or otherwise.  You probably don't want to touch this file.
4741.49Scgd
4751.49Scgd=-=-=-=-=   bsd.own.mk   =-=-=-=-=
4761.49Scgd
4771.49ScgdThe include file <bsd.own.mk> contains source tree configuration parameters,
4781.49Scgdsuch as the owners, groups, etc. for both manual pages and binaries, and
4791.49Scgda few global "feature configuration" parameters.
4801.49Scgd
4811.49ScgdIt has no targets.
4821.49Scgd
4831.49ScgdTo get system-specific configuration parameters, <bsd.own.mk> will try to
4841.49Scgdinclude the file specified by the "MAKECONF" variable.  If MAKECONF is not
4851.49Scgdset, or no such file exists, the system make configuration file, /etc/mk.conf
4861.49Scgdis included.  These files may define any of the variables described below.
4871.49Scgd
4881.49Scgd<bsd.own.mk> sets the following variables, if they are not already defined
4891.49Scgd(defaults are in brackets):
4901.49Scgd
4911.49ScgdNETBSDSRCDIR	Top of the NetBSD source tree.
4921.49Scgd		If _SRC_TOP_ != "", that will be used as the default,
4931.49Scgd		otherwise BSDSRCDIR will be used as the default.
4941.49Scgd		Various makefiles within the NetBSD source tree will
4951.49Scgd		use this to reference the top level of the source tree.
4961.49Scgd
4971.49Scgd_SRC_TOP_	Top of the system source tree, as determined by <bsd.own.mk>
4981.49Scgd		based on the presence of tools/ and build.sh.  This variable
4991.49Scgd		is "internal" to <bsd.own.mk>, although its value is only
5001.49Scgd		determined once and then propagated to all sub-makes.
5011.49Scgd
5021.49ScgdBSDSRCDIR	The real path to the system sources, so that 'make obj'
5031.49Scgd		will work correctly.  [/usr/src]
5041.201Sad
5051.201SadBSDOBJDIR	The real path to the system 'obj' tree, so that 'make obj'
5061.49Scgd		will work correctly.  [/usr/obj]
5071.49Scgd
5081.49ScgdBINGRP		Binary group.  [wheel]
5091.49Scgd
5101.49ScgdBINOWN		Binary owner.  [root]
5111.49Scgd
5121.201SadBINMODE		Binary mode.  [555]
5131.49Scgd
5141.49ScgdNONBINMODE	Mode for non-executable files.  [444]
5151.49Scgd
5161.49ScgdMANDIR		Base path for manual installation.  [/usr/share/man/cat]
5171.49Scgd
5181.49ScgdMANGRP		Manual group.  [wheel]
5191.49Scgd
5201.49ScgdMANOWN		Manual owner.  [root]
5211.49Scgd
5221.49ScgdMANMODE		Manual mode.  [${NONBINMODE}]
5231.201Sad
5241.49ScgdMANINSTALL	Manual installation type.  Space separated list:
5251.49Scgd			catinstall, htmlinstall, maninstall
5261.49Scgd		Default value derived from MKCATPAGES and MKHTML.
5271.49Scgd
5281.49ScgdLDSTATIC	Control program linking; if set blank, link everything
5291.49Scgd		dynamically.  If set to "-static", link everything statically.
5301.49Scgd		If not set, programs link according to their makefile.
5311.49Scgd
5321.49ScgdLIBDIR		Base path for library installation.  [/usr/lib]
5331.49Scgd
5341.49ScgdLINTLIBDIR	Base path for lint(1) library installation.  [/usr/libdata/lint]
5351.49Scgd
5361.49ScgdLIBGRP		Library group.  [${BINGRP}]
5371.49Scgd
5381.49ScgdLIBOWN		Library owner.  [${BINOWN}]
5391.49Scgd
5401.49ScgdLIBMODE		Library mode.  [${NONBINMODE}]
5411.49Scgd
5421.49ScgdDOCDIR		Base path for system documentation (e.g. PSD, USD, etc.)
5431.49Scgd	        installation.  [/usr/share/doc]
5441.49Scgd
5451.49ScgdHTMLDOCDIR	Base path for html system documentation installation.
5461.49Scgd		[/usr/share/doc/html]
5471.147Spk
5481.49ScgdDOCGRP		Documentation group.  [wheel]
5491.49Scgd
5501.49ScgdDOCOWN		Documentation owner.  [root]
5511.49Scgd
5521.49ScgdDOCMODE		Documentation mode.  [${NONBINMODE}]
5531.49Scgd
5541.49ScgdNLSDIR		Base path for Native Language Support files installation.
5551.49Scgd		[/usr/share/nls]
5561.49Scgd
5571.49ScgdNLSGRP		Native Language Support files group.  [wheel]
5581.49Scgd
5591.49ScgdNLSOWN		Native Language Support files owner.  [root]
5601.49Scgd
5611.49ScgdNLSMODE		Native Language Support files mode.  [${NONBINMODE}]
5621.49Scgd
5631.49ScgdX11SRCDIR	The path to the xsrc tree.  [${NETBSDSRCDIR}/../xsrc,
5641.49Scgd		if that exists; otherwise /usr/xsrc]
5651.49Scgd
5661.49ScgdX11SRCDIR.xc	The path to the (old) X11 xc src tree.  [${X11SRCDIR}/xfree/xc]
5671.49Scgd
5681.49ScgdX11SRCDIR.local	The path to the local X11 src tree.  [${X11SRCDIR}/local]
5691.49Scgd
5701.49ScgdX11SRCDIR.lib<package>
5711.49ScgdX11SRCDIR.<package>
5721.49Scgd		The path to the xorg src tree for the specificed package>.
5731.49Scgd		[${X11SRCDIR}/external/mit/xorg/<package>/dist]
5741.49Scgd
5751.49ScgdX11ROOTDIR	Root directory of the X11 installation.  [/usr/X11R6 or
5761.49Scgd		[/usr/X11R7]
5771.49Scgd
5781.49ScgdX11BINDIR	X11 bin directory.  [${X11ROOTDIR}/bin]
5791.49Scgd
5801.49ScgdX11FONTDIR	X11 font directory.  [${X11ROOTDIR}/lib/X11/fonts]
5811.81Skleink
5821.49ScgdX11INCDIR	X11 include directory.  [${X11ROOTDIR}/include]
5831.81Skleink
5841.49ScgdX11LIBDIR	X11 lib/x11 (config) directory.  [${X11ROOTDIR}/lib/X11]
5851.81Skleink
5861.49ScgdX11MANDIR	X11 manual directory.  [${X11ROOTDIR}/man]
5871.81Skleink
5881.81SkleinkX11USRLIBDIR	X11 library directory.  [${X11ROOTDIR}/lib]
5891.81Skleink
5901.81SkleinkSTRIPFLAG	The flag passed to the install program to cause the binary
5911.81Skleink		to be stripped.  This is to be used when building your
5921.81Skleink		own install script so that the entire system can be made
5931.81Skleink		stripped/not-stripped using a single knob.  []
5941.81Skleink
5951.138SenamiCOPY		The flag passed to the install program to cause the binary
5961.81Skleink		to be copied rather than moved.  This is to be used when
5971.81Skleink		building our own install script so that the entire system
5981.81Skleink		can either be installed with copies, or with moves using
5991.81Skleink		a single knob.  [-c]
6001.81Skleink
6011.81SkleinkMAKEDIRTARGET dir target [params]
6021.81Skleink		Runs "cd $${dir} && ${MAKE} [params] $${target}",
6031.49Scgd		displaying a "pretty" message whilst doing so.
6041.81Skleink
6051.81SkleinkRELEASEMACHINEDIR
6061.81Skleink		Subdirectory used below RELEASEDIR when building
6071.81Skleink		a release.  [${MACHINE}]
6081.81Skleink
6091.81SkleinkRELEASEMACHINE	Subdirectory or path component used for the following
6101.81Skleink		paths:
6111.81Skleink			distrib/${RELEASEMACHINE}
6121.81Skleink			distrib/notes/${RELEASEMACHINE}
6131.81Skleink			etc/etc.${RELEASEMACHINE}
6141.81Skleink		Used when building a release.  [${MACHINE}]
6151.81Skleink
6161.81SkleinkAdditionally, the following variables may be set by <bsd.own.mk> or in a
6171.81Skleinkmake configuration file to modify the behavior of the system build
6181.81Skleinkprocess (default values are in brackets along with comments, if set by
6191.81Skleink<bsd.own.mk>):
6201.81Skleink
6211.138SenamiUSETOOLS	Indicates whether the tools specified by ${TOOLDIR} should
6221.81Skleink		be used as part of a build in progress.
6231.49Scgd		Supported values:
6241.81Skleink
6251.49Scgd		yes	Use the tools from TOOLDIR.
6261.81Skleink			Must be set to this if cross-compiling.
6271.49Scgd
6281.81Skleink		no	Do not use the tools from TOOLDIR, but refuse to
6291.81Skleink			build native compilation tool components that are
6301.49Scgd			version-specific for that tool.
6311.49Scgd
6321.49Scgd		never	Do not use the tools from TOOLDIR, even when
6331.81Skleink			building native tool components.  This is similar to
6341.49Scgd			the traditional NetBSD build method, but does not
6351.81Skleink			verify that the compilation tools in use are
6361.215Sad			up-to-date enough in order to build the tree
6371.81Skleink			successfully.  This may cause build or runtime
6381.81Skleink			problems when building the whole NetBSD source tree.
6391.49Scgd
6401.49Scgd		Default: "yes" if building all or part of a whole NetBSD
6411.49Scgd		source tree (detected automatically); "no" otherwise
6421.49Scgd		(to preserve traditional semantics of the <bsd.*.mk>
6431.49Scgd		make(1) include files).
6441.49Scgd
6451.49ScgdOBJECT_FMT	Object file format.  [set to "ELF" on architectures that
6461.49Scgd		use ELF -- currently all architectures].
6471.49Scgd
6481.49ScgdTOOLCHAIN_MISSING
6491.49Scgd		If not "no", this indicates that the platform being built
6501.49Scgd		does not have a working in-tree toolchain.  If the
6511.49Scgd		${MACHINE_ARCH} in question falls into this category,
6521.49Scgd		TOOLCHAIN_MISSING is conditionally assigned the value "yes".
6531.49Scgd		Otherwise, the variable is unconditionally assigned the
6541.49Scgd		value "no".
6551.49Scgd		If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are
6561.49Scgd		unconditionally assigned the value "no".
6571.49Scgd
6581.49ScgdEXTERNAL_TOOLCHAIN
6591.49Scgd		This variable is not directly set by <bsd.own.mk>, but
6601.49Scgd		including <bsd.own.mk> is the canonical way to gain
6611.49Scgd		access to this variable.  The variable should be defined
6621.85Skleink		either in the user's environment or in the user's mk.conf
6631.49Scgd		file.  If defined, this variable indicates the root of
6641.49Scgd		an external toolchain which will be used to build the
6651.49Scgd		tree.  For example, if a platform is a ${TOOLCHAIN_MISSING}
6661.49Scgd		platform, EXTERNAL_TOOLCHAIN can be used to re-enable the
6671.49Scgd		cross-compile framework.
6681.49Scgd
6691.49Scgd		If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally
6701.49Scgd		assigned the value "no", since the external version of the
6711.49Scgd		compiler may not be able to build the library components of
6721.49Scgd		the in-tree compiler.
6731.49Scgd
6741.49Scgd		NOTE: This variable is not yet used in as many places as
6751.49Scgd		it should be.  Expect the exact semantics of this variable
6761.49Scgd		to change in the short term as parts of the cross-compile
6771.49Scgd		framework continue to be cleaned up.
6781.49Scgd
6791.49ScgdThe following variables are defined to commands to perform the
6801.49Scgdappropriate operation, with the default in [brackets].  Note that
6811.49Scgdthe defaults change if USETOOLS == "yes":
6821.49Scgd
6831.49ScgdTOOL_AMIGAAOUT2BB	aout to Amiga bootblock converter.  [amiga-aout2bb]
6841.49Scgd
6851.49ScgdTOOL_AMIGAELF2BB	ELF to Amiga bootblock converter.  [amiga-elf2bb]
6861.49Scgd
6871.49ScgdTOOL_AMIGATXLT		Amige assembly language format translator.  [amiga-txlt]
6881.126Slukem
6891.49ScgdTOOL_ASN1_COMPILE	ASN1 compiler.  [asn1_compile]
6901.49Scgd
6911.49ScgdTOOL_AWK		Pattern-directed scanning/processing language.  [awk]
6921.49Scgd
6931.147SpkTOOL_CAP_MKDB		Create capability database.  [cap_mkdb]
6941.49Scgd
6951.147SpkTOOL_CAT		Concatenate and print files.  [cat]
6961.126Slukem
6971.49ScgdTOOL_CKSUM		Display file checksums.  [cksum]
6981.49Scgd
6991.126SlukemTOOL_COMPILE_ET		Error table compiler.  [compile_et]
7001.49Scgd
7011.49ScgdTOOL_CONFIG		Build kernel compilation directories.  [config]
7021.49Scgd
7031.49ScgdTOOL_CRUNCHGEN		Generate crunched binary build environment.  [crunchgen]
7041.147Spk
7051.147SpkTOOL_CTAGS		Create a tags file.  [ctags]
7061.147Spk
7071.147SpkTOOL_DB			Manipulate db(3) databases.  [db]
7081.147Spk
7091.147SpkTOOL_DISKLABEL		Read and write disk pack label.  [disklabel]
7101.147Spk
7111.147SpkTOOL_EQN		Format equations for groff.  [eqn]
7121.147Spk
7131.147SpkTOOL_FDISK		MS-DOS partition maintenance program.  [fdisk]
7141.147Spk
7151.147SpkTOOL_FGEN		IEEE 1275 Open Firmware FCode Tokenizer.  [fgen]
7161.147Spk
7171.147SpkTOOL_GENASSYM		Generate constants for assembly files.  [genassym]
7181.147Spk
7191.147SpkTOOL_GENCAT		Generate NLS message catalogs.  [gencat]
7201.201Sad
7211.147SpkTOOL_GMAKE		GNU make utility.  [gmake]
7221.201Sad
7231.201SadTOOL_GREP		Print lines matching a pattern.  [grep]
7241.147Spk
7251.147SpkTOOL_GROFF		Front end for groff document formatting system.  [groff]
7261.147Spk
7271.147SpkTOOL_HEXDUMP		Ascii, decimal, hexadecimal, octal dump.  [hexdump]
7281.49Scgd
7291.49ScgdTOOL_HP300MKBOOT	Make bootable image for hp300.  [hp300-mkboot]
7301.49Scgd
7311.49ScgdTOOL_HP700MKBOOT	Make bootable image for hp700.  [hp700-mkboot]
7321.201Sad
7331.201SadTOOL_INDXBIB		Make bibliographic database's inverted index.  [indxbib]
7341.49Scgd
7351.49ScgdTOOL_INSTALLBOOT	Install disk bootstrap software.  [installboot]
7361.126Slukem
7371.49ScgdTOOL_INSTALL_INFO	Update info/dir entries.  [install-info]
7381.126Slukem
7391.201SadTOOL_JOIN		Relational database operator.  [join]
7401.201Sad
7411.201SadTOOL_M4			M4 macro language processor.  [m4]
7421.49Scgd
7431.49ScgdTOOL_MACPPCFIXCOFF	Fix up xcoff headers for macppc.  [macppc-fixcoff]
7441.49Scgd
7451.49ScgdTOOL_MAKEFS		Create file system image from directory tree.  [makefs]
7461.49Scgd
7471.99SmycroftTOOL_MAKEINFO		Translate Texinfo documents.  [makeinfo]
7481.99Smycroft
7491.49ScgdTOOL_MAKEWHATIS		Create a whatis.db database.  [makewhatis]
7501.49Scgd
7511.49ScgdTOOL_MDSETIMAGE		Set kernel RAM disk image.  [mdsetimage]
7521.103Skleink
7531.49ScgdTOOL_MENUC		Menu compiler.  [menuc]
7541.49Scgd
7551.49ScgdTOOL_MIPSELF2ECOFF	Convert ELF-format executable to ECOFF for mips.
7561.49Scgd			[mips-elf2ecoff]
7571.49Scgd
7581.49ScgdTOOL_MKCSMAPPER		Make charset mapping table.  [mkcsmapper]
7591.49Scgd
7601.49ScgdTOOL_MKESDB		Make encoding scheme database.  [mkesdb]
7611.49Scgd
7621.49ScgdTOOL_MKLOCALE		Make LC_CTYPE locale files.  [mklocale]
7631.49Scgd
7641.49ScgdTOOL_MKMAGIC		Create database for file(1).  [file]
7651.49Scgd
7661.49ScgdTOOL_MKTEMP		Make (unique) temporary file name.  [mktemp]
7671.49Scgd
7681.49ScgdTOOL_MSGC		Simple message list compiler.  [msgc]
7691.49Scgd
7701.49ScgdTOOL_MTREE		Map a directory hierarchy.  [mtree]
7711.49Scgd
7721.49ScgdTOOL_PAX		Manipulate file archives and copy directories.  [pax]
7731.49Scgd
7741.49ScgdTOOL_PIC		Compile pictures for groff.  [pic]
7751.49Scgd
7761.49ScgdTOOL_PIGZ		Parallel compressor.  [pigz]
7771.49Scgd
7781.49ScgdTOOL_POWERPCMKBOOTIMAGE	Make bootable image for powerpc.  [powerpc-mkbootimage]
7791.49Scgd
7801.49ScgdTOOL_PWD_MKDB		Generate the password databases.  [pwd_mkdb]
7811.49Scgd
7821.99SmycroftTOOL_REFER		Preprocess bibliographic references for groff.  [refer]
7831.49Scgd
7841.49ScgdTOOL_ROFF_ASCII		Generate ASCII groff output.  [nroff]
7851.103Skleink
7861.79SkleinkTOOL_ROFF_DVI		Generate DVI groff output.  [${TOOL_GROFF} -Tdvi]
7871.79Skleink
7881.103SkleinkTOOL_ROFF_HTML		Generate HTML groff output.
7891.103Skleink			[${TOOL_GROFF} -Tlatin1 -mdoc2html]
7901.103Skleink
7911.79SkleinkTOOL_ROFF_PS		Generate PS groff output.  [${TOOL_GROFF} -Tps]
7921.49Scgd
7931.49ScgdTOOL_ROFF_RAW		Generate "raw" groff output.  [${TOOL_GROFF} -Z]
7941.49Scgd
7951.49ScgdTOOL_RPCGEN		Remote Procedure Call (RPC) protocol compiler.  [rpcgen]
7961.49Scgd
7971.49ScgdTOOL_SED		Stream editor.  [sed]
7981.49Scgd
7991.49ScgdTOOL_SOELIM		Eliminate .so's from groff input.  [soelim]
8001.49Scgd
8011.49ScgdTOOL_SPARKCRC		Generate a crc suitable for use in a sparkive file.
8021.49Scgd			[sparkcrc]
8031.49Scgd
8041.49ScgdTOOL_STAT		Display file status.  [stat]
8051.49Scgd
8061.103SkleinkTOOL_STRFILE		Create a random access file for storing strings.
8071.79Skleink			[strfile]
8081.79Skleink
8091.49ScgdTOOL_SUNLABEL		Read or modify a SunOS disk label.  [sunlabel]
8101.49Scgd
8111.49ScgdTOOL_TBL		Format tables for groff.  [tbl]
8121.49Scgd
8131.49ScgdTOOL_UUDECODE		Uudecode a binary file.  [uudecode]
8141.49Scgd
8151.49ScgdTOOL_VGRIND		Grind nice listings of programs.  [vgrind -f]
8161.49Scgd
8171.49ScgdTOOL_ZIC		Time zone compiler.  [zic]
8181.49Scgd
8191.49Scgd<bsd.own.mk> is generally useful when building your own Makefiles so that
8201.49Scgdthey use the same default owners etc. as the rest of the tree.
8211.49Scgd
8221.49Scgd
8231.49Scgd=-=-=-=-=   bsd.clean.mk   =-=-=-=-=
8241.49Scgd
8251.49ScgdThe include file <bsd.clean.mk> defines the clean and cleandir
8261.49Scgdtargets.  It uses the following variables:
8271.49Scgd
8281.49ScgdCLEANFILES	Files to remove for both the clean and cleandir targets.
8291.49Scgd
8301.192SchristosCLEANDIRFILES	Files to remove for the cleandir target, but not for
8311.49Scgd		the clean target.
8321.49Scgd
8331.188SmartinMKCLEANSRC	Controls whether or not the clean and cleandir targets
8341.126Slukem		will delete files from both the object directory,
8351.126Slukem		${.OBJDIR}, and the source directory, ${.CURDIR}.
8361.239Sdholland
8371.151Schristos		If MKCLEANSRC is set to "no", then the file names in
8381.215Sad		CLEANFILES or CLEANDIRFILES are interpreted relative
8391.49Scgd		to the object directory, ${.OBJDIR}.  This is the
8401.49Scgd		traditional behaviour.
8411.49Scgd
8421.49Scgd		If MKCLEANSRC is set to "yes", then the file deletion
8431.92Skleink		is performed relative to both the object directory,
8441.95Skleink		${.OBJDIR}, and the source directory, ${.CURDIR}.  (This
8451.95Skleink		has no effect if ${.OBJDIR} is the same as ${.CURDIR}.)
8461.95Skleink		Deleting files from ${.CURDIR} is intended to remove
8471.49Scgd		stray output files that had been left in the source
8481.49Scgd		directory by an earlier build that did not use object
8491.121Seeh		directories.
8501.49Scgd
8511.49Scgd		The default is MKCLEANSRC=yes.  If you always build with
8521.49Scgd		separate object directories, and you are sure that there
8531.49Scgd		are no stray files in the source directories, then you
8541.158Sjdolecek		may set MKCLEANSRC=no to save some time.
8551.49Scgd
8561.49ScgdMKCLEANVERIFY	Controls whether or not the clean and cleandir targets
8571.49Scgd		will verify that files have been deleted.
8581.49Scgd
8591.49Scgd		If MKCLEANVERIFY is set to "no", then the files will
8601.49Scgd		be deleted using a "rm -f" command, and its success or
8611.49Scgd		failure will be ignored.
8621.49Scgd
8631.49Scgd		If MKCLEANVERIFY is set to "yes", then the success of
8641.49Scgd		the "rm -f" command will be verified using an "ls"
8651.49Scgd		command.
8661.49Scgd
8671.209Sad		The default is MKCLEANVERIFY=yes.  If you are sure that
8681.49Scgd		there will be no problems caused by file permissions,
8691.225Sad		read-only file systems, or the like, then you may set
8701.190Sad		MKCLEANVERIFY=no to save some time.
8711.210Sad
8721.210SadTo use the clean and cleandir targets defined in <bsd.clean.mk>, other
8731.220SadMakefiles or bsd.*.mk files should append file names to the CLEANFILES
8741.210Sador CLEANDIRFILES variables.  For example:
8751.220Sad
8761.210Sad	    CLEANFILES+= a.out
8771.210Sad	    CLEANDIRFILES+= .depend
8781.246Syamt
8791.147Spk	    .include <bsd.clean.mk>
8801.209Sad
8811.49Scgd
8821.147Spk=-=-=-=-=   bsd.dep.mk   =-=-=-=-=
8831.49Scgd
8841.209SadThe include file <bsd.dep.mk> contains the default targets for building
8851.49Scgd.depend files.  It creates .d files from entries in SRCS and DPSRCS
8861.49Scgdthat are C, C++, or Objective C source files, and builds .depend from the
8871.49Scgd.d files.  All other files in SRCS and all of DPSRCS will be used as
8881.49Scgddependencies for the .d files.  In order for this to function correctly,
8891.49Scgdit should be .included after all other .mk files and directives that may
8901.201Sadmodify SRCS or DPSRCS.  It uses the following variables:
8911.49Scgd
8921.49ScgdSRCS		List of source files to build the program.
8931.49Scgd
8941.49ScgdDPSRCS		List of source files which are needed for generating
8951.201Sad		dependencies, but are not needed in ${SRCS}.
8961.49Scgd
8971.49Scgd
8981.49Scgd=-=-=-=-=   bsd.files.mk   =-=-=-=-=
8991.49Scgd
9001.201SadThe include file <bsd.files.mk> handles the FILES variables and is included
9011.49Scgdfrom <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables:
9021.201Sad
9031.49ScgdFILES		The list of files to install.
9041.170Swrstuden
9051.201SadCONFIGFILES	Similar semantics to FILES, except that the files
9061.170Swrstuden		are installed by the `configinstall' target,
9071.201Sad		not the `install' target.
9081.170Swrstuden		The FILES* variables documented below also apply.
9091.170Swrstuden
9101.201SadFILESOWN	File owner.  [${BINOWN}]
9111.170Swrstuden
9121.201SadFILESGRP	File group.  [${BINGRP}]
9131.170Swrstuden
9141.49ScgdFILESMODE	File mode.  [${NONBINMODE}]
9151.201Sad
9161.49ScgdFILESDIR	The location to install the files.
9171.201Sad
9181.49ScgdFILESNAME	Optional name to install each file as.
9191.49Scgd
9201.118SaugustssFILESOWN_<fn>	File owner of the specific file <fn>.
9211.49Scgd
9221.49ScgdFILESGRP_<fn>	File group of the specific file <fn>.
9231.49Scgd
9241.49ScgdFILESMODE_<fn>	File mode of the specific file <fn>.
9251.49Scgd
9261.201SadFILESDIR_<fn>	The location to install the specific file <fn>.
9271.49Scgd
9281.201SadFILESNAME_<fn>	Optional name to install <fn> as.
9291.49Scgd
9301.49ScgdFILESBUILD	If this variable is defined, then its value will be
9311.49Scgd		used as the default for all FILESBUILD_<fn> variables.
9321.49Scgd		Otherwise, the default will be "no".
9331.49Scgd
9341.49ScgdFILESBUILD_<fn>	A value different from "no" will add the file to the list of
9351.49Scgd		targets to be built by `realall'.  Users of that variable
9361.151Schristos		should provide a target to build the file.
9371.151Schristos
9381.239Sdholland
9391.239SdhollandBUILDSYMLINKS	List of two word items:
9401.239Sdholland			lnsrc lntgt
9411.239Sdholland		For each lnsrc item, create a symlink named lntgt.
9421.239Sdholland		The lntgt symlinks are removed by the cleandir target.
9431.239Sdholland
9441.239SdhollandUUDECODE_FILES	List of files which are stored as <file>.uue in the source
9451.151Schristos		tree. Each one will be decoded with ${TOOL_UUDECODE}.
9461.239Sdholland		The source files have a `.uue' suffix, the generated files do
9471.206Spooka		not.
9481.151Schristos
9491.239SdhollandUUDECODE_FILES_RENAME_<fn>
9501.151Schristos		Rename the output from the decode to the provided name.
9511.151Schristos		
9521.151Schristos		*NOTE: These files are simply decoded, with no install or other
9531.49Scgd		       rule applying implicitly except being added to the clean
9541.49Scgd		       target.
9551.49Scgd
9561.49Scgd=-=-=-=-=   bsd.gcc.mk   =-=-=-=-=
9571.49Scgd
9581.65SchristosThe include file <bsd.gcc.mk> computes various parameters related to GCC
9591.49Scgdsupport libraries.  It defines no targets.  <bsd.own.mk> MUST be included
9601.49Scgdbefore <bsd.gcc.mk>.
9611.49Scgd
9621.49ScgdThe primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each
9631.49Scgdof which need to know where to find certain GCC support libraries.
9641.109Sperry
9651.49ScgdThe behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable,
9661.49Scgdwhich is generally set by the user.  If EXTERNAL_TOOLCHAIN it set, then
9671.177Sthorpejthe compiler is asked where to find the support libraries, otherwise the
9681.127Senamisupport libraries are found in ${DESTDIR}/usr/lib.
9691.121Seeh
9701.177Sthorpej<bsd.gcc.mk> sets the following variables:
9711.138Senami
9721.131Schristos_GCC_CRTBEGIN	The full path name to crtbegin.o.
9731.49Scgd
9741.49Scgd_GCC_CRTBEGINS	The full path name to crtbeginS.o.
9751.49Scgd
9761.49Scgd_GCC_CRTEND	The full path name to crtend.o.
9771.158Sjdolecek
9781.220Sad_GCC_CRTENDS	The full path name to crtendS.o.
9791.220Sad
9801.220Sad_GCC_LIBGCCDIR	The directory where libgcc.a is located.
9811.158Sjdolecek
9821.220Sad
9831.158Sjdolecek=-=-=-=-=   bsd.inc.mk   =-=-=-=-=
9841.220Sad
9851.158SjdolecekThe include file <bsd.inc.mk> defines the includes target and uses the
9861.49Scgdvariables:
9871.220Sad
9881.220SadINCS		The list of include files.
9891.220Sad
9901.49ScgdINCSDIR		The location to install the include files.
9911.220Sad
9921.150SdslINCSNAME	Target name of the include file, if only one; same as
9931.220Sad		FILESNAME, but for include files.
9941.104Sthorpej
9951.104SthorpejINCSYMLINKS	Similar to SYMLINKS in <bsd.links.mk>, except that these
9961.220Sad		are installed in the 'includes' target and not the
9971.220Sad		(much later) 'install' target.
9981.220Sad
9991.104SthorpejINCSNAME_<file>	The name file <file> should be installed as, if not <file>,
10001.220Sad		same as FILESNAME_<file>, but for include files.
10011.104Sthorpej
10021.220Sad
10031.49Scgd=-=-=-=-=   bsd.info.mk   =-=-=-=-=
10041.49Scgd
10051.49ScgdThe include file <bsd.info.mk> is used to generate and install GNU Info
10061.201Saddocumentation from respective Texinfo source files.  It defines three
10071.49Scgdimplicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
10081.201Sadfollowing variables:
10091.49Scgd
10101.49ScgdTEXINFO		List of Texinfo source files.  Info documentation will
10111.49Scgd		consist of single files with the extension replaced by
10121.201Sad		.info.
10131.49Scgd
10141.201SadINFOFLAGS	Flags to pass to makeinfo.  []
10151.49Scgd
10161.49Scgd
10171.49Scgd=-=-=-=-=   bsd.kernobj.mk   =-=-=-=-=
10181.49Scgd
10191.49ScgdThe include file <bsd.kernobj.mk> defines variables related to the
10201.49Scgdlocation of kernel sources and object directories.
10211.49Scgd
10221.118SaugustssKERNSRCDIR	Is the location of the top of the kernel src.
10231.49Scgd		[${_SRC_TOP_}/sys]
10241.49Scgd
10251.147SpkKERNARCHDIR	Is the location of the machine dependent kernel sources.
10261.147Spk		[arch/${MACHINE}]
10271.147Spk
10281.147SpkKERNCONFDIR	Is where the configuration files for kernels are found.
10291.201Sad		[${KERNSRCDIR}/${KERNARCHDIR}/conf]
10301.147Spk
10311.201SadKERNOBJDIR	Is the kernel build directory.  The kernel GENERIC for
10321.49Scgd		instance will be compiled in ${KERNOBJDIR}/GENERIC.
10331.49Scgd		The default value is
10341.147Spk		${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
10351.147Spk		if it exists or the target 'obj' is being made.
10361.148Spk		Otherwise the default is
10371.148Spk		${KERNSRCDIR}/${KERNARCHDIR}/compile.
10381.148Spk
10391.148SpkIt is important that Makefiles (such as those under src/distrib) that
10401.148Spkwish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR}
10411.201Sadrather than make assumptions about the location of the compiled kernel.
10421.49Scgd
10431.49Scgd
10441.49Scgd=-=-=-=-=   bsd.kinc.mk   =-=-=-=-=
10451.49Scgd
10461.49ScgdThe include file <bsd.kinc.mk> defines the many targets (includes,
10471.201Sadsubdirectories, etc.), and is used by kernel makefiles to handle
10481.49Scgdinclude file installation.  It is intended to be included alone, by
10491.49Scgdkernel Makefiles.  It uses similar variables to <bsd.inc.mk>.
10501.49ScgdPlease see <bsd.kinc.mk> for more details, and keep the documentation
10511.49Scgdin that file up to date.
10521.49Scgd
10531.49Scgd
10541.201Sad=-=-=-=-=   bsd.lib.mk   =-=-=-=-=
10551.201Sad
10561.49ScgdThe include file <bsd.lib.mk> has support for building libraries.  It has
10571.49Scgdthe same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
10581.49Scgdincludes, install, lint, and tags.  Additionally, it has a checkver target
10591.148Spkwhich checks for installed shared object libraries whose version is greater
10601.201Sadthat the version of the source. It has a limited number of suffixes,
10611.201Sadconsistent with the current needs of the BSD tree.  <bsd.lib.mk> includes
10621.49Scgd<bsd.shlib.mk> to get shared library parameters.
10631.49Scgd
10641.110SthorpejIt sets/uses the following variables:
10651.49Scgd
10661.49ScgdLIB		The name of the library to build.
10671.49Scgd
10681.49ScgdLIBDIR		Target directory for libraries.
10691.49Scgd
10701.49ScgdMKARZERO	Normally, ar(1) sets the timestamps, uid, gid and
10711.49Scgd		permissions in files inside its archives to those of
10721.49Scgd		the file it was fed. This leads to non-reproduceable
10731.49Scgd		builds. If MKARZERO is set to "yes" (default is "no")
10741.49Scgd		then the "D" flag is passed to ar, causing the
10751.49Scgd		timestamp, uid and gid to be zeroed and the file
10761.49Scgd		permissions to be set to 644. This allows .a files
10771.110Sthorpej		from different builds to be bit identical.
10781.49Scgd
10791.49ScgdSHLIBINSTALLDIR	Target directory for shared libraries if ${USE_SHLIBDIR}
10801.49Scgd		is not "no".
10811.49Scgd
10821.49ScgdSHLIB_MAJOR
10831.49ScgdSHLIB_MINOR
10841.49ScgdSHLIB_TEENY	Major, minor, and teeny version numbers of shared library
10851.49Scgd
10861.49ScgdUSE_SHLIBDIR	If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR}
10871.49Scgd		as the path to install shared libraries to.
10881.49Scgd		USE_SHLIBDIR must be defined before <bsd.own.mk> is included.
10891.109Sperry		Default: no
10901.201Sad
10911.49ScgdLIBISMODULE	If not "no", install as ${LIB}.so (without the "lib" prefix),
10921.49Scgd		and act as "MKDEBUGLIB=no MKLINT=no MKPICINSTALL=no
10931.49Scgd		MKPROFILE=no MKSTATICLIB=no".
10941.177Sthorpej		Default: no
10951.177Sthorpej
10961.177SthorpejLIBISPRIVATE	If not "no", act as "MKDEBUGLIB=no MKLINT=no MKPIC=no
10971.49Scgd		MKPROFILE=no", and don't install the (.a) library.
10981.177Sthorpej		This is useful for "build only" helper libraries.
10991.121Seeh		Default: no
11001.124Senami
11011.121SeehLIBISCXX	If not "no", Use ${CXX} instead of ${CC} to link
11021.121Seeh		shared libraries.
11031.138Senami		This is useful for C++ libraries.
11041.121Seeh		Default: no
11051.126Slukem
11061.124SenamiLINTLIBDIR	Target directory for lint libraries.
11071.121Seeh
11081.121SeehLIBGRP		Library group.
11091.121Seeh
11101.124SenamiLIBOWN		Library owner.
11111.49Scgd
11121.124SenamiLIBMODE		Library mode.
11131.121Seeh
11141.49ScgdLDADD		Additional loader objects.
11151.121Seeh
11161.49ScgdMAN		The manual pages to be installed (use a .1 - .9 suffix).
11171.177Sthorpej
11181.49ScgdNOCHECKVER_<library>
11191.49ScgdNOCHECKVER	If set, disables checking for installed shared object
11201.177Sthorpej		libraries with versions greater than the source.  A
11211.121Seeh		particular library name, without the "lib" prefix, may
11221.49Scgd		be appended to the variable name to disable the check for
11231.177Sthorpej		only that library.
11241.177Sthorpej
11251.177SthorpejSRCS		List of source files to build the library.  Suffix types
11261.49Scgd		.s, .c, and .f are supported.  Note, .s files are preferred
11271.49Scgd		to .c files of the same name.  (This is not the default for
11281.49Scgd		versions of make.)
11291.49Scgd
11301.201SadLIBDPLIBS	A list of the tuples:
11311.49Scgd			libname  path-to-srcdir-of-libname
11321.49Scgd
11331.49Scgd		For each tuple;
11341.49Scgd		     *	LIBDO.libname contains the .OBJDIR of the library
11351.49Scgd			`libname', and if it is not set it is determined
11361.49Scgd			from the srcdir and added to MAKEOVERRIDES (the
11371.201Sad			latter is to allow for build time optimization).
11381.49Scgd		     *	LDADD gets  -L${LIBDO.libname} -llibname    added.
11391.49Scgd		     *	DPADD gets  ${LIBDO.libname}/liblibname.so  or
11401.212Selad				    ${LIBDO.libname}/liblibname.a   added.
11411.212Selad
11421.189Selad		This variable may be used for individual libraries, as
11431.189Selad		well as in parent directories to cache common libraries
11441.189Selad		as a build-time optimization.
11451.189Selad
11461.189SeladThe include file <bsd.lib.mk> includes the file named "../Makefile.inc"
11471.121Seehif it exists, as well as the include file <bsd.man.mk>.
11481.49Scgd
11491.49ScgdIt has rules for building profiled objects; profiled libraries are
11501.142Sgehennabuilt by default.
11511.201Sad
11521.49ScgdLibraries are ranlib'd when made.
11531.49Scgd
11541.201Sad
11551.49Scgd=-=-=-=-=   bsd.links.mk   =-=-=-=-=
11561.201Sad
11571.49ScgdThe include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
11581.142Sgehennaand is included from from <bsd.lib.mk> and <bsd.prog.mk>.
11591.49Scgd
11601.220SadLINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log
11611.209Sadis used. The defaults may be modified by other bsd.*.mk files which
11621.190Sadinclude bsd.links.mk.  In the future, these variables may be replaced
11631.49Scgdby a method for explicitly recording hard links in a metadata log.
11641.49Scgd
11651.65SchristosLINKS		The list of hard links, consisting of pairs of paths:
11661.190Sad			source-file target-file
11671.209Sad		${DESTDIR} is prepended to both paths before linking.
11681.220Sad		For example, to link /bin/test and /bin/[, use:
11691.49Scgd			LINKS=/bin/test /bin/[
11701.190Sad
11711.139SjdolecekCONFIGLINKS	Similar semantics to LINKS, except that the links
11721.160Spk		are installed by the `configinstall' target,
11731.160Spk		not the `install' target.
11741.160Spk
11751.160SpkSYMLINKS	The list of symbolic links, consisting of pairs of paths:
11761.160Spk			source-file target-file
11771.160Spk		${DESTDIR} is only prepended to target-file before linking.
11781.231Srmind		For example, to symlink /usr/bin/tar to /bin/tar resulting
11791.231Srmind		in ${DESTDIR}/usr/bin/tar -> /bin/tar:
11801.231Srmind			SYMLINKS=/bin/tar /usr/bin/tar
11811.49Scgd
11821.49ScgdCONFIGSYMLINKS	Similar semantics to SYMLINKS, except that the symbolic links
11831.49Scgd		are installed by the `configinstall' target,
11841.190Sad		not the `install' target.
11851.209Sad
11861.220SadLINKSOWN	Link owner.  [${BINOWN}]
11871.49Scgd
11881.158SjdolecekLINKSGRP	Link group.  [${BINGRP}]
11891.158Sjdolecek
11901.158SjdolecekLINKSMODE	Link mode.  [${NONBINMODE}]
11911.158Sjdolecek
11921.220SadLINKSOWN_<fn>	Link owner of the specific file <fn>.
11931.209Sad
11941.220SadLINKSGRP_<fn>	Link group of the specific file <fn>.
11951.158Sjdolecek
11961.209SadLINKSMODE_<fn>	Link mode of the specific file <fn>.
11971.191Sdsl
11981.191Sdsl
11991.237Srmind=-=-=-=-=   bsd.man.mk   =-=-=-=-=
12001.237Srmind
12011.237SrmindThe include file <bsd.man.mk> handles installing manual pages and their
12021.191Sdsllinks.
12031.237Srmind
12041.191SdslIt has a three targets:
12051.191Sdsl
12061.237Srmind	catinstall:
12071.237Srmind		Install the preformatted manual pages and their links.
12081.237Srmind	htmlinstall:
12091.158Sjdolecek		Install the HTML manual pages and their links.
12101.237Srmind	maninstall:
12111.158Sjdolecek		Install the manual page sources and their links.
12121.158Sjdolecek
12131.158SjdolecekIt sets/uses the following variables:
12141.191Sdsl
12151.220SadMANDIR		Base path for manual installation.
12161.158Sjdolecek
12171.191SdslMANGRP		Manual group.
12181.209Sad
12191.158SjdolecekMANOWN		Manual owner.
12201.209Sad
12211.220SadMANMODE		Manual mode.
12221.158Sjdolecek
12231.158SjdolecekMANSUBDIR	Subdirectory under the manual page section, i.e. "/vax"
12241.49Scgd		or "/tahoe" for machine specific manual pages.
12251.191Sdsl
12261.49ScgdMAN		The manual pages to be installed (use a .1 - .9 suffix).
12271.220Sad
12281.209SadMLINKS		List of manual page links (using a .1 - .9 suffix).  The
12291.220Sad		linked-to file must come first, the linked file second,
12301.49Scgd		and there may be multiple pairs.
12311.209Sad
12321.237SrmindThe include file <bsd.man.mk> includes a file named "../Makefile.inc" if
12331.237Srmindit exists.
12341.237Srmind
12351.93Skleink
12361.237Srmind=-=-=-=-=   bsd.obj.mk   =-=-=-=-=
12371.191Sdsl
12381.220SadThe include file <bsd.obj.mk> defines targets related to the creation
12391.49Scgdand use of separated object and source directories.
12401.191Sdsl
12411.209SadIf an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
12421.49Scgd${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
12431.209Sadit exists.  Otherwise make(1) looks for the existence of a
12441.220Sadsubdirectory (or a symlink to a directory) of the source directory
12451.49Scgdinto which built targets should be placed.  If an environment variable
12461.49Scgdnamed MAKEOBJDIR is set, make(1) uses its value as the name of the
12471.49Scgdobject directory; failing that, make first looks for a subdirectory
12481.220Sadnamed "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
12491.215Sad
12501.220SadObject directories are not created automatically by make(1) if they
12511.215Saddon't exist; you need to run a separate "make obj".  (This will happen
12521.201Sadduring a top-level build if "MKOBJDIRS" is set to a value other than
12531.215Sad"no").  When the source directory is a subdirectory of ${BSDSRCDIR} --
12541.201Sadand this is determined by a simple string prefix comparison -- object
12551.49Scgddirectories are created in a separate object directory tree, and a
12561.49Scgdsymlink to the object directory in that tree is created in the source
12571.201Saddirectory; otherwise, "make obj" assumes that you're not in the main
12581.192Schristossource tree and that it's not safe to use a separate object tree.
12591.108Sperry
12601.49ScgdSeveral variables used by <bsd.obj.mk> control exactly what
12611.201Saddirectories and links get created during a "make obj":
12621.49Scgd
12631.201SadMAKEOBJDIR	If set, this is the component name of the object
12641.49Scgd		directory.
12651.49Scgd
12661.228SadOBJMACHINE	If this is set but MAKEOBJDIR is not set, creates
12671.228Sad		object directories or links named "obj.${MACHINE}";
12681.228Sad		otherwise, just creates ones named "obj".
12691.228Sad
12701.228SadUSR_OBJMACHINE  If set, and the current directory is a subdirectory of
12711.228Sad		${BSDSRCDIR}, create object directory in the
12721.228Sad		corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
12731.228Sad		otherwise, create it in the corresponding subdirectory
12741.228Sad		of ${BSDOBJDIR}
12751.228Sad
12761.228SadBUILDID		If set, the contents of this variable are appended
12771.228Sad		to the object directory name.  If OBJMACHINE is also
12781.228Sad		set, ".${BUILDID}" is added after ".${MACHINE}".
12791.228Sad
12801.228Sad
12811.49Scgd=-=-=-=-=   bsd.prog.mk   =-=-=-=-=
12821.49Scgd
12831.49ScgdThe include file <bsd.prog.mk> handles building programs from one or
12841.49Scgdmore source files, along with their manual pages.  It has a limited number
12851.49Scgdof suffixes, consistent with the current needs of the BSD tree.
12861.178Schristos<bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters.
12871.126Slukem
12881.201SadIt has eight targets:
12891.74Smycroft
12901.126Slukem	all:
12911.201Sad		build the program and its manual page.  This also
12921.74Smycroft		creates a GDB initialization file (.gdbinit) in
12931.74Smycroft		the objdir.  The .gdbinit file sets the shared library
12941.74Smycroft		prefix to ${DESTDIR} to facilitate cross-debugging.
12951.74Smycroft	clean:
12961.74Smycroft		remove the program, any object files and the files a.out,
12971.74Smycroft		Errs, errs, mklog, and ${PROG}.core.
12981.74Smycroft	cleandir:
12991.74Smycroft		remove all of the files removed by the target clean, as
13001.74Smycroft		well as .depend, tags, and any manual pages.
13011.83Smycroft		`distclean' is a synonym for `cleandir'.
13021.74Smycroft	depend:
13031.74Smycroft		make the dependencies for the source files, and store
13041.74Smycroft		them in the file .depend.
13051.74Smycroft	includes:
13061.178Schristos		install any header files.
13071.49Scgd	install:
13081.74Smycroft		install the program and its manual pages; if the Makefile
13091.178Schristos		does not itself define the target install, the targets
13101.74Smycroft		beforeinstall and afterinstall may also be used to cause
13111.49Scgd		actions immediately before and after the install target
13121.201Sad		is executed.
13131.201Sad	lint:
13141.74Smycroft		run lint on the source files
13151.49Scgd	tags:
13161.49Scgd		create a tags file for the source files.
13171.143Sjdolecek
13181.143SjdolecekIt sets/uses the following variables:
13191.143Sjdolecek
13201.143SjdolecekBINGRP		Binary group.
13211.143Sjdolecek
13221.143SjdolecekBINOWN		Binary owner.
13231.201Sad
13241.144SchristosBINMODE		Binary mode.
13251.201Sad
13261.143SjdolecekCLEANDIRFILES	Additional files to remove for the cleandir target.
13271.143Sjdolecek
13281.143SjdolecekCLEANFILES	Additional files to remove for the clean and cleandir targets.
13291.143Sjdolecek
13301.143SjdolecekCOPTS		Additional flags to the compiler when creating C objects.
13311.143Sjdolecek
13321.143SjdolecekCOPTS.<fn>	Additional flags to the compiler when creating the
13331.143Sjdolecek		C objects for <fn>.
13341.162Sjdolecek		For <fn>.[ly], "<fn>.c" must be used.
13351.201Sad
13361.143SjdolecekCPUFLAGS	Additional flags to the compiler/assembler to select
13371.162Sjdolecek		CPU instruction set options, CPU tuning options, etc.
13381.201Sad
13391.143SjdolecekCPUFLAGS.<fn>	Additional flags to the compiler/assembler for <fn>.
13401.143Sjdolecek		For <fn>.[ly], "<fn>.c" must be used.
13411.143Sjdolecek
13421.143SjdolecekCPPFLAGS	Additional flags to the C pre-processor.
13431.143Sjdolecek
13441.143SjdolecekCPPFLAGS.<fn>	Additional flags to the C pre-processor for <fn>.
13451.143Sjdolecek		For <fn>.[ly], "<fn>.c" must be used.
13461.143Sjdolecek
13471.143SjdolecekGDBINIT		List of GDB initialization files to add to "source"
13481.201Sad		directives in the .gdbinit file that is created in the
13491.144Schristos		objdir.
13501.201Sad
13511.143SjdolecekLDADD		Additional loader objects.  Usually used for libraries.
13521.143Sjdolecek		For example, to load with the compatibility and utility
13531.143Sjdolecek		libraries, use:
13541.143Sjdolecek
13551.143Sjdolecek			LDADD+=-lutil -lcompat
13561.143Sjdolecek
13571.201SadLDFLAGS		Additional linker flags (passed to ${CC} during link).
13581.143Sjdolecek
13591.143SjdolecekLINKS		See <bsd.links.mk>
13601.162Sjdolecek
13611.201SadOBJCOPTS	Additional flags to the compiler when creating ObjC objects.
13621.143Sjdolecek
13631.147SpkOBJCOPTS.<fn>	Additional flags to the compiler when creating the
13641.162Sjdolecek		ObjC objects for <fn>.
13651.201Sad		For <fn>.[ly], "<fn>.c" must be used.
13661.147Spk
13671.143SjdolecekSYMLINKS	See <bsd.links.mk>
13681.143Sjdolecek
13691.143SjdolecekMAN		Manual pages (should end in .1 - .9).  If no MAN variable is
13701.143Sjdolecek		defined, "MAN=${PROG}.1" is assumed.
13711.143Sjdolecek
13721.143SjdolecekPAXCTL_FLAGS	If defined, run paxctl(1) on the program binary after link
13731.143Sjdolecek		time, with the value of this variable as args to paxctl(1).
13741.143Sjdolecek
13751.143SjdolecekPAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS.
13761.143Sjdolecek
13771.143SjdolecekPROG		The name of the program to build.  If not supplied, nothing
13781.143Sjdolecek		is built.
13791.143Sjdolecek
13801.201SadPROG_CXX	If defined, the name of the program to build.  Also
13811.143Sjdolecek		causes <bsd.prog.mk> to link the program with the C++
13821.157Smanu		compiler rather than the C compiler.  PROG_CXX overrides
13831.143Sjdolecek		the value of PROG if PROG is also set.
13841.143Sjdolecek
13851.144SchristosPROGNAME	The name that the above program will be installed as, if
13861.143Sjdolecek		different from ${PROG}.
13871.143Sjdolecek
13881.143SjdolecekSRCS		List of source files to build the program.  If SRCS is not
13891.144Schristos		defined, it's assumed to be ${PROG}.c.
13901.143Sjdolecek
13911.143SjdolecekDPSRCS		List of source files which are needed for generating
13921.143Sjdolecek		dependencies, but are not needed in ${SRCS}.
13931.176Schristos
13941.143SjdolecekDPADD		Additional dependencies for the program.  Usually used for
13951.143Sjdolecek		libraries.  For example, to depend on the compatibility and
13961.143Sjdolecek		utility libraries use:
13971.143Sjdolecek
13981.201Sad			DPADD+=${LIBCOMPAT} ${LIBUTIL}
13991.143Sjdolecek
14001.201Sad		The following system libraries are predefined for DPADD:
14011.143Sjdolecek
14021.143Sjdolecek		LIBARCHIVE?=	${DESTDIR}/usr/lib/libarchive.a
14031.143Sjdolecek		LIBASN1?=	${DESTDIR}/usr/lib/libasn1.a
14041.143Sjdolecek		LIBATF_C?=	${DESTDIR}/usr/lib/libatf-c.a
14051.147Spk		LIBATF_CXX?=	${DESTDIR}/usr/lib/libatf-c++.a
14061.147Spk		LIBBIND9?=	${DESTDIR}/usr/lib/libbind9.a
14071.201Sad		LIBBLUETOOTH?=	${DESTDIR}/usr/lib/libbluetooth.a
14081.147Spk		LIBBSDMALLOC?=	${DESTDIR}/usr/lib/libbsdmalloc.a
14091.49Scgd		LIBBZ2?=	${DESTDIR}/usr/lib/libbz2.a
14101.126Slukem		LIBC?=		${DESTDIR}/usr/lib/libc.a
14111.49Scgd		LIBCOMPAT?=	${DESTDIR}/usr/lib/libcompat.a
14121.126Slukem		LIBCOM_ERR?=	${DESTDIR}/usr/lib/libcom_err.a
14131.49Scgd		LIBCRT0?=	${DESTDIR}/usr/lib/crt0.o
14141.201Sad		LIBCRYPT?=	${DESTDIR}/usr/lib/libcrypt.a
14151.201Sad		LIBCRYPTO?=	${DESTDIR}/usr/lib/libcrypto.a
14161.49Scgd		LIBCRYPTO_IDEA?=${DESTDIR}/usr/lib/libcrypto_idea.a
14171.49Scgd		LIBCRYPTO_MDC2?=${DESTDIR}/usr/lib/libcrypto_mdc2.a
14181.49Scgd		LIBCRYPTO_RC5?=	${DESTDIR}/usr/lib/libcrypto_rc5.a
14191.49Scgd		LIBCURSES?=	${DESTDIR}/usr/lib/libcurses.a
14201.49Scgd		LIBC_PIC?=	${DESTDIR}/usr/lib/libc_pic.a
14211.49Scgd		LIBDBM?=	${DESTDIR}/usr/lib/libdbm.a
14221.49Scgd		LIBDES?=	${DESTDIR}/usr/lib/libdes.a
14231.49Scgd		LIBDNS?=	${DESTDIR}/usr/lib/libdns.a
14241.49Scgd		LIBEDIT?=	${DESTDIR}/usr/lib/libedit.a
14251.49Scgd		LIBEVENT?=	${DESTDIR}/usr/lib/libevent.a
14261.49Scgd		LIBEXPAT?=	${DESTDIR}/usr/lib/libexpat.a
14271.49Scgd		LIBFETCH?=	${DESTDIR}/usr/lib/libfetch.a
14281.49Scgd		LIBFORM?=	${DESTDIR}/usr/lib/libform.a
14291.49Scgd		LIBFL?=		${DESTDIR}/usr/lib/libfl.a
14301.49Scgd		LIBG2C?=	${DESTDIR}/usr/lib/libg2c.a
14311.138Senami		LIBGCC?=	${DESTDIR}/usr/lib/libgcc.a
14321.49Scgd		LIBGNUMALLOC?=	${DESTDIR}/usr/lib/libgnumalloc.a
14331.201Sad		LIBGSSAPI?=	${DESTDIR}/usr/lib/libgssapi.a
14341.49Scgd		LIBHDB?=	${DESTDIR}/usr/lib/libhdb.a
14351.49Scgd		LIBHEIMBASE?=	${DESTDIR}/usr/lib/libheimbase.a
14361.201Sad		LIBHEIMNTLM?=	${DESTDIR}/usr/lib/libheimntlm.a
14371.201Sad		LIBHX500?=	${DESTDIR}/usr/lib/libhx500.a
14381.49Scgd		LIBINTL?=	${DESTDIR}/usr/lib/libintl.a
14391.83Smycroft		LIBIPSEC?=	${DESTDIR}/usr/lib/libipsec.a
14401.49Scgd		LIBISC?=	${DESTDIR}/usr/lib/libisc.a
14411.224Sad		LIBISCCC?=	${DESTDIR}/usr/lib/libisccc.a
14421.65Schristos		LIBISCFG?=	${DESTDIR}/usr/lib/libiscfg.a
14431.49Scgd		LIBKADM5CLNT?=	${DESTDIR}/usr/lib/libkadm5clnt.a
14441.49Scgd		LIBKADM5SRV?=	${DESTDIR}/usr/lib/libkadm5srv.a
14451.201Sad		LIBKAFS?=	${DESTDIR}/usr/lib/libkafs.a
14461.201Sad		LIBKRB5?=	${DESTDIR}/usr/lib/libkrb5.a
14471.49Scgd		LIBKVM?=	${DESTDIR}/usr/lib/libkvm.a
14481.49Scgd		LIBL?=		${DESTDIR}/usr/lib/libl.a
14491.49Scgd		LIBLBER?=	${DESTDIR}/usr/lib/liblber.a
14501.49Scgd		LIBLDAP?=	${DESTDIR}/usr/lib/libldap.a
14511.49Scgd		LIBLDAP_R?=	${DESTDIR}/usr/lib/libldap_r.a
14521.49Scgd		LIBLUA?=	${DESTDIR}/usr/lib/liblua.a
14531.49Scgd		LIBLWRES?=	${DESTDIR}/usr/lib/liblwres.a
14541.126Slukem		LIBM?=		${DESTDIR}/usr/lib/libm.a
14551.49Scgd		LIBMAGIC?=	${DESTDIR}/usr/lib/libmagic.a
14561.126Slukem		LIBMENU?=	${DESTDIR}/usr/lib/libmenu.a
14571.49Scgd		LIBOBJC?=	${DESTDIR}/usr/lib/libobjc.a
14581.147Spk		LIBOSSAUDIO?=	${DESTDIR}/usr/lib/libossaudio.a
14591.201Sad		LIBPAM?=	${DESTDIR}/usr/lib/libpam.a
14601.49Scgd		LIBPCAP?=	${DESTDIR}/usr/lib/libpcap.a
14611.201Sad		LIBPCI?=	${DESTDIR}/usr/lib/libpci.a
14621.147Spk		LIBPMC?=	${DESTDIR}/usr/lib/libpmc.a
14631.49Scgd		LIBPOSIX?=	${DESTDIR}/usr/lib/libposix.a
14641.49Scgd		LIBPTHREAD?=	${DESTDIR}/usr/lib/libpthread.a
14651.49Scgd		LIBPTHREAD_DBG?=${DESTDIR}/usr/lib/libpthread_dbg.a
14661.49Scgd		LIBPUFFS?=	${DESTDIR}/usr/lib/libpuffs.a
14671.49Scgd		LIBQUOTA?=	${DESTDIR}/usr/lib/libquota.a
14681.201Sad		LIBRADIUS?=	${DESTDIR}/usr/lib/libradius.a
14691.49Scgd		LIBRESOLV?=	${DESTDIR}/usr/lib/libresolv.a
14701.49Scgd		LIBRMT?=	${DESTDIR}/usr/lib/librmt.a
14711.126Slukem		LIBROKEN?=	${DESTDIR}/usr/lib/libroken.a
14721.49Scgd		LIBRPCSVC?=	${DESTDIR}/usr/lib/librpcsvc.a
14731.201Sad		LIBRT?=		${DESTDIR}/usr/lib/librt.a
14741.201Sad		LIBRUMP?=	${DESTDIR}/usr/lib/librump.a
14751.49Scgd		LIBRUMPFS_CD9660FS?=${DESTDIR}/usr/lib/librumpfs_cd9660fs.a
14761.49Scgd		LIBRUMPFS_EFS?=	${DESTDIR}/usr/lib/librumpfs_efs.a
14771.49Scgd		LIBRUMPFS_EXT2FS?=${DESTDIR}/usr/lib/librumpfs_ext2fs.a
14781.49Scgd		LIBRUMPFS_FFS?=	${DESTDIR}/usr/lib/librumpfs_ffs.a
14791.49Scgd		LIBRUMPFS_HFS?=	${DESTDIR}/usr/lib/librumpfs_hfs.a
14801.49Scgd		LIBRUMPFS_LFS?=	${DESTDIR}/usr/lib/librumpfs_lfs.a
14811.49Scgd		LIBRUMPFS_MSDOSFS?=${DESTDIR}/usr/lib/librumpfs_msdosfs.a
14821.49Scgd		LIBRUMPFS_NFS?=	${DESTDIR}/usr/lib/librumpfs_nfs.a
14831.49Scgd		LIBRUMPFS_NTFS?=${DESTDIR}/usr/lib/librumpfs_ntfs.a
14841.49Scgd		LIBRUMPFS_SYSPUFFS?=${DESTDIR}/usr/lib/librumpfs_syspuffs.a
14851.49Scgd		LIBRUMPFS_TMPFS?=${DESTDIR}/usr/lib/librumpfs_tmpfs.a
14861.201Sad		LIBRUMPFS_UDF?=	${DESTDIR}/usr/lib/librumpfs_udf.a
14871.49Scgd		LIBRUMPFS_UFS?=	${DESTDIR}/usr/lib/librumpfs_ufs.a
14881.224Sad		LIBRUMPUSER?=	${DESTDIR}/usr/lib/librumpuser.a
14891.213Srmind		LIBSASLC?=	${DESTDIR}/usr/lib/libsaslc.a
14901.49Scgd		LIBSKEY?=	${DESTDIR}/usr/lib/libskey.a
14911.49Scgd		LIBSL?=		${DESTDIR}/usr/lib/libsl.a
14921.49Scgd		LIBSQLITE3?=	${DESTDIR}/usr/lib/libsqlite3.a
14931.49Scgd		LIBSS?=		${DESTDIR}/usr/lib/libss.a
14941.49Scgd		LIBSSH?=	${DESTDIR}/usr/lib/libssh.a
14951.49Scgd		LIBSSL?=	${DESTDIR}/usr/lib/libssl.a
14961.49Scgd		LIBSSP?=	${DESTDIR}/usr/lib/libssp.a
14971.126Slukem		LIBSTDCXX?=	${DESTDIR}/usr/lib/libstdc++.a
14981.49Scgd		LIBSUPCXX?=	${DESTDIR}/usr/lib/libsupc++.a
14991.49Scgd		LIBTERMINFO?=	${DESTDIR}/usr/lib/libterminfo.a
15001.109Sperry		LIBTRE?=	${DESTDIR}/usr/lib/libtre.a
15011.49Scgd		LIBUSBHID?=	${DESTDIR}/usr/lib/libusbhid.a
15021.49Scgd		LIBUTIL?=	${DESTDIR}/usr/lib/libutil.a
15031.49Scgd		LIBWIND?=	${DESTDIR}/usr/lib/libwind.a
15041.49Scgd		LIBWRAP?=	${DESTDIR}/usr/lib/libwrap.a
15051.203Sad		LIBY?=		${DESTDIR}/usr/lib/liby.a
15061.49Scgd		LIBZ?=		${DESTDIR}/usr/lib/libz.a
15071.49Scgd
15081.126Slukem		The following X-Windows libraries are predefined for DPADD:
15091.49Scgd
15101.126Slukem		LIBFS?=		${DESTDIR}/usr/X11R7/lib/libFS.a
15111.49Scgd		LIBGL?=		${DESTDIR}/usr/X11R7/lib/libGL.a
15121.201Sad		LIBGLU?=	${DESTDIR}/usr/X11R7/lib/libGLU.a
15131.201Sad		LIBICE?=	${DESTDIR}/usr/X11R7/lib/libICE.a
15141.49Scgd		LIBSM?=		${DESTDIR}/usr/X11R7/lib/libSM.a
15151.49Scgd		LIBX11?=	${DESTDIR}/usr/X11R7/lib/libX11.a
15161.49Scgd		LIBXTRAP?=	${DESTDIR}/usr/X11R7/lib/libXTrap.a
15171.49Scgd		LIBXAU?=	${DESTDIR}/usr/X11R7/lib/libXau.a
15181.49Scgd		LIBXAW?=	${DESTDIR}/usr/X11R7/lib/libXaw.a
15191.49Scgd		LIBXDMCP?=	${DESTDIR}/usr/X11R7/lib/libXdmcp.a
15201.49Scgd		LIBXEXT?=	${DESTDIR}/usr/X11R7/lib/libXext.a
15211.49Scgd		LIBXFONT?=	${DESTDIR}/usr/X11R7/lib/libXfont.a
15221.49Scgd		LIBXFT?=	${DESTDIR}/usr/X11R7/lib/libXft.a
15231.101Sdrochner		LIBXI?=		${DESTDIR}/usr/X11R7/lib/libXi.a
15241.101Sdrochner		LIBXINERAMA?=	${DESTDIR}/usr/X11R7/lib/libXinerama.a
15251.101Sdrochner		LIBXMU?=	${DESTDIR}/usr/X11R7/lib/libXmu.a
15261.60Smycroft		LIBXMUU?=	${DESTDIR}/usr/X11R7/lib/libXmuu.a
15271.60Smycroft		LIBXPM?=	${DESTDIR}/usr/X11R7/lib/libXpm.a
15281.60Smycroft		LIBXRANDR?=	${DESTDIR}/usr/X11R7/lib/libXrandr.a
15291.49Scgd		LIBXRENDER?=	${DESTDIR}/usr/X11R7/lib/libXrender.a
15301.49Scgd		LIBXSS?=	${DESTDIR}/usr/X11R7/lib/libXss.a
15311.49Scgd		LIBXT?=		${DESTDIR}/usr/X11R7/lib/libXt.a
15321.59Smycroft		LIBXTST?=	${DESTDIR}/usr/X11R7/lib/libXtst.a
15331.49Scgd		LIBXV?=		${DESTDIR}/usr/X11R7/lib/libXv.a
15341.49Scgd		LIBXXF86DGA?=	${DESTDIR}/usr/X11R7/lib/libXxf86dga.a
15351.49Scgd		LIBXXF86MISC?=	${DESTDIR}/usr/X11R7/lib/libXxf86misc.a
15361.49Scgd		LIBXXF86VM?=	${DESTDIR}/usr/X11R7/lib/libXxf86vm.a
15371.49Scgd		LIBDPS?=	${DESTDIR}/usr/X11R7/lib/libdps.a
15381.49Scgd		LIBFNTSTUBS?=	${DESTDIR}/usr/X11R7/lib/libfntstubs.a
15391.147Spk		LIBFONTCACHE?=	${DESTDIR}/usr/X11R7/lib/libfontcache.a
15401.147Spk		LIBFONTCONFIG?=	${DESTDIR}/usr/X11R7/lib/libfontconfig.a
15411.147Spk		LIBFONTENC?=	${DESTDIR}/usr/X11R7/lib/libfontenc.a
15421.49Scgd		LIBFREETYPE?=	${DESTDIR}/usr/X11R7/lib/libfreetype.a
15431.126Slukem		LIBLBXUTIL?=	${DESTDIR}/usr/X11R7/lib/liblbxutil.a
15441.49Scgd		LIBXKBFILE?=	${DESTDIR}/usr/X11R7/lib/libxkbfile.a
15451.126Slukem
15461.49ScgdSHAREDSTRINGS	If defined, a new .c.o rule is used that results in shared
15471.49Scgd		strings, using xstr(1). Note that this will not work with
15481.49Scgd		parallel makes.
15491.49Scgd
15501.49ScgdSTRIPFLAG	The flag passed to the install program to cause the binary
15511.49Scgd		to be stripped.
15521.201Sad
15531.49ScgdSUBDIR		A list of subdirectories that should be built as well.
15541.49Scgd		Each of the targets will execute the same target in the
15551.147Spk		subdirectories.
15561.49Scgd
15571.201SadSCRIPTS		A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
15581.49Scgd		These are installed exactly like programs.
15591.49Scgd
15601.147SpkSCRIPTSDIR	The location to install the scripts.  Each script can be
15611.147Spk		installed to a separate path by setting SCRIPTSDIR_<script>.
15621.201Sad
15631.147SpkSCRIPTSNAME	The name that the above program will be installed as, if
15641.49Scgd		different from ${SCRIPTS}. These can be further specialized
15651.126Slukem		by setting SCRIPTSNAME_<script>.
15661.49Scgd
15671.49ScgdFILES		See description of <bsd.files.mk>.
15681.49Scgd
15691.49ScgdSHLINKDIR	Target directory for shared linker.  See description of
15701.49Scgd		<bsd.own.mk> for additional information about this variable.
15711.49Scgd
15721.49ScgdThe include file <bsd.prog.mk> includes the file named "../Makefile.inc"
15731.49Scgdif it exists, as well as the include file <bsd.man.mk>.
15741.49Scgd
15751.49ScgdSome simple examples:
15761.49Scgd
15771.126SlukemTo build foo from foo.c with a manual page foo.1, use:
15781.49Scgd
15791.49Scgd	PROG=	foo
15801.147Spk
15811.201Sad	.include <bsd.prog.mk>
15821.49Scgd
15831.201SadTo build foo from foo.c with a manual page foo.2, add the line:
15841.147Spk
15851.49Scgd	MAN=	foo.2
15861.49Scgd
15871.49ScgdIf foo does not have a manual page at all, add the line:
15881.49Scgd
15891.49Scgd	MKMAN=	no
15901.49Scgd
15911.49ScgdIf foo has multiple source files, add the line:
15921.49Scgd
15931.49Scgd	SRCS=	a.c b.c c.c d.c
15941.49Scgd
15951.126Slukem
15961.49Scgd=-=-=-=-=   bsd.rpc.mk   =-=-=-=-=
15971.49Scgd
15981.201SadThe include file <bsd.rpc.mk> contains a makefile fragment used to
15991.83Smycroftconstruct source files built by rpcgen.
16001.96Skleink
16011.96SkleinkThe following macros may be defined in makefiles which include
16021.96Skleink<bsd.rpc.mk> in order to control which files get built and how they
16031.96Skleinkare to be built:
16041.96Skleink
16051.96SkleinkRPC_INCS:	construct .h file from .x file
16061.201SadRPC_XDRFILES:	construct _xdr.c from .x file
16071.96Skleink		(for marshalling/unmarshalling data types)
16081.201SadRPC_SVCFILES:	construct _svc.c from .x file
16091.96Skleink		(server-side stubs)
16101.96SkleinkRPC_SVCFLAGS:	Additional flags passed to builds of RPC_SVCFILES.
16111.49Scgd
16121.49ScgdRPC_XDIR:	Directory containing .x/.h files
16131.96Skleink
16141.96Skleink
16151.96Skleink=-=-=-=-=   bsd.shlib.mk   =-=-=-=-=
16161.96Skleink
16171.96SkleinkThe include file <bsd.shlib.mk> computes parameters for shared library
16181.96Skleinkinstallation and use.  It defines no targets.  <bsd.own.mk> MUST be
16191.96Skleinkincluded before <bsd.shlib.mk>.
16201.49Scgd
16211.201Sad<bsd.own.mk> sets the following variables, if they are not already defined
16221.201Sad(defaults are in brackets):
16231.49Scgd
16241.49ScgdSHLIBINSTALLDIR	If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR}
16251.49Scgd		instead of ${LIBDIR} as the base path for shared library
16261.49Scgd		installation.  [/lib]
16271.49Scgd
16281.49ScgdSHLIBDIR	The path to USE_SHLIBDIR shared libraries to use when building
16291.49Scgd		a program.  [/lib for programs in /bin and /sbin, /usr/lib
16301.49Scgd		for all others.]
16311.126Slukem
16321.49Scgd_LIBSODIR	Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no",
16331.49Scgd		otherwise set to ${LIBDIR}
16341.201Sad
16351.49ScgdSHLINKINSTALLDIR Base path for shared linker.  [/libexec]
16361.49Scgd
16371.49ScgdSHLINKDIR	Path to use for shared linker when building a program.
16381.49Scgd		[/libexec for programs in /bin and /sbin, /usr/libexec for
16391.83Smycroft		all others.]
16401.201Sad
16411.201Sad
16421.49Scgd=-=-=-=-=   bsd.subdir.mk   =-=-=-=-=
16431.49Scgd
16441.49ScgdThe include file <bsd.subdir.mk> contains the default targets for building
16451.201Sadsubdirectories.  It has the same eight targets as <bsd.prog.mk>: all,
16461.201Sadclean, cleandir, depend, includes, install, lint, and tags.  It uses the
16471.49Scgdfollowing variables:
16481.49Scgd
16491.49ScgdNOSUBDIR	If this variable is defined, then the SUBDIR variable
16501.49Scgd		will be ignored and subdirectories will not be processed.
16511.147Spk
16521.49ScgdSUBDIR		For all of the directories listed in ${SUBDIR}, the
16531.49Scgd		specified directory will be visited and the target made.
16541.126Slukem
16551.49Scgd		As a special case, the use of a token .WAIT as an
16561.126Slukem		entry in SUBDIR acts as a synchronization barrier
16571.126Slukem		when multiple make jobs are run; subdirs before the
16581.49Scgd		.WAIT must complete before any subdirs after .WAIT are
16591.201Sad		started.  See make(1) for some caveats on use of .WAIT
16601.201Sad		and other special sources.
16611.49Scgd
16621.49Scgd
16631.49Scgd=-=-=-=-=   bsd.sys.mk   =-=-=-=-=
16641.49Scgd
16651.49ScgdThe include file <bsd.sys.mk> is used by <bsd.prog.mk> and
16661.49Scgd<bsd.lib.mk>.  It contains overrides that are used when building
16671.147Spkthe NetBSD source tree.
16681.49Scgd
16691.49ScgdThe following variables control how various files are compiled/built.
16701.49Scgd(Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"):
16711.49Scgd
16721.49ScgdAR		Create, modify, and extract from archives.  [ar]
16731.49Scgd
16741.49ScgdARFLAGS		Options to ${AR}.  [rl]
16751.126Slukem
16761.49ScgdAS		Assembler.  [as]
16771.126Slukem
16781.126SlukemAFLAGS		Options to ${CC} when compiling or linking .s or .S
16791.126Slukem		assembly source files.  []
16801.201Sad
16811.126SlukemBUILDSEED	GCC uses random numbers when compiling C++ code.
16821.185Skardel		If this option is present, seed the random number
16831.49Scgd		generator based on the value, source file names and
16841.234Sdsl		the output file name to make builds more deterministic.
16851.234Sdsl		Additional information is available in the GCC
16861.234Sdsl		documentation of -frandom-seed.
16871.181Smrg
16881.181SmrgCC		C compiler.  [cc]
16891.181Smrg
16901.126SlukemCFLAGS		Options to ${CC}.  [Usually -O or -O2]
16911.126Slukem
16921.126SlukemCPP		C Pre-Processor.  [cpp]
16931.126Slukem
16941.126SlukemCPPFLAGS	Options to ${CPP}.  []
16951.126Slukem
16961.126SlukemCPUFLAGS	Optimization flags for ${CC}.  []
16971.126Slukem
16981.201SadCXX		C++ compiler.  [c++]
16991.126Slukem
17001.49ScgdCXXFLAGS	Options to ${CXX}.  [${CFLAGS}]
17011.49Scgd
17021.49ScgdELF2ECOFF	Convert ELF-format executable to ECOFF.  [elf2ecoff]
17031.49Scgd
17041.49ScgdFC		Fortran compiler.  [f77]
17051.49Scgd
17061.49ScgdFFLAGS		Options to {$FC}.  [-O]
17071.209Sad
17081.49ScgdHOST_SH		Shell.	This must be an absolute path, because it may be
17091.49Scgd		substituted into "#!" lines in scripts.	 [/bin/sh]
17101.223Syamt
17111.225SadINSTALL		install(1) command.  [install]
17121.201Sad
17131.49ScgdLEX		Lexical analyzer.  [lex]
17141.147Spk
17151.210SadLFLAGS		Options to ${LEX}.  []
17161.210Sad
17171.220SadLPREFIX		Symbol prefix for ${LEX} (see -P option in lex(1)) [yy]
17181.210Sad
17191.220SadLD		Linker.  [ld]
17201.210Sad
17211.210SadLDFLAGS		Options to ${CC} during the link process.  []
17221.246Syamt
17231.201SadLINT		C program verifier.  [lint]
17241.65Schristos
17251.49ScgdLINTFLAGS	Options to ${LINT}.  [-chapbxzFS]
17261.49Scgd
17271.49ScgdLORDER		List dependencies for object files.  [lorder]
17281.49Scgd
17291.49ScgdMAKE		make(1).  [make]
17301.49Scgd
17311.49ScgdMKDEP		Construct Makefile dependency list.  [mkdep]
17321.49Scgd
17331.49ScgdNM		List symbols from object files.  [nm]
17341.49Scgd
17351.49ScgdPC		Pascal compiler.  [pc]  (Not present)
17361.49Scgd
17371.49ScgdPFLAGS		Options to ${PC}.  []
17381.49Scgd
17391.49ScgdOBJC		Objective C compiler.  [${CC}]
17401.49Scgd
17411.49ScgdOBJCFLAGS	Options to ${OBJC}.  [${CFLAGS}]
17421.49Scgd
17431.49ScgdOBJCOPY		Copy and translate object files.  [objcopy]
17441.49Scgd
17451.49ScgdOBJCOPYLIBFLAGS	Flags to pass to objcopy when library objects are
17461.49Scgd		being built. [${.TARGET} =~ "*.po" ? -X : -x]
17471.156Sdsl
17481.156SdslOBJDUMP		Display information from object files.  [objdump]
17491.156Sdsl
17501.156SdslRANLIB		Generate index to archive.  [ranlib]
17511.156Sdsl
17521.156SdslSIZE		List section sizes and total size.  [size]
17531.156Sdsl
17541.49ScgdSTRIP		Discard symbols from object files.  [strip]
17551.49Scgd
17561.49ScgdTSORT		Topological sort of a directed graph.  [tsort -q]
17571.49Scgd
17581.49ScgdYACC		LALR(1) parser generator.  [yacc]
17591.49Scgd
17601.49ScgdYFLAGS		Options to ${YACC}.  []
17611.49Scgd
17621.185SkardelYHEADER		If defined, add "-d" to YFLAGS, and add dependencies
17631.49Scgd		from <file>.y to <file>.h and <file>.c, and add
17641.49Scgd		<foo>.h to CLEANFILES.
17651.49Scgd
17661.185SkardelYPREFIX		If defined, add "-p ${YPREFIX}" to YFLAGS.
17671.49Scgd
17681.49Scgd
17691.49ScgdOther variables of note (incomplete list):
17701.185Skardel
17711.185SkardelNOGCCERROR	If defined, prevents passing certain ${CFLAGS} to GCC
17721.49Scgd		that cause warnings to be fatal, such as:
17731.49Scgd			-Werror -Wa,--fatal-warnings
17741.49Scgd		(The latter being for as(1).)
17751.49Scgd
17761.49ScgdNOCLANGERROR	If defined and clang is used as C compiler, -Werror is not
17771.49Scgd		passed to it.
17781.185Skardel
17791.49ScgdWARNS		Crank up compiler warning options; the distinct levels are:
17801.185Skardel			WARNS=1
17811.185Skardel			WARNS=2
17821.185Skardel			WARNS=3
17831.185Skardel			WARNS=4
17841.49Scgd			WARNS=5
17851.54Smycroft
17861.49Scgd=-=-=-=-=   bsd.x11.mk   =-=-=-=-=
17871.49Scgd
17881.49ScgdThe include file <bsd.x11.mk> contains parameters and targets for
17891.156Sdslcross-building X11 from ${X11SRCDIR.xc} / ${X11MITSRCDIR.*}.
17901.49ScgdIt should be included after the general Makefile contents but before
17911.49Scgdthe include files such as <bsd.prog.mk> and <bsd.lib.mk>.
17921.156Sdsl
17931.156SdslIt provides the following targets:
17941.156Sdsl	.man.1 .man.3 .man.4 .man.5 .man.7:
17951.156Sdsl		If ${MAN} or ${PROG} is set and ${MKMAN} != "no",
17961.156Sdsl		these rules convert from X11's manual page source
17971.49Scgd		into an mdoc.old source file.
17981.156Sdsl
17991.49ScgdIt sets the following variables:
18001.49Scgd
18011.49ScgdBINDIR			Set to ${X11BINDIR}.
18021.126Slukem			To override, define after including <bsd.x11.mk>
18031.49Scgd
18041.126SlukemLIBDIR			Set to ${X11USRLIBDIR}.
18051.49Scgd			To override, define after including <bsd.x11.mk>
18061.49Scgd
18071.49ScgdMANDIR			Set to ${X11MANDIR}.
18081.49Scgd			To override, define after including <bsd.x11.mk>
18091.49Scgd
18101.83SmycroftCPPFLAGS		Appended with definitions to include from
18111.49Scgd			${DESTDIR}${X11INCDIR}
18121.201Sad
18131.49ScgdLDFLAGS			Appended with definitions to link from
18141.49Scgd			${DESTDIR}${X11USRLIBDIR}
18151.232Schristos
18161.232SchristosX11FLAGS.CONNECTION	Equivalent to X11's CONNECTION_FLAGS.
18171.232Schristos
18181.232SchristosX11FLAGS.EXTENSION	Equivalent to X11's EXT_DEFINES.
18191.232Schristos
18201.49ScgdX11FLAGS.LOADABLE	Equivalent to X11's LOADABLE.
18211.224Sad
18221.201SadX11FLAGS.OS_DEFINES	Equivalent to X11's OS_DEFINES.
18231.82Skleink
18241.82SkleinkX11FLAGS.SERVER		Equivalent to X11's ServerDefines.
18251.82Skleink
18261.54SmycroftX11FLAGS.THREADLIB	Equivalent to X11's THREADS_DEFINES for libraries.
18271.49Scgd
18281.49ScgdX11FLAGS.THREADS	Equivalent to X11's THREADS_DEFINES.
18291.49Scgd
18301.126SlukemX11FLAGS.VERSION	cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION.
18311.201Sad
18321.49ScgdX11FLAGS.DIX		Equivalent to X11's DIX_DEFINES.
18331.49Scgd
18341.49ScgdX11TOOL_UNXCOMM		Commandline to convert `XCOMM' comments to `#'
18351.49Scgd
18361.49ScgdIt uses the following variables:
18371.49Scgd
18381.49ScgdAPPDEFS			List of app-default files to install.
18391.49Scgd
18401.49ScgdCPPSCRIPTS		List of files/scripts to run through cpp(1)
18411.81Skleink			and then ${X11TOOL_UNXCOMM}.  The source files
18421.81Skleink			have a `.cpp' suffix, the generated files do not.
18431.201Sad
18441.201SadCPPSCRIPTFLAGS		Additional flags to cpp(1) when building CPPSCRIPTS.
18451.49Scgd
18461.246SyamtCPPSCRIPTFLAGS_<fn>	Additional flags to cpp(1) when building CPPSCRIPT <fn>.
18471.201Sad
18481.65Schristos
18491.49Scgd=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
18501.49Scgd