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