Annotation of src/share/mk/bsd.README, Revision 1.50
1.50 ! thorpej 1: # $NetBSD: bsd.README,v 1.49 1999/07/01 20:19:18 itojun Exp $
1.24 mikel 2: # @(#)bsd.README 8.2 (Berkeley) 4/2/94
1.1 cgd 3:
4: This is the README file for the new make "include" files for the BSD
5: source tree. The files are installed in /usr/share/mk, and are, by
1.11 jtc 6: convention, named with the suffix ".mk".
1.1 cgd 7:
8: Note, this file is not intended to replace reading through the .mk
9: files for anything tricky.
10:
11: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
12:
13: RANDOM THINGS WORTH KNOWING:
14:
15: The files are simply C-style #include files, and pretty much behave like
16: you'd expect. The syntax is slightly different in that a single '.' is
17: used instead of the hash mark, i.e. ".include <bsd.prog.mk>".
18:
19: One difference that will save you lots of debugging time is that inclusion
20: of the file is normally done at the *end* of the Makefile. The reason for
21: this is because .mk files often modify variables and behavior based on the
22: values of variables set in the Makefile. To make this work, remember that
23: the 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:
30: the command "make a" will echo "a". To make things confusing, the SECOND
31: variable 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:
39: the command "make b" will echo "bar". This is for compatibility with the
40: way the V7 make behaved.
41:
42: It's fairly difficult to make the BSD .mk files work when you're building
43: multiple programs in a single directory. It's a lot easier split up the
44: programs than to deal with the problem. Most of the agony comes from making
1.36 ross 45: the "obj" directory stuff work right, not because we switched to a new version
1.1 cgd 46: of make. So, don't get mad at us, figure out a better way to handle multiple
47: architectures so we can quit using the symbolic link stuff. (Imake doesn't
48: count.)
49:
50: The file .depend in the source directory is expected to contain dependencies
51: for the source files. This file is read automatically by make after reading
52: the Makefile.
53:
54: The variable DESTDIR works as before. It's not set anywhere but will change
55: the tree where the file gets installed.
56:
57: The profiled libraries are no longer built in a different directory than
58: the regular libraries. A new suffix, ".po", is used to denote a profiled
1.21 christos 59: object, and ".so" denotes a shared (position-independent) object.
60:
1.45 lukem 61: The following variables that control how things are made/installed that
1.47 tv 62: are not set by default. These should not be set by Makefiles; they're for
63: the user to define in MAKECONF (see bsd.own.mk, below) or on the make(1)
64: command line:
1.21 christos 65:
1.45 lukem 66: BUILD If defined, 'make install' checks that the targets in the
67: source directories are up-to-date and remakes them if they
1.21 christos 68: are out of date, instead of blindly trying to install
69: out of date or non-existant targets.
70:
1.45 lukem 71: UPDATE If defined, 'make install' only installs targets that are
72: more recently modified in the source directories that their
73: installed counterparts.
74:
75: MKCATPAGES If "no", don't build or install the catman pages.
76:
77: MKDOC If "no", don't build or install the documentation.
78:
1.47 tv 79: MKINFO If "no", don't build or install Info documentation from
80: Texinfo source files.
1.45 lukem 81:
82: MKLINT If "no", don't build or install the lint libraries.
83:
84: MKMAN If "no", don't build or install the man or catman pages.
1.46 lukem 85: Also acts as "MKCATPAGES=no"
1.45 lukem 86:
87: MKNLS If "no", don't build or install the NLS files.
88:
89: MKOBJ If "no", don't create objdirs.
90:
91: MKPIC If "no", don't build or install shared libraries.
92:
93: MKPICINSTALL If "no", don't install the *_pic.a libraries.
94:
95: MKPROFILE If "no", don't build or install the profiling libraries.
96:
1.48 lukem 97: MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKINFO=no MKMAN=no
98: MKNLS=no". I.e, don't build catman pages, documentation,
99: Info documentation, man pages, NLS files, ...
1.1 cgd 100:
101: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
102:
103: The include file <sys.mk> has the default rules for all makes, in the BSD
104: environment or otherwise. You probably don't want to touch this file.
105:
106: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
107:
108: The include file <bsd.man.mk> handles installing manual pages and their
109: links.
110:
1.21 christos 111: It has a two targets:
1.1 cgd 112:
113: maninstall:
1.21 christos 114: Install the manual page sources and their links.
115: catinstall:
116: Install the preformatted manual pages and their links.
1.1 cgd 117:
118: It sets/uses the following variables:
119:
120: MANDIR Base path for manual installation.
121:
122: MANGRP Manual group.
123:
124: MANOWN Manual owner.
125:
126: MANMODE Manual mode.
127:
128: MANSUBDIR Subdirectory under the manual page section, i.e. "/vax"
129: or "/tahoe" for machine specific manual pages.
130:
1.15 cgd 131: MAN The manual pages to be installed (use a .1 - .9 suffix).
1.1 cgd 132:
1.15 cgd 133: MLINKS List of manual page links (using a .1 - .9 suffix). The
1.1 cgd 134: linked-to file must come first, the linked file second,
135: and there may be multiple pairs. The files are soft-linked.
136:
137: The include file <bsd.man.mk> includes a file named "../Makefile.inc" if
138: it exists.
139:
140: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
141:
1.17 thorpej 142: The include file <bsd.own.mk> contains source tree configuration parameters,
143: such as the owners, groups, etc. for both manual pages and binaries, and
144: a few global "feature configuration" parameters.
1.1 cgd 145:
146: It has no targets.
147:
1.29 cjs 148: To get system-specific configuration parameters, bsd.own.mk will try to
149: include the file specified by the "MAKECONF" variable. If MAKECONF is not
150: set, or no such file exists, the system make configuration file, /etc/mk.conf
151: is included. These files may define any of the variables described below.
1.17 thorpej 152:
153: bsd.own.mk sets the following variables, if they are not already defined
154: (defaults are in brackets):
1.15 cgd 155:
156: BSDSRCDIR The real path to the system sources, so that 'make obj'
157: will work correctly. [/usr/src]
158:
159: BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj'
160: will work correctly. [/usr/obj]
161:
1.34 lukem 162: BINGRP Binary group. [wheel]
1.15 cgd 163:
1.34 lukem 164: BINOWN Binary owner. [root]
1.15 cgd 165:
166: BINMODE Binary mode. [555]
167:
168: NONBINMODE Mode for non-executable files. [444]
169:
170: MANDIR Base path for manual installation. [/usr/share/man/cat]
171:
1.34 lukem 172: MANGRP Manual group. [wheel]
1.15 cgd 173:
1.34 lukem 174: MANOWN Manual owner. [root]
1.15 cgd 175:
176: MANMODE Manual mode. [${NONBINMODE}]
177:
1.21 christos 178: MANINSTALL Manual installation type: maninstall, catinstall, or both
179:
1.15 cgd 180: LIBDIR Base path for library installation. [/usr/lib]
181:
182: LINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint]
183:
184: LIBGRP Library group. [${BINGRP}]
185:
186: LIBOWN Library owner. [${BINOWN}]
187:
188: LIBMODE Library mode. [${NONBINMODE}]
189:
190: DOCDIR Base path for system documentation (e.g. PSD, USD, etc.)
191: installation. [/usr/share/doc]
192:
1.34 lukem 193: DOCGRP Documentation group. [wheel]
1.15 cgd 194:
1.34 lukem 195: DOCOWN Documentation owner. [root]
1.15 cgd 196:
197: DOCMODE Documentation mode. [${NONBINMODE}]
198:
199: NLSDIR Base path for National Language Support files installation.
200: [/usr/share/nls]
1.1 cgd 201:
1.34 lukem 202: NLSGRP National Language Support files group. [wheel]
1.1 cgd 203:
1.34 lukem 204: NLSOWN National Language Support files owner. [root]
1.1 cgd 205:
1.15 cgd 206: NLSMODE National Language Support files mode. [${NONBINMODE}]
1.1 cgd 207:
1.32 mikel 208: STRIPFLAG The flag passed to the install program to cause the binary
1.1 cgd 209: to be stripped. This is to be used when building your
210: own install script so that the entire system can be made
1.15 cgd 211: stripped/not-stripped using a single knob. [-s]
1.1 cgd 212:
1.2 cgd 213: COPY The flag passed to the install program to cause the binary
214: to be copied rather than moved. This is to be used when
215: building our own install script so that the entire system
216: can either be installed with copies, or with moves using
1.15 cgd 217: a single knob. [-c]
218:
1.17 thorpej 219: Additionally, the following variables may be set by bsd.own.mk or in a
220: make configuration file to modify the behaviour of the system build
221: process (default values are in brackets along with comments, if set by
222: bsd.own.mk):
1.15 cgd 223:
1.50 ! thorpej 224: CRYPTOBASE Select which cryptography code base to use when building
! 225: cryptography support into the system. See the
! 226: bsd.crypto.mk section for more information.
! 227:
1.15 cgd 228: EXPORTABLE_SYSTEM
1.50 ! thorpej 229: Forces CRYPTOBASE to the value "none" for compatibility
! 230: with older NetBSD build environments. See the bsd.crypto.mk
! 231: section for more information.
1.2 cgd 232:
1.15 cgd 233: SKEY Compile in support for S/key authentication. [yes, set
234: unconditionally]
235:
236: KERBEROS Compile in support for Kerberos 4 authentication.
237:
238: KERBEROS5 Compile in support for Kerberos 5 authentication.
239:
240: MANZ Compress manual pages at installation time.
241:
242: SYS_INCLUDE Copy or symlink kernel include files into /usr/include.
243: Possible values are "symlinks" or "copies" (which is
244: the same as the variable being unset).
1.1 cgd 245:
1.15 cgd 246: NOPROFILE Do not build profiled versions of system libraries
1.1 cgd 247:
1.15 cgd 248: NOPIC Do not build PIC versions of system libraries, and
249: do not build shared libraries. [set if ${MACHINE_ARCH}
1.45 lukem 250: is "sparc64", unset otherwise.]
1.1 cgd 251:
1.40 perry 252: NOLINT Do not build lint libraries.
1.33 jonathan 253:
1.50 ! thorpej 254: OBJECT_FMT Object file format. [set to "ELF" on architectures that
! 255: use ELF -- currently if ${MACHINE_ARCH} is "alpha",
! 256: "mipsel", "mipseb", "powerpc", "sparc", "sparc64",
! 257: and "i386", or set to "a.out" on other architectures].
1.33 jonathan 258:
1.1 cgd 259:
1.17 thorpej 260: bsd.own.mk is generally useful when building your own Makefiles so that
1.1 cgd 261: they use the same default owners etc. as the rest of the tree.
262:
263: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
264:
265: The include file <bsd.prog.mk> handles building programs from one or
266: more source files, along with their manual pages. It has a limited number
267: of suffixes, consistent with the current needs of the BSD tree.
268:
1.16 jtc 269: It has eight targets:
1.1 cgd 270:
271: all:
272: build the program and its manual page
273: clean:
274: remove the program, any object files and the files a.out,
1.24 mikel 275: Errs, errs, mklog, and ${PROG}.core.
1.1 cgd 276: cleandir:
277: remove all of the files removed by the target clean, as
278: well as .depend, tags, and any manual pages.
1.42 lukem 279: `distclean' is a synonym for `cleandir'.
1.1 cgd 280: depend:
281: make the dependencies for the source files, and store
282: them in the file .depend.
1.16 jtc 283: includes:
284: install any header files.
1.1 cgd 285: install:
286: install the program and its manual pages; if the Makefile
287: does not itself define the target install, the targets
288: beforeinstall and afterinstall may also be used to cause
289: actions immediately before and after the install target
290: is executed.
291: lint:
292: run lint on the source files
293: tags:
294: create a tags file for the source files.
295:
296: It sets/uses the following variables:
297:
298: BINGRP Binary group.
299:
300: BINOWN Binary owner.
301:
302: BINMODE Binary mode.
303:
304: CLEANFILES Additional files to remove for the clean and cleandir targets.
305:
306: COPTS Additional flags to the compiler when creating C objects.
1.35 lukem 307:
308: CPPFLAGS Additional flags to the C pre-processor
1.1 cgd 309:
310: LDADD Additional loader objects. Usually used for libraries.
311: For example, to load with the compatibility and utility
312: libraries, use:
313:
1.5 jtc 314: LDADD+=-lutil -lcompat
1.1 cgd 315:
316: LDFLAGS Additional loader flags.
317:
318: LINKS The list of binary links; should be full pathnames, the
319: linked-to file coming first, followed by the linked
320: file. The files are hard-linked. For example, to link
321: /bin/test and /bin/[, use:
322:
323: LINKS= ${DESTDIR}/bin/test ${DESTDIR}/bin/[
1.19 perry 324:
325: SYMLINKS The list of symbolic links; should be full pathnames.
1.20 perry 326: Syntax is identical to LINKS. Note that DESTDIR is not
327: automatically included in the link.
1.1 cgd 328:
1.15 cgd 329: MAN Manual pages (should end in .1 - .9). If no MAN variable is
1.8 cgd 330: defined, "MAN=${PROG}.1" is assumed.
1.1 cgd 331:
332: PROG The name of the program to build. If not supplied, nothing
333: is built.
334:
1.21 christos 335: PROGNAME The name that the above program will be installed as, if
336: different from ${PROG}.
337:
1.37 tv 338: SRCS List of source files to build the program. If SRCS is not
1.1 cgd 339: defined, it's assumed to be ${PROG}.c.
340:
341: DPADD Additional dependencies for the program. Usually used for
342: libraries. For example, to depend on the compatibility and
343: utility libraries use:
344:
1.5 jtc 345: DPADD+=${LIBCOMPAT} ${LIBUTIL}
1.1 cgd 346:
347: The following libraries are predefined for DPADD:
348:
1.21 christos 349: LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o
350: LIBC?= ${DESTDIR}/usr/lib/libc.a
351: LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a
352: LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a
353: LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a
354: LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a
355: LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a
356: LIBDES?= ${DESTDIR}/usr/lib/libdes.a
357: LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a
358: LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a
359: LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a
1.49 itojun 360: LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a
1.21 christos 361: LIBKDB?= ${DESTDIR}/usr/lib/libkdb.a
362: LIBKRB?= ${DESTDIR}/usr/lib/libkrb.a
363: LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a
364: LIBL?= ${DESTDIR}/usr/lib/libl.a
365: LIBM?= ${DESTDIR}/usr/lib/libm.a
366: LIBMP?= ${DESTDIR}/usr/lib/libmp.a
1.25 christos 367: LIBNTP?= ${DESTDIR}/usr/lib/libntp.a
1.21 christos 368: LIBPC?= ${DESTDIR}/usr/lib/libpc.a
369: LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a
370: LIBPLOT?= ${DESTDIR}/usr/lib/libplot.a
1.26 kleink 371: LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a
1.21 christos 372: LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a
373: LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a
374: LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a
375: LIBTERMCAP?= ${DESTDIR}/usr/lib/libtermcap.a
376: LIBTELNET?= ${DESTDIR}/usr/lib/libtelnet.a
377: LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a
378: LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a
379: LIBY?= ${DESTDIR}/usr/lib/liby.a
380: LIBZ?= ${DESTDIR}/usr/lib/libz.a
381:
1.1 cgd 382:
383: SHAREDSTRINGS If defined, a new .c.o rule is used that results in shared
1.12 christos 384: strings, using xstr(1). Note that this will not work with
385: parallel makes.
1.1 cgd 386:
387: STRIP The flag passed to the install program to cause the binary
388: to be stripped.
389:
390: SUBDIR A list of subdirectories that should be built as well.
391: Each of the targets will execute the same target in the
392: subdirectories.
393:
1.21 christos 394: SCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
395: These are installed exactly like programs.
396:
397: SCRIPTSNAME The name that the above program will be installed as, if
398: different from ${SCRIPTS}. These can be further specialized
399: by setting SCRIPTSNAME_<script>.
400:
401: FILES A list of files to install. The installation is controlled
402: by the FILESNAME, FILESOWN, FILESGRP, FILESMODE, FILESDIR
403: variables that can be further specialized by FILES<VAR>_<file>
404:
1.1 cgd 405: The include file <bsd.prog.mk> includes the file named "../Makefile.inc"
406: if it exists, as well as the include file <bsd.man.mk>.
407:
408: Some simple examples:
409:
410: To build foo from foo.c with a manual page foo.1, use:
411:
412: PROG= foo
413:
414: .include <bsd.prog.mk>
415:
416: To build foo from foo.c with a manual page foo.2, add the line:
417:
1.9 cgd 418: MAN= foo.2
1.1 cgd 419:
420: If foo does not have a manual page at all, add the line:
421:
422: NOMAN= noman
423:
424: If foo has multiple source files, add the line:
425:
426: SRCS= a.c b.c c.c d.c
427:
428: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
429:
430: The include file <bsd.subdir.mk> contains the default targets for building
1.16 jtc 431: subdirectories. It has the same eight targets as <bsd.prog.mk>: all,
432: clean, cleandir, depend, includes, install, lint, and tags. For all of
433: the directories listed in the variable SUBDIRS, the specified directory
434: will be visited and the target made. There is also a default target which
435: allows the command "make subdir" where subdir is any directory listed in
436: the variable SUBDIRS.
1.21 christos 437:
438: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
439:
1.23 christos 440: The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
441: and is included from from bsd.lib.mk and bsd.prog.mk.
442:
443: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
444:
445: The include file <bsd.files.mk> handles the FILES variables and is included
446: from bsd.lib.mk and bsd.prog.mk.
1.21 christos 447:
448: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
449:
1.29 cjs 450: The include file <bsd.inc.mk> defines the includes target and uses two
451: variables:
1.21 christos 452:
1.29 cjs 453: INCS The list of include files
1.21 christos 454:
1.29 cjs 455: INCSDIR The location to install the include files.
1.39 cgd 456:
457: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
458:
459: The include file <bsd.kinc.mk> defines the many targets (includes,
460: subdirectories, etc.), and is used by kernel makefiles to handle
461: include file installation. It is intended to be included alone, by
462: kernel Makefiles. Please see bsd.kinc.mk for more details, and keep
463: the documentation in that file up to date.
1.13 christos 464:
465: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
466:
1.47 tv 467: The include file <bsd.info.mk> is used to generate and install GNU Info
468: documentation from respective Texinfo source files. It defines three
469: implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
470: following variables:
471:
472: TEXINFO List of Texinfo source files. Info documentation will
473: consist of single files with the extension replaced by
474: .info.
475:
476: INFOFLAGS Flags to pass to makeinfo. []
477:
478: INSTALL_INFO Name of install-info program. [install-info]
479:
480: MAKEINFO Name of makeinfo program. [makeinfo]
481:
482: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
483:
1.13 christos 484: The include file <bsd.sys.mk> is used by <bsd.prog.mk> and
1.14 cgd 485: <bsd.lib.mk>. It contains overrides that are used when building
486: the NetBSD source tree. For instance, if "PARALLEL" is defined by
487: the program/library Makefile, it includes a set of rules for lex and
488: yacc that allow multiple lex and yacc targets to be built in parallel.
1.1 cgd 489:
490: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
491:
492: The include file <bsd.lib.mk> has support for building libraries. It has
1.16 jtc 493: the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
1.44 erh 494: includes, install, lint, and tags. Additionally, it has a checkver target
495: which checks for installed shared object libraries whose version is greater
496: that the version of the source. It has a limited number of suffixes,
1.16 jtc 497: consistent with the current needs of the BSD tree.
1.1 cgd 498:
499: It sets/uses the following variables:
1.10 cgd 500:
501: LIB The name of the library to build.
1.1 cgd 502:
503: LIBDIR Target directory for libraries.
504:
505: LINTLIBDIR Target directory for lint libraries.
506:
507: LIBGRP Library group.
508:
509: LIBOWN Library owner.
510:
511: LIBMODE Library mode.
512:
513: LDADD Additional loader objects.
514:
1.15 cgd 515: MAN The manual pages to be installed (use a .1 - .9 suffix).
1.47 tv 516:
517: MKLINKLIB If "no", act as "MKPICINSTALL=no MKPROFILE=no".
518: Also:
519: - don't install the .a libraries
520: - don't install _pic.a libraries on PIC systems
521: - don't build .a libraries on PIC systems
522: - don't install the .so symlink on ELF systems
523: I.e, only install the shared library (and the .so.major
524: symlink on ELF).
1.44 erh 525:
526: NOCHECKVER_<library>
527: NOCHECKVER If set, disables checking for installed shared object
528: libraries with versions greater than the source. A
529: particular library name, without the "lib" prefix, may
530: be appended to the variable name to disable the check for
531: only that library.
1.1 cgd 532:
533: SRCS List of source files to build the library. Suffix types
534: .s, .c, and .f are supported. Note, .s files are preferred
535: to .c files of the same name. (This is not the default for
536: versions of make.)
537:
538: The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
539: if it exists, as well as the include file <bsd.man.mk>.
540:
541: It has rules for building profiled objects; profiled libraries are
542: built by default.
543:
1.4 cgd 544: Libraries are ranlib'd when made.
1.50 ! thorpej 545:
! 546: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
! 547:
! 548: The include file <bsd.crypto.mk> contains variables related to building
! 549: cryptography support into the system.
! 550:
! 551: It has no targets.
! 552:
! 553: In order to get system-specific crypto configuration parameters,
! 554: bsd.crypto.mk will include <bsd.own.mk>, which in turn will include
! 555: the configuration file specified by the "MAKECONF" variable. See
! 556: the <bsd.own.mk> section for more information.
! 557:
! 558: bsd.crypto.mk requires the "SRCTOP" variable to be defined before
! 559: inclusion. This variable contains the relative path to the top of
! 560: the source tree, with no trailing '/'.
! 561:
! 562: The variable "CRYPTOBASE" may be set by the user to select which
! 563: cryptography code base will be used when building the system. If
! 564: CRYPTOBASE is set to "none", no cryptography support will be built
! 565: into the system. CRYPTOBASE should be set to the name of the crypto
! 566: sub-tree in the SRCTOP directory. If CRYPTOBASE is not set,
! 567: bsd.crypto.mk will use the following algorithm to set the variable:
! 568:
! 569: .if exists(${SRCTOP}/crypto-us)
! 570: CRYPTOBASE=crypto-us
! 571: .elif exists(${SRCTOP}/crypto-intl)
! 572: CRYPTOBASE=crypto-intl
! 573: .else
! 574: undef CRYPTOBASE
! 575: .endif
! 576:
! 577: Note that it is legal for the user to set CRYPTOBASE to a relative
! 578: path outside of the source directory. For example:
! 579:
! 580: CRYPTOPATH= ../cryptosrc-intl/crypto-intl
! 581:
! 582: If CRYPTOBASE is set and not set to "none", bsd.crypto.mk will use
! 583: CRYPTOBASE to set the "CRYPTOPATH" variable. CRYPTOPATH is set to
! 584: the value "${SRCTOP}/${CRYPTOBASE}".
! 585:
! 586: Once CRYPTOPATH is set by bsd.crypto.mk, it checks to see if the
! 587: path actually exists. If it does not exist, the variable is undefined.
! 588: Program and library Makefiles may key off the definition of CRYPTOPATH
! 589: to determine if cryptography support is to be included in that program.
! 590: For example, a typical program Makefile should do the following:
! 591:
! 592: SRCTOP= ../..
! 593: .include <bsd.crypto.mk>
! 594:
! 595: PROG= login
! 596: SRCS= login.c
! 597: .
! 598: .
! 599: .
! 600: .if defined(CRYPTOPATH)
! 601: .include "${CRYPTOPATH}/usr.bin/login/Makefile.frag"
! 602: .endif
! 603:
! 604: The Makefile.frag included will now influence the build of the login(1)
! 605: program, specifying additional source files, libraries, and CPP flags.
! 606:
! 607: The "EXPORTABLE_SYSTEM" variable, if set, causes CRYPTOBASE to be set
! 608: to "none". This is for compatibilty with older NetBSD build environments.
1.30 agc 609:
610: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CVSweb <webmaster@jp.NetBSD.org>