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