Annotation of src/share/mk/bsd.README, Revision 1.402
1.402 ! christos 1: # $NetBSD: bsd.README,v 1.401 2020/04/04 23:54:06 christos Exp $
1.24 mikel 2: # @(#)bsd.README 8.2 (Berkeley) 4/2/94
1.1 cgd 3:
1.213 lukem 4: This is the README file for the make "include" files for the NetBSD
5: source tree. The files are installed in /usr/share/mk, and are,
6: by convention, named with the suffix ".mk".
1.1 cgd 7:
8: Note, this file is not intended to replace reading through the .mk
9: files for anything tricky.
10:
11: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
12:
13: RANDOM THINGS WORTH KNOWING:
14:
15: The files are simply C-style #include files, and pretty much behave like
16: you'd expect. The syntax is slightly different in that a single '.' is
17: used instead of the hash mark, i.e. ".include <bsd.prog.mk>".
18:
19: One difference that will save you lots of debugging time is that inclusion
20: of the file is normally done at the *end* of the Makefile. The reason for
21: this is because .mk files often modify variables and behavior based on the
22: values of variables set in the Makefile. To make this work, remember that
23: the FIRST target found is the target that is used, i.e. if the Makefile has:
24:
25: a:
26: echo a
27: a:
28: echo a number two
29:
30: the command "make a" will echo "a". To make things confusing, the SECOND
31: variable assignment is the overriding one, i.e. if the Makefile has:
32:
33: a= foo
34: a= bar
35:
36: b:
37: echo ${a}
38:
39: the command "make b" will echo "bar". This is for compatibility with the
40: way the V7 make behaved.
41:
42: It's fairly difficult to make the BSD .mk files work when you're building
1.75 agc 43: multiple programs in a single directory. It's a lot easier to split up the
1.1 cgd 44: programs than to deal with the problem. Most of the agony comes from making
1.36 ross 45: the "obj" directory stuff work right, not because we switched to a new version
1.1 cgd 46: of make. So, don't get mad at us, figure out a better way to handle multiple
47: architectures so we can quit using the symbolic link stuff. (Imake doesn't
48: count.)
49:
50: The file .depend in the source directory is expected to contain dependencies
51: for the source files. This file is read automatically by make after reading
52: the Makefile.
53:
54: The variable DESTDIR works as before. It's not set anywhere but will change
55: the tree where the file gets installed.
56:
57: The profiled libraries are no longer built in a different directory than
58: the regular libraries. A new suffix, ".po", is used to denote a profiled
1.265 njoly 59: object, and ".pico" 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:
1.231 apb 69: HOST_xxx A command that runs on the host machine regardless of
70: whether or not the system is being cross compiled, or
71: flags for such a command.
72:
1.172 hubertf 73: MKxxx Can be set to "no" to disable functionality, or
74: "yes" to enable it.
75: Usually defaults to "yes", although some variables
76: default to "no".
77: Due to make(1) implementation issues, if a temporary
1.224 lukem 78: command-line override of a mk.conf(5) or <bsd.own.mk>
1.214 wiz 79: setting is required whilst still honoring a particular
1.172 hubertf 80: Makefile's setting of MKxxx, use
81: env MKxxx=value make
82: instead of
83: make MKxxx=value
84:
85: NOxxx If defined, disables a feature.
86: Not intended for users.
87: This is to allow Makefiles to disable functionality
88: that they don't support (such as missing man pages).
89: NOxxx variables must be defined before <bsd.own.mk>
90: is included.
91:
1.231 apb 92: TOOL_xxx A tool that is provided as part of the USETOOLS
93: framework. When not using the USETOOLS framework,
94: TOOL_xxx variables should refer to tools that are
95: already installed on the host system.
96:
1.172 hubertf 97: The following variables that control how things are made/installed that
98: are not set by default. These should not be set by Makefiles; they're for
1.224 lukem 99: the user to define in MAKECONF (see <bsd.own.mk>, below, or mk.conf(5))
100: or on the make(1) command line:
1.172 hubertf 101:
102: BUILD If defined, 'make install' checks that the targets in the
103: source directories are up-to-date and remakes them if they
104: are out of date, instead of blindly trying to install
105: out of date or non-existent targets.
106:
107: MAKEVERBOSE Control how "verbose" the standard make(1) rules are.
108: Default: 2
109: Supported values:
110: 0 Minimal output ("quiet")
111: 1 Describe what is occurring
112: 2 Describe what is occurring and echo the actual command
1.241 apb 113: 3 Ignore the effect of the "@" prefix in make commands
114: 4 Trace shell commands using the shell's -x flag
1.172 hubertf 115:
1.312 jmmv 116: MKATF If "no", don't build the Automated Testing Framework (ATF),
117: which includes the libatf-c, libatf-c++ and libatf-sh libraries
118: and the various command line tools. Also, because the build of
119: the libraries is disabled, don't build the NetBSD test suite
120: either.
1.210 gmcgarry 121: Default: yes
122:
1.252 skrll 123: MKBFD Obsolete, use MKBINUTILS
124:
1.266 joerg 125: MKBINUTILS If "no", don't build binutils (gas, ld, etc and libbfd,
126: libopcodes)
1.172 hubertf 127: Default: yes
128:
1.266 joerg 129: MKBSDTAR If "yes", use the libarchive based cpio and tar instead of
130: the pax frontends.
1.393 roy 131: Default: yes
1.266 joerg 132:
1.172 hubertf 133: MKCATPAGES If "no", don't build or install the catman pages.
1.292 joerg 134: Default: no
1.172 hubertf 135:
1.234 mrg 136: MKCOMPAT If "no", don't build or install the src/compat.
1.303 jkoshy 137: Default: yes on amd64/mips64/sparc64, no elsewhere.
1.234 mrg 138:
1.344 matt 139: MKCOMPATTESTS If "yes", build and install the NetBSD test suite when
140: building and installing src/compat.
141: Default: no
142:
1.345 matt 143: MKCOMPATX11 If "yes", build and install the X11 libraries when
144: building and installing src/compat.
145: Default: no
146:
1.402 ! christos 147: MKCOMPATMODULES If "no", don't build compat modules (xen, etc.)
! 148: Default: yes
! 149:
1.210 gmcgarry 150: MKCOMPLEX If "no", don't build libm support for <complex.h>
151: Default: yes
152:
1.329 ozaki-r 153: MKCTF If "no", do not build and install CTF tools, and also
154: don't generate and manipulate CTF data of ELF binaries
155: during build.
156: Default: no
157:
1.397 martin 158: NETBSD_OFFICIAL_RELEASE
159: If defined and set to "yes", the build targets an official
160: NetBSD release which is going to be available from
161: ftp.NetBSD.org / cdn.NetBSD.org. This modifies a few
162: default paths in the installer and also creates different
163: links in the install documentation.
164: The auto-build cluster uses this variable to distinguish
165: "daily" builds from real releases.
166: Default: undefined (no)
167:
1.349 christos 168: NOCTF Don't generate and manipulate CTF data of ELF binaries
169: during build. It is set internally for standalone programs.
170:
1.172 hubertf 171: MKCVS If "no", don't build or install cvs(1).
172: Default: yes
173:
1.184 lukem 174: MKDEBUG If "no", don't build and install separate debugging symbols
175: into /usr/libdata/debug.
176: Default: no
177:
1.352 christos 178: NODEBUG Don't compile with debugging symbols during build.
179: It is set internally for standalone programs.
180:
1.219 lukem 181: MKDEBUGLIB Build *_g.a debugging libraries, which are compiled
182: with -DDEBUG.
1.176 christos 183: Default: no
184:
1.314 christos 185: MKDEPINCLUDES If "yes" issue .include statements in the .depend file
186: instead of inlining the contents of the .d files. Useful
187: when stale dependencies are present, to list the exact
188: files that need refreshing. It is off by default because
189: it is possibly slower.
190: Default "no"
191:
1.172 hubertf 192: MKDOC If "no", don't build or install the documentation.
193: Default: yes
194:
1.302 jkoshy 195: MKDTRACE If "no", do not build and install the kernel modules,
196: utilities and libraries used to implement the dtrace(1)
197: facility.
198: Default: no
199:
1.172 hubertf 200: MKDYNAMICROOT If "no", build programs in /bin and /sbin statically,
201: don't install certain libraries in /lib, and don't
202: install the shared linker into /libexec.
203: Default: yes
204:
1.260 uebayasi 205: MKEXTSRC If not "no", 'make build' also descends into either src/extsrc
206: to cross-build programs and libraries externally added by
207: users, and automatically enables creation of those sets.
208: Default: no
209:
1.375 wiz 210: MKFIRMWARE If not "no", install the /libdata/firmware directory,
1.372 mrg 211: which is necessary for several drivers: athn(4), bwfm(4),
212: ipw(4), iwi(4), iwm(4), iwn(4), otus(4), rtwn(4), urtwn(4),
213: wpi(4), ral(4), rum(4), run(4), zyd(4), bcm43xx(4), and
214: the Tegra 124 SoC.
215: Default: yes on amd64, cobalt, evbarm evbmips, evbppc, hpcarm,
216: hppa, i386, mac68k, macppc, sandpoint, and sparc64, no elsewhere.
217:
1.201 lukem 218: MKGCC If "no", don't build gcc(1) or any of the GCC-related
1.186 mrg 219: libraries (libgcc, libobjc, libstdc++).
1.172 hubertf 220: Default: yes
221:
1.201 lukem 222: MKGCCCMDS If "no", don't build gcc(1), but do build the GCC-related
223: libraries (libgcc, libobjc, libstdc++).
1.172 hubertf 224: Default: yes
225:
226: MKGDB If "no", don't build gdb(1).
227: Default: yes
228:
1.334 dholland 229: MKGROFFHTMLDOC If "no", avoid trying to use groff to generate html for
230: miscellaneous articles, as this seems to sometimes want
231: to run software not in base. Does not affect html man
232: pages.
233: Default: no
234:
1.172 hubertf 235: MKHESIOD If "no", disables building of Hesiod infrastructure
236: (libraries and support programs).
237: Default: yes
238:
239: MKHOSTOBJ If not "no", for programs intended to be run on the compile
240: host, the name, release, and architecture of the host
241: operating system will be suffixed to the name of the object
242: directory created by "make obj".
243: Default: no
244:
1.222 lukem 245: MKHTML If "no", don't build or install the HTML man pages.
246: Default: yes
1.172 hubertf 247:
248: MKIEEEFP If "no", don't add code for IEEE754/IEC60559 conformance.
249: Has no effect on most platforms.
250: Default: yes
251:
1.225 joerg 252: MKSTRIPIDENT Strip the RCS IDs from program binaries and shared libraries.
253: Default: no
254:
1.172 hubertf 255: MKINET6 If "no", disables building of INET6 (IPv6) infrastructure
1.273 mrg 256: (libraries and support programs). This option must not be
257: set to "no" if MKX11 is not "no".
1.172 hubertf 258: Default: yes
259:
260: MKINFO If "no", don't build or install Info documentation from
261: Texinfo source files.
262: Default: yes
263:
264: MKIPFILTER If "no", don't build or install the IP Filter programs and LKM.
265: Default: yes
266:
1.208 lukem 267: MKISCSI If "no", don't build or install iSCSI library or applications
1.181 mrg 268: (depends on libpthread.)
269: Default: yes
270:
1.331 martin 271: MKKDEBUG If "yes", force building of kernel symbol info and creation
272: of netbsd.gdb in all kernel builds, independently of the
273: settings for "makeoptions DEBUG" in the kernel config file.
274:
1.172 hubertf 275: MKKERBEROS If "no", disables building of Kerberos v5
276: infrastructure (libraries and support programs).
277: Default: yes
278:
1.304 jkoshy 279: MKKMOD If "no", disables building of kernel modules.
280: Default: yes
281:
1.312 jmmv 282: MKKYUA If "no", don't build Kyua nor its dependent library Lutok.
283: Note that setting this to "no" does not disable the build of
284: the NetBSD test suite itself; the build of the tests is
285: controlled by the MKATF knob.
286: Default: no (until the import is done and validated)
287:
1.208 lukem 288: MKLDAP If "no", disables building of LDAP infrastructure
289: (libraries and support programs).
290: Default: yes
291:
1.381 kamil 292: MKLIBCSANITIZER If "yes", use the selected sanitizer inside libc to compile
293: userland programs and libraries as defined in
294: USE_LIBCSANITIZER, which defaults to "undefined".
295:
296: The undefined behavior detector is currently the only supported
297: sanitizer in this mode. Its runtime differs from the UBSan
298: available in MKSANITIZER, and it is reimplemented from scratch
299: as micro-UBSan in the user mode (uUBSan). Its code is shared
300: with the kernel mode variation (kUBSan). The runtime is
301: stripped down from C++ features, in particular -fsanitize=vptr
302: is not supported and explicitly disabled. The only runtime
303: configuration is restricted to the LIBC_UBSAN environment
304: variable, that is designed to be safe for hardening.
305:
306: The USE_LIBCSANITIZER value is passed to the -fsanitize=
307: argument to the compiler in CFLAGS and CXXFLAGS, but not in
308: LDFLAGS, as the runtime part is located inside libc.
309:
310: Additional sanitizer arguments can be passed through
311: LIBCSANITIZERFLAGS.
312: Default: no
313:
1.316 joerg 314: MKLIBCXX If not "no", build and install libc++.
315: Default: no
316:
317: MKLIBSTDCXX If not "no", build and install libstdc++.
318: Default: yes
319:
1.206 lukem 320: MKLINKLIB If "no", act as "MKLINT=no MKPICINSTALL=no MKPROFILE=no".
1.172 hubertf 321: Also:
322: - don't install the .a libraries
323: - don't install _pic.a libraries on PIC systems
324: - don't build .a libraries on PIC systems
325: - don't install the .so symlink on ELF systems
326: I.e, only install the shared library (and the .so.major
327: symlink on ELF).
328: Default: yes
329:
330: MKLINT If "no", don't build or install the lint libraries.
331: Default: yes
332:
1.388 joerg 333: MKLLVM If "yes", build and install clang as host tool and target
334: compiler. Use as system compiler is enabled with HAVE_LLVM
335: (see below for details).
336: Default: no
337:
1.389 joerg 338: MKLLVMRT If "yes", build the LLVM PIC libraries necessary for the
1.399 mrg 339: various Mesa backend and the native JIT of the target
340: architecture, if supported. (Radeon R300 and newer,
341: LLVMPIPE for most.)
1.389 joerg 342: Default: no, enabled automatically with HAVE_MESA_VER=18.
343:
1.261 tron 344: MKLVM If "no", don't build or install the logical volume manager
1.245 agc 345: and device mapper tools and libraries
1.262 tron 346: Default: yes
1.245 agc 347:
1.172 hubertf 348: MKMAN If "no", don't build or install the man or catman pages,
349: and also acts as "MKCATPAGES=no MKHTML=no".
350: Default: yes
351:
1.256 joerg 352: MKMANDOC If "yes", mandoc is built as tool and used to compile
353: catman or html pages. A directory can be exempted by
354: defining NOMANDOC. Individual man pages are exempted
1.278 joerg 355: if NOMANDOC.${target} is set to "yes".
1.292 joerg 356: Default: yes
1.256 joerg 357:
1.172 hubertf 358: MKMANZ If not "no", compress manual pages at installation time.
359: Default: no
360:
1.253 tsarna 361: MKMDNS If "no", disables building of mDNS infrastructure
362: (libraries and support programs).
363: Default: yes
364:
1.172 hubertf 365: MKNLS If "no", don't build or install the NLS files and locale
366: definition files.
367: Default: yes
368:
1.392 wiz 369: MKNOUVEAUFIRMWARE If "yes", install the /libdata/firmware/nouveau directory,
370: which is necessary for the nouveau DRM driver.
371: Default: yes on i386 and amd64, no elsewhere.
372:
1.275 rmind 373: MKNPF If "no", don't build or install the NPF and its modules.
374: Default: yes
375:
1.357 christos 376: MKNSD If "no", don't build or install the "nsd" DNS authoritative
377: server.
378: Default: no
379:
1.172 hubertf 380: MKOBJ If "no", don't enable the rule which creates objdirs,
381: and also acts as "MKOBJDIRS=no".
382: Default: yes
383:
384: MKOBJDIRS If "no", don't create objdirs during a "make build".
385: Default: no
386:
387: MKPAM If "no", disables building of PAM authentication
388: infrastructure (libraries and support programs).
1.182 peter 389: Default: yes
1.172 hubertf 390:
1.210 gmcgarry 391: MKPCC If "no", don't build pcc(1) or any of the PCC-related
392: libraries (libpcc, libpccsoftfloat).
393: Default: no
394:
1.172 hubertf 395: MKPF If "no", don't build or install the pf programs and LKM.
396: Default: yes
397:
398: MKPIC If "no", don't build or install shared libraries, and
399: also acts as "MKPICLIB=no"
1.301 abs 400: Default: yes (for MACHINE_ARCHs that support it)
1.172 hubertf 401:
402: MKPICINSTALL If "no", don't install the *_pic.a libraries.
403: Default: yes
404:
405: MKPICLIB If "no", don't build *_pic.a libraries, and build the
406: shared object libraries from the .a libraries.
407: A symlink is installed in ${DESTDIR}/usr/lib for the
408: _pic.a library pointing to the .a library.
409: Default: yes
410:
1.198 christos 411: MKPIE If "no", create regular executables. Otherwise create
412: PIE (Position Independent Executables).
413: Default: no
414:
1.350 christos 415: NOPIE Don't create PIE (Position Independent Executables)
1.349 christos 416: It is set internally for standalone programs.
417:
1.272 mrg 418: MKPIGZGZIP If "no", only install pigz as pigz, not gzip.
1.271 mrg 419: Default: no
420:
1.172 hubertf 421: MKPOSTFIX If "no", don't build or install postfix(1).
422: Default: yes
423:
424: MKPROFILE If "no", don't build or install the profiling (*_p.a) libraries.
425: Default: yes
426:
1.392 wiz 427: MKRADEONFIRMWARE If "yes", install the /libdata/firmware/radeon directory,
1.355 christos 428: which is necessary for the radeon DRM driver.
429: Default: yes on i386 and amd64, no elsewhere.
430:
1.354 christos 431: MKRELRO If "partial", set the non-PLT GOT to read-only. If "full"
432: also force immediate symbol binding.
433: Default: no
1.382 christos 434:
1.364 khorben 435: MKREPRO If "yes", create reproducible builds. This enables
1.295 wiz 436: different switches to make two builds from the same source tree
437: result in the same build results.
438: Default: no
439:
1.373 christos 440: MKSANITIZER if "yes", use the selected sanitizer to compile userland
441: programs as defined in USE_SANITIZER, which defaults to
1.376 kamil 442: "address". A selection of available sanitizers:
1.373 christos 443: address: A memory error detector (default)
444: thread: A data race detector
1.377 kamil 445: memory: An uninitialized memory read detector
1.373 christos 446: undefined: An undefined behavior detector
1.376 kamil 447: leak: A memory leak detector
1.373 christos 448: dataflow: A general data flow analysis
449: cfi: A control flow detector
450: safe-stack: Protect against stack-based corruption
1.376 kamil 451: scudo: The Scudo Hardened allocator
452: It's possible to specify multiple sanitizers within the
1.377 kamil 453: USE_SANITIZER option (comma separated). The USE_SANITIZER value
454: is passed to the -fsanitize= argument to the compiler.
1.376 kamil 455: Additional arguments can be passed through SANITIZERFLAGS.
1.377 kamil 456: The list of supported features and their valid combinations
457: depends on the compiler version and target CPU architecture.
1.380 kamil 458: Default: no
1.373 christos 459:
1.172 hubertf 460: MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no
461: MKMAN=no MKNLS=no".
462: I.e, don't build catman pages, documentation, Info
463: documentation, man pages, NLS files, ...
464: Default: yes
465:
466: MKSKEY If "no", disables building of S/key authentication
467: infrastructure (libraries and support programs).
468: Default: yes
469:
1.319 adam 470: MKSLJIT If "no", disables building of sljit (stack-less platform
1.309 alnsn 471: independent JIT compiler) private library and tests.
472: Default: yes on amd64, i386 and sparc, no elsewhere.
473:
1.172 hubertf 474: MKSOFTFLOAT If not "no", build with options to enable the compiler to
475: generate output containing library calls for floating
476: point and possibly soft-float library support.
477: Default: no
478:
479: MKSTATICLIB If "no", don't build or install the normal static (*.a)
480: libraries.
481: Default: yes
482:
1.363 christos 483: MKSTATICPIE Compile in support for static pie binaries. These binaries
1.379 joerg 484: use a special support in crt0.o for resolving relative
485: relocations and require linker support.
1.363 christos 486: Default: yes on platforms that support it.
487:
1.359 ozaki-r 488: MKSTRIPSYM If "yes", strip all local symbols from shared libraries;
489: the affect is equivalent to -x option of ld(1). If "no",
490: strip only temporary local symbols; the affect is equivalent
491: to -X option of ld(1). Keeping non-temporary local symbols
492: such as static function names is useful on using DTrace for
493: userland libraries and getting a backtrace from a rump kernel
494: loading shared libraries.
495: Default: yes
496:
1.366 jmcneill 497: MKTEGRAFIRMWARE If "no", install the /libdata/firmware/nvidia directory,
498: which is necessary for the NVIDIA Tegra XHCI driver.
1.370 ryo 499: Default: yes on evbarm, no elsewhere.
1.366 jmcneill 500:
1.351 christos 501: MKTOOLSDEBUG If "yes" build the tools with debugging symbols.
502: Default: no
503:
1.306 christos 504: MKTPM If "no" then don't build the Trusted Platform Module
505: infrastructure.
506: Default: no
507:
1.355 christos 508: MKUNBOUND If not "no", build and install the "unbound" DNS resolver.
1.356 christos 509: Default: yes
1.355 christos 510:
1.172 hubertf 511: MKUNPRIVED If not "no", don't set the owner/group/mode when installing
512: files or directories, and keep a metadata log of what
513: the owner/group/mode should be. This allows a
514: non-root "make install".
515: Default: no
516:
517: MKUPDATE If not "no", 'make install' only installs targets that are
518: more recently modified in the source directories that their
519: installed counterparts.
520: Default: no
521:
1.382 christos 522: MKX11 If not "no", 'make build' also descends into
1.346 mrg 523: src/external/mit/xorg to cross-build X11 and automatically
524: enables creation of X sets.
1.216 mrg 525: Default: no
526:
1.346 mrg 527: MKX11FONTS If not "no", do not build or install the X fonts. The xfont
528: set is still created but will be empty.
1.251 mrg 529: Default: yes
530:
1.346 mrg 531: MKX11MOTIF: If "yes", build the native X11 libGLw with Motif stubs. If
532: Motif is not installed in the default location /usr/pkg, the
533: location can be specified using the X11MOTIFPATH variable.
1.318 mbalmer 534: Default: no
535:
1.172 hubertf 536: MKYP If "no", disables building of YP (NIS)
537: infrastructure (libraries and support programs).
538: Default: yes
539:
1.301 abs 540: MKZFS If "no", do not build and install utilities and libraries
541: used to manage ZFS file system. Do not build zfs and solaris
1.340 pooka 542: compatibility kernel modules. Note: ZFS requires 64bit
543: atomic operations.
544: Default: yes on amd64, no elsewhere.
1.254 haad 545:
1.298 christos 546: MKRUMP If "no", do not build and install rump related headers,
547: libraries, and programs.
548: Default: yes
549:
1.172 hubertf 550: USE_HESIOD If "no", disables building Hesiod support into
551: various system utilities/libraries that support it.
552: If ${MKHESIOD} is "no", USE_HESIOD will also be
553: forced to "no".
554:
555: USE_INET6 If "no", disables building INET6 (IPv6) support into
556: various system utilities/libraries that support it.
557: If ${MKINET6} is "no", USE_INET6 will also be
558: forced to "no".
559:
1.197 ad 560: USE_JEMALLOC If "no", disables building the "jemalloc" allocator
561: designed for improved performance with threaded
562: applications. The "phkmalloc" allocator as used up
563: before NetBSD-5.0 will be substituted.
564:
1.175 christos 565: USE_KERBEROS If "no", disables building Kerberos v5
1.172 hubertf 566: support into various system utilities/libraries that
567: support it. If ${MKKERBEROS} is "no", USE_KERBEROS
568: will also be forced to "no".
569:
1.208 lukem 570: USE_LDAP If "no", disables building LDAP support into various
571: system utilities/libraries that support it.
572: If ${MKLDAP} is "no", USE_LDAP will also be forced to "no".
573:
1.172 hubertf 574: USE_PAM If "no", disables building PAM authentication support
575: into various system utilities/libraries that support it.
576: If ${MKPAM} is "no", USE_PAM will also be forced to "no".
577:
578: USE_SKEY If "no", disables building S/key authentication
579: support into various system utilities/libraries that
580: support it. If ${MKSKEY} is "no", USE_SKEY will
581: also be forced to "no".
1.204 lukem 582: Default: no
1.172 hubertf 583:
1.201 lukem 584: USE_SSP If "no", disables GCC stack protection code, which
1.257 tron 585: detects stack overflows and aborts the program. The
1.268 njoly 586: stack protection code imposes a performance penalty
1.259 pgoyette 587: of about 5%.
1.258 tron 588: Default: "no", unless "USE_FORT" is set to "yes"
1.187 christos 589:
1.353 christos 590: NOSSP Don't compile with stack protector during build.
591: It is set internally for standalone programs.
592:
1.246 christos 593: USE_FORT If "yes" turns on substitute wrappers for commonly used
594: functions that do not do bounds checking regularly, but
595: they could in some cases by using the gcc
1.301 abs 596: __builtin_object_size() function to determine the buffer
1.246 christos 597: size where it is known and detect buffer overflows.
598: These substitute functions are in /usr/include/ssp.
1.257 tron 599: Default: depends on the part of the source tree
1.246 christos 600:
1.353 christos 601: NOFORT Don't compile with substitute wrappers during build.
602: It is set internally for standalone programs.
603:
1.172 hubertf 604: USE_YP If "no", disables building YP (NIS) support into
605: various system utilities/libraries that support it.
606: If ${MKYP} is "no", USE_YP will also be forced to "no".
607:
1.284 matt 608: USE_PIGZGZIP If "no", use the host "gzip" program to compress things.
1.327 apb 609: Otherwise, build tools/pigz, set TOOL_GZIP=${TOOL_PIGZ},
610: and use nbpigz to compress things.
1.274 mrg 611: Default: "no".
612:
1.385 martin 613: USE_XZ_SETS If "no", use the host "gzip" program to compress sets.
614: Otherwise use xz to compress things.
615: Default: "yes" for architectures with "enough" memory to
616: decompress, "no" for older ones.
1.386 martin 617: This is currently incompatible with USE_PIGZGZIP, setting
618: USE_PIGZGZIP=yes sets USE_XZ_SETS=no by default for all
619: architectures.
1.385 martin 620:
1.172 hubertf 621: COPTS.lib<lib>
1.177 mrg 622: OBJCOPTS.lib<lib>
1.172 hubertf 623: LDADD.lib<lib>
624: CPPFLAGS.lib<lib>
625: CXXFLAGS.lib<lib>
626: COPTS.<prog>
1.177 mrg 627: OBJCCOPTS.<prog>
1.172 hubertf 628: LDADD.<prog>
629: CPPFLAGS.<prog>
630: CXXFLAGS.<prog> These provide a way to specify additions to the associated
631: variables in a way that applies only to a particular library
632: or program. <lib> corresponds to the LIB variable set in
633: the library's makefile. <prog> corresponds to either PROG
634: or PROG_CXX (if set). For example, if COPTS.libcrypto is
635: set to "-g", "-g" will be added to COPTS only when compiling
636: the crypto library.
1.118 lukem 637:
1.281 joerg 638: The active compiler is selected using the following variables:
639: AVAILABLE_COMPILER
640: List of available compiler suites. Processed in order
641: for selecting the active compiler for each frontend.
642: HAVE_PCC If defined, PCC is present and enabled.
643: HAVE_LLVM If defined, LLVM/Clang is present and enabled.
644: UNSUPPORTED_COMPILER.xxx
645: If defined, the support for compiler "xxx" is disabled.
646:
647: For the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist:
648: ACTIVE_CC Active compile suite for the CC frontend.
649: SUPPORTED_CC Compile suite with support for the CC frontend.
650: TOOL_CC.xxx Path to the CC frontend for compiler "xxx"
651:
1.118 lukem 652: =-=-=-=-= sys.mk =-=-=-=-=
1.1 cgd 653:
654: The include file <sys.mk> has the default rules for all makes, in the BSD
655: environment or otherwise. You probably don't want to touch this file.
656:
1.118 lukem 657: =-=-=-=-= bsd.own.mk =-=-=-=-=
1.1 cgd 658:
1.17 thorpej 659: The include file <bsd.own.mk> contains source tree configuration parameters,
660: such as the owners, groups, etc. for both manual pages and binaries, and
661: a few global "feature configuration" parameters.
1.1 cgd 662:
663: It has no targets.
664:
1.134 lukem 665: To get system-specific configuration parameters, <bsd.own.mk> will try to
1.29 cjs 666: include the file specified by the "MAKECONF" variable. If MAKECONF is not
667: set, or no such file exists, the system make configuration file, /etc/mk.conf
668: is included. These files may define any of the variables described below.
1.17 thorpej 669:
1.134 lukem 670: <bsd.own.mk> sets the following variables, if they are not already defined
1.17 thorpej 671: (defaults are in brackets):
1.15 cgd 672:
1.98 lukem 673: NETBSDSRCDIR Top of the NetBSD source tree.
674: If _SRC_TOP_ != "", that will be used as the default,
675: otherwise BSDSRCDIR will be used as the default.
676: Various makefiles within the NetBSD source tree will
677: use this to reference the top level of the source tree.
678:
1.95 lukem 679: _SRC_TOP_ Top of the system source tree, as determined by <bsd.own.mk>
1.98 lukem 680: based on the presence of tools/ and build.sh. This variable
681: is "internal" to <bsd.own.mk>, although its value is only
682: determined once and then propagated to all sub-makes.
1.95 lukem 683:
1.305 apb 684: _NETBSD_VERSION_DEPENDS
685: A list of files which contain information about
686: the version of the NetBSD being built. This is
687: defined only if the current directory appears
688: to be inside a NetBSD source tree. The list of
689: files includes ${NETBSDSRCDIR}/sys/sys/param.h
690: (which contains the kernel version number),
691: ${NETBSDSRCDIR}/sys/conf/newvers.sh and
692: ${NETBSDSRCDIR}/sys/conf/osrelease.sh (which
693: interpret the information in sys/sys/param.h), and
694: ${_SRC_TOP_OBJ_}/params (which is an optional file,
695: created by "make build" in ${_SRC_TOP_}/Makefile,
696: containing all the variables that may influence the
697: build).
698:
699: Targets that depend on the NetBSD version, or on
700: variables defined at build time, can declare a
701: dependency on ${_NETBSD_VERSION_DEPENDS}, like this:
702:
703: version.c: ${_NETBSD_VERSION_DEPENDS}
704: commands to create version.c
705:
1.15 cgd 706: BSDSRCDIR The real path to the system sources, so that 'make obj'
1.116 lukem 707: will work correctly. [/usr/src]
1.15 cgd 708:
709: BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj'
1.116 lukem 710: will work correctly. [/usr/obj]
1.15 cgd 711:
1.116 lukem 712: BINGRP Binary group. [wheel]
1.15 cgd 713:
1.116 lukem 714: BINOWN Binary owner. [root]
1.15 cgd 715:
1.116 lukem 716: BINMODE Binary mode. [555]
1.15 cgd 717:
1.116 lukem 718: NONBINMODE Mode for non-executable files. [444]
1.15 cgd 719:
1.116 lukem 720: MANDIR Base path for manual installation. [/usr/share/man/cat]
1.15 cgd 721:
1.116 lukem 722: MANGRP Manual group. [wheel]
1.15 cgd 723:
1.116 lukem 724: MANOWN Manual owner. [root]
1.15 cgd 725:
1.116 lukem 726: MANMODE Manual mode. [${NONBINMODE}]
1.15 cgd 727:
1.222 lukem 728: MANINSTALL Manual installation type. Space separated list:
729: catinstall, htmlinstall, maninstall
1.293 joerg 730: Default value derived from MKCATPAGES and MKHTML.
1.76 fair 731:
732: LDSTATIC Control program linking; if set blank, link everything
1.129 lukem 733: dynamically. If set to "-static", link everything statically.
1.76 fair 734: If not set, programs link according to their makefile.
1.21 christos 735:
1.116 lukem 736: LIBDIR Base path for library installation. [/usr/lib]
1.15 cgd 737:
1.116 lukem 738: LINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint]
1.15 cgd 739:
1.116 lukem 740: LIBGRP Library group. [${BINGRP}]
1.15 cgd 741:
1.116 lukem 742: LIBOWN Library owner. [${BINOWN}]
1.15 cgd 743:
1.116 lukem 744: LIBMODE Library mode. [${NONBINMODE}]
1.15 cgd 745:
746: DOCDIR Base path for system documentation (e.g. PSD, USD, etc.)
1.116 lukem 747: installation. [/usr/share/doc]
1.62 simonb 748:
1.116 lukem 749: DOCGRP Documentation group. [wheel]
1.15 cgd 750:
1.116 lukem 751: DOCOWN Documentation owner. [root]
1.15 cgd 752:
1.116 lukem 753: DOCMODE Documentation mode. [${NONBINMODE}]
1.15 cgd 754:
1.335 apb 755: GZIP_N_FLAG Flags to pass to TOOL_GZIP to prevent it from inserting
756: file names or timestamps in the compressed output.
757: [-n, or -nT when TOOL_GZIP is really TOOL_PIGZ]
758:
1.84 kleink 759: NLSDIR Base path for Native Language Support files installation.
1.15 cgd 760: [/usr/share/nls]
1.1 cgd 761:
1.116 lukem 762: NLSGRP Native Language Support files group. [wheel]
1.1 cgd 763:
1.116 lukem 764: NLSOWN Native Language Support files owner. [root]
1.1 cgd 765:
1.116 lukem 766: NLSMODE Native Language Support files mode. [${NONBINMODE}]
1.1 cgd 767:
1.255 apb 768: X11SRCDIR The path to the xsrc tree. [${NETBSDSRCDIR}/../xsrc,
769: if that exists; otherwise /usr/xsrc]
1.144 lukem 770:
1.221 mrg 771: X11SRCDIR.local The path to the local X11 src tree. [${X11SRCDIR}/local]
1.144 lukem 772:
1.221 mrg 773: X11SRCDIR.lib<package>
774: X11SRCDIR.<package>
775: The path to the xorg src tree for the specificed package>.
776: [${X11SRCDIR}/external/mit/xorg/<package>/dist]
777:
1.367 snj 778: X11ROOTDIR Root directory of the X11 installation. [/usr/X11R7]
1.144 lukem 779:
780: X11BINDIR X11 bin directory. [${X11ROOTDIR}/bin]
781:
782: X11FONTDIR X11 font directory. [${X11ROOTDIR}/lib/X11/fonts]
783:
784: X11INCDIR X11 include directory. [${X11ROOTDIR}/include]
785:
786: X11LIBDIR X11 lib/x11 (config) directory. [${X11ROOTDIR}/lib/X11]
787:
788: X11MANDIR X11 manual directory. [${X11ROOTDIR}/man]
789:
790: X11USRLIBDIR X11 library directory. [${X11ROOTDIR}/lib]
791:
1.32 mikel 792: STRIPFLAG The flag passed to the install program to cause the binary
1.1 cgd 793: to be stripped. This is to be used when building your
794: own install script so that the entire system can be made
1.146 lukem 795: stripped/not-stripped using a single knob. []
1.1 cgd 796:
1.2 cgd 797: COPY The flag passed to the install program to cause the binary
798: to be copied rather than moved. This is to be used when
799: building our own install script so that the entire system
800: can either be installed with copies, or with moves using
1.116 lukem 801: a single knob. [-c]
1.15 cgd 802:
1.310 apb 803: MAKEDIRTARGETENV
804: Environment variables passed to the child make process
805: invoked by MAKEDIRTARGET.
806:
1.150 lukem 807: MAKEDIRTARGET dir target [params]
808: Runs "cd $${dir} && ${MAKE} [params] $${target}",
809: displaying a "pretty" message whilst doing so.
810:
1.152 cl 811: RELEASEMACHINEDIR
812: Subdirectory used below RELEASEDIR when building
1.395 martin 813: a release. [${MACHINE},
814: or ${MACHINE}-${MACHINE_ARCH} for evb{arm,mips,sh3}*]
1.152 cl 815:
816: RELEASEMACHINE Subdirectory or path component used for the following
817: paths:
818: distrib/${RELEASEMACHINE}
819: distrib/notes/${RELEASEMACHINE}
820: etc/etc.${RELEASEMACHINE}
821: Used when building a release. [${MACHINE}]
1.150 lukem 822:
1.134 lukem 823: Additionally, the following variables may be set by <bsd.own.mk> or in a
1.214 wiz 824: make configuration file to modify the behavior of the system build
1.17 thorpej 825: process (default values are in brackets along with comments, if set by
1.134 lukem 826: <bsd.own.mk>):
1.33 jonathan 827:
1.172 hubertf 828: USETOOLS Indicates whether the tools specified by ${TOOLDIR} should
829: be used as part of a build in progress.
830: Supported values:
831:
832: yes Use the tools from TOOLDIR.
833: Must be set to this if cross-compiling.
834:
835: no Do not use the tools from TOOLDIR, but refuse to
836: build native compilation tool components that are
837: version-specific for that tool.
838:
839: never Do not use the tools from TOOLDIR, even when
840: building native tool components. This is similar to
841: the traditional NetBSD build method, but does not
842: verify that the compilation tools in use are
843: up-to-date enough in order to build the tree
844: successfully. This may cause build or runtime
845: problems when building the whole NetBSD source tree.
846:
847: Default: "yes" if building all or part of a whole NetBSD
848: source tree (detected automatically); "no" otherwise
849: (to preserve traditional semantics of the <bsd.*.mk>
850: make(1) include files).
1.142 lukem 851:
1.116 lukem 852: OBJECT_FMT Object file format. [set to "ELF" on architectures that
1.199 simonb 853: use ELF -- currently all architectures].
1.33 jonathan 854:
1.401 christos 855: KERNEL_DIR Install the kernel as /netbsd/kernel and the modules
856: in /netbsd/modules, defaults to "no".
857:
1.103 thorpej 858: TOOLCHAIN_MISSING
1.142 lukem 859: If not "no", this indicates that the platform being built
1.103 thorpej 860: does not have a working in-tree toolchain. If the
1.142 lukem 861: ${MACHINE_ARCH} in question falls into this category,
1.301 abs 862: TOOLCHAIN_MISSING is conditionally assigned the value "yes".
1.103 thorpej 863: Otherwise, the variable is unconditionally assigned the
864: value "no".
1.252 skrll 865: If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are
1.142 lukem 866: unconditionally assigned the value "no".
1.103 thorpej 867:
868: EXTERNAL_TOOLCHAIN
869: This variable is not directly set by <bsd.own.mk>, but
870: including <bsd.own.mk> is the canonical way to gain
871: access to this variable. The variable should be defined
872: either in the user's environment or in the user's mk.conf
873: file. If defined, this variable indicates the root of
874: an external toolchain which will be used to build the
1.142 lukem 875: tree. For example, if a platform is a ${TOOLCHAIN_MISSING}
1.103 thorpej 876: platform, EXTERNAL_TOOLCHAIN can be used to re-enable the
877: cross-compile framework.
878:
1.142 lukem 879: If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally
880: assigned the value "no", since the external version of the
881: compiler may not be able to build the library components of
882: the in-tree compiler.
1.103 thorpej 883:
1.371 joerg 884: This variable should be used in conjunction with an appropiate
885: HAVE_GCC or HAVE_LLVM setting to control the compiler flags.
886:
1.103 thorpej 887: NOTE: This variable is not yet used in as many places as
888: it should be. Expect the exact semantics of this variable
889: to change in the short term as parts of the cross-compile
890: framework continue to be cleaned up.
1.1 cgd 891:
1.236 apb 892: The following variables are defined to commands to perform the
893: appropriate operation, with the default in [brackets]. Note that
894: the defaults change if USETOOLS == "yes":
895:
896: TOOL_AMIGAAOUT2BB aout to Amiga bootblock converter. [amiga-aout2bb]
897:
898: TOOL_AMIGAELF2BB ELF to Amiga bootblock converter. [amiga-elf2bb]
899:
1.387 christos 900: TOOL_AMIGATXLT Amiga assembly language format translator. [amiga-txlt]
901:
902: TOOL_ARMELF2AOUT ELF to a.out executable converter [arm-elf2aout}
1.236 apb 903:
904: TOOL_ASN1_COMPILE ASN1 compiler. [asn1_compile]
905:
906: TOOL_AWK Pattern-directed scanning/processing language. [awk]
907:
908: TOOL_CAP_MKDB Create capability database. [cap_mkdb]
909:
910: TOOL_CAT Concatenate and print files. [cat]
911:
912: TOOL_CKSUM Display file checksums. [cksum]
913:
914: TOOL_COMPILE_ET Error table compiler. [compile_et]
915:
916: TOOL_CONFIG Build kernel compilation directories. [config]
917:
918: TOOL_CRUNCHGEN Generate crunched binary build environment. [crunchgen]
919:
920: TOOL_CTAGS Create a tags file. [ctags]
921:
922: TOOL_DB Manipulate db(3) databases. [db]
923:
924: TOOL_DISKLABEL Read and write disk pack label. [disklabel]
925:
926: TOOL_EQN Format equations for groff. [eqn]
927:
928: TOOL_FDISK MS-DOS partition maintenance program. [fdisk]
929:
930: TOOL_FGEN IEEE 1275 Open Firmware FCode Tokenizer. [fgen]
931:
932: TOOL_GENASSYM Generate constants for assembly files. [genassym]
933:
934: TOOL_GENCAT Generate NLS message catalogs. [gencat]
935:
936: TOOL_GMAKE GNU make utility. [gmake]
937:
1.247 sketch 938: TOOL_GREP Print lines matching a pattern. [grep]
939:
1.236 apb 940: TOOL_GROFF Front end for groff document formatting system. [groff]
941:
1.327 apb 942: TOOL_GZIP Compression/decompression tool. [gzip]
943:
1.335 apb 944: TOOL_GZIP_N Same as TOOL_GZIP, plus a command line option to
945: prevent it from inserting file names or timestamps
946: into the compressed output.
947: [${TOOL_GZIP} ${GZIP_N_FLAG}]
948:
1.236 apb 949: TOOL_HEXDUMP Ascii, decimal, hexadecimal, octal dump. [hexdump]
950:
951: TOOL_HP300MKBOOT Make bootable image for hp300. [hp300-mkboot]
952:
1.328 skrll 953: TOOL_HPPAMKBOOT Make bootable image for hppa. [hppa-mkboot]
1.236 apb 954:
955: TOOL_INDXBIB Make bibliographic database's inverted index. [indxbib]
956:
957: TOOL_INSTALLBOOT Install disk bootstrap software. [installboot]
958:
959: TOOL_INSTALL_INFO Update info/dir entries. [install-info]
960:
961: TOOL_JOIN Relational database operator. [join]
962:
963: TOOL_M4 M4 macro language processor. [m4]
964:
1.387 christos 965: TOOL_M68KELF2AOUT ELF to a.out executable converter [m68k-elf2aout}
966:
1.236 apb 967: TOOL_MACPPCFIXCOFF Fix up xcoff headers for macppc. [macppc-fixcoff]
968:
969: TOOL_MAKEFS Create file system image from directory tree. [makefs]
970:
971: TOOL_MAKEINFO Translate Texinfo documents. [makeinfo]
972:
973: TOOL_MAKEWHATIS Create a whatis.db database. [makewhatis]
974:
975: TOOL_MDSETIMAGE Set kernel RAM disk image. [mdsetimage]
976:
977: TOOL_MENUC Menu compiler. [menuc]
978:
979: TOOL_MIPSELF2ECOFF Convert ELF-format executable to ECOFF for mips.
980: [mips-elf2ecoff]
981:
982: TOOL_MKCSMAPPER Make charset mapping table. [mkcsmapper]
983:
984: TOOL_MKESDB Make encoding scheme database. [mkesdb]
985:
986: TOOL_MKLOCALE Make LC_CTYPE locale files. [mklocale]
987:
988: TOOL_MKMAGIC Create database for file(1). [file]
989:
1.311 jmcneill 990: TOOL_MKNOD Make device special file. [mknod]
991:
1.236 apb 992: TOOL_MKTEMP Make (unique) temporary file name. [mktemp]
993:
994: TOOL_MSGC Simple message list compiler. [msgc]
995:
996: TOOL_MTREE Map a directory hierarchy. [mtree]
997:
1.332 phx 998: TOOL_NCDCS Turn ELF kernel into a NCD firmware image. [ncdcs]
999:
1.236 apb 1000: TOOL_PAX Manipulate file archives and copy directories. [pax]
1001:
1002: TOOL_PIC Compile pictures for groff. [pic]
1003:
1.273 mrg 1004: TOOL_PIGZ Parallel compressor. [pigz]
1005:
1.236 apb 1006: TOOL_POWERPCMKBOOTIMAGE Make bootable image for powerpc. [powerpc-mkbootimage]
1007:
1008: TOOL_PWD_MKDB Generate the password databases. [pwd_mkdb]
1009:
1010: TOOL_REFER Preprocess bibliographic references for groff. [refer]
1011:
1012: TOOL_ROFF_ASCII Generate ASCII groff output. [nroff]
1013:
1014: TOOL_ROFF_DVI Generate DVI groff output. [${TOOL_GROFF} -Tdvi]
1015:
1016: TOOL_ROFF_HTML Generate HTML groff output.
1017: [${TOOL_GROFF} -Tlatin1 -mdoc2html]
1018:
1019: TOOL_ROFF_PS Generate PS groff output. [${TOOL_GROFF} -Tps]
1020:
1021: TOOL_ROFF_RAW Generate "raw" groff output. [${TOOL_GROFF} -Z]
1022:
1023: TOOL_RPCGEN Remote Procedure Call (RPC) protocol compiler. [rpcgen]
1024:
1025: TOOL_SED Stream editor. [sed]
1026:
1027: TOOL_SOELIM Eliminate .so's from groff input. [soelim]
1028:
1029: TOOL_SPARKCRC Generate a crc suitable for use in a sparkive file.
1030: [sparkcrc]
1031:
1032: TOOL_STAT Display file status. [stat]
1033:
1034: TOOL_STRFILE Create a random access file for storing strings.
1035: [strfile]
1036:
1037: TOOL_SUNLABEL Read or modify a SunOS disk label. [sunlabel]
1038:
1039: TOOL_TBL Format tables for groff. [tbl]
1040:
1041: TOOL_UUDECODE Uudecode a binary file. [uudecode]
1042:
1043: TOOL_VGRIND Grind nice listings of programs. [vgrind -f]
1044:
1045: TOOL_ZIC Time zone compiler. [zic]
1046:
1.323 matt 1047: For each possible value of MACHINE_CPU, MACHINES.${MACHINE_CPU} contain a
1048: list of what ports can be built for it. This keeps those definitions in
1049: centralized place.
1050:
1.134 lukem 1051: <bsd.own.mk> is generally useful when building your own Makefiles so that
1.1 cgd 1052: they use the same default owners etc. as the rest of the tree.
1.131 lukem 1053:
1054:
1.286 apb 1055: =-=-=-=-= bsd.clean.mk =-=-=-=-=
1056:
1057: The include file <bsd.clean.mk> defines the clean and cleandir
1058: targets. It uses the following variables:
1059:
1060: CLEANFILES Files to remove for both the clean and cleandir targets.
1061:
1062: CLEANDIRFILES Files to remove for the cleandir target, but not for
1063: the clean target.
1064:
1.287 apb 1065: MKCLEANSRC Controls whether or not the clean and cleandir targets
1066: will delete files from both the object directory,
1067: ${.OBJDIR}, and the source directory, ${.CURDIR}.
1068:
1069: If MKCLEANSRC is set to "no", then the file names in
1070: CLEANFILES or CLEANDIRFILES are interpreted relative
1071: to the object directory, ${.OBJDIR}. This is the
1072: traditional behaviour.
1073:
1074: If MKCLEANSRC is set to "yes", then the file deletion
1075: is performed relative to both the object directory,
1076: ${.OBJDIR}, and the source directory, ${.CURDIR}. (This
1077: has no effect if ${.OBJDIR} is the same as ${.CURDIR}.)
1078: Deleting files from ${.CURDIR} is intended to remove
1079: stray output files that had been left in the source
1080: directory by an earlier build that did not use object
1081: directories.
1082:
1083: The default is MKCLEANSRC=yes. If you always build with
1084: separate object directories, and you are sure that there
1085: are no stray files in the source directories, then you
1086: may set MKCLEANSRC=no to save some time.
1087:
1088: MKCLEANVERIFY Controls whether or not the clean and cleandir targets
1089: will verify that files have been deleted.
1090:
1091: If MKCLEANVERIFY is set to "no", then the files will
1092: be deleted using a "rm -f" command, and its success or
1093: failure will be ignored.
1094:
1095: If MKCLEANVERIFY is set to "yes", then the success of
1096: the "rm -f" command will be verified using an "ls"
1097: command.
1098:
1099: The default is MKCLEANVERIFY=yes. If you are sure that
1100: there will be no problems caused by file permissions,
1101: read-only file systems, or the like, then you may set
1102: MKCLEANVERIFY=no to save some time.
1.286 apb 1103:
1104: To use the clean and cleandir targets defined in <bsd.clean.mk>, other
1105: Makefiles or bsd.*.mk files should append file names to the CLEANFILES
1106: or CLEANDIRFILES variables. For example:
1107:
1108: CLEANFILES+= a.out
1109: CLEANDIRFILES+= .depend
1110:
1111: .include <bsd.clean.mk>
1112:
1.308 apb 1113: The files listed in CLEANFILES and CLEANDIRFILES must not be
1114: directories, because the potential risk from running "rm -rf" commands
1115: in bsd.clean.mk is considered too great. If you want to recursively
1116: delete a directory as part of "make clean" or "make cleandir" then you
1117: need to provide your own target.
1.286 apb 1118:
1.131 lukem 1119: =-=-=-=-= bsd.dep.mk =-=-=-=-=
1120:
1121: The include file <bsd.dep.mk> contains the default targets for building
1.133 lukem 1122: .depend files. It creates .d files from entries in SRCS and DPSRCS
1123: that are C, C++, or Objective C source files, and builds .depend from the
1124: .d files. All other files in SRCS and all of DPSRCS will be used as
1125: dependencies for the .d files. In order for this to function correctly,
1.132 lukem 1126: it should be .included after all other .mk files and directives that may
1127: modify SRCS or DPSRCS. It uses the following variables:
1128:
1129: SRCS List of source files to build the program.
1130:
1131: DPSRCS List of source files which are needed for generating
1132: dependencies, but are not needed in ${SRCS}.
1.1 cgd 1133:
1134:
1.118 lukem 1135: =-=-=-=-= bsd.files.mk =-=-=-=-=
1.106 thorpej 1136:
1.118 lukem 1137: The include file <bsd.files.mk> handles the FILES variables and is included
1.134 lukem 1138: from <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables:
1.124 lukem 1139:
1140: FILES The list of files to install.
1141:
1.153 lukem 1142: CONFIGFILES Similar semantics to FILES, except that the files
1143: are installed by the `configinstall' target,
1144: not the `install' target.
1145: The FILES* variables documented below also apply.
1146:
1.124 lukem 1147: FILESOWN File owner. [${BINOWN}]
1148:
1149: FILESGRP File group. [${BINGRP}]
1150:
1.203 dholland 1151: FILESMODE File mode. [${NONBINMODE}]
1.124 lukem 1152:
1153: FILESDIR The location to install the files.
1154:
1155: FILESNAME Optional name to install each file as.
1156:
1.153 lukem 1157: FILESOWN_<fn> File owner of the specific file <fn>.
1158:
1159: FILESGRP_<fn> File group of the specific file <fn>.
1160:
1161: FILESMODE_<fn> File mode of the specific file <fn>.
1162:
1.202 uwe 1163: FILESDIR_<fn> The location to install the specific file <fn>.
1.153 lukem 1164:
1165: FILESNAME_<fn> Optional name to install <fn> as.
1.124 lukem 1166:
1.285 apb 1167: FILESBUILD If this variable is defined, then its value will be
1168: used as the default for all FILESBUILD_<fn> variables.
1169: Otherwise, the default will be "no".
1170:
1.243 cube 1171: FILESBUILD_<fn> A value different from "no" will add the file to the list of
1172: targets to be built by `realall'. Users of that variable
1173: should provide a target to build the file.
1174:
1.135 lukem 1175:
1.139 lukem 1176: BUILDSYMLINKS List of two word items:
1.135 lukem 1177: lnsrc lntgt
1178: For each lnsrc item, create a symlink named lntgt.
1179: The lntgt symlinks are removed by the cleandir target.
1.106 thorpej 1180:
1.148 jmc 1181: UUDECODE_FILES List of files which are stored as <file>.uue in the source
1182: tree. Each one will be decoded with ${TOOL_UUDECODE}.
1.301 abs 1183: The source files have a `.uue' suffix, the generated files do
1.148 jmc 1184: not.
1.149 jmc 1185:
1.202 uwe 1186: UUDECODE_FILES_RENAME_<fn>
1187: Rename the output from the decode to the provided name.
1.382 christos 1188:
1.148 jmc 1189: *NOTE: These files are simply decoded, with no install or other
1190: rule applying implicitly except being added to the clean
1191: target.
1.106 thorpej 1192:
1.118 lukem 1193: =-=-=-=-= bsd.gcc.mk =-=-=-=-=
1.113 thorpej 1194:
1195: The include file <bsd.gcc.mk> computes various parameters related to GCC
1196: support libraries. It defines no targets. <bsd.own.mk> MUST be included
1.134 lukem 1197: before <bsd.gcc.mk>.
1.113 thorpej 1198:
1.134 lukem 1199: The primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each
1.113 thorpej 1200: of which need to know where to find certain GCC support libraries.
1201:
1.134 lukem 1202: The behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable,
1.113 thorpej 1203: which is generally set by the user. If EXTERNAL_TOOLCHAIN it set, then
1204: the compiler is asked where to find the support libraries, otherwise the
1205: support libraries are found in ${DESTDIR}/usr/lib.
1206:
1.134 lukem 1207: <bsd.gcc.mk> sets the following variables:
1.113 thorpej 1208:
1.118 lukem 1209: _GCC_CRTBEGIN The full path name to crtbegin.o.
1210:
1211: _GCC_CRTBEGINS The full path name to crtbeginS.o.
1212:
1213: _GCC_CRTEND The full path name to crtend.o.
1214:
1215: _GCC_CRTENDS The full path name to crtendS.o.
1216:
1217: _GCC_LIBGCCDIR The directory where libgcc.a is located.
1218:
1219:
1220: =-=-=-=-= bsd.inc.mk =-=-=-=-=
1221:
1.134 lukem 1222: The include file <bsd.inc.mk> defines the includes target and uses the
1.118 lukem 1223: variables:
1224:
1.124 lukem 1225: INCS The list of include files.
1.118 lukem 1226:
1227: INCSDIR The location to install the include files.
1228:
1229: INCSNAME Target name of the include file, if only one; same as
1230: FILESNAME, but for include files.
1231:
1.134 lukem 1232: INCSYMLINKS Similar to SYMLINKS in <bsd.links.mk>, except that these
1233: are installed in the 'includes' target and not the
1234: (much later) 'install' target.
1235:
1.118 lukem 1236: INCSNAME_<file> The name file <file> should be installed as, if not <file>,
1237: same as FILESNAME_<file>, but for include files.
1238:
1239:
1240: =-=-=-=-= bsd.info.mk =-=-=-=-=
1241:
1242: The include file <bsd.info.mk> is used to generate and install GNU Info
1243: documentation from respective Texinfo source files. It defines three
1244: implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
1245: following variables:
1246:
1247: TEXINFO List of Texinfo source files. Info documentation will
1248: consist of single files with the extension replaced by
1249: .info.
1250:
1251: INFOFLAGS Flags to pass to makeinfo. []
1252:
1253:
1254: =-=-=-=-= bsd.kernobj.mk =-=-=-=-=
1255:
1256: The include file <bsd.kernobj.mk> defines variables related to the
1257: location of kernel sources and object directories.
1258:
1259: KERNSRCDIR Is the location of the top of the kernel src.
1.124 lukem 1260: [${_SRC_TOP_}/sys]
1.118 lukem 1261:
1.124 lukem 1262: KERNARCHDIR Is the location of the machine dependent kernel sources.
1263: [arch/${MACHINE}]
1.120 lukem 1264:
1.124 lukem 1265: KERNCONFDIR Is where the configuration files for kernels are found.
1266: [${KERNSRCDIR}/${KERNARCHDIR}/conf]
1.118 lukem 1267:
1268: KERNOBJDIR Is the kernel build directory. The kernel GENERIC for
1269: instance will be compiled in ${KERNOBJDIR}/GENERIC.
1270: The default value is
1271: ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
1272: if it exists or the target 'obj' is being made.
1273: Otherwise the default is
1274: ${KERNSRCDIR}/${KERNARCHDIR}/compile.
1275:
1276: It is important that Makefiles (such as those under src/distrib) that
1.134 lukem 1277: wish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR}
1.118 lukem 1278: rather than make assumptions about the location of the compiled kernel.
1279:
1280:
1281: =-=-=-=-= bsd.kinc.mk =-=-=-=-=
1282:
1283: The include file <bsd.kinc.mk> defines the many targets (includes,
1284: subdirectories, etc.), and is used by kernel makefiles to handle
1285: include file installation. It is intended to be included alone, by
1.134 lukem 1286: kernel Makefiles. It uses similar variables to <bsd.inc.mk>.
1287: Please see <bsd.kinc.mk> for more details, and keep the documentation
1288: in that file up to date.
1.118 lukem 1289:
1.325 christos 1290: =-=-=-=-= bsd.syscall.mk =-=-=-=-=
1291:
1292: The include file <bsd.syscall.mk> contains the logic to create syscall
1293: files for various emulations. It includes <bsd.kinc.mk> to handle the
1294: rest of the targets.
1.118 lukem 1295:
1296: =-=-=-=-= bsd.lib.mk =-=-=-=-=
1297:
1298: The include file <bsd.lib.mk> has support for building libraries. It has
1299: the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
1300: includes, install, lint, and tags. Additionally, it has a checkver target
1301: which checks for installed shared object libraries whose version is greater
1302: that the version of the source. It has a limited number of suffixes,
1.134 lukem 1303: consistent with the current needs of the BSD tree. <bsd.lib.mk> includes
1.118 lukem 1304: <bsd.shlib.mk> to get shared library parameters.
1305:
1306: It sets/uses the following variables:
1307:
1308: LIB The name of the library to build.
1309:
1310: LIBDIR Target directory for libraries.
1311:
1.248 perry 1312: MKARZERO Normally, ar(1) sets the timestamps, uid, gid and
1313: permissions in files inside its archives to those of
1.364 khorben 1314: the file it was fed. This leads to non-reproducible
1.324 apb 1315: builds. If MKARZERO is set to "yes" (default is the
1316: same as MKREPRO, or "no" if MKREPRO is not defined),
1.248 perry 1317: then the "D" flag is passed to ar, causing the
1318: timestamp, uid and gid to be zeroed and the file
1319: permissions to be set to 644. This allows .a files
1320: from different builds to be bit identical.
1321:
1.300 joerg 1322: SHLIBINSTALLDIR Target directory for shared libraries if ${USE_SHLIBDIR}
1323: is not "no".
1324:
1.263 abs 1325: SHLIB_MAJOR
1326: SHLIB_MINOR
1327: SHLIB_TEENY Major, minor, and teeny version numbers of shared library
1328:
1.300 joerg 1329: USE_SHLIBDIR If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR}
1.118 lukem 1330: as the path to install shared libraries to.
1331: USE_SHLIBDIR must be defined before <bsd.own.mk> is included.
1.130 lukem 1332: Default: no
1.118 lukem 1333:
1.218 lukem 1334: LIBISMODULE If not "no", install as ${LIB}.so (without the "lib" prefix),
1335: and act as "MKDEBUGLIB=no MKLINT=no MKPICINSTALL=no
1336: MKPROFILE=no MKSTATICLIB=no".
1337: Default: no
1338:
1.211 lukem 1339: LIBISPRIVATE If not "no", act as "MKDEBUGLIB=no MKLINT=no MKPIC=no
1340: MKPROFILE=no", and don't install the (.a) library.
1.154 lukem 1341: This is useful for "build only" helper libraries.
1342: Default: no
1343:
1.244 mrg 1344: LIBISCXX If not "no", Use ${CXX} instead of ${CC} to link
1345: shared libraries.
1346: This is useful for C++ libraries.
1347: Default: no
1348:
1.118 lukem 1349: LINTLIBDIR Target directory for lint libraries.
1350:
1351: LIBGRP Library group.
1352:
1353: LIBOWN Library owner.
1354:
1355: LIBMODE Library mode.
1356:
1357: LDADD Additional loader objects.
1358:
1359: MAN The manual pages to be installed (use a .1 - .9 suffix).
1360:
1361: NOCHECKVER_<library>
1362: NOCHECKVER If set, disables checking for installed shared object
1363: libraries with versions greater than the source. A
1364: particular library name, without the "lib" prefix, may
1365: be appended to the variable name to disable the check for
1366: only that library.
1367:
1368: SRCS List of source files to build the library. Suffix types
1369: .s, .c, and .f are supported. Note, .s files are preferred
1370: to .c files of the same name. (This is not the default for
1371: versions of make.)
1372:
1.383 christos 1373: LIBDPLIBS/
1374: PROGDPLIBS A list of the tuples:
1.157 lukem 1375: libname path-to-srcdir-of-libname
1376:
1.384 christos 1377: Instead of depending on installed versions of the libraries,
1378: one can depend on their built version in the source directory.
1379: This is useful for finding private libraries (LIBISPRIVATE).
1380:
1.157 lukem 1381: For each tuple;
1382: * LIBDO.libname contains the .OBJDIR of the library
1383: `libname', and if it is not set it is determined
1384: from the srcdir and added to MAKEOVERRIDES (the
1385: latter is to allow for build time optimization).
1386: * LDADD gets -L${LIBDO.libname} -llibname added.
1387: * DPADD gets ${LIBDO.libname}/liblibname.so or
1388: ${LIBDO.libname}/liblibname.a added.
1389:
1.307 pooka 1390: The special value "_external" for LIBDO.lib makes the
1391: build system to assume the library comes from outside
1392: of the NetBSD source tree and only causes -llibname
1393: to be added to LDADD.
1394:
1.383 christos 1395: This variable may be used for individual libraries/programs,
1396: as well as in parent directories to cache common libraries
1.157 lukem 1397: as a build-time optimization.
1398:
1.118 lukem 1399: The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
1400: if it exists, as well as the include file <bsd.man.mk>.
1401:
1402: It has rules for building profiled objects; profiled libraries are
1403: built by default.
1404:
1405: Libraries are ranlib'd when made.
1406:
1407:
1408: =-=-=-=-= bsd.links.mk =-=-=-=-=
1409:
1410: The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
1.134 lukem 1411: and is included from from <bsd.lib.mk> and <bsd.prog.mk>.
1412:
1.249 apb 1413: LINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log
1414: is used. The defaults may be modified by other bsd.*.mk files which
1415: include bsd.links.mk. In the future, these variables may be replaced
1416: by a method for explicitly recording hard links in a metadata log.
1417:
1.134 lukem 1418: LINKS The list of hard links, consisting of pairs of paths:
1419: source-file target-file
1420: ${DESTDIR} is prepended to both paths before linking.
1421: For example, to link /bin/test and /bin/[, use:
1422: LINKS=/bin/test /bin/[
1423:
1.153 lukem 1424: CONFIGLINKS Similar semantics to LINKS, except that the links
1425: are installed by the `configinstall' target,
1426: not the `install' target.
1427:
1.134 lukem 1428: SYMLINKS The list of symbolic links, consisting of pairs of paths:
1429: source-file target-file
1430: ${DESTDIR} is only prepended to target-file before linking.
1431: For example, to symlink /usr/bin/tar to /bin/tar resulting
1432: in ${DESTDIR}/usr/bin/tar -> /bin/tar:
1433: SYMLINKS=/bin/tar /usr/bin/tar
1.118 lukem 1434:
1.153 lukem 1435: CONFIGSYMLINKS Similar semantics to SYMLINKS, except that the symbolic links
1436: are installed by the `configinstall' target,
1437: not the `install' target.
1438:
1.249 apb 1439: LINKSOWN Link owner. [${BINOWN}]
1440:
1441: LINKSGRP Link group. [${BINGRP}]
1442:
1443: LINKSMODE Link mode. [${NONBINMODE}]
1444:
1445: LINKSOWN_<fn> Link owner of the specific file <fn>.
1446:
1447: LINKSGRP_<fn> Link group of the specific file <fn>.
1448:
1449: LINKSMODE_<fn> Link mode of the specific file <fn>.
1450:
1.118 lukem 1451:
1452: =-=-=-=-= bsd.man.mk =-=-=-=-=
1453:
1454: The include file <bsd.man.mk> handles installing manual pages and their
1455: links.
1456:
1.222 lukem 1457: It has a three targets:
1.118 lukem 1458:
1.222 lukem 1459: catinstall:
1460: Install the preformatted manual pages and their links.
1461: htmlinstall:
1462: Install the HTML manual pages and their links.
1.118 lukem 1463: maninstall:
1464: Install the manual page sources and their links.
1465:
1466: It sets/uses the following variables:
1467:
1468: MANDIR Base path for manual installation.
1469:
1470: MANGRP Manual group.
1471:
1472: MANOWN Manual owner.
1473:
1474: MANMODE Manual mode.
1475:
1476: MANSUBDIR Subdirectory under the manual page section, i.e. "/vax"
1477: or "/tahoe" for machine specific manual pages.
1478:
1479: MAN The manual pages to be installed (use a .1 - .9 suffix).
1480:
1481: MLINKS List of manual page links (using a .1 - .9 suffix). The
1482: linked-to file must come first, the linked file second,
1.276 reed 1483: and there may be multiple pairs.
1.118 lukem 1484:
1485: The include file <bsd.man.mk> includes a file named "../Makefile.inc" if
1486: it exists.
1487:
1488:
1489: =-=-=-=-= bsd.obj.mk =-=-=-=-=
1490:
1491: The include file <bsd.obj.mk> defines targets related to the creation
1492: and use of separated object and source directories.
1493:
1494: If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
1495: ${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
1496: it exists. Otherwise make(1) looks for the existence of a
1497: subdirectory (or a symlink to a directory) of the source directory
1498: into which built targets should be placed. If an environment variable
1499: named MAKEOBJDIR is set, make(1) uses its value as the name of the
1500: object directory; failing that, make first looks for a subdirectory
1501: named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
1502:
1503: Object directories are not created automatically by make(1) if they
1504: don't exist; you need to run a separate "make obj". (This will happen
1505: during a top-level build if "MKOBJDIRS" is set to a value other than
1506: "no"). When the source directory is a subdirectory of ${BSDSRCDIR} --
1507: and this is determined by a simple string prefix comparison -- object
1508: directories are created in a separate object directory tree, and a
1509: symlink to the object directory in that tree is created in the source
1510: directory; otherwise, "make obj" assumes that you're not in the main
1511: source tree and that it's not safe to use a separate object tree.
1512:
1513: Several variables used by <bsd.obj.mk> control exactly what
1514: directories and links get created during a "make obj":
1515:
1516: MAKEOBJDIR If set, this is the component name of the object
1517: directory.
1518:
1519: OBJMACHINE If this is set but MAKEOBJDIR is not set, creates
1520: object directories or links named "obj.${MACHINE}";
1521: otherwise, just creates ones named "obj".
1522:
1523: USR_OBJMACHINE If set, and the current directory is a subdirectory of
1524: ${BSDSRCDIR}, create object directory in the
1525: corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
1526: otherwise, create it in the corresponding subdirectory
1527: of ${BSDOBJDIR}
1.113 thorpej 1528:
1.118 lukem 1529: BUILDID If set, the contents of this variable are appended
1530: to the object directory name. If OBJMACHINE is also
1531: set, ".${BUILDID}" is added after ".${MACHINE}".
1.113 thorpej 1532:
1.106 thorpej 1533:
1.118 lukem 1534: =-=-=-=-= bsd.prog.mk =-=-=-=-=
1.106 thorpej 1535:
1.1 cgd 1536: The include file <bsd.prog.mk> handles building programs from one or
1537: more source files, along with their manual pages. It has a limited number
1.301 abs 1538: of suffixes, consistent with the current needs of the BSD tree.
1.134 lukem 1539: <bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters.
1.1 cgd 1540:
1.16 jtc 1541: It has eight targets:
1.1 cgd 1542:
1543: all:
1.102 thorpej 1544: build the program and its manual page. This also
1545: creates a GDB initialization file (.gdbinit) in
1546: the objdir. The .gdbinit file sets the shared library
1547: prefix to ${DESTDIR} to facilitate cross-debugging.
1.1 cgd 1548: clean:
1549: remove the program, any object files and the files a.out,
1.24 mikel 1550: Errs, errs, mklog, and ${PROG}.core.
1.1 cgd 1551: cleandir:
1552: remove all of the files removed by the target clean, as
1553: well as .depend, tags, and any manual pages.
1.42 lukem 1554: `distclean' is a synonym for `cleandir'.
1.1 cgd 1555: depend:
1556: make the dependencies for the source files, and store
1557: them in the file .depend.
1.16 jtc 1558: includes:
1559: install any header files.
1.1 cgd 1560: install:
1561: install the program and its manual pages; if the Makefile
1562: does not itself define the target install, the targets
1563: beforeinstall and afterinstall may also be used to cause
1564: actions immediately before and after the install target
1565: is executed.
1566: lint:
1567: run lint on the source files
1568: tags:
1569: create a tags file for the source files.
1570:
1571: It sets/uses the following variables:
1572:
1573: BINGRP Binary group.
1574:
1575: BINOWN Binary owner.
1576:
1577: BINMODE Binary mode.
1578:
1.286 apb 1579: CLEANDIRFILES Additional files to remove for the cleandir target.
1580:
1.1 cgd 1581: CLEANFILES Additional files to remove for the clean and cleandir targets.
1582:
1.337 uebayasi 1583: CONFIGOPTS Additional flags to config(1) when building kernels.
1584:
1.1 cgd 1585: COPTS Additional flags to the compiler when creating C objects.
1.112 thorpej 1586:
1.125 lukem 1587: COPTS.<fn> Additional flags to the compiler when creating the
1588: C objects for <fn>.
1589: For <fn>.[ly], "<fn>.c" must be used.
1590:
1.112 thorpej 1591: CPUFLAGS Additional flags to the compiler/assembler to select
1592: CPU instruction set options, CPU tuning options, etc.
1.35 lukem 1593:
1.125 lukem 1594: CPUFLAGS.<fn> Additional flags to the compiler/assembler for <fn>.
1595: For <fn>.[ly], "<fn>.c" must be used.
1596:
1.124 lukem 1597: CPPFLAGS Additional flags to the C pre-processor.
1.125 lukem 1598:
1599: CPPFLAGS.<fn> Additional flags to the C pre-processor for <fn>.
1600: For <fn>.[ly], "<fn>.c" must be used.
1.102 thorpej 1601:
1602: GDBINIT List of GDB initialization files to add to "source"
1603: directives in the .gdbinit file that is created in the
1604: objdir.
1.1 cgd 1605:
1606: LDADD Additional loader objects. Usually used for libraries.
1607: For example, to load with the compatibility and utility
1608: libraries, use:
1609:
1.5 jtc 1610: LDADD+=-lutil -lcompat
1.1 cgd 1611:
1.178 lukem 1612: LDFLAGS Additional linker flags (passed to ${CC} during link).
1.1 cgd 1613:
1.134 lukem 1614: LINKS See <bsd.links.mk>
1615:
1.177 mrg 1616: OBJCOPTS Additional flags to the compiler when creating ObjC objects.
1617:
1618: OBJCOPTS.<fn> Additional flags to the compiler when creating the
1619: ObjC objects for <fn>.
1620: For <fn>.[ly], "<fn>.c" must be used.
1621:
1.134 lukem 1622: SYMLINKS See <bsd.links.mk>
1.1 cgd 1623:
1.15 cgd 1624: MAN Manual pages (should end in .1 - .9). If no MAN variable is
1.8 cgd 1625: defined, "MAN=${PROG}.1" is assumed.
1.1 cgd 1626:
1.214 wiz 1627: PAXCTL_FLAGS If defined, run paxctl(1) on the program binary after link
1.212 lukem 1628: time, with the value of this variable as args to paxctl(1).
1.193 perry 1629:
1630: PAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS.
1631:
1.1 cgd 1632: PROG The name of the program to build. If not supplied, nothing
1633: is built.
1634:
1.88 thorpej 1635: PROG_CXX If defined, the name of the program to build. Also
1636: causes <bsd.prog.mk> to link the program with the C++
1637: compiler rather than the C compiler. PROG_CXX overrides
1638: the value of PROG if PROG is also set.
1.87 thorpej 1639:
1.21 christos 1640: PROGNAME The name that the above program will be installed as, if
1641: different from ${PROG}.
1642:
1.37 tv 1643: SRCS List of source files to build the program. If SRCS is not
1.1 cgd 1644: defined, it's assumed to be ${PROG}.c.
1.108 jwise 1645:
1646: DPSRCS List of source files which are needed for generating
1647: dependencies, but are not needed in ${SRCS}.
1.1 cgd 1648:
1649: DPADD Additional dependencies for the program. Usually used for
1650: libraries. For example, to depend on the compatibility and
1651: utility libraries use:
1652:
1.5 jtc 1653: DPADD+=${LIBCOMPAT} ${LIBUTIL}
1.1 cgd 1654:
1.288 christos 1655: The following system libraries are predefined for DPADD:
1.1 cgd 1656:
1.382 christos 1657: LIBARCHIVE?= ${DESTDIR}/usr/lib/libarchive.a
1658: LIBASN1?= ${DESTDIR}/usr/lib/libasn1.a
1659: LIBATF_C?= ${DESTDIR}/usr/lib/libatf-c.a
1660: LIBATF_CXX?= ${DESTDIR}/usr/lib/libatf-c++.a
1661: LIBBIND9?= ${DESTDIR}/usr/lib/libbind9.a
1662: LIBBLUETOOTH?= ${DESTDIR}/usr/lib/libbluetooth.a
1663: LIBBSDMALLOC?= ${DESTDIR}/usr/lib/libbsdmalloc.a
1664: LIBBZ2?= ${DESTDIR}/usr/lib/libbz2.a
1.396 christos 1665: LIBC?= ${DESTDIR}/usr/lib/libc.a
1.382 christos 1666: LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a
1.398 christos 1667: LIBCBOR?= ${DESTDIR}/usr/lib/libcbor.a
1.382 christos 1668: LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a
1669: LIBCOM_ERR?= ${DESTDIR}/usr/lib/libcom_err.a
1670: LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a
1671: LIBCRYPTO?= ${DESTDIR}/usr/lib/libcrypto.a
1672: LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a
1.396 christos 1673: LIBCXX?= ${DESTDIR}/usr/lib/libc++.a
1.382 christos 1674: LIBDES?= ${DESTDIR}/usr/lib/libdes.a
1675: LIBDNS?= ${DESTDIR}/usr/lib/libdns.a
1676: LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a
1677: LIBEVENT?= ${DESTDIR}/usr/lib/libevent.a
1.315 christos 1678: LIBEVENT_OPENSSL?= ${DESTDIR}/usr/lib/libevent_openssl.a
1679: LIBEVENT_PTHREADS?= ${DESTDIR}/usr/lib/libevent_pthreads.a
1.382 christos 1680: LIBEXECINFO?= ${DESTDIR}/usr/lib/libexecinfo.a
1681: LIBEXPAT?= ${DESTDIR}/usr/lib/libexpat.a
1682: LIBFETCH?= ${DESTDIR}/usr/lib/libfetch.a
1.398 christos 1683: LIBFIDO2?= ${DESTDIR}/usr/lib/libfido2.a
1.382 christos 1684: LIBFL?= ${DESTDIR}/usr/lib/libfl.a
1685: LIBFORM?= ${DESTDIR}/usr/lib/libform.a
1686: LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a
1.400 christos 1687: LIBGNUCTF?= ${DESTDIR}/usr/lib/libgnuctf.a
1.382 christos 1688: LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a
1689: LIBGSSAPI?= ${DESTDIR}/usr/lib/libgssapi.a
1690: LIBHDB?= ${DESTDIR}/usr/lib/libhdb.a
1691: LIBHEIMBASE?= ${DESTDIR}/usr/lib/libheimbase.a
1692: LIBHEIMNTLM?= ${DESTDIR}/usr/lib/libheimntlm.a
1693: LIBHX500?= ${DESTDIR}/usr/lib/libhx500.a
1694: LIBINTL?= ${DESTDIR}/usr/lib/libintl.a
1695: LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a
1696: LIBISC?= ${DESTDIR}/usr/lib/libisc.a
1697: LIBISCCC?= ${DESTDIR}/usr/lib/libisccc.a
1698: LIBISCFG?= ${DESTDIR}/usr/lib/libiscfg.a
1699: LIBKADM5CLNT?= ${DESTDIR}/usr/lib/libkadm5clnt.a
1700: LIBKADM5SRV?= ${DESTDIR}/usr/lib/libkadm5srv.a
1701: LIBKAFS?= ${DESTDIR}/usr/lib/libkafs.a
1702: LIBKRB5?= ${DESTDIR}/usr/lib/libkrb5.a
1703: LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a
1704: LIBL?= ${DESTDIR}/usr/lib/libl.a
1705: LIBLBER?= ${DESTDIR}/usr/lib/liblber.a
1706: LIBLDAP?= ${DESTDIR}/usr/lib/libldap.a
1707: LIBLDAP_R?= ${DESTDIR}/usr/lib/libldap_r.a
1708: LIBLUA?= ${DESTDIR}/usr/lib/liblua.a
1709: LIBM?= ${DESTDIR}/usr/lib/libm.a
1710: LIBMAGIC?= ${DESTDIR}/usr/lib/libmagic.a
1711: LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a
1712: LIBNETPGPVERIFY?= ${DESTDIR}/usr/lib/libnetpgpverify.a
1713: LIBNS?= ${DESTDIR}/usr/lib/libns.a
1714: LIBOBJC?= ${DESTDIR}/usr/lib/libobjc.a
1715: LIBOSSAUDIO?= ${DESTDIR}/usr/lib/libossaudio.a
1716: LIBPAM?= ${DESTDIR}/usr/lib/libpam.a
1717: LIBPANEL?= ${DESTDIR}/usr/lib/libpanel.a
1718: LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a
1719: LIBPCI?= ${DESTDIR}/usr/lib/libpci.a
1720: LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a
1721: LIBPTHREAD?= ${DESTDIR}/usr/lib/libpthread.a
1722: LIBPUFFS?= ${DESTDIR}/usr/lib/libpuffs.a
1723: LIBQUOTA?= ${DESTDIR}/usr/lib/libquota.a
1724: LIBRADIUS?= ${DESTDIR}/usr/lib/libradius.a
1725: LIBREFUSE?= ${DESTDIR}/usr/lib/librefuse.a
1726: LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a
1727: LIBRMT?= ${DESTDIR}/usr/lib/librmt.a
1728: LIBROKEN?= ${DESTDIR}/usr/lib/libroken.a
1729: LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a
1730: LIBRT?= ${DESTDIR}/usr/lib/librt.a
1731: LIBRUMP?= ${DESTDIR}/usr/lib/librump.a
1.396 christos 1732: LIBRUMPFS_CD9660?= ${DESTDIR}/usr/lib/librumpfs_cd9660.a
1.382 christos 1733: LIBRUMPFS_EFS?= ${DESTDIR}/usr/lib/librumpfs_efs.a
1734: LIBRUMPFS_EXT2FS?= ${DESTDIR}/usr/lib/librumpfs_ext2fs.a
1735: LIBRUMPFS_FFS?= ${DESTDIR}/usr/lib/librumpfs_ffs.a
1736: LIBRUMPFS_HFS?= ${DESTDIR}/usr/lib/librumpfs_hfs.a
1737: LIBRUMPFS_LFS?= ${DESTDIR}/usr/lib/librumpfs_lfs.a
1.396 christos 1738: LIBRUMPFS_MSDOS?= ${DESTDIR}/usr/lib/librumpfs_msdos.a
1.382 christos 1739: LIBRUMPFS_NFS?= ${DESTDIR}/usr/lib/librumpfs_nfs.a
1740: LIBRUMPFS_NTFS?= ${DESTDIR}/usr/lib/librumpfs_ntfs.a
1741: LIBRUMPFS_SYSPUFFS?= ${DESTDIR}/usr/lib/librumpfs_syspuffs.a
1742: LIBRUMPFS_TMPFS?= ${DESTDIR}/usr/lib/librumpfs_tmpfs.a
1743: LIBRUMPFS_UDF?= ${DESTDIR}/usr/lib/librumpfs_udf.a
1744: LIBRUMPUSER?= ${DESTDIR}/usr/lib/librumpuser.a
1745: LIBSASLC?= ${DESTDIR}/usr/lib/libsaslc.a
1746: LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a
1747: LIBSL?= ${DESTDIR}/usr/lib/libsl.a
1748: LIBSQLITE3?= ${DESTDIR}/usr/lib/libsqlite3.a
1749: LIBSSH?= ${DESTDIR}/usr/lib/libssh.a
1750: LIBSSL?= ${DESTDIR}/usr/lib/libssl.a
1751: LIBSTDCXX?= ${DESTDIR}/usr/lib/libstdc++.a
1752: LIBSUPCXX?= ${DESTDIR}/usr/lib/libsupc++.a
1753: LIBTERMINFO?= ${DESTDIR}/usr/lib/libterminfo.a
1754: LIBTRE?= ${DESTDIR}/usr/lib/libtre.a
1755: LIBUNBOUND?= ${DESTDIR}/usr/lib/libunbound.a
1756: LIBUSBHID?= ${DESTDIR}/usr/lib/libusbhid.a
1757: LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a
1758: LIBWIND?= ${DESTDIR}/usr/lib/libwind.a
1759: LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a
1760: LIBY?= ${DESTDIR}/usr/lib/liby.a
1761: LIBZ?= ${DESTDIR}/usr/lib/libz.a
1762:
1763: The following c startup files.
1764:
1765: LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o
1766: LIBCRTI?= ${DESTDIR}/usr/lib/crti.o
1767: LIBCRTBEGIN?= ${DESTDIR}/usr/lib/crti.o
1768: LIBCRTEND?= ${DESTDIR}/usr/lib/crtn.o
1.1 cgd 1769:
1.288 christos 1770: The following X-Windows libraries are predefined for DPADD:
1771:
1.394 christos 1772: LIBDPS?= ${DESTDIR}/usr/X11R7/lib/libdps.a
1773: LIBFNTSTUBS?= ${DESTDIR}/usr/X11R7/lib/libfntstubs.a
1774: LIBFONTCACHE?= ${DESTDIR}/usr/X11R7/lib/libfontcache.a
1775: LIBFONTCONFIG?= ${DESTDIR}/usr/X11R7/lib/libfontconfig.a
1776: LIBFONTENC?= ${DESTDIR}/usr/X11R7/lib/libfontenc.a
1777: LIBFREETYPE?= ${DESTDIR}/usr/X11R7/lib/libfreetype.a
1.382 christos 1778: LIBFS?= ${DESTDIR}/usr/X11R7/lib/libFS.a
1779: LIBGL?= ${DESTDIR}/usr/X11R7/lib/libGL.a
1780: LIBGLU?= ${DESTDIR}/usr/X11R7/lib/libGLU.a
1781: LIBICE?= ${DESTDIR}/usr/X11R7/lib/libICE.a
1.394 christos 1782: LIBLBXUTIL?= ${DESTDIR}/usr/X11R7/lib/liblbxutil.a
1.382 christos 1783: LIBSM?= ${DESTDIR}/usr/X11R7/lib/libSM.a
1784: LIBX11?= ${DESTDIR}/usr/X11R7/lib/libX11.a
1785: LIBX11_XCB?= ${DESTDIR}/usr/X11R7/lib/libX11-xcb.a
1786: LIBXAU?= ${DESTDIR}/usr/X11R7/lib/libXau.a
1787: LIBXAW?= ${DESTDIR}/usr/X11R7/lib/libXaw.a
1788: LIBXCB?= ${DESTDIR}/usr/X11R7/lib/libxcb.a
1789: LIBXDMCP?= ${DESTDIR}/usr/X11R7/lib/libXdmcp.a
1790: LIBXEXT?= ${DESTDIR}/usr/X11R7/lib/libXext.a
1.394 christos 1791: LIBXFONT2?= ${DESTDIR}/usr/X11R7/lib/libXfont2.a
1.382 christos 1792: LIBXFONT?= ${DESTDIR}/usr/X11R7/lib/libXfont.a
1793: LIBXFT?= ${DESTDIR}/usr/X11R7/lib/libXft.a
1794: LIBXI?= ${DESTDIR}/usr/X11R7/lib/libXi.a
1795: LIBXINERAMA?= ${DESTDIR}/usr/X11R7/lib/libXinerama.a
1.394 christos 1796: LIBXKBFILE?= ${DESTDIR}/usr/X11R7/lib/libxkbfile.a
1.382 christos 1797: LIBXMU?= ${DESTDIR}/usr/X11R7/lib/libXmu.a
1798: LIBXMUU?= ${DESTDIR}/usr/X11R7/lib/libXmuu.a
1799: LIBXPM?= ${DESTDIR}/usr/X11R7/lib/libXpm.a
1800: LIBXRANDR?= ${DESTDIR}/usr/X11R7/lib/libXrandr.a
1801: LIBXRENDER?= ${DESTDIR}/usr/X11R7/lib/libXrender.a
1802: LIBXSS?= ${DESTDIR}/usr/X11R7/lib/libXss.a
1803: LIBXT?= ${DESTDIR}/usr/X11R7/lib/libXt.a
1.394 christos 1804: LIBXTRAP?= ${DESTDIR}/usr/X11R7/lib/libXTrap.a
1.382 christos 1805: LIBXTST?= ${DESTDIR}/usr/X11R7/lib/libXtst.a
1806: LIBXV?= ${DESTDIR}/usr/X11R7/lib/libXv.a
1807: LIBXXF86DGA?= ${DESTDIR}/usr/X11R7/lib/libXxf86dga.a
1808: LIBXXF86MISC?= ${DESTDIR}/usr/X11R7/lib/libXxf86misc.a
1809: LIBXXF86VM?= ${DESTDIR}/usr/X11R7/lib/libXxf86vm.a
1.288 christos 1810:
1.1 cgd 1811: SHAREDSTRINGS If defined, a new .c.o rule is used that results in shared
1.12 christos 1812: strings, using xstr(1). Note that this will not work with
1813: parallel makes.
1.1 cgd 1814:
1.59 jlam 1815: STRIPFLAG The flag passed to the install program to cause the binary
1.1 cgd 1816: to be stripped.
1817:
1818: SUBDIR A list of subdirectories that should be built as well.
1819: Each of the targets will execute the same target in the
1820: subdirectories.
1821:
1.21 christos 1822: SCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
1823: These are installed exactly like programs.
1824:
1.166 rtr 1825: SCRIPTSDIR The location to install the scripts. Each script can be
1826: installed to a separate path by setting SCRIPTSDIR_<script>.
1827:
1.21 christos 1828: SCRIPTSNAME The name that the above program will be installed as, if
1829: different from ${SCRIPTS}. These can be further specialized
1830: by setting SCRIPTSNAME_<script>.
1831:
1.124 lukem 1832: FILES See description of <bsd.files.mk>.
1.21 christos 1833:
1.106 thorpej 1834: SHLINKDIR Target directory for shared linker. See description of
1835: <bsd.own.mk> for additional information about this variable.
1.130 lukem 1836:
1.1 cgd 1837: The include file <bsd.prog.mk> includes the file named "../Makefile.inc"
1838: if it exists, as well as the include file <bsd.man.mk>.
1839:
1840: Some simple examples:
1841:
1842: To build foo from foo.c with a manual page foo.1, use:
1843:
1844: PROG= foo
1845:
1846: .include <bsd.prog.mk>
1847:
1848: To build foo from foo.c with a manual page foo.2, add the line:
1849:
1.9 cgd 1850: MAN= foo.2
1.1 cgd 1851:
1852: If foo does not have a manual page at all, add the line:
1853:
1.75 agc 1854: MKMAN= no
1.1 cgd 1855:
1856: If foo has multiple source files, add the line:
1857:
1858: SRCS= a.c b.c c.c d.c
1859:
1860:
1.118 lukem 1861: =-=-=-=-= bsd.rpc.mk =-=-=-=-=
1862:
1863: The include file <bsd.rpc.mk> contains a makefile fragment used to
1864: construct source files built by rpcgen.
1.72 sommerfe 1865:
1.118 lukem 1866: The following macros may be defined in makefiles which include
1867: <bsd.rpc.mk> in order to control which files get built and how they
1868: are to be built:
1.21 christos 1869:
1.118 lukem 1870: RPC_INCS: construct .h file from .x file
1.120 lukem 1871: RPC_XDRFILES: construct _xdr.c from .x file
1.118 lukem 1872: (for marshalling/unmarshalling data types)
1873: RPC_SVCFILES: construct _svc.c from .x file
1874: (server-side stubs)
1875: RPC_SVCFLAGS: Additional flags passed to builds of RPC_SVCFILES.
1.21 christos 1876:
1.118 lukem 1877: RPC_XDIR: Directory containing .x/.h files
1.23 christos 1878:
1879:
1.118 lukem 1880: =-=-=-=-= bsd.shlib.mk =-=-=-=-=
1.21 christos 1881:
1.118 lukem 1882: The include file <bsd.shlib.mk> computes parameters for shared library
1883: installation and use. It defines no targets. <bsd.own.mk> MUST be
1.134 lukem 1884: included before <bsd.shlib.mk>.
1.21 christos 1885:
1.134 lukem 1886: <bsd.own.mk> sets the following variables, if they are not already defined
1.118 lukem 1887: (defaults are in brackets):
1.21 christos 1888:
1.300 joerg 1889: SHLIBINSTALLDIR If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR}
1890: instead of ${LIBDIR} as the base path for shared library
1891: installation. [/lib]
1892:
1.118 lukem 1893: SHLIBDIR The path to USE_SHLIBDIR shared libraries to use when building
1894: a program. [/lib for programs in /bin and /sbin, /usr/lib
1895: for all others.]
1.81 wiz 1896:
1.300 joerg 1897: _LIBSODIR Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no",
1.118 lukem 1898: otherwise set to ${LIBDIR}
1.81 wiz 1899:
1.300 joerg 1900: SHLINKINSTALLDIR Base path for shared linker. [/libexec]
1901:
1.118 lukem 1902: SHLINKDIR Path to use for shared linker when building a program.
1903: [/libexec for programs in /bin and /sbin, /usr/libexec for
1904: all others.]
1.39 cgd 1905:
1.13 christos 1906:
1.118 lukem 1907: =-=-=-=-= bsd.subdir.mk =-=-=-=-=
1.13 christos 1908:
1.118 lukem 1909: The include file <bsd.subdir.mk> contains the default targets for building
1.120 lukem 1910: subdirectories. It has the same eight targets as <bsd.prog.mk>: all,
1.233 apb 1911: clean, cleandir, depend, includes, install, lint, and tags. It uses the
1912: following variables:
1913:
1914: NOSUBDIR If this variable is defined, then the SUBDIR variable
1915: will be ignored and subdirectories will not be processed.
1916:
1917: SUBDIR For all of the directories listed in ${SUBDIR}, the
1918: specified directory will be visited and the target made.
1919:
1920: As a special case, the use of a token .WAIT as an
1921: entry in SUBDIR acts as a synchronization barrier
1922: when multiple make jobs are run; subdirs before the
1923: .WAIT must complete before any subdirs after .WAIT are
1924: started. See make(1) for some caveats on use of .WAIT
1925: and other special sources.
1.47 tv 1926:
1927:
1.326 christos 1928: =-=-=-=-= bsd.x11.mk =-=-=-=-=
1929:
1930: The include file <bsd.x11.mk> contains parameters and targets for
1.346 mrg 1931: cross-building X11 from ${X11SRCDIR.<package>}. It should be included
1932: after the general Makefile contents but before the include files such as
1933: <bsd.prog.mk> and <bsd.lib.mk>.
1.326 christos 1934:
1935: It provides the following targets:
1936: .man.1 .man.3 .man.4 .man.5 .man.7:
1937: If ${MAN} or ${PROG} is set and ${MKMAN} != "no",
1938: these rules convert from X11's manual page source
1939: into an mdoc.old source file.
1940:
1941: It sets the following variables:
1942:
1943: BINDIR Set to ${X11BINDIR}.
1944: To override, define after including <bsd.x11.mk>
1945:
1946: LIBDIR Set to ${X11USRLIBDIR}.
1947: To override, define after including <bsd.x11.mk>
1948:
1949: MANDIR Set to ${X11MANDIR}.
1950: To override, define after including <bsd.x11.mk>
1951:
1952: CPPFLAGS Appended with definitions to include from
1953: ${DESTDIR}${X11INCDIR}
1954:
1955: LDFLAGS Appended with definitions to link from
1956: ${DESTDIR}${X11USRLIBDIR}
1957:
1958: X11FLAGS.CONNECTION Equivalent to X11's CONNECTION_FLAGS.
1959:
1960: X11FLAGS.EXTENSION Equivalent to X11's EXT_DEFINES.
1961:
1962: X11FLAGS.LOADABLE Equivalent to X11's LOADABLE.
1963:
1964: X11FLAGS.OS_DEFINES Equivalent to X11's OS_DEFINES.
1965:
1966: X11FLAGS.SERVER Equivalent to X11's ServerDefines.
1967:
1968: X11FLAGS.THREADLIB Equivalent to X11's THREADS_DEFINES for libraries.
1969:
1970: X11FLAGS.THREADS Equivalent to X11's THREADS_DEFINES.
1971:
1972: X11FLAGS.VERSION cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION.
1973:
1974: X11FLAGS.DIX Equivalent to X11's DIX_DEFINES.
1975:
1976: X11TOOL_UNXCOMM Commandline to convert `XCOMM' comments to `#'
1977:
1978: It uses the following variables:
1979:
1980: APPDEFS List of app-default files to install.
1981:
1982: CPPSCRIPTS List of files/scripts to run through cpp(1)
1983: and then ${X11TOOL_UNXCOMM}. The source files
1984: have a `.cpp' suffix, the generated files do not.
1985:
1986: CPPSCRIPTFLAGS Additional flags to cpp(1) when building CPPSCRIPTS.
1987:
1988: CPPSCRIPTFLAGS_<fn> Additional flags to cpp(1) when building CPPSCRIPT <fn>.
1989:
1990:
1991: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1992:
1993: The following files are described here for completion, but they are not
1994: supposed to be included directly from other Makefiles; they are used
1995: internally by other system files.
1996:
1.118 lukem 1997: =-=-=-=-= bsd.sys.mk =-=-=-=-=
1.47 tv 1998:
1.326 christos 1999: The include file <bsd.sys.mk> is used by other system mk files and
2000: it is not intended to be included standalone. It contains rules and
2001: system build variables. It requires bsd.own.mk to be included first.
2002: It contains overrides that are used when building the NetBSD source tree.
1.133 lukem 2003:
2004: The following variables control how various files are compiled/built.
1.142 lukem 2005: (Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"):
1.133 lukem 2006:
2007: AR Create, modify, and extract from archives. [ar]
2008:
2009: ARFLAGS Options to ${AR}. [rl]
2010:
1.387 christos 2011: ARM_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout]
2012:
1.151 lukem 2013: AS Assembler. [as]
2014:
1.211 lukem 2015: AFLAGS Options to ${CC} when compiling or linking .s or .S
2016: assembly source files. []
1.151 lukem 2017:
1.217 joerg 2018: BUILDSEED GCC uses random numbers when compiling C++ code.
2019: If this option is present, seed the random number
2020: generator based on the value, source file names and
2021: the output file name to make builds more deterministic.
2022: Additional information is available in the GCC
2023: documentation of -frandom-seed.
2024:
1.133 lukem 2025: CC C compiler. [cc]
2026:
2027: CFLAGS Options to ${CC}. [Usually -O or -O2]
2028:
2029: CPP C Pre-Processor. [cpp]
2030:
2031: CPPFLAGS Options to ${CPP}. []
2032:
1.151 lukem 2033: CPUFLAGS Optimization flags for ${CC}. []
1.133 lukem 2034:
2035: CXX C++ compiler. [c++]
2036:
2037: CXXFLAGS Options to ${CXX}. [${CFLAGS}]
2038:
1.387 christos 2039: M68K_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout]
2040:
2041: MIPS_ELF2ECOFF Convert ELF-format executable to ECOFF. [elf2ecoff]
1.133 lukem 2042:
2043: FC Fortran compiler. [f77]
2044:
2045: FFLAGS Options to {$FC}. [-O]
2046:
1.235 apb 2047: HOST_SH Shell. This must be an absolute path, because it may be
2048: substituted into "#!" lines in scripts. [/bin/sh]
2049:
1.133 lukem 2050: INSTALL install(1) command. [install]
2051:
2052: LEX Lexical analyzer. [lex]
2053:
2054: LFLAGS Options to ${LEX}. []
2055:
1.145 jwise 2056: LPREFIX Symbol prefix for ${LEX} (see -P option in lex(1)) [yy]
2057:
1.133 lukem 2058: LD Linker. [ld]
2059:
1.178 lukem 2060: LDFLAGS Options to ${CC} during the link process. []
1.133 lukem 2061:
2062: LINT C program verifier. [lint]
2063:
1.390 christos 2064: LINTFLAGS Options to ${LINT}. [-chapbrxzgFS]
1.133 lukem 2065:
2066: LORDER List dependencies for object files. [lorder]
2067:
2068: MAKE make(1). [make]
2069:
2070: MKDEP Construct Makefile dependency list. [mkdep]
2071:
1.321 mrg 2072: MKDEPCXX Construct Makefile dependency list for C++ files. [mkdep]
2073:
1.133 lukem 2074: NM List symbols from object files. [nm]
2075:
2076: PC Pascal compiler. [pc] (Not present)
2077:
2078: PFLAGS Options to ${PC}. []
2079:
2080: OBJC Objective C compiler. [${CC}]
2081:
2082: OBJCFLAGS Options to ${OBJC}. [${CFLAGS}]
2083:
2084: OBJCOPY Copy and translate object files. [objcopy]
2085:
1.291 christos 2086: OBJCOPYLIBFLAGS Flags to pass to objcopy when library objects are
2087: being built. [${.TARGET} =~ "*.po" ? -X : -x]
2088:
1.168 riz 2089: OBJDUMP Display information from object files. [objdump]
2090:
1.133 lukem 2091: RANLIB Generate index to archive. [ranlib]
2092:
1.343 pooka 2093: READELF Display information from ELF object files. [readelf]
2094:
1.133 lukem 2095: SIZE List section sizes and total size. [size]
2096:
1.343 pooka 2097: STRINGS Display printable character sequences in files. [strings]
2098:
1.133 lukem 2099: STRIP Discard symbols from object files. [strip]
2100:
2101: TSORT Topological sort of a directed graph. [tsort -q]
2102:
2103: YACC LALR(1) parser generator. [yacc]
2104:
2105: YFLAGS Options to ${YACC}. []
2106:
2107: YHEADER If defined, add "-d" to YFLAGS, and add dependencies
2108: from <file>.y to <file>.h and <file>.c, and add
2109: <foo>.h to CLEANFILES.
2110:
2111: YPREFIX If defined, add "-p ${YPREFIX}" to YFLAGS.
2112:
1.116 lukem 2113:
1.69 sommerfe 2114: Other variables of note (incomplete list):
2115:
1.213 lukem 2116: NOGCCERROR If defined, prevents passing certain ${CFLAGS} to GCC
2117: that cause warnings to be fatal, such as:
2118: -Werror -Wa,--fatal-warnings
2119: (The latter being for as(1).)
1.212 lukem 2120:
1.283 joerg 2121: NOCLANGERROR If defined and clang is used as C compiler, -Werror is not
2122: passed to it.
2123:
1.296 plunky 2124: WARNS Crank up compiler warning options; the distinct levels are:
1.82 lukem 2125: WARNS=1
2126: WARNS=2
2127: WARNS=3
1.164 matt 2128: WARNS=4
1.296 plunky 2129: WARNS=5
1.336 christos 2130: WARNS=6
1.69 sommerfe 2131:
1.326 christos 2132: =-=-=-=-= bsd.host.mk =-=-=-=-=
1.144 lukem 2133:
1.326 christos 2134: This file is automatically included from bsd.own.mk. It contains settings
2135: for all the HOST_* variables that are used in host programs and libraries.
1.144 lukem 2136:
1.326 christos 2137: HOST_AR The host archive processing command
1.144 lukem 2138:
1.326 christos 2139: HOST_CC The host c compiler
1.144 lukem 2140:
1.326 christos 2141: HOST_CFLAGS The host c compiler flags
1.144 lukem 2142:
1.326 christos 2143: HOST_COMPILE.c The host c compiler line with flags
1.144 lukem 2144:
1.326 christos 2145: HOST_COMPILE.cc The host c++ compiler line with flags
1.144 lukem 2146:
1.326 christos 2147: HOST_CPP The host c pre-processor
1.144 lukem 2148:
1.391 kamil 2149: HOST_CPPFLAGS The host c pre-processor flags
1.144 lukem 2150:
1.326 christos 2151: HOST_CXX The host c++ compiler
1.144 lukem 2152:
1.326 christos 2153: HOST_CXXFLAGS The host c++ compiler flags
1.144 lukem 2154:
1.326 christos 2155: HOST_INSTALL_DIR The host command to install a directory
1.144 lukem 2156:
1.326 christos 2157: HOST_INSTALL_FILE The host command to install a file
1.144 lukem 2158:
1.326 christos 2159: HOST_INSTALL_SYMLINK The host command to install a symlink
1.144 lukem 2160:
1.326 christos 2161: HOST_LD The host linker command
1.144 lukem 2162:
1.326 christos 2163: HOST_LDFLAGS The host linker flags
1.144 lukem 2164:
1.326 christos 2165: HOST_LINK.c The host c linker line with flags
1.221 mrg 2166:
1.326 christos 2167: HOST_LINK.cc The host c++ linker line with flags
1.144 lukem 2168:
1.326 christos 2169: HOST_LN The host command to link two files
1.144 lukem 2170:
1.326 christos 2171: HOST_MKDEP The host command to create dependencies for c programs
1.144 lukem 2172:
1.326 christos 2173: HOST_MKDEPCXX The host command to create dependencies for c++ programs
1.144 lukem 2174:
1.326 christos 2175: HOST_OSTYPE The host OSNAME-RELEASE-ARCH tupple
1.144 lukem 2176:
1.326 christos 2177: HOST_RANLIB The host command to create random access archives
1.144 lukem 2178:
1.326 christos 2179: HOST_SH The host Bourne shell interpreter name (absolute path)
1.144 lukem 2180:
1.30 agc 2181: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CVSweb <webmaster@jp.NetBSD.org>