bsd.README revision 1.84
1#	$NetBSD: bsd.README,v 1.84 2001/11/19 16:20:26 kleink 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
61The following variables that control how things are made/installed that
62are not set by default. These should not be set by Makefiles; they're for
63the user to define in MAKECONF (see bsd.own.mk, below) or on the make(1)
64command line:
65
66BUILD 		If defined, 'make install' checks that the targets in the
67		source directories are up-to-date and remakes them if they
68                are out of date, instead of blindly trying to install
69                out of date or non-existent targets.
70
71UPDATE 		If defined, 'make install' only installs targets that are
72		more recently modified in the source directories that their
73		installed counterparts.
74
75UNPRIVED	If defined, don't set the owner/group/mode when installing
76		files or directories, and keep a metadata log of what
77		the owner/group/mode should be.  This allows a
78		non-root "make install".
79
80MKCATPAGES	If "no", don't build or install the catman pages.
81
82MKDOC		If "no", don't build or install the documentation.
83
84MKINFO		If "no", don't build or install Info documentation from
85		Texinfo source files.
86
87MKLINT		If "no", don't build or install the lint libraries.
88
89MKMAN		If "no", don't build or install the man or catman pages.
90		Also acts as "MKCATPAGES=no"
91
92MKNLS		If "no", don't build or install the NLS files and locale
93		definition files.
94
95MKOBJ		If "no", don't enable the rule which creates objdirs.
96		"yes" by default.
97
98MKOBJDIRS	If "no", don't create objdirs during a "make build".
99		"no" by default.
100
101MKPIC		If "no", don't build or install shared libraries.
102
103MKPICINSTALL	If "no", don't install the *_pic.a libraries.
104
105MKPROFILE	If "no", don't build or install the profiling libraries.
106
107MKSHARE		If "no", act as "MKCATPAGES=no MKDOC=no MKINFO=no MKMAN=no
108		MKNLS=no".  I.e, don't build catman pages, documentation,
109		Info documentation, man pages, NLS files, ...
110
111=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
112
113The include file <sys.mk> has the default rules for all makes, in the BSD
114environment or otherwise.  You probably don't want to touch this file.
115If you intend to run a cross build, you will need to supply the following
116host tools, and configure the following variables properly:
117
118OBJCOPY		objcopy - copy and translate object files
119
120STRIP		strip - Discard symbols from object files
121
122CONFIG		config - build kernel compilation directories
123
124RPCGEN		rpcgen - Remote Procedure Call (RPC) protocol compiler
125
126MKLOCALE	mklocale - make LC_CTYPE locale files
127
128MTREE		mtree - build directory tree from a spec file
129
130=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
131
132The include file <bsd.man.mk> handles installing manual pages and their
133links.
134
135It has a two targets:
136
137	maninstall:
138		Install the manual page sources and their links.
139	catinstall:
140		Install the preformatted manual pages and their links.
141
142It sets/uses the following variables:
143
144MANDIR		Base path for manual installation.
145
146MANGRP		Manual group.
147
148MANOWN		Manual owner.
149
150MANMODE		Manual mode.
151
152MANSUBDIR	Subdirectory under the manual page section, i.e. "/vax"
153		or "/tahoe" for machine specific manual pages.
154
155MAN		The manual pages to be installed (use a .1 - .9 suffix).
156
157MLINKS		List of manual page links (using a .1 - .9 suffix).  The
158		linked-to file must come first, the linked file second,
159		and there may be multiple pairs.  The files are soft-linked.
160
161The include file <bsd.man.mk> includes a file named "../Makefile.inc" if
162it exists.
163
164=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
165
166The include file <bsd.own.mk> contains source tree configuration parameters,
167such as the owners, groups, etc. for both manual pages and binaries, and
168a few global "feature configuration" parameters.
169
170It has no targets.
171
172To get system-specific configuration parameters, bsd.own.mk will try to
173include the file specified by the "MAKECONF" variable.  If MAKECONF is not
174set, or no such file exists, the system make configuration file, /etc/mk.conf
175is included.  These files may define any of the variables described below.
176
177bsd.own.mk sets the following variables, if they are not already defined
178(defaults are in brackets):
179
180BSDSRCDIR	The real path to the system sources, so that 'make obj'
181		will work correctly. [/usr/src]
182
183BSDOBJDIR	The real path to the system 'obj' tree, so that 'make obj'
184		will work correctly. [/usr/obj]
185
186BINGRP		Binary group. [wheel]
187
188BINOWN		Binary owner. [root]
189
190BINMODE		Binary mode. [555]
191
192NONBINMODE	Mode for non-executable files. [444]
193
194MANDIR		Base path for manual installation. [/usr/share/man/cat]
195
196MANGRP		Manual group. [wheel]
197
198MANOWN		Manual owner. [root]
199
200MANMODE		Manual mode. [${NONBINMODE}]
201
202MANINSTALL	Manual installation type: maninstall, catinstall, or both
203
204LDSTATIC	Control program linking; if set blank, link everything
205		dynamically. If set to "-static", link everything statically.
206		If not set, programs link according to their makefile.
207
208LIBDIR		Base path for library installation. [/usr/lib]
209
210LINTLIBDIR	Base path for lint(1) library installation. [/usr/libdata/lint]
211
212LIBGRP		Library group. [${BINGRP}]
213
214LIBOWN		Library owner. [${BINOWN}]
215
216LIBMODE		Library mode. [${NONBINMODE}]
217
218DOCDIR		Base path for system documentation (e.g. PSD, USD, etc.)
219	        installation. [/usr/share/doc]
220
221HTMLDOCDIR	Base path for html system documentation installation.
222		[/usr/share/doc/html]
223
224DOCGRP		Documentation group. [wheel]
225
226DOCOWN		Documentation owner. [root]
227
228DOCMODE		Documentation mode. [${NONBINMODE}]
229
230NLSDIR		Base path for Native Language Support files installation.
231		[/usr/share/nls]
232
233NLSGRP		Native Language Support files group. [wheel]
234
235NLSOWN		Native Language Support files owner. [root]
236
237NLSMODE		Native Language Support files mode. [${NONBINMODE}]
238
239STRIPFLAG	The flag passed to the install program to cause the binary
240		to be stripped.  This is to be used when building your
241		own install script so that the entire system can be made
242		stripped/not-stripped using a single knob. [-s]
243
244COPY		The flag passed to the install program to cause the binary
245		to be copied rather than moved.  This is to be used when
246		building our own install script so that the entire system
247		can either be installed with copies, or with moves using
248		a single knob. [-c]
249
250Additionally, the following variables may be set by bsd.own.mk or in a
251make configuration file to modify the behaviour of the system build
252process (default values are in brackets along with comments, if set by
253bsd.own.mk):
254
255MKCRYPTO	If set to "no", no cryptography support will be built
256		into the system.  Defaults to "yes".
257
258NOCRYPTO	If set, it is equivalent to setting MKCRYPTO to "no".
259
260MKCRYPTO_IDEA	If set to "yes", IDEA support will be built into
261		libcrypto_idea.a.  Defaults to "no".
262
263MKCRYPTO_RC5	If set to "yes", RC5 support will be built into
264		libcrypto_rc5.a.  Defaults to "no".
265
266MKKERBEROS	If set to "no", disables building Kerberos (v4 or v5)
267		support into various system utilities that support it.
268		Defaults to "yes".  NOTE: This does not affect the
269		building of the Kerberos libraries or infrastructure
270		programs themselves.  To completely disable Kerberos,
271		set MKCRYPTO to "no".
272
273NOKERBEROS	If set, it is equivalent to setting MKKERBEROS to "no".
274
275SKEY		Compile in support for S/key authentication. [yes, set
276		unconditionally]
277
278MANZ		Compress manual pages at installation time.
279
280SYS_INCLUDE	Copy or symlink kernel include files into /usr/include.
281		Possible values are "symlinks" or "copies" (which is
282		the same as the variable being unset).
283
284NOPROFILE	Do not build profiled versions of system libraries
285
286NOPIC		Do not build PIC versions of system libraries, and
287		do not build shared libraries.  [set if ${MACHINE_ARCH}
288		is "sh3" and ${OBJECT_FMT} is "COFF", unset otherwise.]
289
290NOLINT		Do not build lint libraries.
291
292OBJECT_FMT	Object file format. [set to "ELF" on architectures that
293		use ELF -- currently if ${MACHINE_ARCH} is "alpha",
294		"mipsel", "mipseb", "powerpc", "sparc", "sparc64",
295		"i386" and some m68k machines, or set to "a.out" on
296		other architectures].
297
298MKSOFTFLOAT	If "yes", build with options to enable the compiler to
299		generate output containing library calls for floating
300		point and possibly soft-float library support.  Defaults
301		to "no".
302
303bsd.own.mk is generally useful when building your own Makefiles so that
304they use the same default owners etc. as the rest of the tree.
305
306=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
307
308The include file <bsd.prog.mk> handles building programs from one or
309more source files, along with their manual pages.  It has a limited number
310of suffixes, consistent with the current needs of the BSD tree.
311
312It has eight targets:
313
314	all:
315		build the program and its manual page
316	clean:
317		remove the program, any object files and the files a.out,
318		Errs, errs, mklog, and ${PROG}.core.
319	cleandir:
320		remove all of the files removed by the target clean, as
321		well as .depend, tags, and any manual pages.
322		`distclean' is a synonym for `cleandir'.
323	depend:
324		make the dependencies for the source files, and store
325		them in the file .depend.
326	includes:
327		install any header files.
328	install:
329		install the program and its manual pages; if the Makefile
330		does not itself define the target install, the targets
331		beforeinstall and afterinstall may also be used to cause
332		actions immediately before and after the install target
333		is executed.
334	lint:
335		run lint on the source files
336	tags:
337		create a tags file for the source files.
338
339It sets/uses the following variables:
340
341BINGRP		Binary group.
342
343BINOWN		Binary owner.
344
345BINMODE		Binary mode.
346
347CLEANFILES	Additional files to remove for the clean and cleandir targets.
348
349COPTS		Additional flags to the compiler when creating C objects.
350
351CPPFLAGS	Additional flags to the C pre-processor
352
353LDADD		Additional loader objects.  Usually used for libraries.
354		For example, to load with the compatibility and utility
355		libraries, use:
356
357			LDADD+=-lutil -lcompat
358
359LDFLAGS		Additional loader flags.
360
361LINKS		The list of binary links; should be full pathnames, the
362		linked-to file coming first, followed by the linked
363		file.  The files are hard-linked.  For example, to link
364		/bin/test and /bin/[, use:
365
366			LINKS=	${DESTDIR}/bin/test ${DESTDIR}/bin/[
367
368SYMLINKS	The list of symbolic links; should be full pathnames.
369                Syntax is identical to LINKS. Note that DESTDIR is not
370		automatically included in the link.
371
372MAN		Manual pages (should end in .1 - .9).  If no MAN variable is
373		defined, "MAN=${PROG}.1" is assumed.
374
375PROG		The name of the program to build.  If not supplied, nothing
376		is built.
377
378PROGNAME	The name that the above program will be installed as, if
379		different from ${PROG}.
380
381SRCS		List of source files to build the program.  If SRCS is not
382		defined, it's assumed to be ${PROG}.c.
383
384DPADD		Additional dependencies for the program.  Usually used for
385		libraries.  For example, to depend on the compatibility and
386		utility libraries use:
387
388			DPADD+=${LIBCOMPAT} ${LIBUTIL}
389
390		The following libraries are predefined for DPADD:
391
392		LIBCRT0?=	${DESTDIR}/usr/lib/crt0.o
393		LIBC?=		${DESTDIR}/usr/lib/libc.a
394		LIBC_PIC?=	${DESTDIR}/usr/lib/libc_pic.a
395		LIBCOMPAT?=	${DESTDIR}/usr/lib/libcompat.a
396		LIBCRYPT?=	${DESTDIR}/usr/lib/libcrypt.a
397		LIBCURSES?=	${DESTDIR}/usr/lib/libcurses.a
398		LIBDBM?=	${DESTDIR}/usr/lib/libdbm.a
399		LIBDES?=	${DESTDIR}/usr/lib/libdes.a
400		LIBEDIT?=	${DESTDIR}/usr/lib/libedit.a
401		LIBFORM?=	${DESTDIR}/usr/lib/libform.a
402		LIBGCC?=	${DESTDIR}/usr/lib/libgcc.a
403		LIBGNUMALLOC?=	${DESTDIR}/usr/lib/libgnumalloc.a
404		LIBINTL?=	${DESTDIR}/usr/lib/libintl.a
405		LIBIPSEC?=	${DESTDIR}/usr/lib/libipsec.a
406		LIBKDB?=	${DESTDIR}/usr/lib/libkdb.a
407		LIBKRB?=	${DESTDIR}/usr/lib/libkrb.a
408		LIBKVM?=	${DESTDIR}/usr/lib/libkvm.a
409		LIBL?=		${DESTDIR}/usr/lib/libl.a
410		LIBM?=		${DESTDIR}/usr/lib/libm.a
411		LIBMENU?=	${DESTDIR}/usr/lib/libmenu.a
412		LIBMP?=		${DESTDIR}/usr/lib/libmp.a
413		LIBNTP?=	${DESTDIR}/usr/lib/libntp.a
414		LIBPC?=		${DESTDIR}/usr/lib/libpc.a
415		LIBPCAP?=	${DESTDIR}/usr/lib/libpcap.a
416		LIBPLOT?=	${DESTDIR}/usr/lib/libplot.a
417		LIBPOSIX?=	${DESTDIR}/usr/lib/libposix.a
418		LIBRESOLV?=	${DESTDIR}/usr/lib/libresolv.a
419		LIBRPCSVC?=	${DESTDIR}/usr/lib/librpcsvc.a
420		LIBSKEY?=	${DESTDIR}/usr/lib/libskey.a
421		LIBTERMCAP?=	${DESTDIR}/usr/lib/libtermcap.a
422		LIBTELNET?=	${DESTDIR}/usr/lib/libtelnet.a
423		LIBUTIL?=	${DESTDIR}/usr/lib/libutil.a
424		LIBWRAP?=	${DESTDIR}/usr/lib/libwrap.a
425		LIBY?=		${DESTDIR}/usr/lib/liby.a
426		LIBZ?=		${DESTDIR}/usr/lib/libz.a
427
428
429SHAREDSTRINGS	If defined, a new .c.o rule is used that results in shared
430		strings, using xstr(1). Note that this will not work with
431		parallel makes.
432
433STRIPFLAG	The flag passed to the install program to cause the binary
434		to be stripped.
435
436SUBDIR		A list of subdirectories that should be built as well.
437		Each of the targets will execute the same target in the
438		subdirectories.
439
440SCRIPTS		A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
441		These are installed exactly like programs.
442
443SCRIPTSNAME	The name that the above program will be installed as, if
444		different from ${SCRIPTS}. These can be further specialized
445		by setting SCRIPTSNAME_<script>.
446
447FILES		A list of files to install. The installation is controlled
448		by the FILESNAME, FILESOWN, FILESGRP, FILESMODE, FILESDIR
449		variables that can be further specialized by FILES<VAR>_<file>
450
451The include file <bsd.prog.mk> includes the file named "../Makefile.inc"
452if it exists, as well as the include file <bsd.man.mk>.
453
454Some simple examples:
455
456To build foo from foo.c with a manual page foo.1, use:
457
458	PROG=	foo
459
460	.include <bsd.prog.mk>
461
462To build foo from foo.c with a manual page foo.2, add the line:
463
464	MAN=	foo.2
465
466If foo does not have a manual page at all, add the line:
467
468	MKMAN=	no
469
470If foo has multiple source files, add the line:
471
472	SRCS=	a.c b.c c.c d.c
473
474=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
475
476The include file <bsd.subdir.mk> contains the default targets for building
477subdirectories.  It has the same eight targets as <bsd.prog.mk>: all, 
478clean, cleandir, depend, includes, install, lint, and tags.  For all of
479the directories listed in the variable SUBDIR, the specified directory 
480will be visited and the target made.  There is also a default target which
481allows the command "make subdir" where subdir is any directory listed in
482the variable SUBDIR.
483
484As a special case, the use of a token .WAIT as an entry in SUBDIR acts
485as a synchronization barrier when multiple make jobs are run; subdirs
486before the .WAIT must complete before any subdirs after .WAIT are
487started.  See make(1) for some caveats on use of .WAIT and other
488special sources.
489
490=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
491
492The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
493and is included from from bsd.lib.mk and bsd.prog.mk.
494
495=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
496
497The include file <bsd.files.mk> handles the FILES variables and is included
498from bsd.lib.mk and bsd.prog.mk.
499
500=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
501
502The include file <bsd.inc.mk> defines the includes target and uses two
503variables:
504
505INCS		The list of include files
506
507INCSDIR		The location to install the include files.
508
509INCSNAME	Target name of the include file, if only one; same as
510		FILESNAME, but for include files.
511
512INCSNAME_<file>	The name file <file> should be installed as, if not <file>,
513		same as FILESNAME_<file>, but for include files.
514
515=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
516
517The include file <bsd.kinc.mk> defines the many targets (includes,
518subdirectories, etc.), and is used by kernel makefiles to handle
519include file installation.  It is intended to be included alone, by
520kernel Makefiles.  Please see bsd.kinc.mk for more details, and keep
521the documentation in that file up to date.
522
523=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
524
525The include file <bsd.info.mk> is used to generate and install GNU Info
526documentation from respective Texinfo source files.  It defines three
527implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
528following variables:
529
530TEXINFO		List of Texinfo source files.  Info documentation will
531		consist of single files with the extension replaced by
532		.info.
533
534INFOFLAGS	Flags to pass to makeinfo.  []
535
536INSTALL_INFO	Name of install-info program.  [install-info]
537
538MAKEINFO	Name of makeinfo program.  [makeinfo]
539
540=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
541
542The include file <bsd.sys.mk> is used by <bsd.prog.mk> and
543<bsd.lib.mk>.  It contains overrides that are used when building
544the NetBSD source tree.  For instance, if "PARALLEL" is defined by
545the program/library Makefile, it includes a set of rules for lex and
546yacc that allow multiple lex and yacc targets to be built in parallel.
547
548Other variables of note (incomplete list):
549
550WARNS		Crank up gcc warning options; the distinct levels are:
551			WARNS=1
552			WARNS=2
553			WARNS=3
554
555FORMAT_AUDIT	If FORMAT_AUDIT is set, and WFORMAT is set and > 1, turn on
556WFORMAT 	-Wnetbsd-format-audit for extra-stringent format checking.
557		WFORMAT belongs in individual makefiles and/or
558		Makefile.inc files.  (set WFORMAT=1 in individual
559		makefiles if a program is not security critical and is
560		doing bizarre things with format strings which would
561		be even uglier if rewritten) FORMAT_AUDIT should go in
562		mk.conf if you're doing format-string auditing. 
563		FORMAT_AUDIT may go away in time.
564
565=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
566
567The include file <bsd.lib.mk> has support for building libraries.  It has
568the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
569includes, install, lint, and tags.  Additionally, it has a checkver target
570which checks for installed shared object libraries whose version is greater
571that the version of the source. It has a limited number of suffixes,
572consistent with the current needs of the BSD tree.
573
574It sets/uses the following variables:
575
576LIB		The name of the library to build.
577
578LIBDIR		Target directory for libraries.
579
580LINTLIBDIR	Target directory for lint libraries.
581
582LIBGRP		Library group.
583
584LIBOWN		Library owner.
585
586LIBMODE		Library mode.
587
588LDADD		Additional loader objects.
589
590MAN		The manual pages to be installed (use a .1 - .9 suffix).
591
592MKLINKLIB	If "no", act as "MKPICINSTALL=no MKPROFILE=no".
593		Also:
594			- don't install the .a libraries
595			- don't install _pic.a libraries on PIC systems
596			- don't build .a libraries on PIC systems
597			- don't install the .so symlink on ELF systems
598		I.e, only install the shared library (and the .so.major
599		symlink on ELF).
600
601MKPICLIB	If "no", don't build _pic.a libraries, and build the
602		shared object libraries from the .a libraries.  A
603		symlink is installed in ${DESTDIR}/usr/lib for the
604		_pic.a library pointing to the .a library.
605
606NOCHECKVER_<library>
607NOCHECKVER	If set, disables checking for installed shared object
608		libraries with versions greater than the source.  A
609		particular library name, without the "lib" prefix, may
610		be appended to the variable name to disable the check for
611		only that library.
612
613SRCS		List of source files to build the library.  Suffix types
614		.s, .c, and .f are supported.  Note, .s files are preferred
615		to .c files of the same name.  (This is not the default for
616		versions of make.)
617
618The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
619if it exists, as well as the include file <bsd.man.mk>.
620
621It has rules for building profiled objects; profiled libraries are
622built by default.
623
624Libraries are ranlib'd when made.
625
626=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
627
628The include file <bsd.obj.mk> defines targets related to the creation
629and use of separated object and source directories.
630
631If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
632${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
633it exists.  Otherwise make(1) looks for the existence of a
634subdirectory (or a symlink to a directory) of the source directory
635into which built targets should be placed.  If an environment variable
636named MAKEOBJDIR is set, make(1) uses its value as the name of the
637object directory; failing that, make first looks for a subdirectory
638named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
639
640Object directories are not created automatically by make(1) if they
641don't exist; you need to run a separate "make obj".  (This will happen
642during a top-level build if "MKOBJDIRS" is set to a value other than
643"no").  When the source directory is a subdirectory of ${BSDSRCDIR} --
644and this is determined by a simple string prefix comparison -- object
645directories are created in a separate object directory tree, and a
646symlink to the object directory in that tree is created in the source
647directory; otherwise, "make obj" assumes that you're not in the main
648source tree and that it's not safe to use a separate object tree.
649
650Several variables used by <bsd.obj.mk> control exactly what
651directories and links get created during a "make obj":
652
653MAKEOBJDIR	If set, this is the component name of the object
654		directory.
655
656OBJMACHINE	If this is set but MAKEOBJDIR is not set, creates
657		object directories or links named "obj.${MACHINE}";
658		otherwise, just creates ones named "obj".
659
660USR_OBJMACHINE  If set, and the current directory is a subdirectory of
661		${BSDSRCDIR}, create object directory in the
662		corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
663		otherwise, create it in the corresponding subdirectory
664		of ${BSDOBJDIR}
665
666=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
667
668The include file <bsd.kernobj.mk> defines variables related to the
669location of kernel sources and object directories.
670
671KERNSRCDIR	Is the location of the top of the kernel src.
672		It defaults to ${BSDSRCDIR}/sys, but the top-level
673		Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the
674		absolute path to the directory where the top-level
675		Makefile.inc was found.
676
677KERNARCHDIR	Is the location of the machine dependent kernel
678		sources.  It defaults to arch/${MACHINE}
679		
680KERNCONFDIR	Is where the configuration files for kernels are
681		found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf.
682
683KERNOBJDIR	Is the kernel build directory.  The kernel GENERIC for
684		instance will be compiled in ${KERNOBJDIR}/GENERIC.
685		The default value is
686		${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
687		if it exists or the target 'obj' is being made.
688		Otherwise the default is
689		${KERNSRCDIR}/${KERNARCHDIR}/compile.
690
691It is important that Makefiles (such as those under src/distrib) that
692wish to find compiled kernels use bsd.kernobj.mk and ${KERNOBJDIR}
693rather than make assumptions about the location of the compiled kernel.
694
695=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
696