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