bsd.README revision 1.444
11.444Slukem#	$NetBSD: bsd.README,v 1.444 2023/06/05 22:36:58 lukem 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.231Sapb		flags 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.411SrilligThe following variables control how things are made/installed that
1041.172Shubertfare not set by default. These should not be set by Makefiles; they're for
1051.224Slukemthe user to define in MAKECONF (see <bsd.own.mk>, below, or mk.conf(5))
1061.224Slukemor on the make(1) command line:
1071.172Shubertf
1081.444SlukemBUILD		If defined, 'make install' checks that the targets in the
1091.444Slukem		source directories are up-to-date and re-makes them if
1101.444Slukem		they are out of date, instead of blindly trying to
1111.444Slukem		install out of date or non-existent targets.
1121.444Slukem
1131.444Slukem		Default: Unset.
1141.444Slukem
1151.444SlukemBUILDID		Identifier for the build.  If set, this should be a short
1161.444Slukem		string that is suitable for use as part of a file or
1171.444Slukem		directory name.  The identifier will be appended to
1181.444Slukem		object directory names, and can be consulted in the
1191.444Slukem		make(1) configuration file in order to set additional
1201.444Slukem		build parameters, such as compiler flags.  It will also
1211.444Slukem		be used as part of the kernel version string, which can
1221.444Slukem		be shown by "uname -v".
1231.444Slukem
1241.444Slukem		Default: Unset.
1251.444Slukem
1261.444SlukemBUILDINFO	Optional multi-line string containing information about
1271.444Slukem		the build.  This will appear in DESTDIR/etc/release, and
1281.444Slukem		it will be stored in the buildinfo variable in any
1291.444Slukem		kernels that are built.  When such kernels are booted,
1301.444Slukem		the sysctl(7) kern.buildinfo variable will report this
1311.444Slukem		value.  The string may contain backslash escape
1321.444Slukem		sequences, such as "\\" (representing a backslash
1331.444Slukem		character) and "\n" (representing a newline).
1341.444Slukem
1351.444Slukem		Default: Unset.
1361.444Slukem
1371.444SlukemBUILDSEED	g++(1) uses random numbers when compiling C++ code.  This
1381.444Slukem		variable seeds the g++(1) random number generator using
1391.444Slukem		-frandom-seed with this value.  By default, it is set to
1401.444Slukem		"NetBSD-(majorversion)".  Using a fixed value causes C++
1411.444Slukem		binaries to be the same when built from the same sources,
1421.444Slukem		resulting in identical (reproducible) builds.  Additional
1431.444Slukem		information is available in the g++(1) documentation of
1441.444Slukem		-frandom-seed.
1451.444Slukem
1461.444Slukem		Default: Unset.
1471.444Slukem
1481.444SlukemMAKEVERBOSE	Level of verbosity of status messages.  Supported values:
1491.444Slukem
1501.444Slukem		0   No descriptive messages or commands executed by
1511.444Slukem		    make(1) are shown.
1521.444Slukem
1531.444Slukem		1   Brief messages are shown describing what is being
1541.444Slukem		    done, but the actual commands executed by make(1) are
1551.444Slukem		    not displayed.
1561.444Slukem
1571.444Slukem		2   Descriptive messages are shown as above (prefixed
1581.444Slukem		    with a `#'), and ordinary commands performed by
1591.444Slukem		    make(1) are displayed.
1601.444Slukem
1611.444Slukem		3   In addition to the above, all commands performed by
1621.444Slukem		    make(1) are displayed, even if they would ordinarily
1631.444Slukem		    have been hidden through use of the "@" prefix in the
1641.444Slukem		    relevant makefile.
1651.444Slukem
1661.444Slukem		4   In addition to the above, commands executed by
1671.444Slukem		    make(1) are traced through use of the sh(1) "-x"
1681.444Slukem		    flag.
1691.172Shubertf
1701.172Shubertf		Default: 2
1711.266Sjoerg
1721.444SlukemMKAMDGPUFIRMWARE
1731.444Slukem		Can be set to "yes" or "no".  Indicates whether to
1741.444Slukem		install the /libdata/firmware/amdgpu directory, which is
1751.444Slukem		necessary for the amdgpu(4) AMD RADEON GPU video driver.
1761.444Slukem
1771.444Slukem		Default: "yes" on i386 and x86_64; "no" on other
1781.444Slukem		platforms.
1791.444Slukem
1801.444SlukemMKARGON2	Can be set to "yes" or "no".  Indicates whether the
1811.444Slukem		Argon2 hash is enabled in libcrypt.
1821.444Slukem
1831.444Slukem		Default: "yes"
1841.444Slukem
1851.444SlukemMKARZERO	Can be set to "yes" or "no".  Indicates whether ar(1)
1861.444Slukem		should zero the timestamp, uid, and gid in the archive
1871.444Slukem		for reproducible builds.
1881.444Slukem
1891.444Slukem		Default: The value of MKREPRO (if defined), otherwise
1901.444Slukem		"no".
1911.444Slukem
1921.444SlukemMKATF		Can be set to "yes" or "no".  Indicates whether the
1931.444Slukem		Automated Testing Framework (ATF) will be built and
1941.444Slukem		installed.  This also controls whether the NetBSD test
1951.444Slukem		suite will be built and installed, as the tests rely on
1961.444Slukem		ATF and cannot be built without it.
1971.444Slukem
1981.444Slukem		Forced to "no" if MKCXX=no.
1991.444Slukem
2001.444Slukem		Default: "yes"
2011.444Slukem
2021.444SlukemMKBFD		Obsolete, use MKBINUTILS.
2031.444Slukem
2041.444SlukemMKBINUTILS	Can be set to "yes" or "no".  Indicates whether any of
2051.444Slukem		the binutils tools or libraries will be built and
2061.444Slukem		installed.  That is, the libraries libbfd, libiberty, or
2071.444Slukem		any of the things that depend upon them, e.g.  as(1),
2081.444Slukem		ld(1), dbsym(8), or mdsetimage(8).
2091.444Slukem
2101.444Slukem		Forced to "no" if TOOLCHAIN_MISSING!=no.
2111.444Slukem
2121.444Slukem		Default: "yes"
2131.444Slukem
2141.444SlukemMKBSDGREP	Can be set to "yes" or "no".  Determines which
2151.444Slukem		implementation of grep(1) will be built and installed.
2161.444Slukem		If "yes", use the BSD implementation.  If "no", use the
2171.444Slukem		GNU implementation.
2181.444Slukem
2191.444Slukem		Default: "no"
2201.444Slukem
2211.444SlukemMKBSDTAR	Can be set to "yes" or "no".  Determines which
2221.444Slukem		implementation of cpio(1) and tar(1) will be built and
2231.444Slukem		installed.  If "yes", use the libarchive-based
2241.444Slukem		implementations.  If "no", use the pax(1) based
2251.444Slukem		implementations.
2261.444Slukem
2271.444Slukem		Default: "yes"
2281.444Slukem
2291.444SlukemMKCATPAGES	Can be set to "yes" or "no".  Indicates whether
2301.444Slukem		preformatted plaintext manual pages will be created and
2311.444Slukem		installed.
2321.444Slukem
2331.444Slukem		Forced to "no" if MKMAN=no or MKSHARE=no.
2341.444Slukem
2351.444Slukem		Default: "no"
2361.444Slukem
2371.444SlukemMKCLEANSRC	Can be set to "yes" or "no".  Indicates whether `make
2381.444Slukem		clean' and `make cleandir' will delete file names in
2391.444Slukem		CLEANFILES or CLEANDIRFILES from both the object
2401.444Slukem		directory, .OBJDIR, and the source directory, .SRCDIR.
2411.444Slukem
2421.444Slukem		If "yes", then these file names will be deleted relative
2431.444Slukem		to both .OBJDIR and .CURDIR.  If "no", then the deletion
2441.444Slukem		will be performed relative to .OBJDIR only.
2451.444Slukem
2461.444Slukem		Default: "yes"
2471.444Slukem
2481.444SlukemMKCLEANVERIFY	Can be set to "yes" or "no".  Controls whether `make
2491.444Slukem		clean' and `make cleandir' will verify that files have
2501.444Slukem		been deleted.  If "yes", then file deletions will be
2511.444Slukem		verified using ls(1).  If "no", then file deletions will
2521.444Slukem		not be verified.
2531.444Slukem
2541.444Slukem		Default: "yes"
2551.444Slukem
2561.444SlukemMKCOMPAT	Can be set to "yes" or "no".  Indicates whether support
2571.444Slukem		for multiple ABIs is to be built and installed.
2581.444Slukem
2591.444Slukem		Forced to "no" if NOCOMPAT is defined, usually in the
2601.444Slukem		Makefile before any make(1) .include directives.
2611.444Slukem
2621.444Slukem		Default: "yes" on aarch64 (without gcc), mips64,
2631.444Slukem		powerpc64, riscv64, sparc64, and x86_64; "no" on other
2641.444Slukem		platforms.
2651.444Slukem
2661.444SlukemMKCOMPATMODULES
2671.444Slukem		Can be set to "yes" or "no".  Indicates whether the
2681.444Slukem		compat kernel modules will be built and installed.
2691.444Slukem
2701.444Slukem		Forced to "no" if MKCOMPAT=no.
2711.444Slukem
2721.444Slukem		Default: "yes" on evbppc-powerpc and mips64; "no" on
2731.444Slukem		other platforms.
2741.444Slukem
2751.444SlukemMKCOMPATTESTS	Can be set to "yes" or "no".  Indicates whether the
2761.444Slukem		NetBSD test suite for src/compat will be built and
2771.444Slukem		installed.
2781.444Slukem
2791.444Slukem		Forced to "no" if MKCOMPAT=no.
2801.444Slukem
2811.444Slukem		Default: "no"
2821.444Slukem
2831.444SlukemMKCOMPATX11	Can be set to "yes" or "no".  Indicates whether the X11
2841.444Slukem		libraries will be built and installed.
2851.444Slukem
2861.444Slukem		Forced to "no" if MKCOMPAT=no.
2871.444Slukem
2881.444Slukem		Default: "no"
2891.444Slukem
2901.444SlukemMKCOMPLEX	Can be set to "yes" or "no".  Indicates whether the Math
2911.444Slukem		Library (libm, -lm) is compiled with support for
2921.444Slukem		<complex.h>.
2931.444Slukem
2941.444Slukem		Default: "yes"
2951.444Slukem
2961.444SlukemMKCROSSGDB	Can be set to "yes" or "no".  Create a cross-gdb as a
2971.444Slukem		host tool.
2981.444Slukem
2991.444Slukem		Default: "no"
3001.444Slukem
3011.444SlukemMKCRYPTO	Obsolete.
3021.444Slukem
3031.444SlukemMKCTF		Can be set to "yes" or "no".  Indicates whether CTF tools
3041.444Slukem		are to be built and installed.  If "yes", the tools will
3051.444Slukem		be used to generate and manipulate CTF data of ELF
3061.444Slukem		binaries during build.
3071.444Slukem
3081.444Slukem		Forced to "no" if NOCTF is defined, usually in the
3091.444Slukem		Makefile before any make(1) .include directives.
3101.444Slukem
3111.444Slukem		This is disabled internally for standalone programs in
3121.444Slukem		/usr/mdec.
3131.444Slukem
3141.444Slukem		Default: "yes" on aarch64, amd64, and i386; "no" on other
3151.444Slukem		platforms.
3161.444Slukem
3171.444SlukemMKCVS		Can be set to "yes" or "no".  Indicates whether cvs(1)
3181.444Slukem		will be built and installed.
3191.415Skamil
3201.444Slukem		Default: "yes"
3211.234Smrg
3221.444SlukemMKCXX		Can be set to "yes" or "no".  Indicates whether C++
3231.444Slukem		support is enabled.
3241.344Smatt
3251.444Slukem		If "no", C++ compilers and software will not be built,
3261.444Slukem		and acts as MKATF=no MKGCCCMDS=no MKGDB=no MKGROFF=no
3271.444Slukem		MKKYUA=no.
3281.345Smatt
3291.444Slukem		Default: "yes"
3301.402Schristos
3311.444SlukemMKDEBUG		Can be set to "yes" or "no".  Indicates whether debug
3321.444Slukem		information should be generated for all userland
3331.444Slukem		binaries.  The result is collected as an additional
3341.444Slukem		debug.tgz and xdebug.tgz set and installed in
3351.444Slukem		DESTDIR/usr/libdata/debug.
3361.210Sgmcgarry
3371.444Slukem		Forced to "no" if NODEBUG is defined, usually in the
3381.444Slukem		Makefile before any make(1) .include directives.
3391.329Sozaki
3401.444Slukem		Default: "no"
3411.397Smartin
3421.444SlukemMKDEBUGKERNEL	Can be set to "yes" or "no".  Indicates whether debugging
3431.444Slukem		symbols will be built for kernels by default; pretend as
3441.444Slukem		if makeoptions DEBUG="-g" is specified in kernel
3451.444Slukem		configuration files.  This will also put the debug kernel
3461.444Slukem		netbsd.gdb in the kernel sets.  See options(4) for
3471.444Slukem		details.  This is useful if a cross-gdb is built as well
3481.444Slukem		(see MKCROSSGDB).
3491.349Schristos
3501.444Slukem		Default: "no"
3511.172Shubertf
3521.444SlukemMKDEBUGLIB	Can be set to "yes" or "no".  Indicates whether debug
3531.444Slukem		libraries (lib*_g.a) will be built and installed.  Debug
3541.444Slukem		libraries are compiled with "-g -DDEBUG".
3551.184Slukem
3561.444Slukem		Forced to "no" if NODEBUGLIB is defined, usually in the
3571.444Slukem		Makefile before any make(1) .include directives.
3581.352Schristos
3591.444Slukem		Default: "no"
3601.176Schristos
3611.444SlukemMKDEBUGTOOLS	Can be set to "yes" or "no".  Indicates whether debug
3621.444Slukem		information (lib*_g.a) will be included in the build
3631.444Slukem		toolchain.
3641.427Schristos
3651.444Slukem		Default: "no"
3661.426Schristos
3671.444SlukemMKDEPINCLUDES	Can be set to "yes" or "no".  Indicates whether to add
3681.444Slukem		.include statements in the .depend files instead of
3691.444Slukem		inlining the contents of the *.d files.  This is useful
3701.314Schristos		when stale dependencies are present, to list the exact
3711.444Slukem		files that need refreshing, but it is possibly slower
3721.444Slukem		than inlining.
3731.444Slukem
3741.444Slukem		Default: "no"
3751.444Slukem
3761.444SlukemMKDOC		Can be set to "yes" or "no".  Indicates whether system
3771.444Slukem		documentation destined for DESTDIR/usr/share/doc will be
3781.444Slukem		installed.
3791.444Slukem
3801.444Slukem		Forced to "no" if NODOC is defined, usually in the
3811.444Slukem		Makefile before any make(1) .include directives.
3821.444Slukem
3831.444Slukem		Forced to "no" if MKSHARE=no.
3841.444Slukem
3851.444Slukem		Default: "yes"
3861.444Slukem
3871.444SlukemMKDTB		Can be set to "yes" or "no".  Indicates whether the
3881.444Slukem		devicetree blobs will be built and installed.
3891.444Slukem
3901.444Slukem		Default: "yes" on aarch64, armv6, armv7, riscv32, and
3911.444Slukem		riscv64; "no" on other platforms.
3921.444Slukem
3931.444SlukemMKDTC		Can be set to "yes" or "no".  Indicates whether the
3941.444Slukem		Device Tree Compiler (dtc) will be built and installed.
3951.444Slukem
3961.444Slukem		Default: "yes"
3971.444Slukem
3981.444SlukemMKDTRACE	Can be set to "yes" or "no".  Indicates whether the
3991.444Slukem		kernel modules, utilities, and libraries for dtrace(1)
4001.444Slukem		support are to be built and installed.
4011.444Slukem
4021.444Slukem		Default: "yes" on aarch64, amd64, and i386; "no" on other
4031.444Slukem		platforms.
4041.444Slukem
4051.444SlukemMKDYNAMICROOT	Can be set to "yes" or "no".  Indicates whether all
4061.444Slukem		programs should be dynamically linked, and to install
4071.444Slukem		shared libraries required by /bin and /sbin and the
4081.444Slukem		shared linker ld.elf_so(1) into /lib.  If "no", link
4091.444Slukem		programs in /bin and /sbin statically.
4101.444Slukem
4111.444Slukem		Default: "no" on ia64; "yes" on other platforms.
4121.444Slukem
4131.444SlukemMKEXTSRC	Obsolete.
4141.444Slukem
4151.444SlukemMKFIRMWARE	Can be set to "yes" or "no".  Indicates whether to
4161.444Slukem		install the /libdata/firmware directory, which is
4171.444Slukem		necessary for various drivers, including: athn(4),
4181.444Slukem		bcm43xx(4), bwfm(4), ipw(4), iwi(4), iwm(4), iwn(4),
4191.444Slukem		otus(4), ral(4), rtwn(4), rum(4), run(4), urtwn(4),
4201.444Slukem		wpi(4), zyd(4), and the Tegra 124 SoC.
4211.444Slukem
4221.444Slukem		Default: "yes" on amd64, cobalt, evbarm, evbmips, evbppc,
4231.444Slukem		hpcarm, hppa, i386, mac68k, macppc, sandpoint, and
4241.444Slukem		sparc64; "no" on other platforms.
4251.444Slukem
4261.444SlukemMKGCC		Can be set to "yes" or "no".  Indicates whether gcc(1) or
4271.444Slukem		any related libraries (libg2c, libgcc, libobjc,
4281.444Slukem		libstdc++) will be built and installed.
4291.444Slukem
4301.444Slukem		Forced to "no" if TOOLCHAIN_MISSING!=no or
4311.444Slukem		EXTERNAL_TOOLCHAIN is defined.
4321.444Slukem
4331.444Slukem		Default: "yes"
4341.444Slukem
4351.444SlukemMKGCCCMDS	Can be set to "yes" or "no".  Indicates whether gcc(1)
4361.444Slukem		will be built and installed.  If "no", then MKGCC
4371.444Slukem		controls if the GCC libraries will be built and
4381.444Slukem		installed.
4391.444Slukem
4401.444Slukem		Forced to "no" if MKCXX=no.
4411.444Slukem
4421.444Slukem		Default: "no" on m68000; "yes" on other platforms.
4431.444Slukem
4441.444SlukemMKGDB		Can be set to "yes" or "no".  Indicates whether gdb(1)
4451.444Slukem		will be built and installed.
4461.444Slukem
4471.444Slukem		Forced to "no" if MKCXX=no or TOOLCHAIN_MISSING!=no.
4481.444Slukem
4491.444Slukem		Default: "no" on ia64 and or1k; "yes" on other platforms.
4501.444Slukem
4511.444SlukemMKGROFF		Can be set to "yes" or "no".  Indicates whether groff(1)
4521.444Slukem		will be built, installed, and used to format some of the
4531.444Slukem		PostScript and PDF documentation.
4541.444Slukem
4551.444Slukem		Forced to "no" if MKCXX=no.
4561.302Sjkoshy
4571.444Slukem		Default: "yes"
4581.403Sjmcneill
4591.444SlukemMKGROFFHTMLDOC	Can be set to "yes" or "no".  Indicates whether to use
4601.444Slukem		groff(1) to generate HTML for miscellaneous articles
4611.444Slukem		which sometimes requires software not in the base
4621.444Slukem		installation.  Does not affect the generation of HTML man
4631.334Sdholland		pages.
4641.334Sdholland
4651.444Slukem		Default: "no"
4661.444Slukem
4671.444SlukemMKHESIOD	Can be set to "yes" or "no".  Indicates whether the
4681.444Slukem		Hesiod infrastructure (libraries and support programs)
4691.444Slukem		will be built and installed.
4701.444Slukem
4711.444Slukem		Default: "yes"
4721.444Slukem
4731.444SlukemMKHOSTOBJ	Can be set to "yes" or "no".  If "yes", then for programs
4741.444Slukem		intended to be run on the compile host, the name,
4751.444Slukem		release, and architecture of the host operating system
4761.444Slukem		will be suffixed to the name of the object directory
4771.444Slukem		created by "make obj".  (This allows multiple host
4781.444Slukem		systems to compile NetBSD for a single target.)	 If "no",
4791.444Slukem		then programs built to be run on the compile host will
4801.444Slukem		use the same object directory names as programs built to
4811.444Slukem		be run on the target.
4821.444Slukem
4831.444Slukem		Default: "no"
4841.444Slukem
4851.444SlukemMKHTML		Can be set to "yes" or "no".  Indicates whether the HTML
4861.444Slukem		manual pages are created and installed.
4871.444Slukem
4881.444Slukem		Forced to "no" if NOHTML is defined, usually in the
4891.444Slukem		Makefile before any make(1) .include directives.
4901.444Slukem
4911.444Slukem		Forced to "no" if MKMAN=no or MKSHARE=no.
4921.172Shubertf
4931.444Slukem		Default: "yes"
4941.172Shubertf
4951.444SlukemMKIEEEFP	Can be set to "yes" or "no".  Indicates whether code for
4961.444Slukem		IEEE754/IEC60559 conformance will be built and installed.
4971.172Shubertf		Has no effect on most platforms.
4981.172Shubertf
4991.444Slukem		Default: "yes"
5001.444Slukem
5011.444SlukemMKINET6		Can be set to "yes" or "no".  Indicates whether INET6
5021.444Slukem		(IPv6) infrastructure (libraries and support programs)
5031.444Slukem		will be built and installed.
5041.444Slukem
5051.444Slukem		Note: MKINET6 must not be set to "no" if MKX11!=no.
5061.444Slukem
5071.444Slukem		Default: "yes"
5081.444Slukem
5091.444SlukemMKINFO		Can be set to "yes" or "no".  Indicates whether GNU Info
5101.444Slukem		files, used for the documentation for most of the
5111.444Slukem		compilation tools, will be built and installed.
5121.444Slukem
5131.444Slukem		Forced to "no" if NOINFO is defined, usually in the
5141.444Slukem		Makefile before any make(1) .include directives.
5151.444Slukem
5161.444Slukem		Forced to "no" if MKSHARE=no.
5171.444Slukem
5181.444Slukem		Default: "yes"
5191.444Slukem
5201.444SlukemMKIPFILTER	Can be set to "yes" or "no".  Indicates whether the
5211.444Slukem		ipf(4) programs, headers, and other components will be
5221.444Slukem		built and installed.
5231.444Slukem
5241.444Slukem		Default: "yes"
5251.444Slukem
5261.444SlukemMKISCSI		Can be set to "yes" or "no".  Indicates whether the iSCSI
5271.444Slukem		library and applications are built and installed.
5281.444Slukem
5291.444Slukem		Default: "no" on m68000; "yes" on other platforms.
5301.444Slukem
5311.444SlukemMKKDEBUG	Deprecated, use MKDEBUGKERNEL.
5321.444Slukem
5331.444SlukemMKKERBEROS	Can be set to "yes" or "no".  Indicates whether the
5341.444Slukem		Kerberos v5 infrastructure (libraries and support
5351.444Slukem		programs) will be built and installed.  Caution: the
5361.444Slukem		default pam(8) configuration requires that Kerberos be
5371.444Slukem		present even if not used.  Do not install a userland
5381.444Slukem		without Kerberos without also either updating the
5391.444Slukem		pam.conf(5) files or disabling PAM via MKPAM.  Otherwise
5401.444Slukem		all logins will fail.
5411.444Slukem
5421.444Slukem		Default: "yes"
5431.444Slukem
5441.444SlukemMKKERBEROS4	Obsolete.
5451.444Slukem
5461.444SlukemMKKMOD		Can be set to "yes" or "no".  Indicates whether kernel
5471.444Slukem		modules will be built and installed.
5481.444Slukem
5491.444Slukem		Default: "no" on or1k; "yes" on other platforms.
5501.444Slukem
5511.444SlukemMKKYUA		Can be set to "yes" or "no".  Indicates whether Kyua (the
5521.444Slukem		testing infrastructure used by NetBSD) will be built and
5531.444Slukem		installed.
5541.444Slukem
5551.444Slukem		Forced to "no" if MKCXX=no.
5561.444Slukem
5571.444Slukem		Note: This does not control the installation of the tests
5581.444Slukem		themselves.  The tests rely on the ATF libraries and
5591.444Slukem		therefore their build is controlled by the MKATF
5601.444Slukem		variable.
5611.444Slukem
5621.444Slukem		Default: "no" until the import of Kyua is done and
5631.444Slukem		validated.
5641.444Slukem
5651.444SlukemMKLDAP		Can be set to "yes" or "no".  Indicates whether the
5661.444Slukem		Lightweight Directory Access Protocol (LDAP)
5671.444Slukem		infrastructure (libraries and support programs) will be
5681.444Slukem		built and installed.
5691.444Slukem
5701.444Slukem		Default: "yes"
5711.444Slukem
5721.444SlukemMKLIBCSANITIZER
5731.444Slukem		Can be set to "yes" or "no".  Indicates whether to use
5741.444Slukem		the sanitizer for libc, using the sanitizer defined by
5751.444Slukem		USE_LIBCSANITIZER.
5761.444Slukem
5771.444Slukem		Forced to "no" if NOLIBCSANITIZER is defined, usually in
5781.444Slukem		the Makefile before any make(1) .include directives.
5791.444Slukem
5801.444Slukem		Default: "no"
5811.444Slukem
5821.444SlukemMKLIBCXX	Can be set to "yes" or "no".  Indicates if libc++ will be
5831.444Slukem		built and installed (usually for clang++(1)).
5841.444Slukem
5851.444Slukem		Default: "yes" if MKLLVM=yes; "no" otherwise.
5861.225Sjoerg
5871.444SlukemMKLIBSTDCXX	Can be set to "yes" or "no".  Indicates if libstdc++ will
5881.444Slukem		be built and installed (usually for g++(1)).
5891.381Skamil
5901.444Slukem		Default: "yes"
5911.381Skamil
5921.444SlukemMKLINKLIB	Can be set to "yes" or "no".  Indicates whether all of
5931.444Slukem		the shared library infrastructure will be built and
5941.444Slukem		installed.
5951.316Sjoerg
5961.444Slukem		If "no", prevents:
5971.444Slukem		-   installation of the *.a libraries
5981.444Slukem		-   installation of the *_pic.a libraries on PIC systems
5991.444Slukem		-   building of *.a libraries on PIC systems
6001.444Slukem		-   installation of .so symlinks on ELF systems
6011.316Sjoerg
6021.172Shubertf		I.e, only install the shared library (and the .so.major
6031.172Shubertf		symlink on ELF).
6041.172Shubertf
6051.444Slukem		Forced to "no" if NOLINKLIB is defined, usually in the
6061.444Slukem		Makefile before any make(1) .include directives.
6071.444Slukem
6081.444Slukem		If "no", acts as MKLINT=no MKPICINSTALL=no MKPROFILE=no.
6091.444Slukem
6101.444Slukem		Default: "yes"
6111.444Slukem
6121.444SlukemMKLINT		Can be set to "yes" or "no".  Indicates whether lint(1)
6131.444Slukem		will be run against portions of the NetBSD source code
6141.444Slukem		during the build, and whether lint libraries will be
6151.444Slukem		installed into DESTDIR/usr/libdata/lint.
6161.444Slukem
6171.444Slukem		Forced to "no" if NOLINT is defined, usually in the
6181.444Slukem		Makefile before any make(1) .include directives.
6191.444Slukem
6201.444Slukem		Forced to "no" if MKLINKLIB=no.
6211.444Slukem
6221.444Slukem		Default: "no"
6231.444Slukem
6241.444SlukemMKLLD		Obsolete.
6251.444Slukem
6261.444SlukemMKLLDB		Obsolete.
6271.444Slukem
6281.444SlukemMKLLVM		Can be set to "yes" or "no".  Indicates whether clang(1)
6291.444Slukem		is installed as a host tool and target compiler.
6301.444Slukem
6311.444Slukem		If "yes", acts as MKLIBCXX=yes.
6321.444Slukem
6331.444Slukem		Note: Use of clang(1) as the system compiler is
6341.444Slukem		controlled by HAVE_LLVM.
6351.444Slukem
6361.444Slukem		Default: "no"
6371.444Slukem
6381.444SlukemMKLLVMRT	Can be set to "yes" or "no".  Indicates whether to build
6391.444Slukem		the LLVM PIC libraries necessary for the various Mesa
6401.444Slukem		backend and the native JIT of the target architecture, if
6411.444Slukem		supported.  (Radeon R300 and newer, LLVMPIPE for most.)
6421.444Slukem
6431.444Slukem		Default: If MKX11=yes and HAVE_MESA_VER>=19, "yes" on
6441.444Slukem		aarch64, amd64, and i386; "no" otherwise.
6451.444Slukem
6461.444SlukemMKLVM		Can be set to "yes" or "no".  If not "no", build and
6471.444Slukem		install the logical volume manager.
6481.444Slukem
6491.444Slukem		Default: "yes"
6501.444Slukem
6511.444SlukemMKMAKEMANDB	Can be set to "yes" or "no".  Indicates if the whatis
6521.444Slukem		tools (apropos(1), whatis(1), getNAME(8), makemandb(8),
6531.444Slukem		and makewhatis(8)), should be built, installed, and used
6541.444Slukem		to create and install the whatis.db.
6551.444Slukem
6561.444Slukem		Default: "yes"
6571.444Slukem
6581.444SlukemMKMAN		Can be set to "yes" or "no".  Indicates whether manual
6591.444Slukem		pages will be installed.
6601.444Slukem
6611.444Slukem		Forced to "no" if NOMAN is defined, usually in the
6621.444Slukem		Makefile before any make(1) .include directives.
6631.444Slukem
6641.444Slukem		Forced to "no" if MKSHARE=no.
6651.444Slukem
6661.444Slukem		If "no", acts as MKCATPAGES=no MKHTML=no.
6671.444Slukem
6681.444Slukem		Default: "yes"
6691.444Slukem
6701.444SlukemMKMANDOC	Can be set to "yes" or "no".  Indicates whether mandoc(1)
6711.444Slukem		will be built and installed, and used to create and
6721.444Slukem		install catman and HTML pages.
6731.444Slukem
6741.444Slukem		If "no", use groff(1) instead of mandoc(1).
6751.444Slukem
6761.444Slukem		Forced to "no" if NOMANDOC or NOMANDOC.<target> (for a
6771.444Slukem		given target <target>) is defined, usually in the Makefile
6781.444Slukem		before any make(1) .include directives.
6791.444Slukem
6801.444Slukem		Only used if MKMAN=yes.
6811.444Slukem
6821.444Slukem		Default: "yes"
6831.444Slukem
6841.444SlukemMKMANZ		Can be set to "yes" or "no".  Indicates whether manual
6851.444Slukem		pages should be compressed with gzip(1) at installation
6861.444Slukem		time.
6871.444Slukem
6881.444Slukem		Only used if MKMAN=yes.
6891.444Slukem
6901.444Slukem		Default: "no"
6911.444Slukem
6921.444SlukemMKMCLINKER	Obsolete.
6931.444Slukem
6941.444SlukemMKMDNS		Can be set to "yes" or "no".  Indicates whether the mDNS
6951.444Slukem		(Multicast DNS) infrastructure (libraries and support
6961.444Slukem		programs) will be built and installed.
6971.444Slukem
6981.444Slukem		Default: "yes"
6991.444Slukem
7001.444SlukemMKNLS		Can be set to "yes" or "no".  Indicates whether Native
7011.444Slukem		Language System (NLS) locale zone files will be built and
7021.444Slukem		installed.
7031.444Slukem
7041.444Slukem		Forced to "no" if NONLS is defined, usually in the
7051.444Slukem		Makefile before any make(1) .include directives.
7061.444Slukem
7071.444Slukem		Forced to "no" if MKSHARE=no.
7081.444Slukem
7091.444Slukem		Default: "yes"
7101.444Slukem
7111.444SlukemMKNOUVEAUFIRMWARE
7121.444Slukem		Can be set to "yes" or "no".  Indicates whether to
7131.444Slukem		install the /libdata/firmware/nouveau directory, which is
7141.444Slukem		necessary for the nouveau(4) NVIDIA video driver.
7151.444Slukem
7161.444Slukem		Default: "yes" on aarch64, i386, and x86_64, "no" on
7171.444Slukem		other platforms.
7181.444Slukem
7191.444SlukemMKNPF		Can be set to "yes" or "no".  Indicates whether the NPF
7201.444Slukem		packet filter is to be built and installed.
7211.444Slukem
7221.444Slukem		Default: "yes"
7231.444Slukem
7241.444SlukemMKNSD		Can be set to "yes" or "no".  Indicates whether the Name
7251.444Slukem		Server Daemon (NSD) is to be built and installed.
7261.444Slukem
7271.444Slukem		Default: "no"
7281.444Slukem
7291.444SlukemMKOBJ		Can be set to "yes" or "no".  Indicates whether object
7301.444Slukem		directories will be created when running "make obj".  If
7311.444Slukem		"no", then all built files will be located inside the
7321.444Slukem		regular source tree.
7331.444Slukem
7341.444Slukem		Forced to "no" if NOOBJ is defined, usually in the
7351.444Slukem		Makefile before any make(1) .include directives.
7361.444Slukem
7371.444Slukem		If "no", acts as MKOBJDIRS=no.
7381.444Slukem
7391.444Slukem		Note: Setting MKOBJ to "no" is not recommended and may
7401.444Slukem		cause problems when updating the tree with cvs(1).
7411.172Shubertf
7421.444Slukem		Default: "yes"
7431.388Sjoerg
7441.444SlukemMKOBJDIRS	Can be set to "yes" or "no".  Indicates whether object
7451.444Slukem		directories will be created automatically (via a "make
7461.444Slukem		obj" pass) at the start of a build.
7471.256Sjoerg
7481.444Slukem		Forced to "no" if MKOBJ=no.
7491.172Shubertf
7501.444Slukem		Default: "no"
7511.418Smaya
7521.444SlukemMKPAM		Can be set to "yes" or "no".  Indicates whether the
7531.444Slukem		pam(8) framework (libraries and support files) will be
7541.444Slukem		built and installed.  The pre-PAM code is not supported
7551.444Slukem		and may be removed in the future.
7561.275Srmind
7571.444Slukem		Default: "yes"
7581.357Schristos
7591.444SlukemMKPCC		Can be set to "yes" or "no".  Indicates whether pcc(1) or
7601.444Slukem		any related libraries (libpcc, libpccsoftfloat) will be
7611.444Slukem		built and installed.
7621.172Shubertf
7631.444Slukem		Default: "no"
7641.172Shubertf
7651.444SlukemMKPERFUSE	Obsolete.
7661.172Shubertf
7671.444SlukemMKPF		Can be set to "yes" or "no".  Indicates whether the pf(4)
7681.444Slukem		programs, headers, and LKM will be built and installed.
7691.210Sgmcgarry
7701.444Slukem		Default: "yes"
7711.172Shubertf
7721.444SlukemMKPIC		Can be set to "yes" or "no".  Indicates whether shared
7731.444Slukem		objects and libraries will be created and installed.  If
7741.444Slukem		"no", the entire built system will be statically linked.
7751.198Schristos
7761.444Slukem		Forced to "no" if NOPIC is defined, usually in the
7771.444Slukem		Makefile before any make(1) .include directives.
7781.349Schristos
7791.444Slukem		If "no", acts as MKPICLIB=no.
7801.271Smrg
7811.444Slukem		Default: "no" on m68000; "yes" on other platforms.
7821.172Shubertf
7831.444SlukemMKPICINSTALL	Can be set to "yes" or "no".  Indicates whether the ar(1)
7841.444Slukem		format libraries (lib*_pic.a), used to generate shared
7851.444Slukem		libraries, are installed.
7861.172Shubertf
7871.444Slukem		Forced to "no" if NOPICINSTALL is defined, usually in the
7881.444Slukem		Makefile before any make(1) .include directives.
7891.295Swiz
7901.444Slukem		Forced to "no" if MKLINKLIB=no.
7911.373Schristos
7921.444Slukem		Default: "no"
7931.172Shubertf
7941.444SlukemMKPICLIB	Can be set to "yes" or "no".  Indicates whether the ar(1)
7951.444Slukem		format libraries (lib*_pic.a), used to generate shared
7961.172Shubertf		libraries.
7971.172Shubertf
7981.444Slukem		Forced to "no" if MKPIC=no.
7991.444Slukem
8001.444Slukem		Default: "no" on vax; "yes" on other platforms.
8011.444Slukem
8021.444SlukemMKPIE		Indicates whether Position Independent Executables (PIE)
8031.444Slukem		will be built and installed.
8041.444Slukem
8051.444Slukem		Forced to "no" if NOPIE is defined, usually in the
8061.444Slukem		Makefile before any make(1) .include directives.
8071.444Slukem
8081.444Slukem		Forced to "no" if COVERITY_TOP_CONFIG is defined.
8091.444Slukem
8101.444Slukem		This is disabled internally for standalone programs in
8111.444Slukem		/usr/mdec.
8121.444Slukem
8131.444Slukem		Default: "yes" on aarch64, arm, i386, m68k, mips, sh3,
8141.444Slukem		sparc64, and x86_64; "no" on other platforms.
8151.444Slukem
8161.444SlukemMKPIGZGZIP	Can be set to "yes" or "no".  If "no", the pigz(1)
8171.444Slukem		utility is not installed as gzip(1).
8181.444Slukem
8191.444Slukem		Default: "no"
8201.444Slukem
8211.444SlukemMKPOSTFIX	Can be set to "yes" or "no".  Indicates whether Postfix
8221.444Slukem		will be built and installed.
8231.444Slukem
8241.444Slukem		Default: "yes"
8251.444Slukem
8261.444SlukemMKPROFILE	Can be set to "yes" or "no".  Indicates whether profiled
8271.444Slukem		libraries (lib*_p.a) will be built and installed.
8281.444Slukem
8291.444Slukem		Forced to "no" if NOPROFILE is defined, usually in the
8301.444Slukem		Makefile before any make(1) .include directives.
8311.444Slukem
8321.444Slukem		Forced to "no" if MKLINKLIB=no.
8331.444Slukem
8341.444Slukem		Default: "no" on or1k, riscv32, and riscv64 (due to
8351.444Slukem		toolchain problems with profiled code); "yes" on other
8361.444Slukem		platforms.
8371.444Slukem
8381.444SlukemMKRADEONFIRMWARE
8391.444Slukem		Can be set to "yes" or "no".  Indicates whether to
8401.444Slukem		install the /libdata/firmware/radeon directory, which is
8411.444Slukem		necessary for the radeon(4) AMD RADEON GPU video driver.
8421.444Slukem
8431.444Slukem		Default: "yes" on aarch64, i386, and x86_64, "no" on
8441.444Slukem		other platforms.
8451.444Slukem
8461.444SlukemMKRELRO		Indicates whether to enable support for Relocation Read-
8471.444Slukem		Only (RELRO).  Supported values:
8481.444Slukem
8491.444Slukem		partial	 Set the non-PLT GOT to read-only.
8501.444Slukem
8511.444Slukem		full	 Set the non-PLT GOT to read-only and also force
8521.444Slukem			 immediate symbol binding, unless NOFULLRELRO is
8531.444Slukem			 defined and not "no" (usually in the Makefile
8541.444Slukem			 before any make(1) .include directives).
8551.444Slukem
8561.444Slukem		no	 Disable RELRO.
8571.444Slukem
8581.444Slukem		Forced to "no" if NORELRO is defined, usually in the
8591.444Slukem		Makefile before any make(1) .include directives.
8601.444Slukem
8611.444Slukem		Default: "partial" on aarch64, i386, and x86_64; "no" on
8621.444Slukem		other platforms.
8631.444Slukem
8641.444SlukemMKREPRO		Can be set to "yes" or "no".  Indicates whether builds
8651.444Slukem		are to be reproducible.  If "yes", two builds from the
8661.444Slukem		same source tree will produce the same build results.
8671.444Slukem
8681.444Slukem		Used as the default for MKARZERO.
8691.444Slukem
8701.444Slukem		Default: "no"
8711.444Slukem
8721.444SlukemMKREPRO_TIMESTAMP
8731.444Slukem		Unix timestamp.  When MKREPRO is set, the timestamp of
8741.444Slukem		all files in the sets will be set to this value.
8751.444Slukem
8761.444Slukem		Default: Unset.
8771.444Slukem
8781.444SlukemMKRUMP		Can be set to "yes" or "no".  Indicates whether the
8791.444Slukem		rump(3) headers, libraries, and programs are to be
8801.444Slukem		installed.
8811.444Slukem
8821.444Slukem		Forced to "no" if COVERITY_TOP_CONFIG is defined.
8831.444Slukem
8841.444Slukem		Default: "yes"
8851.444Slukem
8861.444SlukemMKSANITIZER	Can be set to "yes" or "no".  Indicates whether to use
8871.444Slukem		the sanitizer to compile userland programs, using the
8881.444Slukem		sanitizer defined by USE_SANITIZER.
8891.444Slukem
8901.444Slukem		Forced to "no" if NOSANITIZER is defined, usually in the
8911.444Slukem		Makefile before any make(1) .include directives.
8921.444Slukem
8931.444Slukem		Default: "no"
8941.444Slukem
8951.444SlukemMKSHARE		Can be set to "yes" or "no".  Indicates whether files
8961.444Slukem		destined to reside in DESTDIR/usr/share will be built and
8971.444Slukem		installed.
8981.444Slukem
8991.444Slukem		Forced to "no" if NOSHARE is defined, usually in the
9001.444Slukem		Makefile before any make(1) .include directives.
9011.444Slukem
9021.444Slukem		If "no", acts as MKCATPAGES=no MKDOC=no MKINFO=no
9031.444Slukem		MKHTML=no MKMAN=no MKNLS=no.
9041.444Slukem
9051.444Slukem		Default: "yes"
9061.444Slukem
9071.444SlukemMKSKEY		Can be set to "yes" or "no".  Indicates whether the S/key
9081.444Slukem		infrastructure (libraries and support programs) will be
9091.444Slukem		built and installed.
9101.444Slukem
9111.444Slukem		Default: "yes"
9121.444Slukem
9131.444SlukemMKSLJIT		Can be set to "yes" or "no".  Indicates whether to enable
9141.444Slukem		support for sljit (stack-less platform-independent Just
9151.444Slukem		in Time (JIT) compiler) private library and tests.
9161.444Slukem
9171.444Slukem		Default: "yes" on i386, sparc, and x86_64; "no" on other
9181.444Slukem		platforms.
9191.444Slukem
9201.444SlukemMKSOFTFLOAT	Can be set to "yes" or "no".  Indicates whether the
9211.444Slukem		compiler generates output containing library calls for
9221.444Slukem		floating point and possibly soft-float library support.
9231.444Slukem
9241.444Slukem		Forced to "yes" on arm without `hf', coldfire, emips,
9251.444Slukem		or1k, and sh3.
9261.444Slukem
9271.444Slukem		Default: "yes" on mips64; "no" on other platforms.
9281.444Slukem
9291.444SlukemMKSTATICLIB	Can be set to "yes" or "no".  Indicates whether the
9301.444Slukem		normal static libraries (lib*_g.a) will be built and
9311.444Slukem		installed.
9321.444Slukem
9331.444Slukem		Forced to "no" if NOSTATICLIB is defined, usually in the
9341.444Slukem		Makefile before any make(1) .include directives.
9351.444Slukem
9361.444Slukem		Default: "yes"
9371.444Slukem
9381.444SlukemMKSTATICPIE	Can be set to "yes" or "no".  Indicates whether support
9391.444Slukem		for static PIE binaries will be built and installed.
9401.444Slukem		These binaries use a special support in crt0.o for
9411.444Slukem		resolving relative relocations and require linker
9421.444Slukem		support.
9431.444Slukem
9441.444Slukem		Default: "yes" on i386 and x86_64; "no" on other
9451.444Slukem		platforms.
9461.444Slukem
9471.444SlukemMKSTRIPIDENT	Can be set to "yes" or "no".  Indicates whether RCS IDs,
9481.444Slukem		for use with ident(1), should be stripped from program
9491.444Slukem		binaries and shared libraries.
9501.444Slukem
9511.444Slukem		Default: "no"
9521.444Slukem
9531.444SlukemMKSTRIPSYM	Can be set to "yes" or "no".  Indicates whether all local
9541.444Slukem		symbols should be stripped from shared libraries.  If
9551.444Slukem		"yes", strip all local symbols from shared libraries; the
9561.444Slukem		effect is equivalent to the -x option of ld(1).  If "no",
9571.444Slukem		strip only temporary local symbols; the effect is
9581.444Slukem		equivalent to the -X option of ld(1).  Keeping non-
9591.444Slukem		temporary local symbols such as static function names is
9601.444Slukem		useful on using DTrace for userland libraries and getting
9611.444Slukem		a backtrace from a rump kernel loading shared libraries.
9621.444Slukem
9631.444Slukem		Default: "yes"
9641.444Slukem
9651.444SlukemMKTEGRAFIRMWARE
9661.444Slukem		Can be set to "yes" or "no".  Indicates whether to
9671.444Slukem		install the /libdata/firmware/nvidia directory, which is
9681.444Slukem		necessary for the NVIDIA Tegra XHCI driver.
9691.444Slukem
9701.444Slukem		Default: "yes" on evbarm; "no" on other platforms.
9711.444Slukem
9721.444SlukemMKTOOLSDEBUG	Deprecated, use MKDEBUGTOOLS.
9731.444Slukem
9741.444SlukemMKTPM		Can be set to "yes" or "no".  Indicates whether to
9751.444Slukem		install the Trusted Platform Module (TPM) infrastructure.
9761.444Slukem
9771.444Slukem		Default: "no"
9781.444Slukem
9791.444SlukemMKUNBOUND	Can be set to "yes" or "no".  Indicates whether the
9801.444Slukem		unbound(8) DNS resolver will be built and installed.
9811.366Sjmcneill
9821.444Slukem		Default: "yes"
9831.444Slukem
9841.444SlukemMKUNPRIVED	Can be set to "yes" or "no".  Indicates whether an
9851.444Slukem		unprivileged install will occur.  The user, group,
9861.444Slukem		permissions, and file flags, will not be set on the
9871.444Slukem		installed items; instead the information will be appended
9881.444Slukem		to a file called METALOG in DESTDIR.  The contents of
9891.444Slukem		METALOG is used during the generation of the distribution
9901.444Slukem		tar files to ensure that the appropriate file ownership
9911.444Slukem		is stored.  This allows a non-root `make install'.
9921.444Slukem
9931.444Slukem		Default: "no"
9941.444Slukem
9951.444SlukemMKUPDATE	Can be set to "yes" or "no".  Indicates whether all
9961.444Slukem		install operations intended to write to DESTDIR will
9971.444Slukem		compare file timestamps before installing, and skip the
9981.444Slukem		install phase if the destination files are up-to-date.
9991.444Slukem
10001.444Slukem		Default: "no"
10011.444Slukem
10021.444SlukemMKX11		Can be set to "yes" or "no".  Indicates whether X11 will
10031.444Slukem		be built and installed from X11SRCDIR, and whether the X
10041.444Slukem		sets will be created.
10051.444Slukem
10061.444Slukem		Note: If "yes", requires MKINET6=yes.
10071.444Slukem
10081.444Slukem		Default: "no"
10091.444Slukem
10101.444SlukemMKX11FONTS	Can be set to "yes" or "no".  If "no", do not build and
10111.444Slukem		install the X fonts.  The xfont set is still created but
10121.444Slukem		will be empty.
10131.444Slukem
10141.444Slukem		Only used if MKX11=yes.
10151.444Slukem
10161.444Slukem		Default: "yes"
10171.444Slukem
10181.444SlukemMKX11MOTIF	Can be set to "yes" or "no".  If "yes", build the native
10191.444Slukem		Xorg libGLw with Motif stubs.  Requires that Motif can be
10201.444Slukem		found via X11MOTIFPATH.
10211.444Slukem
10221.444Slukem		Default: "no"
10231.444Slukem
10241.444SlukemMKXORG_SERVER	Can be set to "yes" or "no".  Indicates whether the
10251.444Slukem		Xorg(7) X server and drivers will be built and installed.
10261.444Slukem
10271.444Slukem		Default: "yes" on alpha, amd64, amiga, bebox, cats,
10281.444Slukem		dreamcast, ews4800mips, evbarm, evbmips, evbppc, hp300,
10291.444Slukem		hpcarm, hpcmips, hpcsh, hppa, i386, ibmnws, iyonix,
10301.444Slukem		luna68k, mac68k, macppc, netwinder, newsmips, pmax, prep,
10311.444Slukem		ofppc, sgimips, shark, sparc, sparc64, vax, and zaurus;
10321.444Slukem		"no" on other platforms.
10331.444Slukem
10341.444SlukemMKYP		Can be set to "yes" or "no".  Indicates whether the YP
10351.444Slukem		(NIS) infrastructure (libraries and support programs)
10361.444Slukem		will be built and installed.
10371.444Slukem
10381.444Slukem		Default: "yes"
10391.444Slukem
10401.444SlukemMKZFS		Can be set to "yes" or "no".  Indicates whether the ZFS
10411.444Slukem		kernel module and the utilities and libraries used to
10421.444Slukem		manage the ZFS system are to be built and installed.
10431.444Slukem
10441.444Slukem		Note: ZFS requires 64-bit atomic operations .
10451.444Slukem
10461.444Slukem		Default: "yes" on aarch64, amd64, and sparc64; "no" on
10471.444Slukem		other platforms.
10481.444Slukem
10491.444SlukemNETBSD_OFFICIAL_RELEASE
10501.444Slukem		Can be set to "yes" or "no".  Indicates whether the build
10511.444Slukem		creates an official NetBSD release which is going to be
10521.444Slukem		available from ftp.NetBSD.org and/or cdn.NetBSD.org
10531.444Slukem		locations.  This variable modifies a few default paths in
10541.444Slukem		the installer and also creates different links in the
10551.444Slukem		install documentation.  The auto-build cluster uses this
10561.444Slukem		variable to distinguish `daily' builds from real
10571.444Slukem		releases.
10581.444Slukem
10591.444Slukem		Default: Unset.  ("no").
10601.444Slukem
10611.444SlukemUSE_FORT	Can be set to "yes" or "no".  Indicates whether the so-
10621.444Slukem		called "FORTIFY_SOURCE" security(7) extensions are
10631.444Slukem		enabled; see ssp(3) for details.  This imposes some
10641.444Slukem		performance penalty.
10651.444Slukem
10661.444Slukem		Forced to "no" if NOFORT is defined, usually in the
10671.444Slukem		Makefile before any make(1) .include directives.
10681.444Slukem
10691.444Slukem		Default: "no"
10701.444Slukem
10711.444SlukemUSE_HESIOD	Can be set to "yes" or "no".  Indicates whether Hesiod
10721.444Slukem		support is enabled in the various applications that
10731.444Slukem		support it.
10741.444Slukem
10751.444Slukem		Forced to "no" if MKHESIOD=no.
10761.444Slukem
10771.444Slukem		Default: "yes"
10781.444Slukem
10791.444SlukemUSE_INET6	Can be set to "yes" or "no".  Indicates whether INET6
10801.444Slukem		(IPv6) support is enabled in the various applications
10811.444Slukem		that support it.
10821.444Slukem
10831.444Slukem		Forced to "no" if MKINET6=no.
10841.444Slukem
10851.444Slukem		Default: "yes"
10861.444Slukem
10871.444SlukemUSE_JEMALLOC	Can be set to "yes" or "no".  Indicates whether the
10881.444Slukem		jemalloc allocator (which is designed for improved
10891.444Slukem		performance with threaded applications) is used instead
10901.444Slukem		of the phkmalloc allocator (that was the default until
10911.444Slukem		NetBSD 5.0).
10921.444Slukem
10931.444Slukem		Default: "yes"
10941.444Slukem
10951.444SlukemUSE_KERBEROS	Can be set to "yes" or "no".  Indicates whether Kerberos
10961.444Slukem		v5 support is enabled in the various applications that
10971.444Slukem		support it.
10981.444Slukem
10991.444Slukem		Forced to "no" if MKKERBEROS=no.
11001.444Slukem
11011.444Slukem		Default: "yes"
11021.444Slukem
11031.444SlukemUSE_LDAP	Can be set to "yes" or "no".  Indicates whether LDAP
11041.444Slukem		support is enabled in the various applications that
11051.444Slukem		support it.
11061.444Slukem
11071.444Slukem		Forced to "no" if MKLDAP=no.
11081.444Slukem
11091.444Slukem		Default: "yes"
11101.444Slukem
11111.444SlukemUSE_LIBCSANITIZER
11121.444Slukem		Selects the sanitizer in libc to compile userland
11131.444Slukem		programs and libraries.  Supported values:
11141.444Slukem
11151.444Slukem		undefined  Enables the micro-UBSan in the user mode
11161.444Slukem			   (uUBSan) undefined behaviour sanitizer.  The
11171.444Slukem			   code is shared with the kernel mode variation
11181.444Slukem			   (kUBSan).  The runtime runtime differs from
11191.444Slukem			   the UBSan available in MKSANITIZER.  The
11201.444Slukem			   runtime is stripped down from C++ features,
11211.444Slukem			   and is invoked with -fsanitize=no-vptr as that
11221.444Slukem			   sanitizer is not supported.  The runtime
11231.444Slukem			   configuration is restricted to the LIBC_UBSAN
11241.444Slukem			   environment variable, that is designed to be
11251.444Slukem			   safe for hardening.
11261.444Slukem
11271.444Slukem		The value of USE_LIBCSANITIZER is passed to the C and C++
11281.444Slukem		compilers as the argument to -fsanitize=.  Additional
11291.444Slukem		sanitizer arguments can be passed through
11301.444Slukem		LIBCSANITIZERFLAGS.
11311.444Slukem
11321.444Slukem		Disabled if MKLIBCSANITIZER=no.
11331.444Slukem
11341.444Slukem		Default: "undefined".
11351.444Slukem
11361.444SlukemUSE_PAM		Can be set to "yes" or "no".  Indicates whether pam(8)
11371.444Slukem		support is enabled in the various applications that
11381.444Slukem		support it.
11391.444Slukem
11401.444Slukem		Forced to "no" if MKPAM=no.
11411.444Slukem
11421.444Slukem		Default: "yes"
11431.444Slukem
11441.444SlukemUSE_PIGZGZIP	Can be set to "yes" or "no".  Indicates whether pigz(1)
11451.444Slukem		is used instead of gzip(1) for multi-threaded gzip
11461.444Slukem		compression of the distribution tar sets.
11471.444Slukem
11481.444Slukem		Default: "no"
11491.444Slukem
11501.444SlukemUSE_SKEY	Can be set to "yes" or "no".  Indicates whether S/key
11511.444Slukem		support is enabled in the various applications that
11521.444Slukem		support it.
11531.444Slukem
11541.444Slukem		Forced to "no" if MKSKEY=no.
11551.444Slukem
11561.444Slukem		Note: This is mutually exclusive to USE_PAM!=no.
11571.444Slukem
11581.444Slukem		Default: "no"
11591.444Slukem
11601.444SlukemUSE_SSP		Can be set to "yes" or "no".  Indicates whether GCC
11611.444Slukem		stack-smashing protection (SSP) support, which detects
11621.444Slukem		stack overflows and aborts the program, is enabled.  This
11631.444Slukem		imposes some performance penalty (approximately 5%).
11641.444Slukem
11651.444Slukem		This is disabled internally for standalone programs in
11661.444Slukem		/usr/mdec.
11671.444Slukem
11681.444Slukem		Forced to "no" if NOSSP is defined, usually in the
11691.444Slukem		Makefile before any make(1) .include directives.
11701.444Slukem
11711.444Slukem		Forced to "no" if COVERITY_TOP_CONFIG is defined.
11721.444Slukem
11731.444Slukem		Default: "no" on alpha, hppa, ia64, and mips; "yes" on
11741.444Slukem		other platforms if USE_FORT=yes; "no" otherwise.
11751.444Slukem
11761.444SlukemUSE_XZ_SETS	Can be set to "yes" or "no".  Indicates whether the
11771.444Slukem		distribution tar files are to be compressed with xz(1)
11781.444Slukem		instead of gzip(1) or pigz(1).
11791.306Schristos
11801.444Slukem		Forced to "no" if USE_PIGZGZIP=yes.
11811.355Schristos
11821.444Slukem		Default: "yes" on aarch64, amd64, and sparc64, "no" on
11831.444Slukem		other platforms.
11841.172Shubertf
11851.444SlukemUSE_YP		Can be set to "yes" or "no".  Indicates whether YP (NIS)
11861.444Slukem		support is enabled in the various applications that
11871.444Slukem		support it.
11881.172Shubertf
11891.444Slukem		Forced to "no" if MKYP=no.
11901.216Smrg
11911.444Slukem		Default: "yes"
11921.318Smbalmer
11931.444SlukemX11MOTIFPATH	Path of the Motif installation to use if MKX11MOTIF=yes.
11941.172Shubertf
11951.444Slukem		Default: "/usr/pkg"
11961.385Smartin
11971.172ShubertfCOPTS.lib<lib>
11981.177SmrgOBJCOPTS.lib<lib>
11991.172ShubertfLDADD.lib<lib>
12001.172ShubertfCPPFLAGS.lib<lib>
12011.172ShubertfCXXFLAGS.lib<lib>
12021.172ShubertfCOPTS.<prog>
12031.428SchristosOBJCOPTS.<prog>
12041.172ShubertfLDADD.<prog>
12051.172ShubertfCPPFLAGS.<prog>
12061.444SlukemCXXFLAGS.<prog> These provide a way to specify additions to the associated
12071.172Shubertf		variables in a way that applies only to a particular library
12081.172Shubertf		or program.  <lib> corresponds to the LIB variable set in
12091.172Shubertf		the library's makefile.  <prog> corresponds to either PROG
12101.172Shubertf		or PROG_CXX (if set).  For example, if COPTS.libcrypto is
12111.172Shubertf		set to "-g", "-g" will be added to COPTS only when compiling
12121.172Shubertf		the crypto library.
12131.118Slukem
12141.281SjoergThe active compiler is selected using the following variables:
12151.281SjoergAVAILABLE_COMPILER
12161.281Sjoerg		List of available compiler suites.  Processed in order
12171.281Sjoerg		for selecting the active compiler for each frontend.
12181.281SjoergHAVE_PCC	If defined, PCC is present and enabled.
12191.281SjoergHAVE_LLVM	If defined, LLVM/Clang is present and enabled.
12201.444SlukemUNSUPPORTED_COMPILER.<comp>
12211.444Slukem		If defined, the support for compiler <comp> is disabled.
12221.281Sjoerg
12231.281SjoergFor the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist:
12241.281SjoergACTIVE_CC	Active compile suite for the CC frontend.
12251.281SjoergSUPPORTED_CC	Compile suite with support for the CC frontend.
12261.444SlukemTOOL_CC.<comp>	Path to the CC frontend for compiler <comp>.
12271.444Slukem
12281.444Slukem
12291.444Slukem=-=-=-=-=   Variables for a Makefile   =-=-=-=-=
12301.444Slukem
12311.444SlukemIf the following varialbes are defined in the Makefile before
12321.444Slukemany make(1) .include directives, they force the specific behavior.
12331.444Slukem
12341.444SlukemNOCOMPAT	Force MKCOMPAT=no.
12351.444SlukemNOCTF		Force MKCTF=no.
12361.444SlukemNODEBUG		Force MKDEBUG=no.
12371.444SlukemNODEBUGLIB	Force MKDEBUGLIB=no.
12381.444SlukemNODOC		Force MKDOC=no.
12391.444SlukemNOFORT		Force USE_FORT=no.
12401.444SlukemNOHTML		Force MKHTML=no.
12411.444SlukemNOINFO		Force MKINFO=no.
12421.444SlukemNOLIBCSANITIZER Force MKLIBCSANITIZER=no (and USE_LIBCSANITIZER=no)
12431.444SlukemNOLINKLIB	Force MKLINKLIB=no.
12441.444SlukemNOLINT		Force MKLINT=no.
12451.444SlukemNOMAN		Force MKMAN=no.
12461.444SlukemNOMANDOC	Force MKMANDOC=no.
12471.444SlukemNONLS		Force MKNLS=no.
12481.444SlukemNOOBJ		Force MKOBJ=no.
12491.444SlukemNOPIC		Force MKPIC=no.
12501.444SlukemNOPICINSTALL	Force MKPICINSTALL=no.
12511.444SlukemNOPIE		Force MKPIE=no.
12521.444SlukemNOPROFILE	Force MKPROFILE=no.
12531.444SlukemNORELRO		Force MKREPRO=no.
12541.444SlukemNOSANITIZER	Force MKSANITIZER=no (and USE_SANITIZER=no)
12551.444SlukemNOSHARE		Force MKSHARE=no.
12561.444SlukemNOSSP		Force USE_SSP=no.
12571.444SlukemNOSTATICLIB	Force MKSTATICLIB=no.
12581.444Slukem
12591.444SlukemSpecial variations:
12601.444Slukem
12611.444SlukemNOFULLRELRO!=no Force MKRELRO=no if MKRELRO=full
12621.444Slukem
12631.444SlukemTODO: NOFULLRELRO should just be a defined test for consistency.
12641.444Slukem
12651.281Sjoerg
12661.118Slukem=-=-=-=-=   sys.mk   =-=-=-=-=
12671.1Scgd
12681.1ScgdThe include file <sys.mk> has the default rules for all makes, in the BSD
12691.1Scgdenvironment or otherwise.  You probably don't want to touch this file.
12701.1Scgd
12711.118Slukem=-=-=-=-=   bsd.own.mk   =-=-=-=-=
12721.1Scgd
12731.17SthorpejThe include file <bsd.own.mk> contains source tree configuration parameters,
12741.17Sthorpejsuch as the owners, groups, etc. for both manual pages and binaries, and
12751.17Sthorpeja few global "feature configuration" parameters.
12761.1Scgd
12771.1ScgdIt has no targets.
12781.1Scgd
12791.134SlukemTo get system-specific configuration parameters, <bsd.own.mk> will try to
12801.29Scjsinclude the file specified by the "MAKECONF" variable.  If MAKECONF is not
12811.29Scjsset, or no such file exists, the system make configuration file, /etc/mk.conf
12821.29Scjsis included.  These files may define any of the variables described below.
12831.17Sthorpej
12841.134Slukem<bsd.own.mk> sets the following variables, if they are not already defined
12851.17Sthorpej(defaults are in brackets):
12861.15Scgd
12871.98SlukemNETBSDSRCDIR	Top of the NetBSD source tree.
12881.98Slukem		If _SRC_TOP_ != "", that will be used as the default,
12891.98Slukem		otherwise BSDSRCDIR will be used as the default.
12901.98Slukem		Various makefiles within the NetBSD source tree will
12911.98Slukem		use this to reference the top level of the source tree.
12921.98Slukem
12931.95Slukem_SRC_TOP_	Top of the system source tree, as determined by <bsd.own.mk>
12941.98Slukem		based on the presence of tools/ and build.sh.  This variable
12951.98Slukem		is "internal" to <bsd.own.mk>, although its value is only
12961.98Slukem		determined once and then propagated to all sub-makes.
12971.95Slukem
12981.305Sapb_NETBSD_VERSION_DEPENDS
12991.305Sapb		A list of files which contain information about
13001.305Sapb		the version of the NetBSD being built.  This is
13011.305Sapb		defined only if the current directory appears
13021.305Sapb		to be inside a NetBSD source tree.  The list of
13031.305Sapb		files includes ${NETBSDSRCDIR}/sys/sys/param.h
13041.305Sapb		(which contains the kernel version number),
13051.305Sapb		${NETBSDSRCDIR}/sys/conf/newvers.sh and
13061.305Sapb		${NETBSDSRCDIR}/sys/conf/osrelease.sh (which
13071.305Sapb		interpret the information in sys/sys/param.h), and
13081.305Sapb		${_SRC_TOP_OBJ_}/params (which is an optional file,
13091.305Sapb		created by "make build" in ${_SRC_TOP_}/Makefile,
13101.305Sapb		containing all the variables that may influence the
13111.305Sapb		build).
13121.305Sapb
13131.305Sapb		Targets that depend on the NetBSD version, or on
13141.305Sapb		variables defined at build time, can declare a
13151.305Sapb		dependency on ${_NETBSD_VERSION_DEPENDS}, like this:
13161.305Sapb
13171.305Sapb			version.c: ${_NETBSD_VERSION_DEPENDS}
13181.305Sapb				commands to create version.c
13191.305Sapb
13201.15ScgdBSDSRCDIR	The real path to the system sources, so that 'make obj'
13211.116Slukem		will work correctly.  [/usr/src]
13221.15Scgd
13231.15ScgdBSDOBJDIR	The real path to the system 'obj' tree, so that 'make obj'
13241.116Slukem		will work correctly.  [/usr/obj]
13251.15Scgd
13261.116SlukemBINGRP		Binary group.  [wheel]
13271.15Scgd
13281.116SlukemBINOWN		Binary owner.  [root]
13291.15Scgd
13301.116SlukemBINMODE		Binary mode.  [555]
13311.15Scgd
13321.116SlukemNONBINMODE	Mode for non-executable files.  [444]
13331.15Scgd
13341.415SkamilMANDIR		Base path for manual installation.  [/usr/share/man/cat]
13351.15Scgd
13361.116SlukemMANGRP		Manual group.  [wheel]
13371.15Scgd
13381.116SlukemMANOWN		Manual owner.  [root]
13391.15Scgd
13401.116SlukemMANMODE		Manual mode.  [${NONBINMODE}]
13411.15Scgd
13421.222SlukemMANINSTALL	Manual installation type.  Space separated list:
13431.415Skamil			catinstall, htmlinstall, maninstall
13441.415Skamil		Default value derived from MKCATPAGES and MKHTML.
13451.76Sfair
13461.76SfairLDSTATIC	Control program linking; if set blank, link everything
13471.129Slukem		dynamically.  If set to "-static", link everything statically.
13481.76Sfair		If not set, programs link according to their makefile.
13491.21Schristos
13501.116SlukemLIBDIR		Base path for library installation.  [/usr/lib]
13511.15Scgd
13521.116SlukemLINTLIBDIR	Base path for lint(1) library installation.  [/usr/libdata/lint]
13531.15Scgd
13541.116SlukemLIBGRP		Library group.  [${BINGRP}]
13551.15Scgd
13561.116SlukemLIBOWN		Library owner.  [${BINOWN}]
13571.15Scgd
13581.116SlukemLIBMODE		Library mode.  [${NONBINMODE}]
13591.15Scgd
13601.15ScgdDOCDIR		Base path for system documentation (e.g. PSD, USD, etc.)
13611.444Slukem		installation.  [/usr/share/doc]
13621.62Ssimonb
13631.116SlukemDOCGRP		Documentation group.  [wheel]
13641.15Scgd
13651.116SlukemDOCOWN		Documentation owner.  [root]
13661.15Scgd
13671.116SlukemDOCMODE		Documentation mode.  [${NONBINMODE}]
13681.15Scgd
13691.335SapbGZIP_N_FLAG	Flags to pass to TOOL_GZIP to prevent it from inserting
13701.335Sapb		file names or timestamps in the compressed output.
13711.335Sapb		[-n, or -nT when TOOL_GZIP is really TOOL_PIGZ]
13721.335Sapb
13731.84SkleinkNLSDIR		Base path for Native Language Support files installation.
13741.15Scgd		[/usr/share/nls]
13751.1Scgd
13761.116SlukemNLSGRP		Native Language Support files group.  [wheel]
13771.1Scgd
13781.116SlukemNLSOWN		Native Language Support files owner.  [root]
13791.1Scgd
13801.116SlukemNLSMODE		Native Language Support files mode.  [${NONBINMODE}]
13811.1Scgd
13821.255SapbX11SRCDIR	The path to the xsrc tree.  [${NETBSDSRCDIR}/../xsrc,
13831.255Sapb		if that exists; otherwise /usr/xsrc]
13841.144Slukem
13851.444SlukemX11SRCDIR.local The path to the local X11 src tree.  [${X11SRCDIR}/local]
13861.144Slukem
13871.221SmrgX11SRCDIR.lib<package>
13881.221SmrgX11SRCDIR.<package>
13891.425Smsaitoh		The path to the xorg src tree for the specified package>.
13901.221Smrg		[${X11SRCDIR}/external/mit/xorg/<package>/dist]
13911.221Smrg
13921.367SsnjX11ROOTDIR	Root directory of the X11 installation.  [/usr/X11R7]
13931.144Slukem
13941.144SlukemX11BINDIR	X11 bin directory.  [${X11ROOTDIR}/bin]
13951.144Slukem
13961.144SlukemX11FONTDIR	X11 font directory.  [${X11ROOTDIR}/lib/X11/fonts]
13971.144Slukem
13981.144SlukemX11INCDIR	X11 include directory.  [${X11ROOTDIR}/include]
13991.144Slukem
14001.144SlukemX11LIBDIR	X11 lib/x11 (config) directory.  [${X11ROOTDIR}/lib/X11]
14011.144Slukem
14021.144SlukemX11MANDIR	X11 manual directory.  [${X11ROOTDIR}/man]
14031.144Slukem
14041.144SlukemX11USRLIBDIR	X11 library directory.  [${X11ROOTDIR}/lib]
14051.144Slukem
14061.32SmikelSTRIPFLAG	The flag passed to the install program to cause the binary
14071.1Scgd		to be stripped.  This is to be used when building your
14081.1Scgd		own install script so that the entire system can be made
14091.146Slukem		stripped/not-stripped using a single knob.  []
14101.1Scgd
14111.2ScgdCOPY		The flag passed to the install program to cause the binary
14121.2Scgd		to be copied rather than moved.  This is to be used when
14131.2Scgd		building our own install script so that the entire system
14141.2Scgd		can either be installed with copies, or with moves using
14151.116Slukem		a single knob.  [-c]
14161.15Scgd
14171.310SapbMAKEDIRTARGETENV
14181.310Sapb		Environment variables passed to the child make process
14191.310Sapb		invoked by MAKEDIRTARGET.
14201.310Sapb
14211.150SlukemMAKEDIRTARGET dir target [params]
14221.150Slukem		Runs "cd $${dir} && ${MAKE} [params] $${target}",
14231.150Slukem		displaying a "pretty" message whilst doing so.
14241.150Slukem
14251.152SclRELEASEMACHINEDIR
14261.152Scl		Subdirectory used below RELEASEDIR when building
14271.395Smartin		a release.  [${MACHINE},
14281.395Smartin		or ${MACHINE}-${MACHINE_ARCH} for evb{arm,mips,sh3}*]
14291.152Scl
14301.152SclRELEASEMACHINE	Subdirectory or path component used for the following
14311.152Scl		paths:
14321.152Scl			distrib/${RELEASEMACHINE}
14331.152Scl			distrib/notes/${RELEASEMACHINE}
14341.152Scl			etc/etc.${RELEASEMACHINE}
14351.152Scl		Used when building a release.  [${MACHINE}]
14361.150Slukem
14371.134SlukemAdditionally, the following variables may be set by <bsd.own.mk> or in a
14381.214Swizmake configuration file to modify the behavior of the system build
14391.17Sthorpejprocess (default values are in brackets along with comments, if set by
14401.134Slukem<bsd.own.mk>):
14411.33Sjonathan
14421.172ShubertfUSETOOLS	Indicates whether the tools specified by ${TOOLDIR} should
14431.172Shubertf		be used as part of a build in progress.
14441.172Shubertf		Supported values:
14451.172Shubertf
14461.172Shubertf		yes	Use the tools from TOOLDIR.
14471.172Shubertf			Must be set to this if cross-compiling.
14481.172Shubertf
14491.172Shubertf		no	Do not use the tools from TOOLDIR, but refuse to
14501.172Shubertf			build native compilation tool components that are
14511.172Shubertf			version-specific for that tool.
14521.172Shubertf
14531.172Shubertf		never	Do not use the tools from TOOLDIR, even when
14541.172Shubertf			building native tool components.  This is similar to
14551.172Shubertf			the traditional NetBSD build method, but does not
14561.172Shubertf			verify that the compilation tools in use are
14571.172Shubertf			up-to-date enough in order to build the tree
14581.172Shubertf			successfully.  This may cause build or runtime
14591.172Shubertf			problems when building the whole NetBSD source tree.
14601.172Shubertf
14611.172Shubertf		Default: "yes" if building all or part of a whole NetBSD
14621.172Shubertf		source tree (detected automatically); "no" otherwise
14631.172Shubertf		(to preserve traditional semantics of the <bsd.*.mk>
14641.172Shubertf		make(1) include files).
14651.142Slukem
14661.116SlukemOBJECT_FMT	Object file format.  [set to "ELF" on architectures that
14671.199Ssimonb		use ELF -- currently all architectures].
14681.33Sjonathan
14691.401SchristosKERNEL_DIR	Install the kernel as /netbsd/kernel and the modules
14701.401Schristos		in /netbsd/modules, defaults to "no".
14711.401Schristos
14721.103SthorpejTOOLCHAIN_MISSING
14731.142Slukem		If not "no", this indicates that the platform being built
14741.103Sthorpej		does not have a working in-tree toolchain.  If the
14751.142Slukem		${MACHINE_ARCH} in question falls into this category,
14761.301Sabs		TOOLCHAIN_MISSING is conditionally assigned the value "yes".
14771.103Sthorpej		Otherwise, the variable is unconditionally assigned the
14781.103Sthorpej		value "no".
14791.252Sskrll		If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are
14801.142Slukem		unconditionally assigned the value "no".
14811.103Sthorpej
14821.103SthorpejEXTERNAL_TOOLCHAIN
14831.103Sthorpej		This variable is not directly set by <bsd.own.mk>, but
14841.103Sthorpej		including <bsd.own.mk> is the canonical way to gain
14851.103Sthorpej		access to this variable.  The variable should be defined
14861.103Sthorpej		either in the user's environment or in the user's mk.conf
14871.103Sthorpej		file.  If defined, this variable indicates the root of
14881.103Sthorpej		an external toolchain which will be used to build the
14891.142Slukem		tree.  For example, if a platform is a ${TOOLCHAIN_MISSING}
14901.103Sthorpej		platform, EXTERNAL_TOOLCHAIN can be used to re-enable the
14911.103Sthorpej		cross-compile framework.
14921.103Sthorpej
14931.142Slukem		If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally
14941.142Slukem		assigned the value "no", since the external version of the
14951.142Slukem		compiler may not be able to build the library components of
14961.142Slukem		the in-tree compiler.
14971.103Sthorpej
14981.429Sandvar		This variable should be used in conjunction with an appropriate
14991.371Sjoerg		HAVE_GCC or HAVE_LLVM setting to control the compiler flags.
15001.371Sjoerg
15011.103Sthorpej		NOTE: This variable is not yet used in as many places as
15021.103Sthorpej		it should be.  Expect the exact semantics of this variable
15031.103Sthorpej		to change in the short term as parts of the cross-compile
15041.103Sthorpej		framework continue to be cleaned up.
15051.1Scgd
15061.236SapbThe following variables are defined to commands to perform the
15071.236Sapbappropriate operation, with the default in [brackets].  Note that
15081.236Sapbthe defaults change if USETOOLS == "yes":
15091.236Sapb
15101.236SapbTOOL_AMIGAAOUT2BB	aout to Amiga bootblock converter.  [amiga-aout2bb]
15111.236Sapb
15121.236SapbTOOL_AMIGAELF2BB	ELF to Amiga bootblock converter.  [amiga-elf2bb]
15131.236Sapb
15141.387SchristosTOOL_AMIGATXLT		Amiga assembly language format translator.  [amiga-txlt]
15151.387Schristos
15161.387SchristosTOOL_ARMELF2AOUT	ELF to a.out executable converter [arm-elf2aout}
15171.236Sapb
15181.236SapbTOOL_ASN1_COMPILE	ASN1 compiler.  [asn1_compile]
15191.236Sapb
15201.236SapbTOOL_AWK		Pattern-directed scanning/processing language.  [awk]
15211.236Sapb
15221.236SapbTOOL_CAP_MKDB		Create capability database.  [cap_mkdb]
15231.236Sapb
15241.236SapbTOOL_CAT		Concatenate and print files.  [cat]
15251.236Sapb
15261.236SapbTOOL_CKSUM		Display file checksums.  [cksum]
15271.236Sapb
15281.236SapbTOOL_COMPILE_ET		Error table compiler.  [compile_et]
15291.236Sapb
15301.236SapbTOOL_CONFIG		Build kernel compilation directories.  [config]
15311.236Sapb
15321.236SapbTOOL_CRUNCHGEN		Generate crunched binary build environment.  [crunchgen]
15331.236Sapb
15341.236SapbTOOL_CTAGS		Create a tags file.  [ctags]
15351.236Sapb
15361.236SapbTOOL_DB			Manipulate db(3) databases.  [db]
15371.236Sapb
15381.236SapbTOOL_DISKLABEL		Read and write disk pack label.  [disklabel]
15391.236Sapb
15401.236SapbTOOL_EQN		Format equations for groff.  [eqn]
15411.236Sapb
15421.236SapbTOOL_FDISK		MS-DOS partition maintenance program.  [fdisk]
15431.236Sapb
15441.236SapbTOOL_FGEN		IEEE 1275 Open Firmware FCode Tokenizer.  [fgen]
15451.236Sapb
15461.236SapbTOOL_GENASSYM		Generate constants for assembly files.  [genassym]
15471.236Sapb
15481.236SapbTOOL_GENCAT		Generate NLS message catalogs.  [gencat]
15491.236Sapb
15501.236SapbTOOL_GMAKE		GNU make utility.  [gmake]
15511.236Sapb
15521.247SsketchTOOL_GREP		Print lines matching a pattern.  [grep]
15531.247Ssketch
15541.236SapbTOOL_GROFF		Front end for groff document formatting system.  [groff]
15551.236Sapb
15561.327SapbTOOL_GZIP		Compression/decompression tool.  [gzip]
15571.327Sapb
15581.335SapbTOOL_GZIP_N		Same as TOOL_GZIP, plus a command line option to
15591.335Sapb			prevent it from inserting file names or timestamps
15601.335Sapb			into the compressed output.
15611.335Sapb			[${TOOL_GZIP} ${GZIP_N_FLAG}]
15621.335Sapb
15631.236SapbTOOL_HEXDUMP		Ascii, decimal, hexadecimal, octal dump.  [hexdump]
15641.236Sapb
15651.236SapbTOOL_HP300MKBOOT	Make bootable image for hp300.  [hp300-mkboot]
15661.236Sapb
15671.328SskrllTOOL_HPPAMKBOOT		Make bootable image for hppa.  [hppa-mkboot]
15681.236Sapb
15691.236SapbTOOL_INDXBIB		Make bibliographic database's inverted index.  [indxbib]
15701.236Sapb
15711.236SapbTOOL_INSTALLBOOT	Install disk bootstrap software.  [installboot]
15721.236Sapb
15731.236SapbTOOL_INSTALL_INFO	Update info/dir entries.  [install-info]
15741.236Sapb
15751.236SapbTOOL_JOIN		Relational database operator.  [join]
15761.236Sapb
15771.236SapbTOOL_M4			M4 macro language processor.  [m4]
15781.236Sapb
15791.387SchristosTOOL_M68KELF2AOUT	ELF to a.out executable converter [m68k-elf2aout}
15801.387Schristos
15811.236SapbTOOL_MACPPCFIXCOFF	Fix up xcoff headers for macppc.  [macppc-fixcoff]
15821.236Sapb
15831.236SapbTOOL_MAKEFS		Create file system image from directory tree.  [makefs]
15841.236Sapb
15851.236SapbTOOL_MAKEINFO		Translate Texinfo documents.  [makeinfo]
15861.236Sapb
15871.236SapbTOOL_MAKEWHATIS		Create a whatis.db database.  [makewhatis]
15881.236Sapb
15891.236SapbTOOL_MDSETIMAGE		Set kernel RAM disk image.  [mdsetimage]
15901.236Sapb
15911.236SapbTOOL_MENUC		Menu compiler.  [menuc]
15921.236Sapb
15931.236SapbTOOL_MIPSELF2ECOFF	Convert ELF-format executable to ECOFF for mips.
15941.236Sapb			[mips-elf2ecoff]
15951.236Sapb
15961.236SapbTOOL_MKCSMAPPER		Make charset mapping table.  [mkcsmapper]
15971.236Sapb
15981.236SapbTOOL_MKESDB		Make encoding scheme database.  [mkesdb]
15991.236Sapb
16001.236SapbTOOL_MKLOCALE		Make LC_CTYPE locale files.  [mklocale]
16011.236Sapb
16021.236SapbTOOL_MKMAGIC		Create database for file(1).  [file]
16031.236Sapb
16041.311SjmcneillTOOL_MKNOD		Make device special file.  [mknod]
16051.311Sjmcneill
16061.236SapbTOOL_MKTEMP		Make (unique) temporary file name.  [mktemp]
16071.236Sapb
16081.236SapbTOOL_MSGC		Simple message list compiler.  [msgc]
16091.236Sapb
16101.236SapbTOOL_MTREE		Map a directory hierarchy.  [mtree]
16111.236Sapb
16121.332SphxTOOL_NCDCS		Turn ELF kernel into a NCD firmware image. [ncdcs]
16131.332Sphx
16141.236SapbTOOL_PAX		Manipulate file archives and copy directories.  [pax]
16151.236Sapb
16161.236SapbTOOL_PIC		Compile pictures for groff.  [pic]
16171.236Sapb
16181.273SmrgTOOL_PIGZ		Parallel compressor.  [pigz]
16191.273Smrg
16201.444SlukemTOOL_POWERPCMKBOOTIMAGE Make bootable image for powerpc.  [powerpc-mkbootimage]
16211.236Sapb
16221.236SapbTOOL_PWD_MKDB		Generate the password databases.  [pwd_mkdb]
16231.236Sapb
16241.236SapbTOOL_REFER		Preprocess bibliographic references for groff.  [refer]
16251.236Sapb
16261.236SapbTOOL_ROFF_ASCII		Generate ASCII groff output.  [nroff]
16271.236Sapb
16281.236SapbTOOL_ROFF_DVI		Generate DVI groff output.  [${TOOL_GROFF} -Tdvi]
16291.236Sapb
16301.236SapbTOOL_ROFF_HTML		Generate HTML groff output.
16311.236Sapb			[${TOOL_GROFF} -Tlatin1 -mdoc2html]
16321.236Sapb
16331.236SapbTOOL_ROFF_PS		Generate PS groff output.  [${TOOL_GROFF} -Tps]
16341.236Sapb
16351.236SapbTOOL_ROFF_RAW		Generate "raw" groff output.  [${TOOL_GROFF} -Z]
16361.236Sapb
16371.236SapbTOOL_RPCGEN		Remote Procedure Call (RPC) protocol compiler.  [rpcgen]
16381.236Sapb
16391.236SapbTOOL_SED		Stream editor.  [sed]
16401.236Sapb
16411.236SapbTOOL_SOELIM		Eliminate .so's from groff input.  [soelim]
16421.236Sapb
16431.236SapbTOOL_SPARKCRC		Generate a crc suitable for use in a sparkive file.
16441.236Sapb			[sparkcrc]
16451.236Sapb
16461.236SapbTOOL_STAT		Display file status.  [stat]
16471.236Sapb
16481.236SapbTOOL_STRFILE		Create a random access file for storing strings.
16491.236Sapb			[strfile]
16501.236Sapb
16511.236SapbTOOL_SUNLABEL		Read or modify a SunOS disk label.  [sunlabel]
16521.236Sapb
16531.236SapbTOOL_TBL		Format tables for groff.  [tbl]
16541.236Sapb
16551.236SapbTOOL_UUDECODE		Uudecode a binary file.  [uudecode]
16561.236Sapb
16571.236SapbTOOL_VGRIND		Grind nice listings of programs.  [vgrind -f]
16581.236Sapb
16591.236SapbTOOL_ZIC		Time zone compiler.  [zic]
16601.236Sapb
16611.323SmattFor each possible value of MACHINE_CPU, MACHINES.${MACHINE_CPU} contain a
16621.323Smattlist of what ports can be built for it.  This keeps those definitions in
16631.323Smattcentralized place.
16641.323Smatt
16651.134Slukem<bsd.own.mk> is generally useful when building your own Makefiles so that
16661.1Scgdthey use the same default owners etc. as the rest of the tree.
16671.131Slukem
16681.131Slukem
16691.286Sapb=-=-=-=-=   bsd.clean.mk   =-=-=-=-=
16701.286Sapb
16711.286SapbThe include file <bsd.clean.mk> defines the clean and cleandir
16721.286Sapbtargets.  It uses the following variables:
16731.286Sapb
16741.286SapbCLEANFILES	Files to remove for both the clean and cleandir targets.
16751.286Sapb
16761.286SapbCLEANDIRFILES	Files to remove for the cleandir target, but not for
16771.286Sapb		the clean target.
16781.286Sapb
16791.287SapbMKCLEANSRC	Controls whether or not the clean and cleandir targets
16801.287Sapb		will delete files from both the object directory,
16811.287Sapb		${.OBJDIR}, and the source directory, ${.CURDIR}.
16821.287Sapb
16831.287Sapb		If MKCLEANSRC is set to "no", then the file names in
16841.287Sapb		CLEANFILES or CLEANDIRFILES are interpreted relative
16851.287Sapb		to the object directory, ${.OBJDIR}.  This is the
16861.287Sapb		traditional behaviour.
16871.287Sapb
16881.287Sapb		If MKCLEANSRC is set to "yes", then the file deletion
16891.287Sapb		is performed relative to both the object directory,
16901.287Sapb		${.OBJDIR}, and the source directory, ${.CURDIR}.  (This
16911.287Sapb		has no effect if ${.OBJDIR} is the same as ${.CURDIR}.)
16921.287Sapb		Deleting files from ${.CURDIR} is intended to remove
16931.287Sapb		stray output files that had been left in the source
16941.287Sapb		directory by an earlier build that did not use object
16951.287Sapb		directories.
16961.287Sapb
16971.287Sapb		The default is MKCLEANSRC=yes.  If you always build with
16981.287Sapb		separate object directories, and you are sure that there
16991.287Sapb		are no stray files in the source directories, then you
17001.287Sapb		may set MKCLEANSRC=no to save some time.
17011.287Sapb
17021.287SapbMKCLEANVERIFY	Controls whether or not the clean and cleandir targets
17031.287Sapb		will verify that files have been deleted.
17041.287Sapb
17051.287Sapb		If MKCLEANVERIFY is set to "no", then the files will
17061.287Sapb		be deleted using a "rm -f" command, and its success or
17071.287Sapb		failure will be ignored.
17081.287Sapb
17091.287Sapb		If MKCLEANVERIFY is set to "yes", then the success of
17101.287Sapb		the "rm -f" command will be verified using an "ls"
17111.287Sapb		command.
17121.287Sapb
17131.287Sapb		The default is MKCLEANVERIFY=yes.  If you are sure that
17141.287Sapb		there will be no problems caused by file permissions,
17151.287Sapb		read-only file systems, or the like, then you may set
17161.287Sapb		MKCLEANVERIFY=no to save some time.
17171.286Sapb
17181.286SapbTo use the clean and cleandir targets defined in <bsd.clean.mk>, other
17191.286SapbMakefiles or bsd.*.mk files should append file names to the CLEANFILES
17201.286Sapbor CLEANDIRFILES variables.  For example:
17211.286Sapb
17221.286Sapb	    CLEANFILES+= a.out
17231.286Sapb	    CLEANDIRFILES+= .depend
17241.286Sapb
17251.286Sapb	    .include <bsd.clean.mk>
17261.286Sapb
17271.308SapbThe files listed in CLEANFILES and CLEANDIRFILES must not be
17281.308Sapbdirectories, because the potential risk from running "rm -rf" commands
17291.308Sapbin bsd.clean.mk is considered too great.  If you want to recursively
17301.308Sapbdelete a directory as part of "make clean" or "make cleandir" then you
17311.308Sapbneed to provide your own target.
17321.286Sapb
17331.131Slukem=-=-=-=-=   bsd.dep.mk   =-=-=-=-=
17341.131Slukem
17351.131SlukemThe include file <bsd.dep.mk> contains the default targets for building
17361.133Slukem.depend files.  It creates .d files from entries in SRCS and DPSRCS
17371.133Slukemthat are C, C++, or Objective C source files, and builds .depend from the
17381.133Slukem.d files.  All other files in SRCS and all of DPSRCS will be used as
17391.133Slukemdependencies for the .d files.  In order for this to function correctly,
17401.132Slukemit should be .included after all other .mk files and directives that may
17411.132Slukemmodify SRCS or DPSRCS.  It uses the following variables:
17421.132Slukem
17431.132SlukemSRCS		List of source files to build the program.
17441.132Slukem
17451.132SlukemDPSRCS		List of source files which are needed for generating
17461.132Slukem		dependencies, but are not needed in ${SRCS}.
17471.1Scgd
17481.444SlukemNODPSRCS	TODO
17491.1Scgd
17501.118Slukem=-=-=-=-=   bsd.files.mk   =-=-=-=-=
17511.106Sthorpej
17521.118SlukemThe include file <bsd.files.mk> handles the FILES variables and is included
17531.134Slukemfrom <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables:
17541.124Slukem
17551.124SlukemFILES		The list of files to install.
17561.124Slukem
17571.153SlukemCONFIGFILES	Similar semantics to FILES, except that the files
17581.153Slukem		are installed by the `configinstall' target,
17591.153Slukem		not the `install' target.
17601.153Slukem		The FILES* variables documented below also apply.
17611.153Slukem
17621.124SlukemFILESOWN	File owner.  [${BINOWN}]
17631.124Slukem
17641.124SlukemFILESGRP	File group.  [${BINGRP}]
17651.124Slukem
17661.203SdhollandFILESMODE	File mode.  [${NONBINMODE}]
17671.124Slukem
17681.124SlukemFILESDIR	The location to install the files.
17691.124Slukem
17701.124SlukemFILESNAME	Optional name to install each file as.
17711.124Slukem
17721.153SlukemFILESOWN_<fn>	File owner of the specific file <fn>.
17731.153Slukem
17741.153SlukemFILESGRP_<fn>	File group of the specific file <fn>.
17751.153Slukem
17761.153SlukemFILESMODE_<fn>	File mode of the specific file <fn>.
17771.153Slukem
17781.202SuweFILESDIR_<fn>	The location to install the specific file <fn>.
17791.153Slukem
17801.153SlukemFILESNAME_<fn>	Optional name to install <fn> as.
17811.124Slukem
17821.285SapbFILESBUILD	If this variable is defined, then its value will be
17831.285Sapb		used as the default for all FILESBUILD_<fn> variables.
17841.285Sapb		Otherwise, the default will be "no".
17851.285Sapb
17861.444SlukemFILESBUILD_<fn> A value different from "no" will add the file to the list of
17871.243Scube		targets to be built by `realall'.  Users of that variable
17881.243Scube		should provide a target to build the file.
17891.243Scube
17901.135Slukem
17911.139SlukemBUILDSYMLINKS	List of two word items:
17921.135Slukem			lnsrc lntgt
17931.135Slukem		For each lnsrc item, create a symlink named lntgt.
17941.135Slukem		The lntgt symlinks are removed by the cleandir target.
17951.106Sthorpej
17961.148SjmcUUDECODE_FILES	List of files which are stored as <file>.uue in the source
17971.148Sjmc		tree. Each one will be decoded with ${TOOL_UUDECODE}.
17981.301Sabs		The source files have a `.uue' suffix, the generated files do
17991.148Sjmc		not.
18001.149Sjmc
18011.202SuweUUDECODE_FILES_RENAME_<fn>
18021.202Suwe		Rename the output from the decode to the provided name.
18031.382Schristos
18041.148Sjmc		*NOTE: These files are simply decoded, with no install or other
18051.148Sjmc		       rule applying implicitly except being added to the clean
18061.148Sjmc		       target.
18071.106Sthorpej
18081.118Slukem=-=-=-=-=   bsd.gcc.mk   =-=-=-=-=
18091.113Sthorpej
18101.113SthorpejThe include file <bsd.gcc.mk> computes various parameters related to GCC
18111.113Sthorpejsupport libraries.  It defines no targets.  <bsd.own.mk> MUST be included
18121.134Slukembefore <bsd.gcc.mk>.
18131.113Sthorpej
18141.134SlukemThe primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each
18151.113Sthorpejof which need to know where to find certain GCC support libraries.
18161.113Sthorpej
18171.134SlukemThe behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable,
18181.113Sthorpejwhich is generally set by the user.  If EXTERNAL_TOOLCHAIN it set, then
18191.113Sthorpejthe compiler is asked where to find the support libraries, otherwise the
18201.113Sthorpejsupport libraries are found in ${DESTDIR}/usr/lib.
18211.113Sthorpej
18221.134Slukem<bsd.gcc.mk> sets the following variables:
18231.113Sthorpej
18241.118Slukem_GCC_CRTBEGIN	The full path name to crtbegin.o.
18251.118Slukem
18261.118Slukem_GCC_CRTBEGINS	The full path name to crtbeginS.o.
18271.118Slukem
18281.118Slukem_GCC_CRTEND	The full path name to crtend.o.
18291.118Slukem
18301.118Slukem_GCC_CRTENDS	The full path name to crtendS.o.
18311.118Slukem
18321.118Slukem_GCC_LIBGCCDIR	The directory where libgcc.a is located.
18331.118Slukem
18341.118Slukem
18351.118Slukem=-=-=-=-=   bsd.inc.mk   =-=-=-=-=
18361.118Slukem
18371.134SlukemThe include file <bsd.inc.mk> defines the includes target and uses the
18381.118Slukemvariables:
18391.118Slukem
18401.124SlukemINCS		The list of include files.
18411.118Slukem
18421.118SlukemINCSDIR		The location to install the include files.
18431.118Slukem
18441.118SlukemINCSNAME	Target name of the include file, if only one; same as
18451.118Slukem		FILESNAME, but for include files.
18461.118Slukem
18471.134SlukemINCSYMLINKS	Similar to SYMLINKS in <bsd.links.mk>, except that these
18481.134Slukem		are installed in the 'includes' target and not the
18491.134Slukem		(much later) 'install' target.
18501.134Slukem
18511.444SlukemINCSNAME_<file> The name file <file> should be installed as, if not <file>,
18521.118Slukem		same as FILESNAME_<file>, but for include files.
18531.118Slukem
18541.118Slukem
18551.118Slukem=-=-=-=-=   bsd.info.mk   =-=-=-=-=
18561.118Slukem
18571.118SlukemThe include file <bsd.info.mk> is used to generate and install GNU Info
18581.118Slukemdocumentation from respective Texinfo source files.  It defines three
18591.118Slukemimplicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
18601.118Slukemfollowing variables:
18611.118Slukem
18621.118SlukemTEXINFO		List of Texinfo source files.  Info documentation will
18631.118Slukem		consist of single files with the extension replaced by
18641.118Slukem		.info.
18651.118Slukem
18661.118SlukemINFOFLAGS	Flags to pass to makeinfo.  []
18671.118Slukem
18681.118Slukem
18691.118Slukem=-=-=-=-=   bsd.kernobj.mk   =-=-=-=-=
18701.118Slukem
18711.118SlukemThe include file <bsd.kernobj.mk> defines variables related to the
18721.118Slukemlocation of kernel sources and object directories.
18731.118Slukem
18741.118SlukemKERNSRCDIR	Is the location of the top of the kernel src.
18751.124Slukem		[${_SRC_TOP_}/sys]
18761.118Slukem
18771.124SlukemKERNARCHDIR	Is the location of the machine dependent kernel sources.
18781.124Slukem		[arch/${MACHINE}]
18791.120Slukem
18801.124SlukemKERNCONFDIR	Is where the configuration files for kernels are found.
18811.124Slukem		[${KERNSRCDIR}/${KERNARCHDIR}/conf]
18821.118Slukem
18831.118SlukemKERNOBJDIR	Is the kernel build directory.  The kernel GENERIC for
18841.118Slukem		instance will be compiled in ${KERNOBJDIR}/GENERIC.
18851.118Slukem		The default value is
18861.118Slukem		${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
18871.118Slukem		if it exists or the target 'obj' is being made.
18881.118Slukem		Otherwise the default is
18891.118Slukem		${KERNSRCDIR}/${KERNARCHDIR}/compile.
18901.118Slukem
18911.118SlukemIt is important that Makefiles (such as those under src/distrib) that
18921.134Slukemwish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR}
18931.118Slukemrather than make assumptions about the location of the compiled kernel.
18941.118Slukem
18951.118Slukem
18961.118Slukem=-=-=-=-=   bsd.kinc.mk   =-=-=-=-=
18971.118Slukem
18981.118SlukemThe include file <bsd.kinc.mk> defines the many targets (includes,
18991.118Slukemsubdirectories, etc.), and is used by kernel makefiles to handle
19001.118Slukeminclude file installation.  It is intended to be included alone, by
19011.134Slukemkernel Makefiles.  It uses similar variables to <bsd.inc.mk>.
19021.134SlukemPlease see <bsd.kinc.mk> for more details, and keep the documentation
19031.134Slukemin that file up to date.
19041.118Slukem
19051.325Schristos=-=-=-=-=   bsd.syscall.mk =-=-=-=-=
19061.325Schristos
19071.325SchristosThe include file <bsd.syscall.mk> contains the logic to create syscall
19081.325Schristosfiles for various emulations. It includes <bsd.kinc.mk> to handle the
19091.325Schristosrest of the targets.
19101.118Slukem
19111.118Slukem=-=-=-=-=   bsd.lib.mk   =-=-=-=-=
19121.118Slukem
19131.118SlukemThe include file <bsd.lib.mk> has support for building libraries.  It has
19141.118Slukemthe same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
19151.118Slukemincludes, install, lint, and tags.  Additionally, it has a checkver target
19161.118Slukemwhich checks for installed shared object libraries whose version is greater
19171.118Slukemthat the version of the source. It has a limited number of suffixes,
19181.134Slukemconsistent with the current needs of the BSD tree.  <bsd.lib.mk> includes
19191.118Slukem<bsd.shlib.mk> to get shared library parameters.
19201.118Slukem
19211.118SlukemIt sets/uses the following variables:
19221.118Slukem
19231.118SlukemLIB		The name of the library to build.
19241.118Slukem
19251.118SlukemLIBDIR		Target directory for libraries.
19261.118Slukem
19271.248SperryMKARZERO	Normally, ar(1) sets the timestamps, uid, gid and
19281.248Sperry		permissions in files inside its archives to those of
19291.364Skhorben		the file it was fed. This leads to non-reproducible
19301.324Sapb		builds. If MKARZERO is set to "yes" (default is the
19311.324Sapb		same as MKREPRO, or "no" if MKREPRO is not defined),
19321.248Sperry		then the "D" flag is passed to ar, causing the
19331.248Sperry		timestamp, uid and gid to be zeroed and the file
19341.248Sperry		permissions to be set to 644. This allows .a files
19351.248Sperry		from different builds to be bit identical.
19361.248Sperry
19371.444SlukemSHLIBINSTALLDIR Target directory for shared libraries if ${USE_SHLIBDIR}
19381.300Sjoerg		is not "no".
19391.300Sjoerg
19401.263SabsSHLIB_MAJOR
19411.263SabsSHLIB_MINOR
19421.263SabsSHLIB_TEENY	Major, minor, and teeny version numbers of shared library
19431.263Sabs
19441.300SjoergUSE_SHLIBDIR	If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR}
19451.118Slukem		as the path to install shared libraries to.
19461.118Slukem		USE_SHLIBDIR must be defined before <bsd.own.mk> is included.
19471.130Slukem		Default: no
19481.118Slukem
19491.218SlukemLIBISMODULE	If not "no", install as ${LIB}.so (without the "lib" prefix),
19501.423Schristos		and act as "MKDEBUGLIB=no MKPICINSTALL=no MKPROFILE=no
19511.423Schristos		MKSTATICLIB=no". Also do not install the lint library.
19521.218Slukem		Default: no
19531.218Slukem
19541.423SchristosLIBISPRIVATE	If not "no", act as "MKDEBUGLIB=no MKPIC=no MKPROFILE=no",
19551.423Schristos		and don't install the (.a) library or the lint library.
19561.154Slukem		This is useful for "build only" helper libraries.
19571.406Schristos		If set to "pic", then a _pic.a library is also produced,
19581.406Schristos		so that it can be incorporated into other shared objects.
19591.154Slukem		Default: no
19601.154Slukem
19611.244SmrgLIBISCXX	If not "no", Use ${CXX} instead of ${CC} to link
19621.244Smrg		shared libraries.
19631.244Smrg		This is useful for C++ libraries.
19641.244Smrg		Default: no
19651.244Smrg
19661.118SlukemLINTLIBDIR	Target directory for lint libraries.
19671.118Slukem
19681.118SlukemLIBGRP		Library group.
19691.118Slukem
19701.118SlukemLIBOWN		Library owner.
19711.118Slukem
19721.118SlukemLIBMODE		Library mode.
19731.118Slukem
19741.118SlukemLDADD		Additional loader objects.
19751.118Slukem
19761.118SlukemMAN		The manual pages to be installed (use a .1 - .9 suffix).
19771.118Slukem
19781.118SlukemNOCHECKVER_<library>
19791.118SlukemNOCHECKVER	If set, disables checking for installed shared object
19801.118Slukem		libraries with versions greater than the source.  A
19811.118Slukem		particular library name, without the "lib" prefix, may
19821.118Slukem		be appended to the variable name to disable the check for
19831.118Slukem		only that library.
19841.118Slukem
19851.118SlukemSRCS		List of source files to build the library.  Suffix types
19861.118Slukem		.s, .c, and .f are supported.  Note, .s files are preferred
19871.118Slukem		to .c files of the same name.  (This is not the default for
19881.118Slukem		versions of make.)
19891.118Slukem
19901.383SchristosLIBDPLIBS/
19911.383SchristosPROGDPLIBS	A list of the tuples:
19921.444Slukem			libname	 path-to-srcdir-of-libname
19931.157Slukem
19941.384Schristos		Instead of depending on installed versions of the libraries,
19951.384Schristos		one can depend on their built version in the source directory.
19961.384Schristos		This is useful for finding private libraries (LIBISPRIVATE).
19971.384Schristos
19981.157Slukem		For each tuple;
19991.157Slukem		     *	LIBDO.libname contains the .OBJDIR of the library
20001.157Slukem			`libname', and if it is not set it is determined
20011.157Slukem			from the srcdir and added to MAKEOVERRIDES (the
20021.157Slukem			latter is to allow for build time optimization).
20031.157Slukem		     *	LDADD gets  -L${LIBDO.libname} -llibname    added.
20041.157Slukem		     *	DPADD gets  ${LIBDO.libname}/liblibname.so  or
20051.157Slukem				    ${LIBDO.libname}/liblibname.a   added.
20061.157Slukem
20071.307Spooka		The special value "_external" for LIBDO.lib makes the
20081.307Spooka		build system to assume the library comes from outside
20091.307Spooka		of the NetBSD source tree and only causes -llibname
20101.307Spooka		to be added to LDADD.
20111.307Spooka
20121.383Schristos		This variable may be used for individual libraries/programs,
20131.383Schristos		as well as in parent directories to cache common libraries
20141.157Slukem		as a build-time optimization.
20151.157Slukem
20161.118SlukemThe include file <bsd.lib.mk> includes the file named "../Makefile.inc"
20171.118Slukemif it exists, as well as the include file <bsd.man.mk>.
20181.118Slukem
20191.118SlukemIt has rules for building profiled objects; profiled libraries are
20201.118Slukembuilt by default.
20211.118Slukem
20221.118SlukemLibraries are ranlib'd when made.
20231.118Slukem
20241.118Slukem
20251.118Slukem=-=-=-=-=   bsd.links.mk   =-=-=-=-=
20261.118Slukem
20271.118SlukemThe include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
20281.424Smsaitohand is included from <bsd.lib.mk> and <bsd.prog.mk>.
20291.134Slukem
20301.249SapbLINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log
20311.249Sapbis used. The defaults may be modified by other bsd.*.mk files which
20321.249Sapbinclude bsd.links.mk.  In the future, these variables may be replaced
20331.249Sapbby a method for explicitly recording hard links in a metadata log.
20341.249Sapb
20351.134SlukemLINKS		The list of hard links, consisting of pairs of paths:
20361.134Slukem			source-file target-file
20371.134Slukem		${DESTDIR} is prepended to both paths before linking.
20381.134Slukem		For example, to link /bin/test and /bin/[, use:
20391.134Slukem			LINKS=/bin/test /bin/[
20401.134Slukem
20411.153SlukemCONFIGLINKS	Similar semantics to LINKS, except that the links
20421.153Slukem		are installed by the `configinstall' target,
20431.153Slukem		not the `install' target.
20441.153Slukem
20451.134SlukemSYMLINKS	The list of symbolic links, consisting of pairs of paths:
20461.134Slukem			source-file target-file
20471.134Slukem		${DESTDIR} is only prepended to target-file before linking.
20481.134Slukem		For example, to symlink /usr/bin/tar to /bin/tar resulting
20491.134Slukem		in ${DESTDIR}/usr/bin/tar -> /bin/tar:
20501.134Slukem			SYMLINKS=/bin/tar /usr/bin/tar
20511.118Slukem
20521.153SlukemCONFIGSYMLINKS	Similar semantics to SYMLINKS, except that the symbolic links
20531.153Slukem		are installed by the `configinstall' target,
20541.153Slukem		not the `install' target.
20551.153Slukem
20561.249SapbLINKSOWN	Link owner.  [${BINOWN}]
20571.249Sapb
20581.249SapbLINKSGRP	Link group.  [${BINGRP}]
20591.249Sapb
20601.249SapbLINKSMODE	Link mode.  [${NONBINMODE}]
20611.249Sapb
20621.249SapbLINKSOWN_<fn>	Link owner of the specific file <fn>.
20631.249Sapb
20641.249SapbLINKSGRP_<fn>	Link group of the specific file <fn>.
20651.249Sapb
20661.249SapbLINKSMODE_<fn>	Link mode of the specific file <fn>.
20671.249Sapb
20681.118Slukem
20691.118Slukem=-=-=-=-=   bsd.man.mk   =-=-=-=-=
20701.118Slukem
20711.118SlukemThe include file <bsd.man.mk> handles installing manual pages and their
20721.118Slukemlinks.
20731.118Slukem
20741.222SlukemIt has a three targets:
20751.118Slukem
20761.415Skamil	catinstall:
20771.415Skamil		Install the preformatted manual pages and their links.
20781.222Slukem	htmlinstall:
20791.222Slukem		Install the HTML manual pages and their links.
20801.118Slukem	maninstall:
20811.118Slukem		Install the manual page sources and their links.
20821.118Slukem
20831.118SlukemIt sets/uses the following variables:
20841.118Slukem
20851.118SlukemMANDIR		Base path for manual installation.
20861.118Slukem
20871.118SlukemMANGRP		Manual group.
20881.118Slukem
20891.118SlukemMANOWN		Manual owner.
20901.118Slukem
20911.118SlukemMANMODE		Manual mode.
20921.118Slukem
20931.118SlukemMANSUBDIR	Subdirectory under the manual page section, i.e. "/vax"
20941.118Slukem		or "/tahoe" for machine specific manual pages.
20951.118Slukem
20961.118SlukemMAN		The manual pages to be installed (use a .1 - .9 suffix).
20971.118Slukem
20981.118SlukemMLINKS		List of manual page links (using a .1 - .9 suffix).  The
20991.118Slukem		linked-to file must come first, the linked file second,
21001.276Sreed		and there may be multiple pairs.
21011.118Slukem
21021.118SlukemThe include file <bsd.man.mk> includes a file named "../Makefile.inc" if
21031.118Slukemit exists.
21041.118Slukem
21051.118Slukem
21061.118Slukem=-=-=-=-=   bsd.obj.mk   =-=-=-=-=
21071.118Slukem
21081.118SlukemThe include file <bsd.obj.mk> defines targets related to the creation
21091.118Slukemand use of separated object and source directories.
21101.118Slukem
21111.118SlukemIf an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
21121.118Slukem${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
21131.118Slukemit exists.  Otherwise make(1) looks for the existence of a
21141.118Slukemsubdirectory (or a symlink to a directory) of the source directory
21151.118Slukeminto which built targets should be placed.  If an environment variable
21161.118Slukemnamed MAKEOBJDIR is set, make(1) uses its value as the name of the
21171.118Slukemobject directory; failing that, make first looks for a subdirectory
21181.118Slukemnamed "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
21191.118Slukem
21201.118SlukemObject directories are not created automatically by make(1) if they
21211.118Slukemdon't exist; you need to run a separate "make obj".  (This will happen
21221.118Slukemduring a top-level build if "MKOBJDIRS" is set to a value other than
21231.118Slukem"no").  When the source directory is a subdirectory of ${BSDSRCDIR} --
21241.118Slukemand this is determined by a simple string prefix comparison -- object
21251.118Slukemdirectories are created in a separate object directory tree, and a
21261.118Slukemsymlink to the object directory in that tree is created in the source
21271.118Slukemdirectory; otherwise, "make obj" assumes that you're not in the main
21281.118Slukemsource tree and that it's not safe to use a separate object tree.
21291.118Slukem
21301.118SlukemSeveral variables used by <bsd.obj.mk> control exactly what
21311.118Slukemdirectories and links get created during a "make obj":
21321.118Slukem
21331.118SlukemMAKEOBJDIR	If set, this is the component name of the object
21341.118Slukem		directory.
21351.118Slukem
21361.118SlukemOBJMACHINE	If this is set but MAKEOBJDIR is not set, creates
21371.118Slukem		object directories or links named "obj.${MACHINE}";
21381.118Slukem		otherwise, just creates ones named "obj".
21391.118Slukem
21401.444SlukemOBJMACHINE_ARCH If set with OBJMACHINE, creates object directories or
21411.409Sjmcneill		links named "obj.${MACHINE}-${MACHINE_ARCH}".
21421.409Sjmcneill
21431.444SlukemUSR_OBJMACHINE	If set, and the current directory is a subdirectory of
21441.118Slukem		${BSDSRCDIR}, create object directory in the
21451.118Slukem		corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
21461.118Slukem		otherwise, create it in the corresponding subdirectory
21471.118Slukem		of ${BSDOBJDIR}
21481.113Sthorpej
21491.118SlukemBUILDID		If set, the contents of this variable are appended
21501.118Slukem		to the object directory name.  If OBJMACHINE is also
21511.118Slukem		set, ".${BUILDID}" is added after ".${MACHINE}".
21521.113Sthorpej
21531.106Sthorpej
21541.118Slukem=-=-=-=-=   bsd.prog.mk   =-=-=-=-=
21551.106Sthorpej
21561.1ScgdThe include file <bsd.prog.mk> handles building programs from one or
21571.1Scgdmore source files, along with their manual pages.  It has a limited number
21581.301Sabsof suffixes, consistent with the current needs of the BSD tree.
21591.134Slukem<bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters.
21601.1Scgd
21611.16SjtcIt has eight targets:
21621.1Scgd
21631.1Scgd	all:
21641.102Sthorpej		build the program and its manual page.  This also
21651.102Sthorpej		creates a GDB initialization file (.gdbinit) in
21661.102Sthorpej		the objdir.  The .gdbinit file sets the shared library
21671.102Sthorpej		prefix to ${DESTDIR} to facilitate cross-debugging.
21681.1Scgd	clean:
21691.1Scgd		remove the program, any object files and the files a.out,
21701.24Smikel		Errs, errs, mklog, and ${PROG}.core.
21711.1Scgd	cleandir:
21721.1Scgd		remove all of the files removed by the target clean, as
21731.1Scgd		well as .depend, tags, and any manual pages.
21741.42Slukem		`distclean' is a synonym for `cleandir'.
21751.1Scgd	depend:
21761.1Scgd		make the dependencies for the source files, and store
21771.1Scgd		them in the file .depend.
21781.16Sjtc	includes:
21791.16Sjtc		install any header files.
21801.1Scgd	install:
21811.1Scgd		install the program and its manual pages; if the Makefile
21821.1Scgd		does not itself define the target install, the targets
21831.1Scgd		beforeinstall and afterinstall may also be used to cause
21841.1Scgd		actions immediately before and after the install target
21851.1Scgd		is executed.
21861.1Scgd	lint:
21871.1Scgd		run lint on the source files
21881.1Scgd	tags:
21891.1Scgd		create a tags file for the source files.
21901.1Scgd
21911.1ScgdIt sets/uses the following variables:
21921.1Scgd
21931.1ScgdBINGRP		Binary group.
21941.1Scgd
21951.1ScgdBINOWN		Binary owner.
21961.1Scgd
21971.1ScgdBINMODE		Binary mode.
21981.1Scgd
21991.286SapbCLEANDIRFILES	Additional files to remove for the cleandir target.
22001.286Sapb
22011.1ScgdCLEANFILES	Additional files to remove for the clean and cleandir targets.
22021.1Scgd
22031.337SuebayasiCONFIGOPTS	Additional flags to config(1) when building kernels.
22041.337Suebayasi
22051.1ScgdCOPTS		Additional flags to the compiler when creating C objects.
22061.112Sthorpej
22071.125SlukemCOPTS.<fn>	Additional flags to the compiler when creating the
22081.125Slukem		C objects for <fn>.
22091.125Slukem		For <fn>.[ly], "<fn>.c" must be used.
22101.125Slukem
22111.112SthorpejCPUFLAGS	Additional flags to the compiler/assembler to select
22121.112Sthorpej		CPU instruction set options, CPU tuning options, etc.
22131.35Slukem
22141.125SlukemCPUFLAGS.<fn>	Additional flags to the compiler/assembler for <fn>.
22151.125Slukem		For <fn>.[ly], "<fn>.c" must be used.
22161.125Slukem
22171.124SlukemCPPFLAGS	Additional flags to the C pre-processor.
22181.125Slukem
22191.125SlukemCPPFLAGS.<fn>	Additional flags to the C pre-processor for <fn>.
22201.125Slukem		For <fn>.[ly], "<fn>.c" must be used.
22211.102Sthorpej
22221.102SthorpejGDBINIT		List of GDB initialization files to add to "source"
22231.102Sthorpej		directives in the .gdbinit file that is created in the
22241.102Sthorpej		objdir.
22251.1Scgd
22261.1ScgdLDADD		Additional loader objects.  Usually used for libraries.
22271.1Scgd		For example, to load with the compatibility and utility
22281.1Scgd		libraries, use:
22291.1Scgd
22301.5Sjtc			LDADD+=-lutil -lcompat
22311.1Scgd
22321.178SlukemLDFLAGS		Additional linker flags (passed to ${CC} during link).
22331.1Scgd
22341.134SlukemLINKS		See <bsd.links.mk>
22351.134Slukem
22361.177SmrgOBJCOPTS	Additional flags to the compiler when creating ObjC objects.
22371.177Smrg
22381.177SmrgOBJCOPTS.<fn>	Additional flags to the compiler when creating the
22391.177Smrg		ObjC objects for <fn>.
22401.177Smrg		For <fn>.[ly], "<fn>.c" must be used.
22411.177Smrg
22421.134SlukemSYMLINKS	See <bsd.links.mk>
22431.1Scgd
22441.15ScgdMAN		Manual pages (should end in .1 - .9).  If no MAN variable is
22451.8Scgd		defined, "MAN=${PROG}.1" is assumed.
22461.1Scgd
22471.214SwizPAXCTL_FLAGS	If defined, run paxctl(1) on the program binary after link
22481.212Slukem		time, with the value of this variable as args to paxctl(1).
22491.193Sperry
22501.193SperryPAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS.
22511.193Sperry
22521.1ScgdPROG		The name of the program to build.  If not supplied, nothing
22531.1Scgd		is built.
22541.1Scgd
22551.88SthorpejPROG_CXX	If defined, the name of the program to build.  Also
22561.88Sthorpej		causes <bsd.prog.mk> to link the program with the C++
22571.88Sthorpej		compiler rather than the C compiler.  PROG_CXX overrides
22581.88Sthorpej		the value of PROG if PROG is also set.
22591.87Sthorpej
22601.21SchristosPROGNAME	The name that the above program will be installed as, if
22611.21Schristos		different from ${PROG}.
22621.21Schristos
22631.408SlukemPROGS		Multiple programs to build from a single directory.
22641.408Slukem		Defaults to PROG. For each program ${_P} in ${PROGS},
22651.408Slukem		uses SRCS.${_P}, defaulting to ${_P}.c.
22661.408Slukem
22671.408SlukemPROGS_CXX	Multiple C++ programs to build from a single directory.
22681.408Slukem		Defaults to PROG_CXX. For each program ${_P} in ${PROGS_CXX},
22691.408Slukem		uses SRCS.${_P}, defaulting to ${_P}.cc.
22701.408Slukem
22711.37StvSRCS		List of source files to build the program.  If SRCS is not
22721.408Slukem		defined, it's assumed to be ${PROG}.c or ${PROG_CXX}.cc.
22731.108Sjwise
22741.108SjwiseDPSRCS		List of source files which are needed for generating
22751.108Sjwise		dependencies, but are not needed in ${SRCS}.
22761.1Scgd
22771.1ScgdDPADD		Additional dependencies for the program.  Usually used for
22781.1Scgd		libraries.  For example, to depend on the compatibility and
22791.1Scgd		utility libraries use:
22801.1Scgd
22811.5Sjtc			DPADD+=${LIBCOMPAT} ${LIBUTIL}
22821.1Scgd
22831.288Schristos		The following system libraries are predefined for DPADD:
22841.1Scgd
22851.382Schristos		LIBARCHIVE?=		${DESTDIR}/usr/lib/libarchive.a
22861.382Schristos		LIBASN1?=		${DESTDIR}/usr/lib/libasn1.a
22871.382Schristos		LIBATF_C?=		${DESTDIR}/usr/lib/libatf-c.a
22881.382Schristos		LIBATF_CXX?=		${DESTDIR}/usr/lib/libatf-c++.a
22891.382Schristos		LIBBIND9?=		${DESTDIR}/usr/lib/libbind9.a
22901.407Schristos		LIBBLOCKLIST?=		${DESTDIR}/usr/lib/libblocklist.a
22911.382Schristos		LIBBLUETOOTH?=		${DESTDIR}/usr/lib/libbluetooth.a
22921.382Schristos		LIBBSDMALLOC?=		${DESTDIR}/usr/lib/libbsdmalloc.a
22931.382Schristos		LIBBZ2?=		${DESTDIR}/usr/lib/libbz2.a
22941.396Schristos		LIBC?=			${DESTDIR}/usr/lib/libc.a
22951.382Schristos		LIBC_PIC?=		${DESTDIR}/usr/lib/libc_pic.a
22961.398Schristos		LIBCBOR?=		${DESTDIR}/usr/lib/libcbor.a
22971.382Schristos		LIBCOMPAT?=		${DESTDIR}/usr/lib/libcompat.a
22981.382Schristos		LIBCOM_ERR?=		${DESTDIR}/usr/lib/libcom_err.a
22991.382Schristos		LIBCRYPT?=		${DESTDIR}/usr/lib/libcrypt.a
23001.382Schristos		LIBCRYPTO?=		${DESTDIR}/usr/lib/libcrypto.a
23011.382Schristos		LIBCURSES?=		${DESTDIR}/usr/lib/libcurses.a
23021.396Schristos		LIBCXX?=		${DESTDIR}/usr/lib/libc++.a
23031.382Schristos		LIBDES?=		${DESTDIR}/usr/lib/libdes.a
23041.382Schristos		LIBDNS?=		${DESTDIR}/usr/lib/libdns.a
23051.382Schristos		LIBEDIT?=		${DESTDIR}/usr/lib/libedit.a
23061.382Schristos		LIBEVENT?=		${DESTDIR}/usr/lib/libevent.a
23071.315Schristos		LIBEVENT_OPENSSL?=	${DESTDIR}/usr/lib/libevent_openssl.a
23081.315Schristos		LIBEVENT_PTHREADS?=	${DESTDIR}/usr/lib/libevent_pthreads.a
23091.382Schristos		LIBEXECINFO?=		${DESTDIR}/usr/lib/libexecinfo.a
23101.382Schristos		LIBEXPAT?=		${DESTDIR}/usr/lib/libexpat.a
23111.382Schristos		LIBFETCH?=		${DESTDIR}/usr/lib/libfetch.a
23121.398Schristos		LIBFIDO2?=		${DESTDIR}/usr/lib/libfido2.a
23131.382Schristos		LIBFL?=			${DESTDIR}/usr/lib/libfl.a
23141.382Schristos		LIBFORM?=		${DESTDIR}/usr/lib/libform.a
23151.382Schristos		LIBGCC?=		${DESTDIR}/usr/lib/libgcc.a
23161.400Schristos		LIBGNUCTF?=		${DESTDIR}/usr/lib/libgnuctf.a
23171.382Schristos		LIBGNUMALLOC?=		${DESTDIR}/usr/lib/libgnumalloc.a
23181.382Schristos		LIBGSSAPI?=		${DESTDIR}/usr/lib/libgssapi.a
23191.382Schristos		LIBHDB?=		${DESTDIR}/usr/lib/libhdb.a
23201.382Schristos		LIBHEIMBASE?=		${DESTDIR}/usr/lib/libheimbase.a
23211.382Schristos		LIBHEIMNTLM?=		${DESTDIR}/usr/lib/libheimntlm.a
23221.382Schristos		LIBHX500?=		${DESTDIR}/usr/lib/libhx500.a
23231.382Schristos		LIBINTL?=		${DESTDIR}/usr/lib/libintl.a
23241.382Schristos		LIBIPSEC?=		${DESTDIR}/usr/lib/libipsec.a
23251.382Schristos		LIBISC?=		${DESTDIR}/usr/lib/libisc.a
23261.382Schristos		LIBISCCC?=		${DESTDIR}/usr/lib/libisccc.a
23271.382Schristos		LIBISCFG?=		${DESTDIR}/usr/lib/libiscfg.a
23281.382Schristos		LIBKADM5CLNT?=		${DESTDIR}/usr/lib/libkadm5clnt.a
23291.382Schristos		LIBKADM5SRV?=		${DESTDIR}/usr/lib/libkadm5srv.a
23301.382Schristos		LIBKAFS?=		${DESTDIR}/usr/lib/libkafs.a
23311.382Schristos		LIBKRB5?=		${DESTDIR}/usr/lib/libkrb5.a
23321.382Schristos		LIBKVM?=		${DESTDIR}/usr/lib/libkvm.a
23331.382Schristos		LIBL?=			${DESTDIR}/usr/lib/libl.a
23341.382Schristos		LIBLBER?=		${DESTDIR}/usr/lib/liblber.a
23351.382Schristos		LIBLDAP?=		${DESTDIR}/usr/lib/libldap.a
23361.382Schristos		LIBLDAP_R?=		${DESTDIR}/usr/lib/libldap_r.a
23371.382Schristos		LIBLUA?=		${DESTDIR}/usr/lib/liblua.a
23381.382Schristos		LIBM?=			${DESTDIR}/usr/lib/libm.a
23391.382Schristos		LIBMAGIC?=		${DESTDIR}/usr/lib/libmagic.a
23401.382Schristos		LIBMENU?=		${DESTDIR}/usr/lib/libmenu.a
23411.382Schristos		LIBNETPGPVERIFY?=	${DESTDIR}/usr/lib/libnetpgpverify.a
23421.382Schristos		LIBNS?=			${DESTDIR}/usr/lib/libns.a
23431.382Schristos		LIBOBJC?=		${DESTDIR}/usr/lib/libobjc.a
23441.382Schristos		LIBOSSAUDIO?=		${DESTDIR}/usr/lib/libossaudio.a
23451.382Schristos		LIBPAM?=		${DESTDIR}/usr/lib/libpam.a
23461.382Schristos		LIBPANEL?=		${DESTDIR}/usr/lib/libpanel.a
23471.382Schristos		LIBPCAP?=		${DESTDIR}/usr/lib/libpcap.a
23481.382Schristos		LIBPCI?=		${DESTDIR}/usr/lib/libpci.a
23491.382Schristos		LIBPOSIX?=		${DESTDIR}/usr/lib/libposix.a
23501.382Schristos		LIBPTHREAD?=		${DESTDIR}/usr/lib/libpthread.a
23511.382Schristos		LIBPUFFS?=		${DESTDIR}/usr/lib/libpuffs.a
23521.382Schristos		LIBQUOTA?=		${DESTDIR}/usr/lib/libquota.a
23531.382Schristos		LIBRADIUS?=		${DESTDIR}/usr/lib/libradius.a
23541.382Schristos		LIBREFUSE?=		${DESTDIR}/usr/lib/librefuse.a
23551.382Schristos		LIBRESOLV?=		${DESTDIR}/usr/lib/libresolv.a
23561.382Schristos		LIBRMT?=		${DESTDIR}/usr/lib/librmt.a
23571.382Schristos		LIBROKEN?=		${DESTDIR}/usr/lib/libroken.a
23581.382Schristos		LIBRPCSVC?=		${DESTDIR}/usr/lib/librpcsvc.a
23591.382Schristos		LIBRT?=			${DESTDIR}/usr/lib/librt.a
23601.382Schristos		LIBRUMP?=		${DESTDIR}/usr/lib/librump.a
23611.396Schristos		LIBRUMPFS_CD9660?=	${DESTDIR}/usr/lib/librumpfs_cd9660.a
23621.382Schristos		LIBRUMPFS_EFS?=		${DESTDIR}/usr/lib/librumpfs_efs.a
23631.382Schristos		LIBRUMPFS_EXT2FS?=	${DESTDIR}/usr/lib/librumpfs_ext2fs.a
23641.382Schristos		LIBRUMPFS_FFS?=		${DESTDIR}/usr/lib/librumpfs_ffs.a
23651.382Schristos		LIBRUMPFS_HFS?=		${DESTDIR}/usr/lib/librumpfs_hfs.a
23661.382Schristos		LIBRUMPFS_LFS?=		${DESTDIR}/usr/lib/librumpfs_lfs.a
23671.396Schristos		LIBRUMPFS_MSDOS?=	${DESTDIR}/usr/lib/librumpfs_msdos.a
23681.382Schristos		LIBRUMPFS_NFS?=		${DESTDIR}/usr/lib/librumpfs_nfs.a
23691.382Schristos		LIBRUMPFS_NTFS?=	${DESTDIR}/usr/lib/librumpfs_ntfs.a
23701.382Schristos		LIBRUMPFS_SYSPUFFS?=	${DESTDIR}/usr/lib/librumpfs_syspuffs.a
23711.382Schristos		LIBRUMPFS_TMPFS?=	${DESTDIR}/usr/lib/librumpfs_tmpfs.a
23721.382Schristos		LIBRUMPFS_UDF?=		${DESTDIR}/usr/lib/librumpfs_udf.a
23731.382Schristos		LIBRUMPUSER?=		${DESTDIR}/usr/lib/librumpuser.a
23741.382Schristos		LIBSASLC?=		${DESTDIR}/usr/lib/libsaslc.a
23751.382Schristos		LIBSKEY?=		${DESTDIR}/usr/lib/libskey.a
23761.382Schristos		LIBSL?=			${DESTDIR}/usr/lib/libsl.a
23771.382Schristos		LIBSQLITE3?=		${DESTDIR}/usr/lib/libsqlite3.a
23781.382Schristos		LIBSSH?=		${DESTDIR}/usr/lib/libssh.a
23791.382Schristos		LIBSSL?=		${DESTDIR}/usr/lib/libssl.a
23801.382Schristos		LIBSTDCXX?=		${DESTDIR}/usr/lib/libstdc++.a
23811.382Schristos		LIBSUPCXX?=		${DESTDIR}/usr/lib/libsupc++.a
23821.382Schristos		LIBTERMINFO?=		${DESTDIR}/usr/lib/libterminfo.a
23831.382Schristos		LIBTRE?=		${DESTDIR}/usr/lib/libtre.a
23841.382Schristos		LIBUNBOUND?=		${DESTDIR}/usr/lib/libunbound.a
23851.382Schristos		LIBUSBHID?=		${DESTDIR}/usr/lib/libusbhid.a
23861.382Schristos		LIBUTIL?=		${DESTDIR}/usr/lib/libutil.a
23871.382Schristos		LIBWIND?=		${DESTDIR}/usr/lib/libwind.a
23881.382Schristos		LIBWRAP?=		${DESTDIR}/usr/lib/libwrap.a
23891.382Schristos		LIBY?=			${DESTDIR}/usr/lib/liby.a
23901.382Schristos		LIBZ?=			${DESTDIR}/usr/lib/libz.a
23911.382Schristos
23921.382Schristos		The following c startup files.
23931.382Schristos
23941.382Schristos		LIBCRT0?=		${DESTDIR}/usr/lib/crt0.o
23951.382Schristos		LIBCRTI?=		${DESTDIR}/usr/lib/crti.o
23961.382Schristos		LIBCRTBEGIN?=		${DESTDIR}/usr/lib/crti.o
23971.382Schristos		LIBCRTEND?=		${DESTDIR}/usr/lib/crtn.o
23981.1Scgd
23991.288Schristos		The following X-Windows libraries are predefined for DPADD:
24001.288Schristos
24011.394Schristos		LIBDPS?=		${DESTDIR}/usr/X11R7/lib/libdps.a
24021.394Schristos		LIBFNTSTUBS?=		${DESTDIR}/usr/X11R7/lib/libfntstubs.a
24031.394Schristos		LIBFONTCACHE?=		${DESTDIR}/usr/X11R7/lib/libfontcache.a
24041.394Schristos		LIBFONTCONFIG?=		${DESTDIR}/usr/X11R7/lib/libfontconfig.a
24051.394Schristos		LIBFONTENC?=		${DESTDIR}/usr/X11R7/lib/libfontenc.a
24061.394Schristos		LIBFREETYPE?=		${DESTDIR}/usr/X11R7/lib/libfreetype.a
24071.382Schristos		LIBFS?=			${DESTDIR}/usr/X11R7/lib/libFS.a
24081.382Schristos		LIBGL?=			${DESTDIR}/usr/X11R7/lib/libGL.a
24091.382Schristos		LIBGLU?=		${DESTDIR}/usr/X11R7/lib/libGLU.a
24101.382Schristos		LIBICE?=		${DESTDIR}/usr/X11R7/lib/libICE.a
24111.394Schristos		LIBLBXUTIL?=		${DESTDIR}/usr/X11R7/lib/liblbxutil.a
24121.382Schristos		LIBSM?=			${DESTDIR}/usr/X11R7/lib/libSM.a
24131.382Schristos		LIBX11?=		${DESTDIR}/usr/X11R7/lib/libX11.a
24141.382Schristos		LIBX11_XCB?=		${DESTDIR}/usr/X11R7/lib/libX11-xcb.a
24151.382Schristos		LIBXAU?=		${DESTDIR}/usr/X11R7/lib/libXau.a
24161.382Schristos		LIBXAW?=		${DESTDIR}/usr/X11R7/lib/libXaw.a
24171.382Schristos		LIBXCB?=		${DESTDIR}/usr/X11R7/lib/libxcb.a
24181.412Snia		LIBXCOMPOSITE?=		${DESTDIR}/usr/X11R7/lib/libXcomposite.a
24191.440Smrg		LIBXCVT?=		${DESTDIR}/usr/X11R7/lib/libxcvt.a
24201.412Snia		LIBXDAMAGE?=		${DESTDIR}/usr/X11R7/lib/libXdamage.a
24211.382Schristos		LIBXDMCP?=		${DESTDIR}/usr/X11R7/lib/libXdmcp.a
24221.382Schristos		LIBXEXT?=		${DESTDIR}/usr/X11R7/lib/libXext.a
24231.412Snia		LIBXFIXES?=		${DESTDIR}/usr/X11R7/lib/libXfixes.a
24241.394Schristos		LIBXFONT2?=		${DESTDIR}/usr/X11R7/lib/libXfont2.a
24251.382Schristos		LIBXFONT?=		${DESTDIR}/usr/X11R7/lib/libXfont.a
24261.382Schristos		LIBXFT?=		${DESTDIR}/usr/X11R7/lib/libXft.a
24271.382Schristos		LIBXI?=			${DESTDIR}/usr/X11R7/lib/libXi.a
24281.382Schristos		LIBXINERAMA?=		${DESTDIR}/usr/X11R7/lib/libXinerama.a
24291.394Schristos		LIBXKBFILE?=		${DESTDIR}/usr/X11R7/lib/libxkbfile.a
24301.382Schristos		LIBXMU?=		${DESTDIR}/usr/X11R7/lib/libXmu.a
24311.382Schristos		LIBXMUU?=		${DESTDIR}/usr/X11R7/lib/libXmuu.a
24321.382Schristos		LIBXPM?=		${DESTDIR}/usr/X11R7/lib/libXpm.a
24331.382Schristos		LIBXRANDR?=		${DESTDIR}/usr/X11R7/lib/libXrandr.a
24341.382Schristos		LIBXRENDER?=		${DESTDIR}/usr/X11R7/lib/libXrender.a
24351.382Schristos		LIBXSS?=		${DESTDIR}/usr/X11R7/lib/libXss.a
24361.382Schristos		LIBXT?=			${DESTDIR}/usr/X11R7/lib/libXt.a
24371.394Schristos		LIBXTRAP?=		${DESTDIR}/usr/X11R7/lib/libXTrap.a
24381.382Schristos		LIBXTST?=		${DESTDIR}/usr/X11R7/lib/libXtst.a
24391.382Schristos		LIBXV?=			${DESTDIR}/usr/X11R7/lib/libXv.a
24401.382Schristos		LIBXXF86DGA?=		${DESTDIR}/usr/X11R7/lib/libXxf86dga.a
24411.382Schristos		LIBXXF86MISC?=		${DESTDIR}/usr/X11R7/lib/libXxf86misc.a
24421.382Schristos		LIBXXF86VM?=		${DESTDIR}/usr/X11R7/lib/libXxf86vm.a
24431.288Schristos
24441.59SjlamSTRIPFLAG	The flag passed to the install program to cause the binary
24451.1Scgd		to be stripped.
24461.1Scgd
24471.1ScgdSUBDIR		A list of subdirectories that should be built as well.
24481.1Scgd		Each of the targets will execute the same target in the
24491.1Scgd		subdirectories.
24501.1Scgd
24511.21SchristosSCRIPTS		A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
24521.21Schristos		These are installed exactly like programs.
24531.21Schristos
24541.166SrtrSCRIPTSDIR	The location to install the scripts.  Each script can be
24551.166Srtr		installed to a separate path by setting SCRIPTSDIR_<script>.
24561.166Srtr
24571.21SchristosSCRIPTSNAME	The name that the above program will be installed as, if
24581.21Schristos		different from ${SCRIPTS}. These can be further specialized
24591.21Schristos		by setting SCRIPTSNAME_<script>.
24601.21Schristos
24611.124SlukemFILES		See description of <bsd.files.mk>.
24621.21Schristos
24631.106SthorpejSHLINKDIR	Target directory for shared linker.  See description of
24641.106Sthorpej		<bsd.own.mk> for additional information about this variable.
24651.130Slukem
24661.1ScgdThe include file <bsd.prog.mk> includes the file named "../Makefile.inc"
24671.1Scgdif it exists, as well as the include file <bsd.man.mk>.
24681.1Scgd
24691.1ScgdSome simple examples:
24701.1Scgd
24711.1ScgdTo build foo from foo.c with a manual page foo.1, use:
24721.1Scgd
24731.1Scgd	PROG=	foo
24741.1Scgd
24751.1Scgd	.include <bsd.prog.mk>
24761.1Scgd
24771.1ScgdTo build foo from foo.c with a manual page foo.2, add the line:
24781.1Scgd
24791.9Scgd	MAN=	foo.2
24801.1Scgd
24811.1ScgdIf foo does not have a manual page at all, add the line:
24821.1Scgd
24831.75Sagc	MKMAN=	no
24841.1Scgd
24851.1ScgdIf foo has multiple source files, add the line:
24861.1Scgd
24871.1Scgd	SRCS=	a.c b.c c.c d.c
24881.1Scgd
24891.1Scgd
24901.118Slukem=-=-=-=-=   bsd.rpc.mk   =-=-=-=-=
24911.118Slukem
24921.118SlukemThe include file <bsd.rpc.mk> contains a makefile fragment used to
24931.118Slukemconstruct source files built by rpcgen.
24941.72Ssommerfe
24951.118SlukemThe following macros may be defined in makefiles which include
24961.118Slukem<bsd.rpc.mk> in order to control which files get built and how they
24971.118Slukemare to be built:
24981.21Schristos
24991.444SlukemRPC_INCS	construct .h file from .x file
25001.444SlukemRPC_XDRFILES	construct _xdr.c from .x file
25011.118Slukem		(for marshalling/unmarshalling data types)
25021.444SlukemRPC_SVCFILES	construct _svc.c from .x file
25031.118Slukem		(server-side stubs)
25041.444SlukemRPC_SVCFLAGS	Additional flags passed to builds of RPC_SVCFILES.
25051.21Schristos
25061.444SlukemRPC_XDIR	Directory containing .x/.h files
25071.23Schristos
25081.23Schristos
25091.118Slukem=-=-=-=-=   bsd.shlib.mk   =-=-=-=-=
25101.21Schristos
25111.118SlukemThe include file <bsd.shlib.mk> computes parameters for shared library
25121.118Slukeminstallation and use.  It defines no targets.  <bsd.own.mk> MUST be
25131.134Slukemincluded before <bsd.shlib.mk>.
25141.21Schristos
25151.134Slukem<bsd.own.mk> sets the following variables, if they are not already defined
25161.118Slukem(defaults are in brackets):
25171.21Schristos
25181.444SlukemSHLIBINSTALLDIR If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR}
25191.300Sjoerg		instead of ${LIBDIR} as the base path for shared library
25201.300Sjoerg		installation.  [/lib]
25211.300Sjoerg
25221.118SlukemSHLIBDIR	The path to USE_SHLIBDIR shared libraries to use when building
25231.118Slukem		a program.  [/lib for programs in /bin and /sbin, /usr/lib
25241.118Slukem		for all others.]
25251.81Swiz
25261.300Sjoerg_LIBSODIR	Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no",
25271.118Slukem		otherwise set to ${LIBDIR}
25281.81Swiz
25291.300SjoergSHLINKINSTALLDIR Base path for shared linker.  [/libexec]
25301.300Sjoerg
25311.118SlukemSHLINKDIR	Path to use for shared linker when building a program.
25321.118Slukem		[/libexec for programs in /bin and /sbin, /usr/libexec for
25331.118Slukem		all others.]
25341.39Scgd
25351.13Schristos
25361.118Slukem=-=-=-=-=   bsd.subdir.mk   =-=-=-=-=
25371.13Schristos
25381.118SlukemThe include file <bsd.subdir.mk> contains the default targets for building
25391.120Slukemsubdirectories.  It has the same eight targets as <bsd.prog.mk>: all,
25401.233Sapbclean, cleandir, depend, includes, install, lint, and tags.  It uses the
25411.233Sapbfollowing variables:
25421.233Sapb
25431.233SapbNOSUBDIR	If this variable is defined, then the SUBDIR variable
25441.233Sapb		will be ignored and subdirectories will not be processed.
25451.233Sapb
25461.233SapbSUBDIR		For all of the directories listed in ${SUBDIR}, the
25471.233Sapb		specified directory will be visited and the target made.
25481.233Sapb
25491.233Sapb		As a special case, the use of a token .WAIT as an
25501.233Sapb		entry in SUBDIR acts as a synchronization barrier
25511.233Sapb		when multiple make jobs are run; subdirs before the
25521.233Sapb		.WAIT must complete before any subdirs after .WAIT are
25531.233Sapb		started.  See make(1) for some caveats on use of .WAIT
25541.233Sapb		and other special sources.
25551.47Stv
25561.47Stv
25571.326Schristos=-=-=-=-=   bsd.x11.mk   =-=-=-=-=
25581.326Schristos
25591.326SchristosThe include file <bsd.x11.mk> contains parameters and targets for
25601.346Smrgcross-building X11 from ${X11SRCDIR.<package>}.  It should be included
25611.346Smrgafter the general Makefile contents but before the include files such as
25621.346Smrg<bsd.prog.mk> and <bsd.lib.mk>.
25631.326Schristos
25641.326SchristosIt provides the following targets:
25651.326Schristos	.man.1 .man.3 .man.4 .man.5 .man.7:
25661.326Schristos		If ${MAN} or ${PROG} is set and ${MKMAN} != "no",
25671.326Schristos		these rules convert from X11's manual page source
25681.326Schristos		into an mdoc.old source file.
25691.326Schristos
25701.326SchristosIt sets the following variables:
25711.326Schristos
25721.326SchristosBINDIR			Set to ${X11BINDIR}.
25731.326Schristos			To override, define after including <bsd.x11.mk>
25741.326Schristos
25751.326SchristosLIBDIR			Set to ${X11USRLIBDIR}.
25761.326Schristos			To override, define after including <bsd.x11.mk>
25771.326Schristos
25781.326SchristosMANDIR			Set to ${X11MANDIR}.
25791.326Schristos			To override, define after including <bsd.x11.mk>
25801.326Schristos
25811.326SchristosCPPFLAGS		Appended with definitions to include from
25821.326Schristos			${DESTDIR}${X11INCDIR}
25831.326Schristos
25841.326SchristosLDFLAGS			Appended with definitions to link from
25851.326Schristos			${DESTDIR}${X11USRLIBDIR}
25861.326Schristos
25871.326SchristosX11FLAGS.CONNECTION	Equivalent to X11's CONNECTION_FLAGS.
25881.326Schristos
25891.326SchristosX11FLAGS.EXTENSION	Equivalent to X11's EXT_DEFINES.
25901.326Schristos
25911.326SchristosX11FLAGS.LOADABLE	Equivalent to X11's LOADABLE.
25921.326Schristos
25931.326SchristosX11FLAGS.OS_DEFINES	Equivalent to X11's OS_DEFINES.
25941.326Schristos
25951.326SchristosX11FLAGS.SERVER		Equivalent to X11's ServerDefines.
25961.326Schristos
25971.326SchristosX11FLAGS.THREADLIB	Equivalent to X11's THREADS_DEFINES for libraries.
25981.326Schristos
25991.326SchristosX11FLAGS.THREADS	Equivalent to X11's THREADS_DEFINES.
26001.326Schristos
26011.326SchristosX11FLAGS.VERSION	cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION.
26021.326Schristos
26031.326SchristosX11FLAGS.DIX		Equivalent to X11's DIX_DEFINES.
26041.326Schristos
26051.326SchristosX11TOOL_UNXCOMM		Commandline to convert `XCOMM' comments to `#'
26061.326Schristos
26071.326SchristosIt uses the following variables:
26081.326Schristos
26091.326SchristosAPPDEFS			List of app-default files to install.
26101.326Schristos
26111.326SchristosCPPSCRIPTS		List of files/scripts to run through cpp(1)
26121.326Schristos			and then ${X11TOOL_UNXCOMM}.  The source files
26131.326Schristos			have a `.cpp' suffix, the generated files do not.
26141.326Schristos
26151.326SchristosCPPSCRIPTFLAGS		Additional flags to cpp(1) when building CPPSCRIPTS.
26161.326Schristos
26171.326SchristosCPPSCRIPTFLAGS_<fn>	Additional flags to cpp(1) when building CPPSCRIPT <fn>.
26181.326Schristos
26191.326Schristos
26201.326Schristos=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
26211.326Schristos
26221.326SchristosThe following files are described here for completion, but they are not
26231.326Schristossupposed to be included directly from other Makefiles; they are used
26241.326Schristosinternally by other system files.
26251.326Schristos
26261.118Slukem=-=-=-=-=   bsd.sys.mk   =-=-=-=-=
26271.47Stv
26281.326SchristosThe include file <bsd.sys.mk> is used by other system mk files and
26291.326Schristosit is not intended to be included standalone. It contains rules and
26301.326Schristossystem build variables. It requires bsd.own.mk to be included first.
26311.326SchristosIt contains overrides that are used when building the NetBSD source tree.
26321.133Slukem
26331.133SlukemThe following variables control how various files are compiled/built.
26341.142Slukem(Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"):
26351.133Slukem
26361.133SlukemAR		Create, modify, and extract from archives.  [ar]
26371.133Slukem
26381.133SlukemARFLAGS		Options to ${AR}.  [rl]
26391.133Slukem
26401.387SchristosARM_ELF2AOUT	Convert ELF-format executable to a.out.  [elf2aout]
26411.387Schristos
26421.151SlukemAS		Assembler.  [as]
26431.151Slukem
26441.211SlukemAFLAGS		Options to ${CC} when compiling or linking .s or .S
26451.211Slukem		assembly source files.  []
26461.151Slukem
26471.217SjoergBUILDSEED	GCC uses random numbers when compiling C++ code.
26481.217Sjoerg		If this option is present, seed the random number
26491.217Sjoerg		generator based on the value, source file names and
26501.217Sjoerg		the output file name to make builds more deterministic.
26511.217Sjoerg		Additional information is available in the GCC
26521.217Sjoerg		documentation of -frandom-seed.
26531.217Sjoerg
26541.133SlukemCC		C compiler.  [cc]
26551.133Slukem
26561.133SlukemCFLAGS		Options to ${CC}.  [Usually -O or -O2]
26571.133Slukem
26581.133SlukemCPP		C Pre-Processor.  [cpp]
26591.133Slukem
26601.133SlukemCPPFLAGS	Options to ${CPP}.  []
26611.133Slukem
26621.151SlukemCPUFLAGS	Optimization flags for ${CC}.  []
26631.133Slukem
26641.133SlukemCXX		C++ compiler.  [c++]
26651.133Slukem
26661.133SlukemCXXFLAGS	Options to ${CXX}.  [${CFLAGS}]
26671.133Slukem
26681.387SchristosM68K_ELF2AOUT	Convert ELF-format executable to a.out.  [elf2aout]
26691.387Schristos
26701.387SchristosMIPS_ELF2ECOFF	Convert ELF-format executable to ECOFF.  [elf2ecoff]
26711.133Slukem
26721.133SlukemFC		Fortran compiler.  [f77]
26731.133Slukem
26741.133SlukemFFLAGS		Options to {$FC}.  [-O]
26751.133Slukem
26761.444SlukemHOST_SH		Shell.  This must be an absolute path, because it may be
26771.444Slukem		substituted into "#!" lines in scripts.  [/bin/sh]
26781.235Sapb
26791.133SlukemINSTALL		install(1) command.  [install]
26801.133Slukem
26811.133SlukemLEX		Lexical analyzer.  [lex]
26821.133Slukem
26831.133SlukemLFLAGS		Options to ${LEX}.  []
26841.133Slukem
26851.145SjwiseLPREFIX		Symbol prefix for ${LEX} (see -P option in lex(1)) [yy]
26861.145Sjwise
26871.133SlukemLD		Linker.  [ld]
26881.133Slukem
26891.178SlukemLDFLAGS		Options to ${CC} during the link process.  []
26901.133Slukem
26911.133SlukemLINT		C program verifier.  [lint]
26921.133Slukem
26931.390SchristosLINTFLAGS	Options to ${LINT}.  [-chapbrxzgFS]
26941.133Slukem
26951.133SlukemLORDER		List dependencies for object files.  [lorder]
26961.133Slukem
26971.133SlukemMAKE		make(1).  [make]
26981.133Slukem
26991.133SlukemMKDEP		Construct Makefile dependency list.  [mkdep]
27001.133Slukem
27011.321SmrgMKDEPCXX	Construct Makefile dependency list for C++ files.  [mkdep]
27021.321Smrg
27031.133SlukemNM		List symbols from object files.  [nm]
27041.133Slukem
27051.444SlukemPC		Pascal compiler.  [pc]	(Not present)
27061.133Slukem
27071.133SlukemPFLAGS		Options to ${PC}.  []
27081.133Slukem
27091.133SlukemOBJC		Objective C compiler.  [${CC}]
27101.133Slukem
27111.133SlukemOBJCFLAGS	Options to ${OBJC}.  [${CFLAGS}]
27121.133Slukem
27131.133SlukemOBJCOPY		Copy and translate object files.  [objcopy]
27141.133Slukem
27151.444SlukemOBJCOPYLIBFLAGS Flags to pass to objcopy when library objects are
27161.291Schristos		being built. [${.TARGET} =~ "*.po" ? -X : -x]
27171.291Schristos
27181.168SrizOBJDUMP		Display information from object files.  [objdump]
27191.168Sriz
27201.133SlukemRANLIB		Generate index to archive.  [ranlib]
27211.133Slukem
27221.343SpookaREADELF		Display information from ELF object files.  [readelf]
27231.343Spooka
27241.133SlukemSIZE		List section sizes and total size.  [size]
27251.133Slukem
27261.343SpookaSTRINGS		Display printable character sequences in files.  [strings]
27271.343Spooka
27281.133SlukemSTRIP		Discard symbols from object files.  [strip]
27291.133Slukem
27301.133SlukemTSORT		Topological sort of a directed graph.  [tsort -q]
27311.133Slukem
27321.133SlukemYACC		LALR(1) parser generator.  [yacc]
27331.133Slukem
27341.133SlukemYFLAGS		Options to ${YACC}.  []
27351.133Slukem
27361.133SlukemYHEADER		If defined, add "-d" to YFLAGS, and add dependencies
27371.133Slukem		from <file>.y to <file>.h and <file>.c, and add
27381.133Slukem		<foo>.h to CLEANFILES.
27391.133Slukem
27401.133SlukemYPREFIX		If defined, add "-p ${YPREFIX}" to YFLAGS.
27411.133Slukem
27421.116Slukem
27431.69SsommerfeOther variables of note (incomplete list):
27441.69Ssommerfe
27451.444SlukemNOCLANGERROR	If defined and clang is used as C compiler, -Werror is not
27461.444Slukem		passed to it.
27471.444Slukem
27481.213SlukemNOGCCERROR	If defined, prevents passing certain ${CFLAGS} to GCC
27491.213Slukem		that cause warnings to be fatal, such as:
27501.213Slukem			-Werror -Wa,--fatal-warnings
27511.213Slukem		(The latter being for as(1).)
27521.212Slukem
27531.296SplunkyWARNS		Crank up compiler warning options; the distinct levels are:
27541.82Slukem			WARNS=1
27551.82Slukem			WARNS=2
27561.82Slukem			WARNS=3
27571.164Smatt			WARNS=4
27581.296Splunky			WARNS=5
27591.336Schristos			WARNS=6
27601.69Ssommerfe
27611.444Slukem=-=-=-=-=   bsd.host.mk   =-=-=-=-=
27621.144Slukem
27631.326SchristosThis file is automatically included from bsd.own.mk. It contains settings
27641.326Schristosfor all the HOST_* variables that are used in host programs and libraries.
27651.144Slukem
27661.326SchristosHOST_AR			The host archive processing command
27671.144Slukem
27681.326SchristosHOST_CC			The host c compiler
27691.144Slukem
27701.326SchristosHOST_CFLAGS		The host c compiler flags
27711.144Slukem
27721.326SchristosHOST_COMPILE.c		The host c compiler line with flags
27731.144Slukem
27741.326SchristosHOST_COMPILE.cc		The host c++ compiler line with flags
27751.144Slukem
27761.326SchristosHOST_CPP		The host c pre-processor
27771.144Slukem
27781.391SkamilHOST_CPPFLAGS		The host c pre-processor flags
27791.144Slukem
27801.326SchristosHOST_CXX		The host c++ compiler
27811.144Slukem
27821.326SchristosHOST_CXXFLAGS		The host c++ compiler flags
27831.144Slukem
27841.326SchristosHOST_INSTALL_DIR	The host command to install a directory
27851.144Slukem
27861.326SchristosHOST_INSTALL_FILE	The host command to install a file
27871.144Slukem
27881.326SchristosHOST_INSTALL_SYMLINK	The host command to install a symlink
27891.144Slukem
27901.326SchristosHOST_LD			The host linker command
27911.144Slukem
27921.326SchristosHOST_LDFLAGS		The host linker flags
27931.144Slukem
27941.326SchristosHOST_LINK.c		The host c linker line with flags
27951.221Smrg
27961.326SchristosHOST_LINK.cc		The host c++ linker line with flags
27971.144Slukem
27981.326SchristosHOST_LN			The host command to link two files
27991.144Slukem
28001.326SchristosHOST_MKDEP		The host command to create dependencies for c programs
28011.144Slukem
28021.326SchristosHOST_MKDEPCXX		The host command to create dependencies for c++ programs
28031.144Slukem
28041.326SchristosHOST_OSTYPE		The host OSNAME-RELEASE-ARCH tupple
28051.144Slukem
28061.326SchristosHOST_RANLIB		The host command to create random access archives
28071.144Slukem
28081.326SchristosHOST_SH			The host Bourne shell interpreter name (absolute path)
28091.144Slukem
28101.30Sagc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
2811