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