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