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