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