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