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