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