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