bsd.README revision 1.155
1#	$NetBSD: bsd.README,v 1.155 2004/06/13 08:17:22 jmc Exp $
2#	@(#)bsd.README	8.2 (Berkeley) 4/2/94
3
4This is the README file for the new make "include" files for the BSD
5source tree.  The files are installed in /usr/share/mk, and are, by
6convention, named with the suffix ".mk".
7
8Note, this file is not intended to replace reading through the .mk
9files for anything tricky.
10
11=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
12
13RANDOM THINGS WORTH KNOWING:
14
15The files are simply C-style #include files, and pretty much behave like
16you'd expect.  The syntax is slightly different in that a single '.' is
17used instead of the hash mark, i.e. ".include <bsd.prog.mk>".
18
19One difference that will save you lots of debugging time is that inclusion
20of the file is normally done at the *end* of the Makefile.  The reason for
21this is because .mk files often modify variables and behavior based on the
22values of variables set in the Makefile.  To make this work, remember that
23the FIRST target found is the target that is used, i.e. if the Makefile has:
24
25	a:
26		echo a
27	a:
28		echo a number two
29
30the command "make a" will echo "a".  To make things confusing, the SECOND
31variable assignment is the overriding one, i.e. if the Makefile has:
32
33	a=	foo
34	a=	bar
35
36	b:
37		echo ${a}
38
39the command "make b" will echo "bar".  This is for compatibility with the
40way the V7 make behaved.
41
42It's fairly difficult to make the BSD .mk files work when you're building
43multiple programs in a single directory.  It's a lot easier to split up the
44programs than to deal with the problem.  Most of the agony comes from making
45the "obj" directory stuff work right, not because we switched to a new version
46of make.  So, don't get mad at us, figure out a better way to handle multiple
47architectures so we can quit using the symbolic link stuff.  (Imake doesn't
48count.)
49
50The file .depend in the source directory is expected to contain dependencies
51for the source files.  This file is read automatically by make after reading
52the Makefile.
53
54The variable DESTDIR works as before.  It's not set anywhere but will change
55the tree where the file gets installed.
56
57The profiled libraries are no longer built in a different directory than
58the regular libraries.  A new suffix, ".po", is used to denote a profiled
59object, and ".so" denotes a shared (position-independent) object.
60
61There are various make variables used during the build.
62
63Many variables support a (case sensitive) value of "no" or "yes",
64and are tested with  ${VAR} == "no"  and  ${VAR} != "no" .
65
66
67The basic rule for the variable naming scheme is as follows:
68
69MKxxx		Can be set to "no" to disable functionality, or
70		"yes" to enable it.
71		Usually defaults to "yes", although some variables
72		default to "no".
73		Due to make(1) implementation issues, if a temporary
74		command-line override of a mk.conf or <bsd.own.mk>
75		setting is required whilst still honouring a particular
76		Makefile's setting of MKxxx, use
77			env MKxxx=value make
78		instead of
79			make MKxxx=value
80
81NOxxx		If defined, disables a feature.
82		Not intended for users.
83		This is to allow Makefiles to disable functionality
84		that they don't support (such as missing man pages).
85		NOxxx variables must be defined before <bsd.own.mk>
86		is included.
87
88The following variables that control how things are made/installed that
89are not set by default. These should not be set by Makefiles; they're for
90the user to define in MAKECONF (see <bsd.own.mk>, below) or on the make(1)
91command line:
92
93BUILD 		If defined, 'make install' checks that the targets in the
94		source directories are up-to-date and remakes them if they
95                are out of date, instead of blindly trying to install
96                out of date or non-existent targets.
97
98MAKEVERBOSE	Control how "verbose" the standard make(1) rules are.
99		Default: 2
100		Supported values:
101		    0	Minimal output ("quiet")
102		    1	Describe what is occurring
103		    2	Describe what is occurring and echo the actual command
104
105
106MKBFD		If "no", don't build libbfd, libiberty, or any of the things
107		that depend on them (binutils/gas/ld, gdb, dbsym, mdsetimage).
108		Default: yes
109
110MKCATPAGES	If "no", don't build or install the catman pages.
111		Default: yes
112
113MKCRYPTO	If "no", no cryptography support will be built into the system,
114		and also acts as "MKKERBEROS=no MKKERBEROS4=no".
115		Default: yes
116
117MKCRYPTO_IDEA	If not "no", IDEA support will be built into libcrypto_idea.a.
118		Default: no
119
120MKCRYPTO_MDC2	If not "no", MDC2 support will be built into libcrypto_mdc2.a
121		Default: no
122
123MKCRYPTO_RC5	If not "no", RC5 support will be built into libcrypto_rc5.a.
124		Default: no
125
126MKCVS		If "no", don't build or install cvs(1).
127		Default: yes
128
129MKDOC		If "no", don't build or install the documentation.
130		Default: yes
131
132MKDYNAMICROOT	If "no", build programs in /bin and /sbin statically,
133		don't install certain libraries in /lib, and don't
134		install the shared linker into /libexec.
135		Default: yes
136
137MKGCC		If "no", don't build gcc(1) or any of the gcc-related
138		libraries (libg2c, libgcc, libobjc, libstdc++).
139		Default: yes
140
141MKGCCCMDS	If "no", don't build gcc(1).
142		Default: yes
143
144MKGDB		If "no", don't build gdb(1).
145		Default: yes
146
147MKHESIOD	If "no", disables building of Hesiod infrastructure
148		(libraries and support programs).
149		Default: yes
150
151MKHOSTOBJ	If not "no", for programs intended to be run on the compile
152		host, the name, release, and architecture of the host
153		operating system will be suffixed to the name of the object
154		directory created by "make obj".
155		Default: no
156
157MKHTML		If "no", don't build or install the html man pages.
158		Default: yes
159
160MKIEEEFP	If "no", don't add code for IEEE754/IEC60559 conformance.
161		Has no effect on most platforms.
162		Default: yes
163
164MKINFO		If "no", don't build or install Info documentation from
165		Texinfo source files.
166		Default: yes
167
168MKKERBEROS4	If "no", disables building of Kerberos v4
169		infrastructure (libraries and support programs).
170		Default: yes
171
172MKKERBEROS	If "no", disables building of Kerberos v5
173		infrastructure (libraries and support programs).
174		Default: yes
175
176MKLINKLIB	If "no", act as "MKPICINSTALL=no MKPROFILE=no".
177		Also:
178			- don't install the .a libraries
179			- don't install _pic.a libraries on PIC systems
180			- don't build .a libraries on PIC systems
181			- don't install the .so symlink on ELF systems
182		I.e, only install the shared library (and the .so.major
183		symlink on ELF).
184		Default: yes
185
186MKLINT		If "no", don't build or install the lint libraries.
187		Default: yes
188
189MKMAN		If "no", don't build or install the man or catman pages,
190		and also acts as "MKCATPAGES=no MKHTML=no".
191		Default: yes
192
193MKMANZ		If not "no", compress manual pages at installation time.
194		Default: no
195
196MKNLS		If "no", don't build or install the NLS files and locale
197		definition files.
198		Default: yes
199
200MKOBJ		If "no", don't enable the rule which creates objdirs,
201		and also acts as "MKOBJDIRS=no".
202		Default: yes
203
204MKOBJDIRS	If "no", don't create objdirs during a "make build".
205		Default: no
206
207MKPIC		If "no", don't build or install shared libraries, and
208		also acts as "MKPICLIB=no"
209		Default: yes (for MACHINE_ARCHs that support it) 
210
211MKPICINSTALL	If "no", don't install the *_pic.a libraries.
212		Default: yes
213
214MKPICLIB	If "no", don't build *_pic.a libraries, and build the
215		shared object libraries from the .a libraries.
216		A symlink is installed in ${DESTDIR}/usr/lib for the
217		_pic.a library pointing to the .a library.
218		Default: yes
219
220MKPOSTFIX	If "no", don't build or install postfix(1).
221		Default: yes
222
223MKPROFILE	If "no", don't build or install the profiling (*_p.a) libraries.
224		Default: yes
225
226MKSENDMAIL	If "no", don't build or install sendmail(8).
227		Default: yes
228
229MKSHARE		If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no
230		MKMAN=no MKNLS=no".
231		I.e, don't build catman pages, documentation, Info
232		documentation, man pages, NLS files, ...
233		Default: yes
234
235MKSKEY		If "no", disables building of S/key authentication
236		infrastructure (libraries and support programs).
237		Default: yes
238
239MKSOFTFLOAT	If not "no", build with options to enable the compiler to
240		generate output containing library calls for floating
241		point and possibly soft-float library support.
242		Default: no
243
244MKSTATICLIB	If "no", don't build or install the normal static (*.a)
245		libraries.
246		Default: yes
247
248MKUNPRIVED	If not "no", don't set the owner/group/mode when installing
249		files or directories, and keep a metadata log of what
250		the owner/group/mode should be.  This allows a
251		non-root "make install".
252		Default: no
253
254MKUPDATE 	If not "no", 'make install' only installs targets that are
255		more recently modified in the source directories that their
256		installed counterparts.
257		Default: no
258
259MKUUCP		If "no", don't build or install uucp(1).
260		Default: yes
261
262MKX11		If not "no", 'make build' also descends into src/x11
263		to cross build X11R6 and automatically enables creation
264		of X sets.
265		Default: no
266
267MKYP		If "no", disables building of YP (NIS)
268		infrastructure (libraries and support programs).
269		Default: yes
270
271USE_HESIOD	If "no", disables building Hesiod support into
272		various system utilities/libraries that support it.
273		If ${MKHESIOD} is "no", USE_HESIOD will also be
274		forced to "no".
275
276USE_KERBEROS4	If "no", disables building Kerberos v4
277		support into various system utilities/libraries that
278		support it.  If ${MKKERBEROS4} is "no", USE_KERBEROS4
279		will also be forced to "no".
280
281USE_KERBEROS	If "no", disables building Kerberos v4 or v5)
282		support into various system utilities/libraries that
283		support it.  If ${MKKERBEROS} is "no", USE_KERBEROS
284		will also be forced to "no".
285
286USE_SKEY	If "no", disables building S/key authentication
287		support into various system utilities/libraries that
288		support it.  If ${MKSKEY} is "no", USE_SKEY will
289		also be forced to "no".
290
291USE_YP		If "no", disables building YP (NIS) support into
292		various system utilities/libraries that support it.
293		If ${MKYP} is "no", USE_YP will also be forced to "no".
294
295COPTS.lib<lib>
296LDADD.lib<lib>
297CPPFLAGS.lib<lib>
298CXXFLAGS.lib<lib>
299COPTS.<prog>
300LDADD.<prog>
301CPPFLAGS.<prog>
302CXXFLAGS.<prog>	These provide a way to specify additions to the associated
303		variables in a way that applies only to a particular library
304		or program.  <lib> corresponds to the LIB variable set in
305		the library's makefile.  <prog> corresponds to either PROG
306		or PROG_CXX (if set).  For example, if COPTS.libcrypto is
307		set to "-g", "-g" will be added to COPTS only when compiling
308		the crypto library.
309
310=-=-=-=-=   sys.mk   =-=-=-=-=
311
312The include file <sys.mk> has the default rules for all makes, in the BSD
313environment or otherwise.  You probably don't want to touch this file.
314
315=-=-=-=-=   bsd.own.mk   =-=-=-=-=
316
317The include file <bsd.own.mk> contains source tree configuration parameters,
318such as the owners, groups, etc. for both manual pages and binaries, and
319a few global "feature configuration" parameters.
320
321It has no targets.
322
323To get system-specific configuration parameters, <bsd.own.mk> will try to
324include the file specified by the "MAKECONF" variable.  If MAKECONF is not
325set, or no such file exists, the system make configuration file, /etc/mk.conf
326is included.  These files may define any of the variables described below.
327
328<bsd.own.mk> sets the following variables, if they are not already defined
329(defaults are in brackets):
330
331NETBSDSRCDIR	Top of the NetBSD source tree.
332		If _SRC_TOP_ != "", that will be used as the default,
333		otherwise BSDSRCDIR will be used as the default.
334		Various makefiles within the NetBSD source tree will
335		use this to reference the top level of the source tree.
336
337_SRC_TOP_	Top of the system source tree, as determined by <bsd.own.mk>
338		based on the presence of tools/ and build.sh.  This variable
339		is "internal" to <bsd.own.mk>, although its value is only
340		determined once and then propagated to all sub-makes.
341
342BSDSRCDIR	The real path to the system sources, so that 'make obj'
343		will work correctly.  [/usr/src]
344
345BSDOBJDIR	The real path to the system 'obj' tree, so that 'make obj'
346		will work correctly.  [/usr/obj]
347
348BINGRP		Binary group.  [wheel]
349
350BINOWN		Binary owner.  [root]
351
352BINMODE		Binary mode.  [555]
353
354NONBINMODE	Mode for non-executable files.  [444]
355
356MANDIR		Base path for manual installation.  [/usr/share/man/cat]
357
358MANGRP		Manual group.  [wheel]
359
360MANOWN		Manual owner.  [root]
361
362MANMODE		Manual mode.  [${NONBINMODE}]
363
364MANINSTALL	Manual installation type: maninstall, catinstall, or both
365		[maninstall catinstall]
366
367LDSTATIC	Control program linking; if set blank, link everything
368		dynamically.  If set to "-static", link everything statically.
369		If not set, programs link according to their makefile.
370
371LIBDIR		Base path for library installation.  [/usr/lib]
372
373LINTLIBDIR	Base path for lint(1) library installation.  [/usr/libdata/lint]
374
375LIBGRP		Library group.  [${BINGRP}]
376
377LIBOWN		Library owner.  [${BINOWN}]
378
379LIBMODE		Library mode.  [${NONBINMODE}]
380
381DOCDIR		Base path for system documentation (e.g. PSD, USD, etc.)
382	        installation.  [/usr/share/doc]
383
384HTMLDOCDIR	Base path for html system documentation installation.
385		[/usr/share/doc/html]
386
387DOCGRP		Documentation group.  [wheel]
388
389DOCOWN		Documentation owner.  [root]
390
391DOCMODE		Documentation mode.  [${NONBINMODE}]
392
393NLSDIR		Base path for Native Language Support files installation.
394		[/usr/share/nls]
395
396NLSGRP		Native Language Support files group.  [wheel]
397
398NLSOWN		Native Language Support files owner.  [root]
399
400NLSMODE		Native Language Support files mode.  [${NONBINMODE}]
401
402X11SRCDIR	The path to the xsrc tree.  [/usr/xsrc]
403
404X11SRCDIR.xc	The path to the X11R6 xc src tree.  [${X11SRCDIR}/xfree/xc]
405
406X11SRCDIR.local	The path to the local X11R6 src tree.  [${X11SRCDIR}/local]
407
408X11ROOTDIR	Root directory of the X11 installation.  [/usr/X11R6]
409
410X11BINDIR	X11 bin directory.  [${X11ROOTDIR}/bin]
411
412X11FONTDIR	X11 font directory.  [${X11ROOTDIR}/lib/X11/fonts]
413
414X11INCDIR	X11 include directory.  [${X11ROOTDIR}/include]
415
416X11LIBDIR	X11 lib/x11 (config) directory.  [${X11ROOTDIR}/lib/X11]
417
418X11MANDIR	X11 manual directory.  [${X11ROOTDIR}/man]
419
420X11USRLIBDIR	X11 library directory.  [${X11ROOTDIR}/lib]
421
422STRIPFLAG	The flag passed to the install program to cause the binary
423		to be stripped.  This is to be used when building your
424		own install script so that the entire system can be made
425		stripped/not-stripped using a single knob.  []
426
427COPY		The flag passed to the install program to cause the binary
428		to be copied rather than moved.  This is to be used when
429		building our own install script so that the entire system
430		can either be installed with copies, or with moves using
431		a single knob.  [-c]
432
433MAKEDIRTARGET dir target [params]
434		Runs "cd $${dir} && ${MAKE} [params] $${target}",
435		displaying a "pretty" message whilst doing so.
436
437RELEASEMACHINEDIR
438		Subdirectory used below RELEASEDIR when building
439		a release.  [${MACHINE}]
440
441RELEASEMACHINE	Subdirectory or path component used for the following
442		paths:
443			distrib/${RELEASEMACHINE}
444			distrib/notes/${RELEASEMACHINE}
445			etc/etc.${RELEASEMACHINE}
446		Used when building a release.  [${MACHINE}]
447
448Additionally, the following variables may be set by <bsd.own.mk> or in a
449make configuration file to modify the behaviour of the system build
450process (default values are in brackets along with comments, if set by
451<bsd.own.mk>):
452
453USETOOLS	Indicates whether the tools specified by ${TOOLDIR} should
454		be used as part of a build in progress.
455		Supported values:
456
457		yes	Use the tools from TOOLDIR.
458			Must be set to this if cross-compiling.
459
460		no	Do not use the tools from TOOLDIR, but refuse to
461			build native compilation tool components that are
462			version-specific for that tool.
463
464		never	Do not use the tools from TOOLDIR, even when
465			building native tool components.  This is similar to
466			the traditional NetBSD build method, but does not
467			verify that the compilation tools in use are
468			up-to-date enough in order to build the tree
469			successfully.  This may cause build or runtime
470			problems when building the whole NetBSD source tree.
471
472		Default: "yes" if building all or part of a whole NetBSD
473		source tree (detected automatically); "no" otherwise
474		(to preserve traditional semantics of the <bsd.*.mk>
475		make(1) include files).
476
477OBJECT_FMT	Object file format.  [set to "ELF" on architectures that
478		use ELF -- currently if ${MACHINE_ARCH} is "alpha",
479		"mipsel", "mipseb", "powerpc", "sparc", "sparc64",
480		"i386" and some m68k machines, or set to "a.out" on
481		other architectures].
482
483TOOLCHAIN_MISSING
484		If not "no", this indicates that the platform being built
485		does not have a working in-tree toolchain.  If the
486		${MACHINE_ARCH} in question falls into this category,
487		TOOLCHAIN_MISSING is conditionally assigned the value "yes". 
488		Otherwise, the variable is unconditionally assigned the
489		value "no".
490		If not "no", ${MKBFD}, ${MKGCC}, and ${MKGDB} are
491		unconditionally assigned the value "no".
492
493EXTERNAL_TOOLCHAIN
494		This variable is not directly set by <bsd.own.mk>, but
495		including <bsd.own.mk> is the canonical way to gain
496		access to this variable.  The variable should be defined
497		either in the user's environment or in the user's mk.conf
498		file.  If defined, this variable indicates the root of
499		an external toolchain which will be used to build the
500		tree.  For example, if a platform is a ${TOOLCHAIN_MISSING}
501		platform, EXTERNAL_TOOLCHAIN can be used to re-enable the
502		cross-compile framework.
503
504		If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally
505		assigned the value "no", since the external version of the
506		compiler may not be able to build the library components of
507		the in-tree compiler.
508
509		NOTE: This variable is not yet used in as many places as
510		it should be.  Expect the exact semantics of this variable
511		to change in the short term as parts of the cross-compile
512		framework continue to be cleaned up.
513
514<bsd.own.mk> is generally useful when building your own Makefiles so that
515they use the same default owners etc. as the rest of the tree.
516
517
518=-=-=-=-=   bsd.dep.mk   =-=-=-=-=
519
520The include file <bsd.dep.mk> contains the default targets for building
521.depend files.  It creates .d files from entries in SRCS and DPSRCS
522that are C, C++, or Objective C source files, and builds .depend from the
523.d files.  All other files in SRCS and all of DPSRCS will be used as
524dependencies for the .d files.  In order for this to function correctly,
525it should be .included after all other .mk files and directives that may
526modify SRCS or DPSRCS.  It uses the following variables:
527
528SRCS		List of source files to build the program.
529
530DPSRCS		List of source files which are needed for generating
531		dependencies, but are not needed in ${SRCS}.
532
533
534=-=-=-=-=   bsd.files.mk   =-=-=-=-=
535
536The include file <bsd.files.mk> handles the FILES variables and is included
537from <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables:
538
539FILES		The list of files to install.
540
541CONFIGFILES	Similar semantics to FILES, except that the files
542		are installed by the `configinstall' target,
543		not the `install' target.
544		The FILES* variables documented below also apply.
545
546FILESOWN	File owner.  [${BINOWN}]
547
548FILESGRP	File group.  [${BINGRP}]
549
550FILESMODE	File mode.  [${BINMODE}]
551
552FILESDIR	The location to install the files.
553
554FILESNAME	Optional name to install each file as.
555
556FILESOWN_<fn>	File owner of the specific file <fn>.
557
558FILESGRP_<fn>	File group of the specific file <fn>.
559
560FILESMODE_<fn>	File mode of the specific file <fn>.
561
562FILESDIR_<fn>	The location to install the specific file <fn>>
563
564FILESNAME_<fn>	Optional name to install <fn> as.
565
566
567BUILDSYMLINKS	List of two word items:
568			lnsrc lntgt
569		For each lnsrc item, create a symlink named lntgt.
570		The lntgt symlinks are removed by the cleandir target.
571
572UUDECODE_FILES	List of files which are stored as <file>.uue in the source
573		tree. Each one will be decoded with ${TOOL_UUDECODE}.
574		The source files have a `.uue' suffix, the generated files do 
575		not.
576
577UUDECODE_FILES_RENAME_fn Rename the output from the decode to the provided name.
578		
579		*NOTE: These files are simply decoded, with no install or other
580		       rule applying implicitly except being added to the clean
581		       target.
582
583=-=-=-=-=   bsd.gcc.mk   =-=-=-=-=
584
585The include file <bsd.gcc.mk> computes various parameters related to GCC
586support libraries.  It defines no targets.  <bsd.own.mk> MUST be included
587before <bsd.gcc.mk>.
588
589The primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each
590of which need to know where to find certain GCC support libraries.
591
592The behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable,
593which is generally set by the user.  If EXTERNAL_TOOLCHAIN it set, then
594the compiler is asked where to find the support libraries, otherwise the
595support libraries are found in ${DESTDIR}/usr/lib.
596
597<bsd.gcc.mk> sets the following variables:
598
599_GCC_CRTBEGIN	The full path name to crtbegin.o.
600
601_GCC_CRTBEGINS	The full path name to crtbeginS.o.
602
603_GCC_CRTEND	The full path name to crtend.o.
604
605_GCC_CRTENDS	The full path name to crtendS.o.
606
607_GCC_LIBGCCDIR	The directory where libgcc.a is located.
608
609
610=-=-=-=-=   bsd.inc.mk   =-=-=-=-=
611
612The include file <bsd.inc.mk> defines the includes target and uses the
613variables:
614
615INCS		The list of include files.
616
617INCSDIR		The location to install the include files.
618
619INCSNAME	Target name of the include file, if only one; same as
620		FILESNAME, but for include files.
621
622INCSYMLINKS	Similar to SYMLINKS in <bsd.links.mk>, except that these
623		are installed in the 'includes' target and not the
624		(much later) 'install' target.
625
626INCSNAME_<file>	The name file <file> should be installed as, if not <file>,
627		same as FILESNAME_<file>, but for include files.
628
629
630=-=-=-=-=   bsd.info.mk   =-=-=-=-=
631
632The include file <bsd.info.mk> is used to generate and install GNU Info
633documentation from respective Texinfo source files.  It defines three
634implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
635following variables:
636
637TEXINFO		List of Texinfo source files.  Info documentation will
638		consist of single files with the extension replaced by
639		.info.
640
641INFOFLAGS	Flags to pass to makeinfo.  []
642
643
644=-=-=-=-=   bsd.kernobj.mk   =-=-=-=-=
645
646The include file <bsd.kernobj.mk> defines variables related to the
647location of kernel sources and object directories.
648
649KERNSRCDIR	Is the location of the top of the kernel src.
650		[${_SRC_TOP_}/sys]
651
652KERNARCHDIR	Is the location of the machine dependent kernel sources.
653		[arch/${MACHINE}]
654
655KERNCONFDIR	Is where the configuration files for kernels are found.
656		[${KERNSRCDIR}/${KERNARCHDIR}/conf]
657
658KERNOBJDIR	Is the kernel build directory.  The kernel GENERIC for
659		instance will be compiled in ${KERNOBJDIR}/GENERIC.
660		The default value is
661		${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
662		if it exists or the target 'obj' is being made.
663		Otherwise the default is
664		${KERNSRCDIR}/${KERNARCHDIR}/compile.
665
666It is important that Makefiles (such as those under src/distrib) that
667wish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR}
668rather than make assumptions about the location of the compiled kernel.
669
670
671=-=-=-=-=   bsd.kinc.mk   =-=-=-=-=
672
673The include file <bsd.kinc.mk> defines the many targets (includes,
674subdirectories, etc.), and is used by kernel makefiles to handle
675include file installation.  It is intended to be included alone, by
676kernel Makefiles.  It uses similar variables to <bsd.inc.mk>.
677Please see <bsd.kinc.mk> for more details, and keep the documentation
678in that file up to date.
679
680
681=-=-=-=-=   bsd.lib.mk   =-=-=-=-=
682
683The include file <bsd.lib.mk> has support for building libraries.  It has
684the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
685includes, install, lint, and tags.  Additionally, it has a checkver target
686which checks for installed shared object libraries whose version is greater
687that the version of the source. It has a limited number of suffixes,
688consistent with the current needs of the BSD tree.  <bsd.lib.mk> includes
689<bsd.shlib.mk> to get shared library parameters.
690
691It sets/uses the following variables:
692
693LIB		The name of the library to build.
694
695LIBDIR		Target directory for libraries.
696
697SHLIBINSTALLDIR	Target directory for shared libraries if ${USE_SHLIBDIR}
698		is not "no".
699
700USE_SHLIBDIR	If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR}
701		as the path to install shared libraries to.
702		USE_SHLIBDIR must be defined before <bsd.own.mk> is included.
703		Default: no
704
705MKPRIVATELIB	If not "no", act as "MKPROFILE=no MKPIC=no MKLINT=no",
706		and don't install the (.a) library.
707		This is useful for "build only" helper libraries.
708		Default: no
709
710LINTLIBDIR	Target directory for lint libraries.
711
712LIBGRP		Library group.
713
714LIBOWN		Library owner.
715
716LIBMODE		Library mode.
717
718LDADD		Additional loader objects.
719
720MAN		The manual pages to be installed (use a .1 - .9 suffix).
721
722NOCHECKVER_<library>
723NOCHECKVER	If set, disables checking for installed shared object
724		libraries with versions greater than the source.  A
725		particular library name, without the "lib" prefix, may
726		be appended to the variable name to disable the check for
727		only that library.
728
729SRCS		List of source files to build the library.  Suffix types
730		.s, .c, and .f are supported.  Note, .s files are preferred
731		to .c files of the same name.  (This is not the default for
732		versions of make.)
733
734The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
735if it exists, as well as the include file <bsd.man.mk>.
736
737It has rules for building profiled objects; profiled libraries are
738built by default.
739
740Libraries are ranlib'd when made.
741
742
743=-=-=-=-=   bsd.links.mk   =-=-=-=-=
744
745The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
746and is included from from <bsd.lib.mk> and <bsd.prog.mk>.
747
748LINKS		The list of hard links, consisting of pairs of paths:
749			source-file target-file
750		${DESTDIR} is prepended to both paths before linking.
751		For example, to link /bin/test and /bin/[, use:
752			LINKS=/bin/test /bin/[
753
754CONFIGLINKS	Similar semantics to LINKS, except that the links
755		are installed by the `configinstall' target,
756		not the `install' target.
757
758SYMLINKS	The list of symbolic links, consisting of pairs of paths:
759			source-file target-file
760		${DESTDIR} is only prepended to target-file before linking.
761		For example, to symlink /usr/bin/tar to /bin/tar resulting
762		in ${DESTDIR}/usr/bin/tar -> /bin/tar:
763			SYMLINKS=/bin/tar /usr/bin/tar
764
765CONFIGSYMLINKS	Similar semantics to SYMLINKS, except that the symbolic links
766		are installed by the `configinstall' target,
767		not the `install' target.
768
769
770=-=-=-=-=   bsd.man.mk   =-=-=-=-=
771
772The include file <bsd.man.mk> handles installing manual pages and their
773links.
774
775It has a two targets:
776
777	maninstall:
778		Install the manual page sources and their links.
779	catinstall:
780		Install the preformatted manual pages and their links.
781
782It sets/uses the following variables:
783
784MANDIR		Base path for manual installation.
785
786MANGRP		Manual group.
787
788MANOWN		Manual owner.
789
790MANMODE		Manual mode.
791
792MANSUBDIR	Subdirectory under the manual page section, i.e. "/vax"
793		or "/tahoe" for machine specific manual pages.
794
795MAN		The manual pages to be installed (use a .1 - .9 suffix).
796
797MLINKS		List of manual page links (using a .1 - .9 suffix).  The
798		linked-to file must come first, the linked file second,
799		and there may be multiple pairs.  The files are soft-linked.
800
801The include file <bsd.man.mk> includes a file named "../Makefile.inc" if
802it exists.
803
804
805=-=-=-=-=   bsd.obj.mk   =-=-=-=-=
806
807The include file <bsd.obj.mk> defines targets related to the creation
808and use of separated object and source directories.
809
810If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
811${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
812it exists.  Otherwise make(1) looks for the existence of a
813subdirectory (or a symlink to a directory) of the source directory
814into which built targets should be placed.  If an environment variable
815named MAKEOBJDIR is set, make(1) uses its value as the name of the
816object directory; failing that, make first looks for a subdirectory
817named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
818
819Object directories are not created automatically by make(1) if they
820don't exist; you need to run a separate "make obj".  (This will happen
821during a top-level build if "MKOBJDIRS" is set to a value other than
822"no").  When the source directory is a subdirectory of ${BSDSRCDIR} --
823and this is determined by a simple string prefix comparison -- object
824directories are created in a separate object directory tree, and a
825symlink to the object directory in that tree is created in the source
826directory; otherwise, "make obj" assumes that you're not in the main
827source tree and that it's not safe to use a separate object tree.
828
829Several variables used by <bsd.obj.mk> control exactly what
830directories and links get created during a "make obj":
831
832MAKEOBJDIR	If set, this is the component name of the object
833		directory.
834
835OBJMACHINE	If this is set but MAKEOBJDIR is not set, creates
836		object directories or links named "obj.${MACHINE}";
837		otherwise, just creates ones named "obj".
838
839USR_OBJMACHINE  If set, and the current directory is a subdirectory of
840		${BSDSRCDIR}, create object directory in the
841		corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
842		otherwise, create it in the corresponding subdirectory
843		of ${BSDOBJDIR}
844
845BUILDID		If set, the contents of this variable are appended
846		to the object directory name.  If OBJMACHINE is also
847		set, ".${BUILDID}" is added after ".${MACHINE}".
848
849
850=-=-=-=-=   bsd.prog.mk   =-=-=-=-=
851
852The include file <bsd.prog.mk> handles building programs from one or
853more source files, along with their manual pages.  It has a limited number
854of suffixes, consistent with the current needs of the BSD tree. 
855<bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters.
856
857It has eight targets:
858
859	all:
860		build the program and its manual page.  This also
861		creates a GDB initialization file (.gdbinit) in
862		the objdir.  The .gdbinit file sets the shared library
863		prefix to ${DESTDIR} to facilitate cross-debugging.
864	clean:
865		remove the program, any object files and the files a.out,
866		Errs, errs, mklog, and ${PROG}.core.
867	cleandir:
868		remove all of the files removed by the target clean, as
869		well as .depend, tags, and any manual pages.
870		`distclean' is a synonym for `cleandir'.
871	depend:
872		make the dependencies for the source files, and store
873		them in the file .depend.
874	includes:
875		install any header files.
876	install:
877		install the program and its manual pages; if the Makefile
878		does not itself define the target install, the targets
879		beforeinstall and afterinstall may also be used to cause
880		actions immediately before and after the install target
881		is executed.
882	lint:
883		run lint on the source files
884	tags:
885		create a tags file for the source files.
886
887It sets/uses the following variables:
888
889BINGRP		Binary group.
890
891BINOWN		Binary owner.
892
893BINMODE		Binary mode.
894
895CLEANFILES	Additional files to remove for the clean and cleandir targets.
896
897COPTS		Additional flags to the compiler when creating C objects.
898
899COPTS.<fn>	Additional flags to the compiler when creating the
900		C objects for <fn>.
901		For <fn>.[ly], "<fn>.c" must be used.
902
903CPUFLAGS	Additional flags to the compiler/assembler to select
904		CPU instruction set options, CPU tuning options, etc.
905
906CPUFLAGS.<fn>	Additional flags to the compiler/assembler for <fn>.
907		For <fn>.[ly], "<fn>.c" must be used.
908
909CPPFLAGS	Additional flags to the C pre-processor.
910
911CPPFLAGS.<fn>	Additional flags to the C pre-processor for <fn>.
912		For <fn>.[ly], "<fn>.c" must be used.
913
914GDBINIT		List of GDB initialization files to add to "source"
915		directives in the .gdbinit file that is created in the
916		objdir.
917
918LDADD		Additional loader objects.  Usually used for libraries.
919		For example, to load with the compatibility and utility
920		libraries, use:
921
922			LDADD+=-lutil -lcompat
923
924LDFLAGS		Additional loader flags.
925
926LINKS		See <bsd.links.mk>
927
928SYMLINKS	See <bsd.links.mk>
929
930MAN		Manual pages (should end in .1 - .9).  If no MAN variable is
931		defined, "MAN=${PROG}.1" is assumed.
932
933PROG		The name of the program to build.  If not supplied, nothing
934		is built.
935
936PROG_CXX	If defined, the name of the program to build.  Also
937		causes <bsd.prog.mk> to link the program with the C++
938		compiler rather than the C compiler.  PROG_CXX overrides
939		the value of PROG if PROG is also set.
940
941PROGNAME	The name that the above program will be installed as, if
942		different from ${PROG}.
943
944SRCS		List of source files to build the program.  If SRCS is not
945		defined, it's assumed to be ${PROG}.c.
946
947DPSRCS		List of source files which are needed for generating
948		dependencies, but are not needed in ${SRCS}.
949
950DPADD		Additional dependencies for the program.  Usually used for
951		libraries.  For example, to depend on the compatibility and
952		utility libraries use:
953
954			DPADD+=${LIBCOMPAT} ${LIBUTIL}
955
956		The following libraries are predefined for DPADD:
957
958		LIBCRT0?=	${DESTDIR}/usr/lib/crt0.o
959		LIBBZ2?=	${DESTDIR}/usr/lib/libbz2.a
960		LIBC?=		${DESTDIR}/usr/lib/libc.a
961		LIBC_PIC?=	${DESTDIR}/usr/lib/libc_pic.a
962		LIBCDK?=	${DESTDIR}/usr/lib/libcdk.a
963		LIBCOM_ERR?=	${DESTDIR}/usr/lib/libcom_err.a
964		LIBCOMPAT?=	${DESTDIR}/usr/lib/libcompat.a
965		LIBCRYPT?=	${DESTDIR}/usr/lib/libcrypt.a
966		LIBCRYPTO?=	${DESTDIR}/usr/lib/libcrypto.a
967		LIBCRYPTO_IDEA?=${DESTDIR}/usr/lib/libcrypto_idea.a
968		LIBCRYPTO_MDC2?=${DESTDIR}/usr/lib/libcrypto_mdc2.a
969		LIBCRYPTO_RC5?=	${DESTDIR}/usr/lib/libcrypto_rc5.a
970		LIBCURSES?=	${DESTDIR}/usr/lib/libcurses.a
971		LIBDBM?=	${DESTDIR}/usr/lib/libdbm.a
972		LIBDES?=	${DESTDIR}/usr/lib/libdes.a
973		LIBEDIT?=	${DESTDIR}/usr/lib/libedit.a
974		LIBEVENT?=	${DESTDIR}/usr/lib/libevent.a
975		LIBFORM?=	${DESTDIR}/usr/lib/libform.a
976		LIBGCC?=	${DESTDIR}/usr/lib/libgcc.a
977		LIBGNUMALLOC?=	${DESTDIR}/usr/lib/libgnumalloc.a
978		LIBGSSAPI?=	${DESTDIR}/usr/lib/libgssapi.a
979		LIBHDB?=	${DESTDIR}/usr/lib/libhdb.a
980		LIBINTL?=	${DESTDIR}/usr/lib/libintl.a
981		LIBIPSEC?=	${DESTDIR}/usr/lib/libipsec.a
982		LIBKADM?=	${DESTDIR}/usr/lib/libkadm.a
983		LIBKADM5CLNT?=	${DESTDIR}/usr/lib/libkadm5clnt.a
984		LIBKADM5SRV?=	${DESTDIR}/usr/lib/libkadm5srv.a
985		LIBKAFS?=	${DESTDIR}/usr/lib/libkafs.a
986		LIBKDB?=	${DESTDIR}/usr/lib/libkdb.a
987		LIBKRB?=	${DESTDIR}/usr/lib/libkrb.a
988		LIBKRB5?=	${DESTDIR}/usr/lib/libkrb5.a
989		LIBKSTREAM?=	${DESTDIR}/usr/lib/libkstream.a
990		LIBKVM?=	${DESTDIR}/usr/lib/libkvm.a
991		LIBL?=		${DESTDIR}/usr/lib/libl.a
992		LIBM?=		${DESTDIR}/usr/lib/libm.a
993		LIBMENU?=	${DESTDIR}/usr/lib/libmenu.a
994		LIBOBJC?=	${DESTDIR}/usr/lib/libobjc.a
995		LIBOSSAUDIO?=	${DESTDIR}/usr/lib/libossaudio.a
996		LIBPCAP?=	${DESTDIR}/usr/lib/libpcap.a
997		LIBPCI?=	${DESTDIR}/usr/lib/libpci.a
998		LIBPMC?=	${DESTDIR}/usr/lib/libpmc.a
999		LIBPOSIX?=	${DESTDIR}/usr/lib/libposix.a
1000		LIBPTHREAD?=	${DESTDIR}/usr/lib/libpthread.a
1001		LIBPTHREAD_DBG?=${DESTDIR}/usr/lib/libpthread_dbg.a
1002		LIBRESOLV?=	${DESTDIR}/usr/lib/libresolv.a
1003		LIBRMT?=	${DESTDIR}/usr/lib/librmt.a
1004		LIBROKEN?=	${DESTDIR}/usr/lib/libroken.a
1005		LIBRPCSVC?=	${DESTDIR}/usr/lib/librpcsvc.a
1006		LIBRT?=		${DESTDIR}/usr/lib/librt.a
1007		LIBSKEY?=	${DESTDIR}/usr/lib/libskey.a
1008		LIBSL?=		${DESTDIR}/usr/lib/libsl.a
1009		LIBSS?=		${DESTDIR}/usr/lib/libss.a
1010		LIBSSL?=	${DESTDIR}/usr/lib/libssl.a
1011		LIBSTDCXX?=	${DESTDIR}/usr/lib/libstdc++.a
1012		LIBTERMCAP?=	${DESTDIR}/usr/lib/libtermcap.a
1013		LIBUSBHID?=	${DESTDIR}/usr/lib/libusbhid.a
1014		LIBUTIL?=	${DESTDIR}/usr/lib/libutil.a
1015		LIBWRAP?=	${DESTDIR}/usr/lib/libwrap.a
1016		LIBY?=		${DESTDIR}/usr/lib/liby.a
1017		LIBZ?=		${DESTDIR}/usr/lib/libz.a
1018
1019SHAREDSTRINGS	If defined, a new .c.o rule is used that results in shared
1020		strings, using xstr(1). Note that this will not work with
1021		parallel makes.
1022
1023STRIPFLAG	The flag passed to the install program to cause the binary
1024		to be stripped.
1025
1026SUBDIR		A list of subdirectories that should be built as well.
1027		Each of the targets will execute the same target in the
1028		subdirectories.
1029
1030SCRIPTS		A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
1031		These are installed exactly like programs.
1032
1033SCRIPTSNAME	The name that the above program will be installed as, if
1034		different from ${SCRIPTS}. These can be further specialized
1035		by setting SCRIPTSNAME_<script>.
1036
1037FILES		See description of <bsd.files.mk>.
1038
1039SHLINKDIR	Target directory for shared linker.  See description of
1040		<bsd.own.mk> for additional information about this variable.
1041
1042USE_LIBSTDCXX	If "no", the support libraries needed for C++ programs
1043		are set to `-lsupc++ -lm', rather than `-lstdc++ -lm'.
1044		Default: yes
1045
1046The include file <bsd.prog.mk> includes the file named "../Makefile.inc"
1047if it exists, as well as the include file <bsd.man.mk>.
1048
1049Some simple examples:
1050
1051To build foo from foo.c with a manual page foo.1, use:
1052
1053	PROG=	foo
1054
1055	.include <bsd.prog.mk>
1056
1057To build foo from foo.c with a manual page foo.2, add the line:
1058
1059	MAN=	foo.2
1060
1061If foo does not have a manual page at all, add the line:
1062
1063	MKMAN=	no
1064
1065If foo has multiple source files, add the line:
1066
1067	SRCS=	a.c b.c c.c d.c
1068
1069
1070=-=-=-=-=   bsd.rpc.mk   =-=-=-=-=
1071
1072The include file <bsd.rpc.mk> contains a makefile fragment used to
1073construct source files built by rpcgen.
1074
1075The following macros may be defined in makefiles which include
1076<bsd.rpc.mk> in order to control which files get built and how they
1077are to be built:
1078
1079RPC_INCS:	construct .h file from .x file
1080RPC_XDRFILES:	construct _xdr.c from .x file
1081		(for marshalling/unmarshalling data types)
1082RPC_SVCFILES:	construct _svc.c from .x file
1083		(server-side stubs)
1084RPC_SVCFLAGS:	Additional flags passed to builds of RPC_SVCFILES.
1085
1086RPC_XDIR:	Directory containing .x/.h files
1087
1088
1089=-=-=-=-=   bsd.shlib.mk   =-=-=-=-=
1090
1091The include file <bsd.shlib.mk> computes parameters for shared library
1092installation and use.  It defines no targets.  <bsd.own.mk> MUST be
1093included before <bsd.shlib.mk>.
1094
1095<bsd.own.mk> sets the following variables, if they are not already defined
1096(defaults are in brackets):
1097
1098SHLIBINSTALLDIR	If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR}
1099		instead of ${LIBDIR} as the base path for shared library
1100		installation.  [/lib]
1101
1102SHLIBDIR	The path to USE_SHLIBDIR shared libraries to use when building
1103		a program.  [/lib for programs in /bin and /sbin, /usr/lib
1104		for all others.]
1105
1106_LIBSODIR	Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no",
1107		otherwise set to ${LIBDIR}
1108
1109SHLINKINSTALLDIR Base path for shared linker.  [/libexec]
1110
1111SHLINKDIR	Path to use for shared linker when building a program.
1112		[/libexec for programs in /bin and /sbin, /usr/libexec for
1113		all others.]
1114
1115
1116=-=-=-=-=   bsd.subdir.mk   =-=-=-=-=
1117
1118The include file <bsd.subdir.mk> contains the default targets for building
1119subdirectories.  It has the same eight targets as <bsd.prog.mk>: all,
1120clean, cleandir, depend, includes, install, lint, and tags.  For all of
1121the directories listed in ${SUBDIR}, the specified directory will be
1122visited and the target made.  There is also a default target which allows
1123the command "make subdir" where subdir is any directory listed in ${SUBDIR}.
1124
1125As a special case, the use of a token .WAIT as an entry in SUBDIR acts
1126as a synchronization barrier when multiple make jobs are run; subdirs
1127before the .WAIT must complete before any subdirs after .WAIT are
1128started.  See make(1) for some caveats on use of .WAIT and other
1129special sources.
1130
1131
1132=-=-=-=-=   bsd.sys.mk   =-=-=-=-=
1133
1134The include file <bsd.sys.mk> is used by <bsd.prog.mk> and
1135<bsd.lib.mk>.  It contains overrides that are used when building
1136the NetBSD source tree.
1137
1138The following variables control how various files are compiled/built.
1139(Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"):
1140
1141AR		Create, modify, and extract from archives.  [ar]
1142
1143ARFLAGS		Options to ${AR}.  [rl]
1144
1145AS		Assembler.  [as]
1146
1147AFLAGS		Options to ${AS}.  []
1148
1149CC		C compiler.  [cc]
1150
1151CFLAGS		Options to ${CC}.  [Usually -O or -O2]
1152
1153CPP		C Pre-Processor.  [cpp]
1154
1155CPPFLAGS	Options to ${CPP}.  []
1156
1157CPUFLAGS	Optimization flags for ${CC}.  []
1158
1159CXX		C++ compiler.  [c++]
1160
1161CXXFLAGS	Options to ${CXX}.  [${CFLAGS}]
1162
1163ELF2ECOFF	Convert ELF-format executable to ECOFF.  [elf2ecoff]
1164
1165FC		Fortran compiler.  [f77]
1166
1167FFLAGS		Options to {$FC}.  [-O]
1168
1169INSTALL		install(1) command.  [install]
1170
1171LEX		Lexical analyzer.  [lex]
1172
1173LFLAGS		Options to ${LEX}.  []
1174
1175LPREFIX		Symbol prefix for ${LEX} (see -P option in lex(1)) [yy]
1176
1177LD		Linker.  [ld]
1178
1179LDFLAGS		Options to ${LD}.  []
1180
1181LINT		C program verifier.  [lint]
1182
1183LINTFLAGS	Options to ${LINT}.  [-chapbxzF]
1184
1185LORDER		List dependencies for object files.  [lorder]
1186
1187MAKE		make(1).  [make]
1188
1189MKDEP		Construct Makefile dependency list.  [mkdep]
1190
1191NM		List symbols from object files.  [nm]
1192
1193PC		Pascal compiler.  [pc]  (Not present)
1194
1195PFLAGS		Options to ${PC}.  []
1196
1197OBJC		Objective C compiler.  [${CC}]
1198
1199OBJCFLAGS	Options to ${OBJC}.  [${CFLAGS}]
1200
1201OBJCOPY		Copy and translate object files.  [objcopy]
1202
1203RANLIB		Generate index to archive.  [ranlib]
1204
1205SHELL		Shell.  [sh]
1206
1207SIZE		List section sizes and total size.  [size]
1208
1209STRIP		Discard symbols from object files.  [strip]
1210
1211TSORT		Topological sort of a directed graph.  [tsort -q]
1212
1213YACC		LALR(1) parser generator.  [yacc]
1214
1215YFLAGS		Options to ${YACC}.  []
1216
1217YHEADER		If defined, add "-d" to YFLAGS, and add dependencies
1218		from <file>.y to <file>.h and <file>.c, and add
1219		<foo>.h to CLEANFILES.
1220
1221YPREFIX		If defined, add "-p ${YPREFIX}" to YFLAGS.
1222
1223
1224The following variables are defined to commands to perform the
1225appropriate operation, with the default in [brackets].
1226(Note that these are overridden in <bsd.own.mk> if USETOOLS == "yes"):
1227
1228TOOL_ASN1_COMPILE	ASN1 compiler.  [asn1_compile]
1229
1230TOOL_CAP_MKDB		Create capability database.  [cap_mkdb]
1231
1232TOOL_CAT		Concatenate and print files.  [cat]
1233
1234TOOL_CKSUM		Display file checksums.  [cksum]
1235
1236TOOL_COMPILE_ET		Error table compiler.  [compile_et]
1237
1238TOOL_CONFIG		Build kernel compilation directories.  [config]
1239
1240TOOL_CRUNCHGEN		Generate crunched binary build environment.  [crunchgen]
1241
1242TOOL_CTAGS		Create a tags file.  [ctags]
1243
1244TOOL_DB			Manipulate db(3) databases.  [db]
1245
1246TOOL_EQN		Format equations for groff.  [eqn]
1247
1248TOOL_FGEN		IEEE 1275 Open Firmware FCode Tokenizer.  [fgen]
1249
1250TOOL_GENCAT		Generate NLS message catalogs.  [gencat]
1251
1252TOOL_GROFF		Front end for groff document formatting system.  [groff]
1253
1254TOOL_HEXDUMP		Ascii, decimal, hexadecimal, octal dump.  [hexdump]
1255
1256TOOL_INDXBIB		Make bibliographic database's inverted index.  [indxbib]
1257
1258TOOL_INSTALLBOOT	Install disk bootstrap software.  [installboot]
1259
1260TOOL_INSTALL_INFO	Update info/dir entries.  [install-info]
1261
1262TOOL_M4			M4 macro language processor.  [m4]
1263
1264TOOL_MAKEFS		Create file system image from directory tree.  [makefs]
1265
1266TOOL_MAKEINFO		Translate Texinfo documents.  [makeinfo]
1267
1268TOOL_MAKEWHATIS		Create a whatis.db database.  [makewhatis]
1269
1270TOOL_MDSETIMAGE		Set kernel RAM disk image.  [mdsetimage]
1271
1272TOOL_MENUC		Menu compiler.  [menuc]
1273
1274TOOL_MKCSMAPPER		Make charset mapping table.  [mkcsmapper]
1275
1276TOOL_MKESDB		Make encoding scheme database.  [mkesdb]
1277
1278TOOL_MKLOCALE		Make LC_CTYPE locale files.  [mklocale]
1279
1280TOOL_MKMAGIC		Create database for file(1).  [file]
1281
1282TOOL_MKTEMP		Make (unique) temporary file name.  [mktemp]
1283
1284TOOL_MSGC		Simple message list compiler.  [msgc]
1285
1286TOOL_MTREE		Map a directory hierarchy.  [mtree]
1287
1288TOOL_PAX		Manipulate file archives and copy directories.  [pax]
1289
1290TOOL_PIC		Compile pictures for groff.  [pic]
1291
1292TOOL_PREPMKBOOTIMAGE	prep-mkbootimage (XXXBUILDSH).  [prep-mkbootimage]
1293
1294TOOL_PWD_MKDB		Generate the password databases.  [pwd_mkdb]
1295
1296TOOL_REFER		Preprocess bibliographic references for groff.  [refer]
1297
1298TOOL_ROFF_ASCII		Generate ASCII groff output.  [nroff]
1299
1300TOOL_ROFF_DVI		Generate DVI groff output.  [${TOOL_GROFF} -Tdvi]
1301
1302TOOL_ROFF_HTML		Generate HTML groff output.
1303			[${TOOL_GROFF} -Tlatin1 -mdoc2html]
1304
1305TOOL_ROFF_PS		Generate PS groff output.  [${TOOL_GROFF} -Tps]
1306
1307TOOL_ROFF_RAW		Generate "raw" groff output.  [${TOOL_GROFF} -Z]
1308
1309TOOL_RPCGEN		Remote Procedure Call (RPC) protocol compiler.  [rpcgen]
1310
1311TOOL_SOELIM		Eliminate .so's from groff input.  [soelim]
1312
1313TOOL_STAT		Display file status.  [stat]
1314
1315TOOL_SUNLABEL		Read or modify a SunOS disk label.  [sunlabel]
1316
1317TOOL_TBL		Format tables for groff.  [tbl]
1318
1319TOOL_UUDECODE		Uudecode a binary file.  [uudecode]
1320
1321TOOL_VGRIND		Grind nice listings of programs.  [vgrind -f]
1322
1323TOOL_ZIC		Time zone compiler.  [zic]
1324
1325
1326Other variables of note (incomplete list):
1327
1328WARNS		Crank up gcc warning options; the distinct levels are:
1329			WARNS=1
1330			WARNS=2
1331			WARNS=3
1332
1333FORMAT_AUDIT	If FORMAT_AUDIT is set, and WFORMAT is set and > 1, turn on
1334WFORMAT 	-Wnetbsd-format-audit for extra-stringent format checking.
1335		WFORMAT belongs in individual makefiles and/or
1336		Makefile.inc files.  (set WFORMAT=1 in individual
1337		makefiles if a program is not security critical and is
1338		doing bizarre things with format strings which would
1339		be even uglier if rewritten) FORMAT_AUDIT should go in
1340		mk.conf if you're doing format-string auditing.
1341		FORMAT_AUDIT may go away in time.
1342
1343
1344=-=-=-=-=   bsd.x11.mk   =-=-=-=-=
1345
1346The include file <bsd.x11.mk> contains parameters and targets for
1347cross-building X11R6 from ${X11SRCDIR.xc}.
1348It should be included after the general Makefile contents but before
1349the include files such as <bsd.prog.mk> and <bsd.lib.mk>.
1350
1351It provides the following targets:
1352	.man.1 .man.3 .man.4 .man.5 .man.7:
1353		If ${MAN} or ${PROG} is set and ${MKMAN} != "no",
1354		these rules convert from X11R6's manual page source
1355		into an mdoc.old source file.
1356	cleanx11man:
1357		Clean up the mdoc.old files generated by the above.
1358
1359It sets the following variables:
1360
1361BINDIR			Set to ${X11BINDIR}.
1362			To override, define after including <bsd.x11.mk>
1363
1364LIBDIR			Set to ${X11USRLIBDIR}.
1365			To override, define after including <bsd.x11.mk>
1366
1367MANDIR			Set to ${X11MANDIR}.
1368			To override, define after including <bsd.x11.mk>
1369
1370CPPFLAGS		Appended with definitions to include from
1371			${DESTDIR}${X11INCDIR}
1372
1373LDFLAGS			Appended with definitions to link from
1374			${DESTDIR}${X11USRLIBDIR}
1375
1376X11FLAGS.CONNECTION	Equivalent to X11R6's CONNECTION_FLAGS.
1377
1378X11FLAGS.EXTENSION	Equivalent to X11R6's EXT_DEFINES.
1379
1380X11FLAGS.LOADABLE	Equivalent to X11R6's LOADABLE.
1381
1382X11FLAGS.OS_DEFINES	Equivalent to X11R6's OS_DEFINES.
1383
1384X11FLAGS.SERVER		Equivalent to X11R6's ServerDefines.
1385
1386X11FLAGS.THREADLIB	Equivalent to X11R6's THREADS_DEFINES for libraries.
1387
1388X11FLAGS.THREADS	Equivalent to X11R6's THREADS_DEFINES.
1389
1390X11FLAGS.VERSION	cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION.
1391
1392X11TOOL_UNXCOMM		Commandline to convert `XCOMM' comments to `#'
1393
1394It uses the following variables:
1395
1396APPDEFS			List of app-default files to install.
1397
1398CPPSCRIPTS		List of files/scripts to run through cpp(1)
1399			and then ${X11TOOL_UNXCOMM}.  The source files
1400			have a `.cpp' suffix, the generated files do not.
1401
1402CPPSCRIPTFLAGS		Additional flags to cpp(1) when building CPPSCRIPTS.
1403
1404CPPSCRIPTFLAGS_<fn>	Additional flags to cpp(1) when building CPPSCRIPT <fn>.
1405
1406
1407=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1408