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