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