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