bsd.README revision 1.444
1# $NetBSD: bsd.README,v 1.444 2023/06/05 22:36:58 lukem Exp $ 2# @(#)bsd.README 8.2 (Berkeley) 4/2/94 3 4This is the README file for the make "include" files for the NetBSD 5source tree. The files are installed in /usr/share/mk, and are, 6by convention, named with the suffix ".mk". 7 8Other sources of relevant documentation are BUILDING in the top 9level of the NetBSD source tree, and the mk.conf(5) man page. 10 11Note: this file is not intended to replace reading through the .mk 12files for anything tricky. 13 14=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 15 16RANDOM THINGS WORTH KNOWING: 17 18The files are simply C-style #include files, and pretty much behave like 19you'd expect. The syntax is slightly different in that a single '.' is 20used instead of the hash mark, i.e. ".include <bsd.prog.mk>". 21 22One difference that will save you lots of debugging time is that inclusion 23of the file is normally done at the *end* of the Makefile. The reason for 24this is because .mk files often modify variables and behavior based on the 25values of variables set in the Makefile. To make this work, remember that 26the FIRST target found is the target that is used, i.e. if the Makefile has: 27 28 a: 29 echo a 30 a: 31 echo a number two 32 33the command "make a" will echo "a". To make things confusing, the SECOND 34variable assignment is the overriding one, i.e. if the Makefile has: 35 36 a= foo 37 a= bar 38 39 b: 40 echo ${a} 41 42the command "make b" will echo "bar". This is for compatibility with the 43way the V7 make behaved. 44 45It's fairly difficult to make the BSD .mk files work when you're building 46multiple programs in a single directory. It's a lot easier to split up the 47programs than to deal with the problem. Most of the agony comes from making 48the "obj" directory stuff work right, not because we switched to a new version 49of make. So, don't get mad at us, figure out a better way to handle multiple 50architectures so we can quit using the symbolic link stuff. (Imake doesn't 51count.) 52 53The file .depend in the source directory is expected to contain dependencies 54for the source files. This file is read automatically by make after reading 55the Makefile. 56 57The variable DESTDIR works as before. It's not set anywhere but will change 58the tree where the file gets installed. 59 60The profiled libraries are no longer built in a different directory than 61the regular libraries. A new suffix, ".po", is used to denote a profiled 62object, and ".pico" denotes a shared (position-independent) object. 63 64There are various make variables used during the build. 65 66Many variables support a (case sensitive) value of "no" or "yes", 67and are tested with ${VAR} == "no" and ${VAR} != "no" . 68 69 70The basic rule for the variable naming scheme is as follows: 71 72HOST_<cmd> A command that runs on the host machine regardless of 73 whether or not the system is being cross compiled, or 74 flags for such a command. 75 76MK<feature> Can be set to "no" to disable feature <feature>, 77 or "yes" to enable feature <feature>. 78 Usually defaults to "yes", although some variables 79 default to "no". 80 Due to make(1) implementation issues, if a temporary 81 command-line override of a mk.conf(5) or <bsd.own.mk> 82 setting is required whilst still honoring a particular 83 Makefile's setting of MK<feature>, use 84 env MK<feature>=value make 85 instead of 86 make MK<feature>=value 87 88NO<feature> If defined, disables feature <feature>, overriding 89 a user's MK<feature>=yes configuration. 90 Not intended for users. 91 This is to allow Makefiles to disable functionality 92 that they don't support (such as missing man pages). 93 NO<feature> variables must be defined before <bsd.own.mk> 94 is included, which generally means define before 95 any <*.mk> is included. 96 See "Variables for a Makefile". 97 98TOOL_<tool> A tool that is provided as part of the USETOOLS 99 framework. When not using the USETOOLS framework, 100 TOOL_<tool> variables should refer to tools that are 101 already installed on the host system. 102 103The following variables control how things are made/installed that 104are not set by default. These should not be set by Makefiles; they're for 105the user to define in MAKECONF (see <bsd.own.mk>, below, or mk.conf(5)) 106or on the make(1) command line: 107 108BUILD If defined, 'make install' checks that the targets in the 109 source directories are up-to-date and re-makes them if 110 they are out of date, instead of blindly trying to 111 install out of date or non-existent targets. 112 113 Default: Unset. 114 115BUILDID Identifier for the build. If set, this should be a short 116 string that is suitable for use as part of a file or 117 directory name. The identifier will be appended to 118 object directory names, and can be consulted in the 119 make(1) configuration file in order to set additional 120 build parameters, such as compiler flags. It will also 121 be used as part of the kernel version string, which can 122 be shown by "uname -v". 123 124 Default: Unset. 125 126BUILDINFO Optional multi-line string containing information about 127 the build. This will appear in DESTDIR/etc/release, and 128 it will be stored in the buildinfo variable in any 129 kernels that are built. When such kernels are booted, 130 the sysctl(7) kern.buildinfo variable will report this 131 value. The string may contain backslash escape 132 sequences, such as "\\" (representing a backslash 133 character) and "\n" (representing a newline). 134 135 Default: Unset. 136 137BUILDSEED g++(1) uses random numbers when compiling C++ code. This 138 variable seeds the g++(1) random number generator using 139 -frandom-seed with this value. By default, it is set to 140 "NetBSD-(majorversion)". Using a fixed value causes C++ 141 binaries to be the same when built from the same sources, 142 resulting in identical (reproducible) builds. Additional 143 information is available in the g++(1) documentation of 144 -frandom-seed. 145 146 Default: Unset. 147 148MAKEVERBOSE Level of verbosity of status messages. Supported values: 149 150 0 No descriptive messages or commands executed by 151 make(1) are shown. 152 153 1 Brief messages are shown describing what is being 154 done, but the actual commands executed by make(1) are 155 not displayed. 156 157 2 Descriptive messages are shown as above (prefixed 158 with a `#'), and ordinary commands performed by 159 make(1) are displayed. 160 161 3 In addition to the above, all commands performed by 162 make(1) are displayed, even if they would ordinarily 163 have been hidden through use of the "@" prefix in the 164 relevant makefile. 165 166 4 In addition to the above, commands executed by 167 make(1) are traced through use of the sh(1) "-x" 168 flag. 169 170 Default: 2 171 172MKAMDGPUFIRMWARE 173 Can be set to "yes" or "no". Indicates whether to 174 install the /libdata/firmware/amdgpu directory, which is 175 necessary for the amdgpu(4) AMD RADEON GPU video driver. 176 177 Default: "yes" on i386 and x86_64; "no" on other 178 platforms. 179 180MKARGON2 Can be set to "yes" or "no". Indicates whether the 181 Argon2 hash is enabled in libcrypt. 182 183 Default: "yes" 184 185MKARZERO Can be set to "yes" or "no". Indicates whether ar(1) 186 should zero the timestamp, uid, and gid in the archive 187 for reproducible builds. 188 189 Default: The value of MKREPRO (if defined), otherwise 190 "no". 191 192MKATF Can be set to "yes" or "no". Indicates whether the 193 Automated Testing Framework (ATF) will be built and 194 installed. This also controls whether the NetBSD test 195 suite will be built and installed, as the tests rely on 196 ATF and cannot be built without it. 197 198 Forced to "no" if MKCXX=no. 199 200 Default: "yes" 201 202MKBFD Obsolete, use MKBINUTILS. 203 204MKBINUTILS Can be set to "yes" or "no". Indicates whether any of 205 the binutils tools or libraries will be built and 206 installed. That is, the libraries libbfd, libiberty, or 207 any of the things that depend upon them, e.g. as(1), 208 ld(1), dbsym(8), or mdsetimage(8). 209 210 Forced to "no" if TOOLCHAIN_MISSING!=no. 211 212 Default: "yes" 213 214MKBSDGREP Can be set to "yes" or "no". Determines which 215 implementation of grep(1) will be built and installed. 216 If "yes", use the BSD implementation. If "no", use the 217 GNU implementation. 218 219 Default: "no" 220 221MKBSDTAR Can be set to "yes" or "no". Determines which 222 implementation of cpio(1) and tar(1) will be built and 223 installed. If "yes", use the libarchive-based 224 implementations. If "no", use the pax(1) based 225 implementations. 226 227 Default: "yes" 228 229MKCATPAGES Can be set to "yes" or "no". Indicates whether 230 preformatted plaintext manual pages will be created and 231 installed. 232 233 Forced to "no" if MKMAN=no or MKSHARE=no. 234 235 Default: "no" 236 237MKCLEANSRC Can be set to "yes" or "no". Indicates whether `make 238 clean' and `make cleandir' will delete file names in 239 CLEANFILES or CLEANDIRFILES from both the object 240 directory, .OBJDIR, and the source directory, .SRCDIR. 241 242 If "yes", then these file names will be deleted relative 243 to both .OBJDIR and .CURDIR. If "no", then the deletion 244 will be performed relative to .OBJDIR only. 245 246 Default: "yes" 247 248MKCLEANVERIFY Can be set to "yes" or "no". Controls whether `make 249 clean' and `make cleandir' will verify that files have 250 been deleted. If "yes", then file deletions will be 251 verified using ls(1). If "no", then file deletions will 252 not be verified. 253 254 Default: "yes" 255 256MKCOMPAT Can be set to "yes" or "no". Indicates whether support 257 for multiple ABIs is to be built and installed. 258 259 Forced to "no" if NOCOMPAT is defined, usually in the 260 Makefile before any make(1) .include directives. 261 262 Default: "yes" on aarch64 (without gcc), mips64, 263 powerpc64, riscv64, sparc64, and x86_64; "no" on other 264 platforms. 265 266MKCOMPATMODULES 267 Can be set to "yes" or "no". Indicates whether the 268 compat kernel modules will be built and installed. 269 270 Forced to "no" if MKCOMPAT=no. 271 272 Default: "yes" on evbppc-powerpc and mips64; "no" on 273 other platforms. 274 275MKCOMPATTESTS Can be set to "yes" or "no". Indicates whether the 276 NetBSD test suite for src/compat will be built and 277 installed. 278 279 Forced to "no" if MKCOMPAT=no. 280 281 Default: "no" 282 283MKCOMPATX11 Can be set to "yes" or "no". Indicates whether the X11 284 libraries will be built and installed. 285 286 Forced to "no" if MKCOMPAT=no. 287 288 Default: "no" 289 290MKCOMPLEX Can be set to "yes" or "no". Indicates whether the Math 291 Library (libm, -lm) is compiled with support for 292 <complex.h>. 293 294 Default: "yes" 295 296MKCROSSGDB Can be set to "yes" or "no". Create a cross-gdb as a 297 host tool. 298 299 Default: "no" 300 301MKCRYPTO Obsolete. 302 303MKCTF Can be set to "yes" or "no". Indicates whether CTF tools 304 are to be built and installed. If "yes", the tools will 305 be used to generate and manipulate CTF data of ELF 306 binaries during build. 307 308 Forced to "no" if NOCTF is defined, usually in the 309 Makefile before any make(1) .include directives. 310 311 This is disabled internally for standalone programs in 312 /usr/mdec. 313 314 Default: "yes" on aarch64, amd64, and i386; "no" on other 315 platforms. 316 317MKCVS Can be set to "yes" or "no". Indicates whether cvs(1) 318 will be built and installed. 319 320 Default: "yes" 321 322MKCXX Can be set to "yes" or "no". Indicates whether C++ 323 support is enabled. 324 325 If "no", C++ compilers and software will not be built, 326 and acts as MKATF=no MKGCCCMDS=no MKGDB=no MKGROFF=no 327 MKKYUA=no. 328 329 Default: "yes" 330 331MKDEBUG Can be set to "yes" or "no". Indicates whether debug 332 information should be generated for all userland 333 binaries. The result is collected as an additional 334 debug.tgz and xdebug.tgz set and installed in 335 DESTDIR/usr/libdata/debug. 336 337 Forced to "no" if NODEBUG is defined, usually in the 338 Makefile before any make(1) .include directives. 339 340 Default: "no" 341 342MKDEBUGKERNEL Can be set to "yes" or "no". Indicates whether debugging 343 symbols will be built for kernels by default; pretend as 344 if makeoptions DEBUG="-g" is specified in kernel 345 configuration files. This will also put the debug kernel 346 netbsd.gdb in the kernel sets. See options(4) for 347 details. This is useful if a cross-gdb is built as well 348 (see MKCROSSGDB). 349 350 Default: "no" 351 352MKDEBUGLIB Can be set to "yes" or "no". Indicates whether debug 353 libraries (lib*_g.a) will be built and installed. Debug 354 libraries are compiled with "-g -DDEBUG". 355 356 Forced to "no" if NODEBUGLIB is defined, usually in the 357 Makefile before any make(1) .include directives. 358 359 Default: "no" 360 361MKDEBUGTOOLS Can be set to "yes" or "no". Indicates whether debug 362 information (lib*_g.a) will be included in the build 363 toolchain. 364 365 Default: "no" 366 367MKDEPINCLUDES Can be set to "yes" or "no". Indicates whether to add 368 .include statements in the .depend files instead of 369 inlining the contents of the *.d files. This is useful 370 when stale dependencies are present, to list the exact 371 files that need refreshing, but it is possibly slower 372 than inlining. 373 374 Default: "no" 375 376MKDOC Can be set to "yes" or "no". Indicates whether system 377 documentation destined for DESTDIR/usr/share/doc will be 378 installed. 379 380 Forced to "no" if NODOC is defined, usually in the 381 Makefile before any make(1) .include directives. 382 383 Forced to "no" if MKSHARE=no. 384 385 Default: "yes" 386 387MKDTB Can be set to "yes" or "no". Indicates whether the 388 devicetree blobs will be built and installed. 389 390 Default: "yes" on aarch64, armv6, armv7, riscv32, and 391 riscv64; "no" on other platforms. 392 393MKDTC Can be set to "yes" or "no". Indicates whether the 394 Device Tree Compiler (dtc) will be built and installed. 395 396 Default: "yes" 397 398MKDTRACE Can be set to "yes" or "no". Indicates whether the 399 kernel modules, utilities, and libraries for dtrace(1) 400 support are to be built and installed. 401 402 Default: "yes" on aarch64, amd64, and i386; "no" on other 403 platforms. 404 405MKDYNAMICROOT Can be set to "yes" or "no". Indicates whether all 406 programs should be dynamically linked, and to install 407 shared libraries required by /bin and /sbin and the 408 shared linker ld.elf_so(1) into /lib. If "no", link 409 programs in /bin and /sbin statically. 410 411 Default: "no" on ia64; "yes" on other platforms. 412 413MKEXTSRC Obsolete. 414 415MKFIRMWARE Can be set to "yes" or "no". Indicates whether to 416 install the /libdata/firmware directory, which is 417 necessary for various drivers, including: athn(4), 418 bcm43xx(4), bwfm(4), ipw(4), iwi(4), iwm(4), iwn(4), 419 otus(4), ral(4), rtwn(4), rum(4), run(4), urtwn(4), 420 wpi(4), zyd(4), and the Tegra 124 SoC. 421 422 Default: "yes" on amd64, cobalt, evbarm, evbmips, evbppc, 423 hpcarm, hppa, i386, mac68k, macppc, sandpoint, and 424 sparc64; "no" on other platforms. 425 426MKGCC Can be set to "yes" or "no". Indicates whether gcc(1) or 427 any related libraries (libg2c, libgcc, libobjc, 428 libstdc++) will be built and installed. 429 430 Forced to "no" if TOOLCHAIN_MISSING!=no or 431 EXTERNAL_TOOLCHAIN is defined. 432 433 Default: "yes" 434 435MKGCCCMDS Can be set to "yes" or "no". Indicates whether gcc(1) 436 will be built and installed. If "no", then MKGCC 437 controls if the GCC libraries will be built and 438 installed. 439 440 Forced to "no" if MKCXX=no. 441 442 Default: "no" on m68000; "yes" on other platforms. 443 444MKGDB Can be set to "yes" or "no". Indicates whether gdb(1) 445 will be built and installed. 446 447 Forced to "no" if MKCXX=no or TOOLCHAIN_MISSING!=no. 448 449 Default: "no" on ia64 and or1k; "yes" on other platforms. 450 451MKGROFF Can be set to "yes" or "no". Indicates whether groff(1) 452 will be built, installed, and used to format some of the 453 PostScript and PDF documentation. 454 455 Forced to "no" if MKCXX=no. 456 457 Default: "yes" 458 459MKGROFFHTMLDOC Can be set to "yes" or "no". Indicates whether to use 460 groff(1) to generate HTML for miscellaneous articles 461 which sometimes requires software not in the base 462 installation. Does not affect the generation of HTML man 463 pages. 464 465 Default: "no" 466 467MKHESIOD Can be set to "yes" or "no". Indicates whether the 468 Hesiod infrastructure (libraries and support programs) 469 will be built and installed. 470 471 Default: "yes" 472 473MKHOSTOBJ Can be set to "yes" or "no". If "yes", then for programs 474 intended to be run on the compile host, the name, 475 release, and architecture of the host operating system 476 will be suffixed to the name of the object directory 477 created by "make obj". (This allows multiple host 478 systems to compile NetBSD for a single target.) If "no", 479 then programs built to be run on the compile host will 480 use the same object directory names as programs built to 481 be run on the target. 482 483 Default: "no" 484 485MKHTML Can be set to "yes" or "no". Indicates whether the HTML 486 manual pages are created and installed. 487 488 Forced to "no" if NOHTML is defined, usually in the 489 Makefile before any make(1) .include directives. 490 491 Forced to "no" if MKMAN=no or MKSHARE=no. 492 493 Default: "yes" 494 495MKIEEEFP Can be set to "yes" or "no". Indicates whether code for 496 IEEE754/IEC60559 conformance will be built and installed. 497 Has no effect on most platforms. 498 499 Default: "yes" 500 501MKINET6 Can be set to "yes" or "no". Indicates whether INET6 502 (IPv6) infrastructure (libraries and support programs) 503 will be built and installed. 504 505 Note: MKINET6 must not be set to "no" if MKX11!=no. 506 507 Default: "yes" 508 509MKINFO Can be set to "yes" or "no". Indicates whether GNU Info 510 files, used for the documentation for most of the 511 compilation tools, will be built and installed. 512 513 Forced to "no" if NOINFO is defined, usually in the 514 Makefile before any make(1) .include directives. 515 516 Forced to "no" if MKSHARE=no. 517 518 Default: "yes" 519 520MKIPFILTER Can be set to "yes" or "no". Indicates whether the 521 ipf(4) programs, headers, and other components will be 522 built and installed. 523 524 Default: "yes" 525 526MKISCSI Can be set to "yes" or "no". Indicates whether the iSCSI 527 library and applications are built and installed. 528 529 Default: "no" on m68000; "yes" on other platforms. 530 531MKKDEBUG Deprecated, use MKDEBUGKERNEL. 532 533MKKERBEROS Can be set to "yes" or "no". Indicates whether the 534 Kerberos v5 infrastructure (libraries and support 535 programs) will be built and installed. Caution: the 536 default pam(8) configuration requires that Kerberos be 537 present even if not used. Do not install a userland 538 without Kerberos without also either updating the 539 pam.conf(5) files or disabling PAM via MKPAM. Otherwise 540 all logins will fail. 541 542 Default: "yes" 543 544MKKERBEROS4 Obsolete. 545 546MKKMOD Can be set to "yes" or "no". Indicates whether kernel 547 modules will be built and installed. 548 549 Default: "no" on or1k; "yes" on other platforms. 550 551MKKYUA Can be set to "yes" or "no". Indicates whether Kyua (the 552 testing infrastructure used by NetBSD) will be built and 553 installed. 554 555 Forced to "no" if MKCXX=no. 556 557 Note: This does not control the installation of the tests 558 themselves. The tests rely on the ATF libraries and 559 therefore their build is controlled by the MKATF 560 variable. 561 562 Default: "no" until the import of Kyua is done and 563 validated. 564 565MKLDAP Can be set to "yes" or "no". Indicates whether the 566 Lightweight Directory Access Protocol (LDAP) 567 infrastructure (libraries and support programs) will be 568 built and installed. 569 570 Default: "yes" 571 572MKLIBCSANITIZER 573 Can be set to "yes" or "no". Indicates whether to use 574 the sanitizer for libc, using the sanitizer defined by 575 USE_LIBCSANITIZER. 576 577 Forced to "no" if NOLIBCSANITIZER is defined, usually in 578 the Makefile before any make(1) .include directives. 579 580 Default: "no" 581 582MKLIBCXX Can be set to "yes" or "no". Indicates if libc++ will be 583 built and installed (usually for clang++(1)). 584 585 Default: "yes" if MKLLVM=yes; "no" otherwise. 586 587MKLIBSTDCXX Can be set to "yes" or "no". Indicates if libstdc++ will 588 be built and installed (usually for g++(1)). 589 590 Default: "yes" 591 592MKLINKLIB Can be set to "yes" or "no". Indicates whether all of 593 the shared library infrastructure will be built and 594 installed. 595 596 If "no", prevents: 597 - installation of the *.a libraries 598 - installation of the *_pic.a libraries on PIC systems 599 - building of *.a libraries on PIC systems 600 - installation of .so symlinks on ELF systems 601 602 I.e, only install the shared library (and the .so.major 603 symlink on ELF). 604 605 Forced to "no" if NOLINKLIB is defined, usually in the 606 Makefile before any make(1) .include directives. 607 608 If "no", acts as MKLINT=no MKPICINSTALL=no MKPROFILE=no. 609 610 Default: "yes" 611 612MKLINT Can be set to "yes" or "no". Indicates whether lint(1) 613 will be run against portions of the NetBSD source code 614 during the build, and whether lint libraries will be 615 installed into DESTDIR/usr/libdata/lint. 616 617 Forced to "no" if NOLINT is defined, usually in the 618 Makefile before any make(1) .include directives. 619 620 Forced to "no" if MKLINKLIB=no. 621 622 Default: "no" 623 624MKLLD Obsolete. 625 626MKLLDB Obsolete. 627 628MKLLVM Can be set to "yes" or "no". Indicates whether clang(1) 629 is installed as a host tool and target compiler. 630 631 If "yes", acts as MKLIBCXX=yes. 632 633 Note: Use of clang(1) as the system compiler is 634 controlled by HAVE_LLVM. 635 636 Default: "no" 637 638MKLLVMRT Can be set to "yes" or "no". Indicates whether to build 639 the LLVM PIC libraries necessary for the various Mesa 640 backend and the native JIT of the target architecture, if 641 supported. (Radeon R300 and newer, LLVMPIPE for most.) 642 643 Default: If MKX11=yes and HAVE_MESA_VER>=19, "yes" on 644 aarch64, amd64, and i386; "no" otherwise. 645 646MKLVM Can be set to "yes" or "no". If not "no", build and 647 install the logical volume manager. 648 649 Default: "yes" 650 651MKMAKEMANDB Can be set to "yes" or "no". Indicates if the whatis 652 tools (apropos(1), whatis(1), getNAME(8), makemandb(8), 653 and makewhatis(8)), should be built, installed, and used 654 to create and install the whatis.db. 655 656 Default: "yes" 657 658MKMAN Can be set to "yes" or "no". Indicates whether manual 659 pages will be installed. 660 661 Forced to "no" if NOMAN is defined, usually in the 662 Makefile before any make(1) .include directives. 663 664 Forced to "no" if MKSHARE=no. 665 666 If "no", acts as MKCATPAGES=no MKHTML=no. 667 668 Default: "yes" 669 670MKMANDOC Can be set to "yes" or "no". Indicates whether mandoc(1) 671 will be built and installed, and used to create and 672 install catman and HTML pages. 673 674 If "no", use groff(1) instead of mandoc(1). 675 676 Forced to "no" if NOMANDOC or NOMANDOC.<target> (for a 677 given target <target>) is defined, usually in the Makefile 678 before any make(1) .include directives. 679 680 Only used if MKMAN=yes. 681 682 Default: "yes" 683 684MKMANZ Can be set to "yes" or "no". Indicates whether manual 685 pages should be compressed with gzip(1) at installation 686 time. 687 688 Only used if MKMAN=yes. 689 690 Default: "no" 691 692MKMCLINKER Obsolete. 693 694MKMDNS Can be set to "yes" or "no". Indicates whether the mDNS 695 (Multicast DNS) infrastructure (libraries and support 696 programs) will be built and installed. 697 698 Default: "yes" 699 700MKNLS Can be set to "yes" or "no". Indicates whether Native 701 Language System (NLS) locale zone files will be built and 702 installed. 703 704 Forced to "no" if NONLS is defined, usually in the 705 Makefile before any make(1) .include directives. 706 707 Forced to "no" if MKSHARE=no. 708 709 Default: "yes" 710 711MKNOUVEAUFIRMWARE 712 Can be set to "yes" or "no". Indicates whether to 713 install the /libdata/firmware/nouveau directory, which is 714 necessary for the nouveau(4) NVIDIA video driver. 715 716 Default: "yes" on aarch64, i386, and x86_64, "no" on 717 other platforms. 718 719MKNPF Can be set to "yes" or "no". Indicates whether the NPF 720 packet filter is to be built and installed. 721 722 Default: "yes" 723 724MKNSD Can be set to "yes" or "no". Indicates whether the Name 725 Server Daemon (NSD) is to be built and installed. 726 727 Default: "no" 728 729MKOBJ Can be set to "yes" or "no". Indicates whether object 730 directories will be created when running "make obj". If 731 "no", then all built files will be located inside the 732 regular source tree. 733 734 Forced to "no" if NOOBJ is defined, usually in the 735 Makefile before any make(1) .include directives. 736 737 If "no", acts as MKOBJDIRS=no. 738 739 Note: Setting MKOBJ to "no" is not recommended and may 740 cause problems when updating the tree with cvs(1). 741 742 Default: "yes" 743 744MKOBJDIRS Can be set to "yes" or "no". Indicates whether object 745 directories will be created automatically (via a "make 746 obj" pass) at the start of a build. 747 748 Forced to "no" if MKOBJ=no. 749 750 Default: "no" 751 752MKPAM Can be set to "yes" or "no". Indicates whether the 753 pam(8) framework (libraries and support files) will be 754 built and installed. The pre-PAM code is not supported 755 and may be removed in the future. 756 757 Default: "yes" 758 759MKPCC Can be set to "yes" or "no". Indicates whether pcc(1) or 760 any related libraries (libpcc, libpccsoftfloat) will be 761 built and installed. 762 763 Default: "no" 764 765MKPERFUSE Obsolete. 766 767MKPF Can be set to "yes" or "no". Indicates whether the pf(4) 768 programs, headers, and LKM will be built and installed. 769 770 Default: "yes" 771 772MKPIC Can be set to "yes" or "no". Indicates whether shared 773 objects and libraries will be created and installed. If 774 "no", the entire built system will be statically linked. 775 776 Forced to "no" if NOPIC is defined, usually in the 777 Makefile before any make(1) .include directives. 778 779 If "no", acts as MKPICLIB=no. 780 781 Default: "no" on m68000; "yes" on other platforms. 782 783MKPICINSTALL Can be set to "yes" or "no". Indicates whether the ar(1) 784 format libraries (lib*_pic.a), used to generate shared 785 libraries, are installed. 786 787 Forced to "no" if NOPICINSTALL is defined, usually in the 788 Makefile before any make(1) .include directives. 789 790 Forced to "no" if MKLINKLIB=no. 791 792 Default: "no" 793 794MKPICLIB Can be set to "yes" or "no". Indicates whether the ar(1) 795 format libraries (lib*_pic.a), used to generate shared 796 libraries. 797 798 Forced to "no" if MKPIC=no. 799 800 Default: "no" on vax; "yes" on other platforms. 801 802MKPIE Indicates whether Position Independent Executables (PIE) 803 will be built and installed. 804 805 Forced to "no" if NOPIE is defined, usually in the 806 Makefile before any make(1) .include directives. 807 808 Forced to "no" if COVERITY_TOP_CONFIG is defined. 809 810 This is disabled internally for standalone programs in 811 /usr/mdec. 812 813 Default: "yes" on aarch64, arm, i386, m68k, mips, sh3, 814 sparc64, and x86_64; "no" on other platforms. 815 816MKPIGZGZIP Can be set to "yes" or "no". If "no", the pigz(1) 817 utility is not installed as gzip(1). 818 819 Default: "no" 820 821MKPOSTFIX Can be set to "yes" or "no". Indicates whether Postfix 822 will be built and installed. 823 824 Default: "yes" 825 826MKPROFILE Can be set to "yes" or "no". Indicates whether profiled 827 libraries (lib*_p.a) will be built and installed. 828 829 Forced to "no" if NOPROFILE is defined, usually in the 830 Makefile before any make(1) .include directives. 831 832 Forced to "no" if MKLINKLIB=no. 833 834 Default: "no" on or1k, riscv32, and riscv64 (due to 835 toolchain problems with profiled code); "yes" on other 836 platforms. 837 838MKRADEONFIRMWARE 839 Can be set to "yes" or "no". Indicates whether to 840 install the /libdata/firmware/radeon directory, which is 841 necessary for the radeon(4) AMD RADEON GPU video driver. 842 843 Default: "yes" on aarch64, i386, and x86_64, "no" on 844 other platforms. 845 846MKRELRO Indicates whether to enable support for Relocation Read- 847 Only (RELRO). Supported values: 848 849 partial Set the non-PLT GOT to read-only. 850 851 full Set the non-PLT GOT to read-only and also force 852 immediate symbol binding, unless NOFULLRELRO is 853 defined and not "no" (usually in the Makefile 854 before any make(1) .include directives). 855 856 no Disable RELRO. 857 858 Forced to "no" if NORELRO is defined, usually in the 859 Makefile before any make(1) .include directives. 860 861 Default: "partial" on aarch64, i386, and x86_64; "no" on 862 other platforms. 863 864MKREPRO Can be set to "yes" or "no". Indicates whether builds 865 are to be reproducible. If "yes", two builds from the 866 same source tree will produce the same build results. 867 868 Used as the default for MKARZERO. 869 870 Default: "no" 871 872MKREPRO_TIMESTAMP 873 Unix timestamp. When MKREPRO is set, the timestamp of 874 all files in the sets will be set to this value. 875 876 Default: Unset. 877 878MKRUMP Can be set to "yes" or "no". Indicates whether the 879 rump(3) headers, libraries, and programs are to be 880 installed. 881 882 Forced to "no" if COVERITY_TOP_CONFIG is defined. 883 884 Default: "yes" 885 886MKSANITIZER Can be set to "yes" or "no". Indicates whether to use 887 the sanitizer to compile userland programs, using the 888 sanitizer defined by USE_SANITIZER. 889 890 Forced to "no" if NOSANITIZER is defined, usually in the 891 Makefile before any make(1) .include directives. 892 893 Default: "no" 894 895MKSHARE Can be set to "yes" or "no". Indicates whether files 896 destined to reside in DESTDIR/usr/share will be built and 897 installed. 898 899 Forced to "no" if NOSHARE is defined, usually in the 900 Makefile before any make(1) .include directives. 901 902 If "no", acts as MKCATPAGES=no MKDOC=no MKINFO=no 903 MKHTML=no MKMAN=no MKNLS=no. 904 905 Default: "yes" 906 907MKSKEY Can be set to "yes" or "no". Indicates whether the S/key 908 infrastructure (libraries and support programs) will be 909 built and installed. 910 911 Default: "yes" 912 913MKSLJIT Can be set to "yes" or "no". Indicates whether to enable 914 support for sljit (stack-less platform-independent Just 915 in Time (JIT) compiler) private library and tests. 916 917 Default: "yes" on i386, sparc, and x86_64; "no" on other 918 platforms. 919 920MKSOFTFLOAT Can be set to "yes" or "no". Indicates whether the 921 compiler generates output containing library calls for 922 floating point and possibly soft-float library support. 923 924 Forced to "yes" on arm without `hf', coldfire, emips, 925 or1k, and sh3. 926 927 Default: "yes" on mips64; "no" on other platforms. 928 929MKSTATICLIB Can be set to "yes" or "no". Indicates whether the 930 normal static libraries (lib*_g.a) will be built and 931 installed. 932 933 Forced to "no" if NOSTATICLIB is defined, usually in the 934 Makefile before any make(1) .include directives. 935 936 Default: "yes" 937 938MKSTATICPIE Can be set to "yes" or "no". Indicates whether support 939 for static PIE binaries will be built and installed. 940 These binaries use a special support in crt0.o for 941 resolving relative relocations and require linker 942 support. 943 944 Default: "yes" on i386 and x86_64; "no" on other 945 platforms. 946 947MKSTRIPIDENT Can be set to "yes" or "no". Indicates whether RCS IDs, 948 for use with ident(1), should be stripped from program 949 binaries and shared libraries. 950 951 Default: "no" 952 953MKSTRIPSYM Can be set to "yes" or "no". Indicates whether all local 954 symbols should be stripped from shared libraries. If 955 "yes", strip all local symbols from shared libraries; the 956 effect is equivalent to the -x option of ld(1). If "no", 957 strip only temporary local symbols; the effect is 958 equivalent to the -X option of ld(1). Keeping non- 959 temporary local symbols such as static function names is 960 useful on using DTrace for userland libraries and getting 961 a backtrace from a rump kernel loading shared libraries. 962 963 Default: "yes" 964 965MKTEGRAFIRMWARE 966 Can be set to "yes" or "no". Indicates whether to 967 install the /libdata/firmware/nvidia directory, which is 968 necessary for the NVIDIA Tegra XHCI driver. 969 970 Default: "yes" on evbarm; "no" on other platforms. 971 972MKTOOLSDEBUG Deprecated, use MKDEBUGTOOLS. 973 974MKTPM Can be set to "yes" or "no". Indicates whether to 975 install the Trusted Platform Module (TPM) infrastructure. 976 977 Default: "no" 978 979MKUNBOUND Can be set to "yes" or "no". Indicates whether the 980 unbound(8) DNS resolver will be built and installed. 981 982 Default: "yes" 983 984MKUNPRIVED Can be set to "yes" or "no". Indicates whether an 985 unprivileged install will occur. The user, group, 986 permissions, and file flags, will not be set on the 987 installed items; instead the information will be appended 988 to a file called METALOG in DESTDIR. The contents of 989 METALOG is used during the generation of the distribution 990 tar files to ensure that the appropriate file ownership 991 is stored. This allows a non-root `make install'. 992 993 Default: "no" 994 995MKUPDATE Can be set to "yes" or "no". Indicates whether all 996 install operations intended to write to DESTDIR will 997 compare file timestamps before installing, and skip the 998 install phase if the destination files are up-to-date. 999 1000 Default: "no" 1001 1002MKX11 Can be set to "yes" or "no". Indicates whether X11 will 1003 be built and installed from X11SRCDIR, and whether the X 1004 sets will be created. 1005 1006 Note: If "yes", requires MKINET6=yes. 1007 1008 Default: "no" 1009 1010MKX11FONTS Can be set to "yes" or "no". If "no", do not build and 1011 install the X fonts. The xfont set is still created but 1012 will be empty. 1013 1014 Only used if MKX11=yes. 1015 1016 Default: "yes" 1017 1018MKX11MOTIF Can be set to "yes" or "no". If "yes", build the native 1019 Xorg libGLw with Motif stubs. Requires that Motif can be 1020 found via X11MOTIFPATH. 1021 1022 Default: "no" 1023 1024MKXORG_SERVER Can be set to "yes" or "no". Indicates whether the 1025 Xorg(7) X server and drivers will be built and installed. 1026 1027 Default: "yes" on alpha, amd64, amiga, bebox, cats, 1028 dreamcast, ews4800mips, evbarm, evbmips, evbppc, hp300, 1029 hpcarm, hpcmips, hpcsh, hppa, i386, ibmnws, iyonix, 1030 luna68k, mac68k, macppc, netwinder, newsmips, pmax, prep, 1031 ofppc, sgimips, shark, sparc, sparc64, vax, and zaurus; 1032 "no" on other platforms. 1033 1034MKYP Can be set to "yes" or "no". Indicates whether the YP 1035 (NIS) infrastructure (libraries and support programs) 1036 will be built and installed. 1037 1038 Default: "yes" 1039 1040MKZFS Can be set to "yes" or "no". Indicates whether the ZFS 1041 kernel module and the utilities and libraries used to 1042 manage the ZFS system are to be built and installed. 1043 1044 Note: ZFS requires 64-bit atomic operations . 1045 1046 Default: "yes" on aarch64, amd64, and sparc64; "no" on 1047 other platforms. 1048 1049NETBSD_OFFICIAL_RELEASE 1050 Can be set to "yes" or "no". Indicates whether the build 1051 creates an official NetBSD release which is going to be 1052 available from ftp.NetBSD.org and/or cdn.NetBSD.org 1053 locations. This variable modifies a few default paths in 1054 the installer and also creates different links in the 1055 install documentation. The auto-build cluster uses this 1056 variable to distinguish `daily' builds from real 1057 releases. 1058 1059 Default: Unset. ("no"). 1060 1061USE_FORT Can be set to "yes" or "no". Indicates whether the so- 1062 called "FORTIFY_SOURCE" security(7) extensions are 1063 enabled; see ssp(3) for details. This imposes some 1064 performance penalty. 1065 1066 Forced to "no" if NOFORT is defined, usually in the 1067 Makefile before any make(1) .include directives. 1068 1069 Default: "no" 1070 1071USE_HESIOD Can be set to "yes" or "no". Indicates whether Hesiod 1072 support is enabled in the various applications that 1073 support it. 1074 1075 Forced to "no" if MKHESIOD=no. 1076 1077 Default: "yes" 1078 1079USE_INET6 Can be set to "yes" or "no". Indicates whether INET6 1080 (IPv6) support is enabled in the various applications 1081 that support it. 1082 1083 Forced to "no" if MKINET6=no. 1084 1085 Default: "yes" 1086 1087USE_JEMALLOC Can be set to "yes" or "no". Indicates whether the 1088 jemalloc allocator (which is designed for improved 1089 performance with threaded applications) is used instead 1090 of the phkmalloc allocator (that was the default until 1091 NetBSD 5.0). 1092 1093 Default: "yes" 1094 1095USE_KERBEROS Can be set to "yes" or "no". Indicates whether Kerberos 1096 v5 support is enabled in the various applications that 1097 support it. 1098 1099 Forced to "no" if MKKERBEROS=no. 1100 1101 Default: "yes" 1102 1103USE_LDAP Can be set to "yes" or "no". Indicates whether LDAP 1104 support is enabled in the various applications that 1105 support it. 1106 1107 Forced to "no" if MKLDAP=no. 1108 1109 Default: "yes" 1110 1111USE_LIBCSANITIZER 1112 Selects the sanitizer in libc to compile userland 1113 programs and libraries. Supported values: 1114 1115 undefined Enables the micro-UBSan in the user mode 1116 (uUBSan) undefined behaviour sanitizer. The 1117 code is shared with the kernel mode variation 1118 (kUBSan). The runtime runtime differs from 1119 the UBSan available in MKSANITIZER. The 1120 runtime is stripped down from C++ features, 1121 and is invoked with -fsanitize=no-vptr as that 1122 sanitizer is not supported. The runtime 1123 configuration is restricted to the LIBC_UBSAN 1124 environment variable, that is designed to be 1125 safe for hardening. 1126 1127 The value of USE_LIBCSANITIZER is passed to the C and C++ 1128 compilers as the argument to -fsanitize=. Additional 1129 sanitizer arguments can be passed through 1130 LIBCSANITIZERFLAGS. 1131 1132 Disabled if MKLIBCSANITIZER=no. 1133 1134 Default: "undefined". 1135 1136USE_PAM Can be set to "yes" or "no". Indicates whether pam(8) 1137 support is enabled in the various applications that 1138 support it. 1139 1140 Forced to "no" if MKPAM=no. 1141 1142 Default: "yes" 1143 1144USE_PIGZGZIP Can be set to "yes" or "no". Indicates whether pigz(1) 1145 is used instead of gzip(1) for multi-threaded gzip 1146 compression of the distribution tar sets. 1147 1148 Default: "no" 1149 1150USE_SKEY Can be set to "yes" or "no". Indicates whether S/key 1151 support is enabled in the various applications that 1152 support it. 1153 1154 Forced to "no" if MKSKEY=no. 1155 1156 Note: This is mutually exclusive to USE_PAM!=no. 1157 1158 Default: "no" 1159 1160USE_SSP Can be set to "yes" or "no". Indicates whether GCC 1161 stack-smashing protection (SSP) support, which detects 1162 stack overflows and aborts the program, is enabled. This 1163 imposes some performance penalty (approximately 5%). 1164 1165 This is disabled internally for standalone programs in 1166 /usr/mdec. 1167 1168 Forced to "no" if NOSSP is defined, usually in the 1169 Makefile before any make(1) .include directives. 1170 1171 Forced to "no" if COVERITY_TOP_CONFIG is defined. 1172 1173 Default: "no" on alpha, hppa, ia64, and mips; "yes" on 1174 other platforms if USE_FORT=yes; "no" otherwise. 1175 1176USE_XZ_SETS Can be set to "yes" or "no". Indicates whether the 1177 distribution tar files are to be compressed with xz(1) 1178 instead of gzip(1) or pigz(1). 1179 1180 Forced to "no" if USE_PIGZGZIP=yes. 1181 1182 Default: "yes" on aarch64, amd64, and sparc64, "no" on 1183 other platforms. 1184 1185USE_YP Can be set to "yes" or "no". Indicates whether YP (NIS) 1186 support is enabled in the various applications that 1187 support it. 1188 1189 Forced to "no" if MKYP=no. 1190 1191 Default: "yes" 1192 1193X11MOTIFPATH Path of the Motif installation to use if MKX11MOTIF=yes. 1194 1195 Default: "/usr/pkg" 1196 1197COPTS.lib<lib> 1198OBJCOPTS.lib<lib> 1199LDADD.lib<lib> 1200CPPFLAGS.lib<lib> 1201CXXFLAGS.lib<lib> 1202COPTS.<prog> 1203OBJCOPTS.<prog> 1204LDADD.<prog> 1205CPPFLAGS.<prog> 1206CXXFLAGS.<prog> These provide a way to specify additions to the associated 1207 variables in a way that applies only to a particular library 1208 or program. <lib> corresponds to the LIB variable set in 1209 the library's makefile. <prog> corresponds to either PROG 1210 or PROG_CXX (if set). For example, if COPTS.libcrypto is 1211 set to "-g", "-g" will be added to COPTS only when compiling 1212 the crypto library. 1213 1214The active compiler is selected using the following variables: 1215AVAILABLE_COMPILER 1216 List of available compiler suites. Processed in order 1217 for selecting the active compiler for each frontend. 1218HAVE_PCC If defined, PCC is present and enabled. 1219HAVE_LLVM If defined, LLVM/Clang is present and enabled. 1220UNSUPPORTED_COMPILER.<comp> 1221 If defined, the support for compiler <comp> is disabled. 1222 1223For the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist: 1224ACTIVE_CC Active compile suite for the CC frontend. 1225SUPPORTED_CC Compile suite with support for the CC frontend. 1226TOOL_CC.<comp> Path to the CC frontend for compiler <comp>. 1227 1228 1229=-=-=-=-= Variables for a Makefile =-=-=-=-= 1230 1231If the following varialbes are defined in the Makefile before 1232any make(1) .include directives, they force the specific behavior. 1233 1234NOCOMPAT Force MKCOMPAT=no. 1235NOCTF Force MKCTF=no. 1236NODEBUG Force MKDEBUG=no. 1237NODEBUGLIB Force MKDEBUGLIB=no. 1238NODOC Force MKDOC=no. 1239NOFORT Force USE_FORT=no. 1240NOHTML Force MKHTML=no. 1241NOINFO Force MKINFO=no. 1242NOLIBCSANITIZER Force MKLIBCSANITIZER=no (and USE_LIBCSANITIZER=no) 1243NOLINKLIB Force MKLINKLIB=no. 1244NOLINT Force MKLINT=no. 1245NOMAN Force MKMAN=no. 1246NOMANDOC Force MKMANDOC=no. 1247NONLS Force MKNLS=no. 1248NOOBJ Force MKOBJ=no. 1249NOPIC Force MKPIC=no. 1250NOPICINSTALL Force MKPICINSTALL=no. 1251NOPIE Force MKPIE=no. 1252NOPROFILE Force MKPROFILE=no. 1253NORELRO Force MKREPRO=no. 1254NOSANITIZER Force MKSANITIZER=no (and USE_SANITIZER=no) 1255NOSHARE Force MKSHARE=no. 1256NOSSP Force USE_SSP=no. 1257NOSTATICLIB Force MKSTATICLIB=no. 1258 1259Special variations: 1260 1261NOFULLRELRO!=no Force MKRELRO=no if MKRELRO=full 1262 1263TODO: NOFULLRELRO should just be a defined test for consistency. 1264 1265 1266=-=-=-=-= sys.mk =-=-=-=-= 1267 1268The include file <sys.mk> has the default rules for all makes, in the BSD 1269environment or otherwise. You probably don't want to touch this file. 1270 1271=-=-=-=-= bsd.own.mk =-=-=-=-= 1272 1273The include file <bsd.own.mk> contains source tree configuration parameters, 1274such as the owners, groups, etc. for both manual pages and binaries, and 1275a few global "feature configuration" parameters. 1276 1277It has no targets. 1278 1279To get system-specific configuration parameters, <bsd.own.mk> will try to 1280include the file specified by the "MAKECONF" variable. If MAKECONF is not 1281set, or no such file exists, the system make configuration file, /etc/mk.conf 1282is included. These files may define any of the variables described below. 1283 1284<bsd.own.mk> sets the following variables, if they are not already defined 1285(defaults are in brackets): 1286 1287NETBSDSRCDIR Top of the NetBSD source tree. 1288 If _SRC_TOP_ != "", that will be used as the default, 1289 otherwise BSDSRCDIR will be used as the default. 1290 Various makefiles within the NetBSD source tree will 1291 use this to reference the top level of the source tree. 1292 1293_SRC_TOP_ Top of the system source tree, as determined by <bsd.own.mk> 1294 based on the presence of tools/ and build.sh. This variable 1295 is "internal" to <bsd.own.mk>, although its value is only 1296 determined once and then propagated to all sub-makes. 1297 1298_NETBSD_VERSION_DEPENDS 1299 A list of files which contain information about 1300 the version of the NetBSD being built. This is 1301 defined only if the current directory appears 1302 to be inside a NetBSD source tree. The list of 1303 files includes ${NETBSDSRCDIR}/sys/sys/param.h 1304 (which contains the kernel version number), 1305 ${NETBSDSRCDIR}/sys/conf/newvers.sh and 1306 ${NETBSDSRCDIR}/sys/conf/osrelease.sh (which 1307 interpret the information in sys/sys/param.h), and 1308 ${_SRC_TOP_OBJ_}/params (which is an optional file, 1309 created by "make build" in ${_SRC_TOP_}/Makefile, 1310 containing all the variables that may influence the 1311 build). 1312 1313 Targets that depend on the NetBSD version, or on 1314 variables defined at build time, can declare a 1315 dependency on ${_NETBSD_VERSION_DEPENDS}, like this: 1316 1317 version.c: ${_NETBSD_VERSION_DEPENDS} 1318 commands to create version.c 1319 1320BSDSRCDIR The real path to the system sources, so that 'make obj' 1321 will work correctly. [/usr/src] 1322 1323BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj' 1324 will work correctly. [/usr/obj] 1325 1326BINGRP Binary group. [wheel] 1327 1328BINOWN Binary owner. [root] 1329 1330BINMODE Binary mode. [555] 1331 1332NONBINMODE Mode for non-executable files. [444] 1333 1334MANDIR Base path for manual installation. [/usr/share/man/cat] 1335 1336MANGRP Manual group. [wheel] 1337 1338MANOWN Manual owner. [root] 1339 1340MANMODE Manual mode. [${NONBINMODE}] 1341 1342MANINSTALL Manual installation type. Space separated list: 1343 catinstall, htmlinstall, maninstall 1344 Default value derived from MKCATPAGES and MKHTML. 1345 1346LDSTATIC Control program linking; if set blank, link everything 1347 dynamically. If set to "-static", link everything statically. 1348 If not set, programs link according to their makefile. 1349 1350LIBDIR Base path for library installation. [/usr/lib] 1351 1352LINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint] 1353 1354LIBGRP Library group. [${BINGRP}] 1355 1356LIBOWN Library owner. [${BINOWN}] 1357 1358LIBMODE Library mode. [${NONBINMODE}] 1359 1360DOCDIR Base path for system documentation (e.g. PSD, USD, etc.) 1361 installation. [/usr/share/doc] 1362 1363DOCGRP Documentation group. [wheel] 1364 1365DOCOWN Documentation owner. [root] 1366 1367DOCMODE Documentation mode. [${NONBINMODE}] 1368 1369GZIP_N_FLAG Flags to pass to TOOL_GZIP to prevent it from inserting 1370 file names or timestamps in the compressed output. 1371 [-n, or -nT when TOOL_GZIP is really TOOL_PIGZ] 1372 1373NLSDIR Base path for Native Language Support files installation. 1374 [/usr/share/nls] 1375 1376NLSGRP Native Language Support files group. [wheel] 1377 1378NLSOWN Native Language Support files owner. [root] 1379 1380NLSMODE Native Language Support files mode. [${NONBINMODE}] 1381 1382X11SRCDIR The path to the xsrc tree. [${NETBSDSRCDIR}/../xsrc, 1383 if that exists; otherwise /usr/xsrc] 1384 1385X11SRCDIR.local The path to the local X11 src tree. [${X11SRCDIR}/local] 1386 1387X11SRCDIR.lib<package> 1388X11SRCDIR.<package> 1389 The path to the xorg src tree for the specified package>. 1390 [${X11SRCDIR}/external/mit/xorg/<package>/dist] 1391 1392X11ROOTDIR Root directory of the X11 installation. [/usr/X11R7] 1393 1394X11BINDIR X11 bin directory. [${X11ROOTDIR}/bin] 1395 1396X11FONTDIR X11 font directory. [${X11ROOTDIR}/lib/X11/fonts] 1397 1398X11INCDIR X11 include directory. [${X11ROOTDIR}/include] 1399 1400X11LIBDIR X11 lib/x11 (config) directory. [${X11ROOTDIR}/lib/X11] 1401 1402X11MANDIR X11 manual directory. [${X11ROOTDIR}/man] 1403 1404X11USRLIBDIR X11 library directory. [${X11ROOTDIR}/lib] 1405 1406STRIPFLAG The flag passed to the install program to cause the binary 1407 to be stripped. This is to be used when building your 1408 own install script so that the entire system can be made 1409 stripped/not-stripped using a single knob. [] 1410 1411COPY The flag passed to the install program to cause the binary 1412 to be copied rather than moved. This is to be used when 1413 building our own install script so that the entire system 1414 can either be installed with copies, or with moves using 1415 a single knob. [-c] 1416 1417MAKEDIRTARGETENV 1418 Environment variables passed to the child make process 1419 invoked by MAKEDIRTARGET. 1420 1421MAKEDIRTARGET dir target [params] 1422 Runs "cd $${dir} && ${MAKE} [params] $${target}", 1423 displaying a "pretty" message whilst doing so. 1424 1425RELEASEMACHINEDIR 1426 Subdirectory used below RELEASEDIR when building 1427 a release. [${MACHINE}, 1428 or ${MACHINE}-${MACHINE_ARCH} for evb{arm,mips,sh3}*] 1429 1430RELEASEMACHINE Subdirectory or path component used for the following 1431 paths: 1432 distrib/${RELEASEMACHINE} 1433 distrib/notes/${RELEASEMACHINE} 1434 etc/etc.${RELEASEMACHINE} 1435 Used when building a release. [${MACHINE}] 1436 1437Additionally, the following variables may be set by <bsd.own.mk> or in a 1438make configuration file to modify the behavior of the system build 1439process (default values are in brackets along with comments, if set by 1440<bsd.own.mk>): 1441 1442USETOOLS Indicates whether the tools specified by ${TOOLDIR} should 1443 be used as part of a build in progress. 1444 Supported values: 1445 1446 yes Use the tools from TOOLDIR. 1447 Must be set to this if cross-compiling. 1448 1449 no Do not use the tools from TOOLDIR, but refuse to 1450 build native compilation tool components that are 1451 version-specific for that tool. 1452 1453 never Do not use the tools from TOOLDIR, even when 1454 building native tool components. This is similar to 1455 the traditional NetBSD build method, but does not 1456 verify that the compilation tools in use are 1457 up-to-date enough in order to build the tree 1458 successfully. This may cause build or runtime 1459 problems when building the whole NetBSD source tree. 1460 1461 Default: "yes" if building all or part of a whole NetBSD 1462 source tree (detected automatically); "no" otherwise 1463 (to preserve traditional semantics of the <bsd.*.mk> 1464 make(1) include files). 1465 1466OBJECT_FMT Object file format. [set to "ELF" on architectures that 1467 use ELF -- currently all architectures]. 1468 1469KERNEL_DIR Install the kernel as /netbsd/kernel and the modules 1470 in /netbsd/modules, defaults to "no". 1471 1472TOOLCHAIN_MISSING 1473 If not "no", this indicates that the platform being built 1474 does not have a working in-tree toolchain. If the 1475 ${MACHINE_ARCH} in question falls into this category, 1476 TOOLCHAIN_MISSING is conditionally assigned the value "yes". 1477 Otherwise, the variable is unconditionally assigned the 1478 value "no". 1479 If not "no", ${MKBINUTILS}, ${MKGCC}, and ${MKGDB} are 1480 unconditionally assigned the value "no". 1481 1482EXTERNAL_TOOLCHAIN 1483 This variable is not directly set by <bsd.own.mk>, but 1484 including <bsd.own.mk> is the canonical way to gain 1485 access to this variable. The variable should be defined 1486 either in the user's environment or in the user's mk.conf 1487 file. If defined, this variable indicates the root of 1488 an external toolchain which will be used to build the 1489 tree. For example, if a platform is a ${TOOLCHAIN_MISSING} 1490 platform, EXTERNAL_TOOLCHAIN can be used to re-enable the 1491 cross-compile framework. 1492 1493 If EXTERNAL_TOOLCHAIN is defined, ${MKGCC} is unconditionally 1494 assigned the value "no", since the external version of the 1495 compiler may not be able to build the library components of 1496 the in-tree compiler. 1497 1498 This variable should be used in conjunction with an appropriate 1499 HAVE_GCC or HAVE_LLVM setting to control the compiler flags. 1500 1501 NOTE: This variable is not yet used in as many places as 1502 it should be. Expect the exact semantics of this variable 1503 to change in the short term as parts of the cross-compile 1504 framework continue to be cleaned up. 1505 1506The following variables are defined to commands to perform the 1507appropriate operation, with the default in [brackets]. Note that 1508the defaults change if USETOOLS == "yes": 1509 1510TOOL_AMIGAAOUT2BB aout to Amiga bootblock converter. [amiga-aout2bb] 1511 1512TOOL_AMIGAELF2BB ELF to Amiga bootblock converter. [amiga-elf2bb] 1513 1514TOOL_AMIGATXLT Amiga assembly language format translator. [amiga-txlt] 1515 1516TOOL_ARMELF2AOUT ELF to a.out executable converter [arm-elf2aout} 1517 1518TOOL_ASN1_COMPILE ASN1 compiler. [asn1_compile] 1519 1520TOOL_AWK Pattern-directed scanning/processing language. [awk] 1521 1522TOOL_CAP_MKDB Create capability database. [cap_mkdb] 1523 1524TOOL_CAT Concatenate and print files. [cat] 1525 1526TOOL_CKSUM Display file checksums. [cksum] 1527 1528TOOL_COMPILE_ET Error table compiler. [compile_et] 1529 1530TOOL_CONFIG Build kernel compilation directories. [config] 1531 1532TOOL_CRUNCHGEN Generate crunched binary build environment. [crunchgen] 1533 1534TOOL_CTAGS Create a tags file. [ctags] 1535 1536TOOL_DB Manipulate db(3) databases. [db] 1537 1538TOOL_DISKLABEL Read and write disk pack label. [disklabel] 1539 1540TOOL_EQN Format equations for groff. [eqn] 1541 1542TOOL_FDISK MS-DOS partition maintenance program. [fdisk] 1543 1544TOOL_FGEN IEEE 1275 Open Firmware FCode Tokenizer. [fgen] 1545 1546TOOL_GENASSYM Generate constants for assembly files. [genassym] 1547 1548TOOL_GENCAT Generate NLS message catalogs. [gencat] 1549 1550TOOL_GMAKE GNU make utility. [gmake] 1551 1552TOOL_GREP Print lines matching a pattern. [grep] 1553 1554TOOL_GROFF Front end for groff document formatting system. [groff] 1555 1556TOOL_GZIP Compression/decompression tool. [gzip] 1557 1558TOOL_GZIP_N Same as TOOL_GZIP, plus a command line option to 1559 prevent it from inserting file names or timestamps 1560 into the compressed output. 1561 [${TOOL_GZIP} ${GZIP_N_FLAG}] 1562 1563TOOL_HEXDUMP Ascii, decimal, hexadecimal, octal dump. [hexdump] 1564 1565TOOL_HP300MKBOOT Make bootable image for hp300. [hp300-mkboot] 1566 1567TOOL_HPPAMKBOOT Make bootable image for hppa. [hppa-mkboot] 1568 1569TOOL_INDXBIB Make bibliographic database's inverted index. [indxbib] 1570 1571TOOL_INSTALLBOOT Install disk bootstrap software. [installboot] 1572 1573TOOL_INSTALL_INFO Update info/dir entries. [install-info] 1574 1575TOOL_JOIN Relational database operator. [join] 1576 1577TOOL_M4 M4 macro language processor. [m4] 1578 1579TOOL_M68KELF2AOUT ELF to a.out executable converter [m68k-elf2aout} 1580 1581TOOL_MACPPCFIXCOFF Fix up xcoff headers for macppc. [macppc-fixcoff] 1582 1583TOOL_MAKEFS Create file system image from directory tree. [makefs] 1584 1585TOOL_MAKEINFO Translate Texinfo documents. [makeinfo] 1586 1587TOOL_MAKEWHATIS Create a whatis.db database. [makewhatis] 1588 1589TOOL_MDSETIMAGE Set kernel RAM disk image. [mdsetimage] 1590 1591TOOL_MENUC Menu compiler. [menuc] 1592 1593TOOL_MIPSELF2ECOFF Convert ELF-format executable to ECOFF for mips. 1594 [mips-elf2ecoff] 1595 1596TOOL_MKCSMAPPER Make charset mapping table. [mkcsmapper] 1597 1598TOOL_MKESDB Make encoding scheme database. [mkesdb] 1599 1600TOOL_MKLOCALE Make LC_CTYPE locale files. [mklocale] 1601 1602TOOL_MKMAGIC Create database for file(1). [file] 1603 1604TOOL_MKNOD Make device special file. [mknod] 1605 1606TOOL_MKTEMP Make (unique) temporary file name. [mktemp] 1607 1608TOOL_MSGC Simple message list compiler. [msgc] 1609 1610TOOL_MTREE Map a directory hierarchy. [mtree] 1611 1612TOOL_NCDCS Turn ELF kernel into a NCD firmware image. [ncdcs] 1613 1614TOOL_PAX Manipulate file archives and copy directories. [pax] 1615 1616TOOL_PIC Compile pictures for groff. [pic] 1617 1618TOOL_PIGZ Parallel compressor. [pigz] 1619 1620TOOL_POWERPCMKBOOTIMAGE Make bootable image for powerpc. [powerpc-mkbootimage] 1621 1622TOOL_PWD_MKDB Generate the password databases. [pwd_mkdb] 1623 1624TOOL_REFER Preprocess bibliographic references for groff. [refer] 1625 1626TOOL_ROFF_ASCII Generate ASCII groff output. [nroff] 1627 1628TOOL_ROFF_DVI Generate DVI groff output. [${TOOL_GROFF} -Tdvi] 1629 1630TOOL_ROFF_HTML Generate HTML groff output. 1631 [${TOOL_GROFF} -Tlatin1 -mdoc2html] 1632 1633TOOL_ROFF_PS Generate PS groff output. [${TOOL_GROFF} -Tps] 1634 1635TOOL_ROFF_RAW Generate "raw" groff output. [${TOOL_GROFF} -Z] 1636 1637TOOL_RPCGEN Remote Procedure Call (RPC) protocol compiler. [rpcgen] 1638 1639TOOL_SED Stream editor. [sed] 1640 1641TOOL_SOELIM Eliminate .so's from groff input. [soelim] 1642 1643TOOL_SPARKCRC Generate a crc suitable for use in a sparkive file. 1644 [sparkcrc] 1645 1646TOOL_STAT Display file status. [stat] 1647 1648TOOL_STRFILE Create a random access file for storing strings. 1649 [strfile] 1650 1651TOOL_SUNLABEL Read or modify a SunOS disk label. [sunlabel] 1652 1653TOOL_TBL Format tables for groff. [tbl] 1654 1655TOOL_UUDECODE Uudecode a binary file. [uudecode] 1656 1657TOOL_VGRIND Grind nice listings of programs. [vgrind -f] 1658 1659TOOL_ZIC Time zone compiler. [zic] 1660 1661For each possible value of MACHINE_CPU, MACHINES.${MACHINE_CPU} contain a 1662list of what ports can be built for it. This keeps those definitions in 1663centralized place. 1664 1665<bsd.own.mk> is generally useful when building your own Makefiles so that 1666they use the same default owners etc. as the rest of the tree. 1667 1668 1669=-=-=-=-= bsd.clean.mk =-=-=-=-= 1670 1671The include file <bsd.clean.mk> defines the clean and cleandir 1672targets. It uses the following variables: 1673 1674CLEANFILES Files to remove for both the clean and cleandir targets. 1675 1676CLEANDIRFILES Files to remove for the cleandir target, but not for 1677 the clean target. 1678 1679MKCLEANSRC Controls whether or not the clean and cleandir targets 1680 will delete files from both the object directory, 1681 ${.OBJDIR}, and the source directory, ${.CURDIR}. 1682 1683 If MKCLEANSRC is set to "no", then the file names in 1684 CLEANFILES or CLEANDIRFILES are interpreted relative 1685 to the object directory, ${.OBJDIR}. This is the 1686 traditional behaviour. 1687 1688 If MKCLEANSRC is set to "yes", then the file deletion 1689 is performed relative to both the object directory, 1690 ${.OBJDIR}, and the source directory, ${.CURDIR}. (This 1691 has no effect if ${.OBJDIR} is the same as ${.CURDIR}.) 1692 Deleting files from ${.CURDIR} is intended to remove 1693 stray output files that had been left in the source 1694 directory by an earlier build that did not use object 1695 directories. 1696 1697 The default is MKCLEANSRC=yes. If you always build with 1698 separate object directories, and you are sure that there 1699 are no stray files in the source directories, then you 1700 may set MKCLEANSRC=no to save some time. 1701 1702MKCLEANVERIFY Controls whether or not the clean and cleandir targets 1703 will verify that files have been deleted. 1704 1705 If MKCLEANVERIFY is set to "no", then the files will 1706 be deleted using a "rm -f" command, and its success or 1707 failure will be ignored. 1708 1709 If MKCLEANVERIFY is set to "yes", then the success of 1710 the "rm -f" command will be verified using an "ls" 1711 command. 1712 1713 The default is MKCLEANVERIFY=yes. If you are sure that 1714 there will be no problems caused by file permissions, 1715 read-only file systems, or the like, then you may set 1716 MKCLEANVERIFY=no to save some time. 1717 1718To use the clean and cleandir targets defined in <bsd.clean.mk>, other 1719Makefiles or bsd.*.mk files should append file names to the CLEANFILES 1720or CLEANDIRFILES variables. For example: 1721 1722 CLEANFILES+= a.out 1723 CLEANDIRFILES+= .depend 1724 1725 .include <bsd.clean.mk> 1726 1727The files listed in CLEANFILES and CLEANDIRFILES must not be 1728directories, because the potential risk from running "rm -rf" commands 1729in bsd.clean.mk is considered too great. If you want to recursively 1730delete a directory as part of "make clean" or "make cleandir" then you 1731need to provide your own target. 1732 1733=-=-=-=-= bsd.dep.mk =-=-=-=-= 1734 1735The include file <bsd.dep.mk> contains the default targets for building 1736.depend files. It creates .d files from entries in SRCS and DPSRCS 1737that are C, C++, or Objective C source files, and builds .depend from the 1738.d files. All other files in SRCS and all of DPSRCS will be used as 1739dependencies for the .d files. In order for this to function correctly, 1740it should be .included after all other .mk files and directives that may 1741modify SRCS or DPSRCS. It uses the following variables: 1742 1743SRCS List of source files to build the program. 1744 1745DPSRCS List of source files which are needed for generating 1746 dependencies, but are not needed in ${SRCS}. 1747 1748NODPSRCS TODO 1749 1750=-=-=-=-= bsd.files.mk =-=-=-=-= 1751 1752The include file <bsd.files.mk> handles the FILES variables and is included 1753from <bsd.lib.mk> and <bsd.prog.mk>, and uses the following variables: 1754 1755FILES The list of files to install. 1756 1757CONFIGFILES Similar semantics to FILES, except that the files 1758 are installed by the `configinstall' target, 1759 not the `install' target. 1760 The FILES* variables documented below also apply. 1761 1762FILESOWN File owner. [${BINOWN}] 1763 1764FILESGRP File group. [${BINGRP}] 1765 1766FILESMODE File mode. [${NONBINMODE}] 1767 1768FILESDIR The location to install the files. 1769 1770FILESNAME Optional name to install each file as. 1771 1772FILESOWN_<fn> File owner of the specific file <fn>. 1773 1774FILESGRP_<fn> File group of the specific file <fn>. 1775 1776FILESMODE_<fn> File mode of the specific file <fn>. 1777 1778FILESDIR_<fn> The location to install the specific file <fn>. 1779 1780FILESNAME_<fn> Optional name to install <fn> as. 1781 1782FILESBUILD If this variable is defined, then its value will be 1783 used as the default for all FILESBUILD_<fn> variables. 1784 Otherwise, the default will be "no". 1785 1786FILESBUILD_<fn> A value different from "no" will add the file to the list of 1787 targets to be built by `realall'. Users of that variable 1788 should provide a target to build the file. 1789 1790 1791BUILDSYMLINKS List of two word items: 1792 lnsrc lntgt 1793 For each lnsrc item, create a symlink named lntgt. 1794 The lntgt symlinks are removed by the cleandir target. 1795 1796UUDECODE_FILES List of files which are stored as <file>.uue in the source 1797 tree. Each one will be decoded with ${TOOL_UUDECODE}. 1798 The source files have a `.uue' suffix, the generated files do 1799 not. 1800 1801UUDECODE_FILES_RENAME_<fn> 1802 Rename the output from the decode to the provided name. 1803 1804 *NOTE: These files are simply decoded, with no install or other 1805 rule applying implicitly except being added to the clean 1806 target. 1807 1808=-=-=-=-= bsd.gcc.mk =-=-=-=-= 1809 1810The include file <bsd.gcc.mk> computes various parameters related to GCC 1811support libraries. It defines no targets. <bsd.own.mk> MUST be included 1812before <bsd.gcc.mk>. 1813 1814The primary users of <bsd.gcc.mk> are <bsd.prog.mk> and <bsd.lib.mk>, each 1815of which need to know where to find certain GCC support libraries. 1816 1817The behavior of <bsd.gcc.mk> is influenced by the EXTERNAL_TOOLCHAIN variable, 1818which is generally set by the user. If EXTERNAL_TOOLCHAIN it set, then 1819the compiler is asked where to find the support libraries, otherwise the 1820support libraries are found in ${DESTDIR}/usr/lib. 1821 1822<bsd.gcc.mk> sets the following variables: 1823 1824_GCC_CRTBEGIN The full path name to crtbegin.o. 1825 1826_GCC_CRTBEGINS The full path name to crtbeginS.o. 1827 1828_GCC_CRTEND The full path name to crtend.o. 1829 1830_GCC_CRTENDS The full path name to crtendS.o. 1831 1832_GCC_LIBGCCDIR The directory where libgcc.a is located. 1833 1834 1835=-=-=-=-= bsd.inc.mk =-=-=-=-= 1836 1837The include file <bsd.inc.mk> defines the includes target and uses the 1838variables: 1839 1840INCS The list of include files. 1841 1842INCSDIR The location to install the include files. 1843 1844INCSNAME Target name of the include file, if only one; same as 1845 FILESNAME, but for include files. 1846 1847INCSYMLINKS Similar to SYMLINKS in <bsd.links.mk>, except that these 1848 are installed in the 'includes' target and not the 1849 (much later) 'install' target. 1850 1851INCSNAME_<file> The name file <file> should be installed as, if not <file>, 1852 same as FILESNAME_<file>, but for include files. 1853 1854 1855=-=-=-=-= bsd.info.mk =-=-=-=-= 1856 1857The include file <bsd.info.mk> is used to generate and install GNU Info 1858documentation from respective Texinfo source files. It defines three 1859implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the 1860following variables: 1861 1862TEXINFO List of Texinfo source files. Info documentation will 1863 consist of single files with the extension replaced by 1864 .info. 1865 1866INFOFLAGS Flags to pass to makeinfo. [] 1867 1868 1869=-=-=-=-= bsd.kernobj.mk =-=-=-=-= 1870 1871The include file <bsd.kernobj.mk> defines variables related to the 1872location of kernel sources and object directories. 1873 1874KERNSRCDIR Is the location of the top of the kernel src. 1875 [${_SRC_TOP_}/sys] 1876 1877KERNARCHDIR Is the location of the machine dependent kernel sources. 1878 [arch/${MACHINE}] 1879 1880KERNCONFDIR Is where the configuration files for kernels are found. 1881 [${KERNSRCDIR}/${KERNARCHDIR}/conf] 1882 1883KERNOBJDIR Is the kernel build directory. The kernel GENERIC for 1884 instance will be compiled in ${KERNOBJDIR}/GENERIC. 1885 The default value is 1886 ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile 1887 if it exists or the target 'obj' is being made. 1888 Otherwise the default is 1889 ${KERNSRCDIR}/${KERNARCHDIR}/compile. 1890 1891It is important that Makefiles (such as those under src/distrib) that 1892wish to find compiled kernels use <bsd.kernobj.mk> and ${KERNOBJDIR} 1893rather than make assumptions about the location of the compiled kernel. 1894 1895 1896=-=-=-=-= bsd.kinc.mk =-=-=-=-= 1897 1898The include file <bsd.kinc.mk> defines the many targets (includes, 1899subdirectories, etc.), and is used by kernel makefiles to handle 1900include file installation. It is intended to be included alone, by 1901kernel Makefiles. It uses similar variables to <bsd.inc.mk>. 1902Please see <bsd.kinc.mk> for more details, and keep the documentation 1903in that file up to date. 1904 1905=-=-=-=-= bsd.syscall.mk =-=-=-=-= 1906 1907The include file <bsd.syscall.mk> contains the logic to create syscall 1908files for various emulations. It includes <bsd.kinc.mk> to handle the 1909rest of the targets. 1910 1911=-=-=-=-= bsd.lib.mk =-=-=-=-= 1912 1913The include file <bsd.lib.mk> has support for building libraries. It has 1914the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend, 1915includes, install, lint, and tags. Additionally, it has a checkver target 1916which checks for installed shared object libraries whose version is greater 1917that the version of the source. It has a limited number of suffixes, 1918consistent with the current needs of the BSD tree. <bsd.lib.mk> includes 1919<bsd.shlib.mk> to get shared library parameters. 1920 1921It sets/uses the following variables: 1922 1923LIB The name of the library to build. 1924 1925LIBDIR Target directory for libraries. 1926 1927MKARZERO Normally, ar(1) sets the timestamps, uid, gid and 1928 permissions in files inside its archives to those of 1929 the file it was fed. This leads to non-reproducible 1930 builds. If MKARZERO is set to "yes" (default is the 1931 same as MKREPRO, or "no" if MKREPRO is not defined), 1932 then the "D" flag is passed to ar, causing the 1933 timestamp, uid and gid to be zeroed and the file 1934 permissions to be set to 644. This allows .a files 1935 from different builds to be bit identical. 1936 1937SHLIBINSTALLDIR Target directory for shared libraries if ${USE_SHLIBDIR} 1938 is not "no". 1939 1940SHLIB_MAJOR 1941SHLIB_MINOR 1942SHLIB_TEENY Major, minor, and teeny version numbers of shared library 1943 1944USE_SHLIBDIR If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR} 1945 as the path to install shared libraries to. 1946 USE_SHLIBDIR must be defined before <bsd.own.mk> is included. 1947 Default: no 1948 1949LIBISMODULE If not "no", install as ${LIB}.so (without the "lib" prefix), 1950 and act as "MKDEBUGLIB=no MKPICINSTALL=no MKPROFILE=no 1951 MKSTATICLIB=no". Also do not install the lint library. 1952 Default: no 1953 1954LIBISPRIVATE If not "no", act as "MKDEBUGLIB=no MKPIC=no MKPROFILE=no", 1955 and don't install the (.a) library or the lint library. 1956 This is useful for "build only" helper libraries. 1957 If set to "pic", then a _pic.a library is also produced, 1958 so that it can be incorporated into other shared objects. 1959 Default: no 1960 1961LIBISCXX If not "no", Use ${CXX} instead of ${CC} to link 1962 shared libraries. 1963 This is useful for C++ libraries. 1964 Default: no 1965 1966LINTLIBDIR Target directory for lint libraries. 1967 1968LIBGRP Library group. 1969 1970LIBOWN Library owner. 1971 1972LIBMODE Library mode. 1973 1974LDADD Additional loader objects. 1975 1976MAN The manual pages to be installed (use a .1 - .9 suffix). 1977 1978NOCHECKVER_<library> 1979NOCHECKVER If set, disables checking for installed shared object 1980 libraries with versions greater than the source. A 1981 particular library name, without the "lib" prefix, may 1982 be appended to the variable name to disable the check for 1983 only that library. 1984 1985SRCS List of source files to build the library. Suffix types 1986 .s, .c, and .f are supported. Note, .s files are preferred 1987 to .c files of the same name. (This is not the default for 1988 versions of make.) 1989 1990LIBDPLIBS/ 1991PROGDPLIBS A list of the tuples: 1992 libname path-to-srcdir-of-libname 1993 1994 Instead of depending on installed versions of the libraries, 1995 one can depend on their built version in the source directory. 1996 This is useful for finding private libraries (LIBISPRIVATE). 1997 1998 For each tuple; 1999 * LIBDO.libname contains the .OBJDIR of the library 2000 `libname', and if it is not set it is determined 2001 from the srcdir and added to MAKEOVERRIDES (the 2002 latter is to allow for build time optimization). 2003 * LDADD gets -L${LIBDO.libname} -llibname added. 2004 * DPADD gets ${LIBDO.libname}/liblibname.so or 2005 ${LIBDO.libname}/liblibname.a added. 2006 2007 The special value "_external" for LIBDO.lib makes the 2008 build system to assume the library comes from outside 2009 of the NetBSD source tree and only causes -llibname 2010 to be added to LDADD. 2011 2012 This variable may be used for individual libraries/programs, 2013 as well as in parent directories to cache common libraries 2014 as a build-time optimization. 2015 2016The include file <bsd.lib.mk> includes the file named "../Makefile.inc" 2017if it exists, as well as the include file <bsd.man.mk>. 2018 2019It has rules for building profiled objects; profiled libraries are 2020built by default. 2021 2022Libraries are ranlib'd when made. 2023 2024 2025=-=-=-=-= bsd.links.mk =-=-=-=-= 2026 2027The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables 2028and is included from <bsd.lib.mk> and <bsd.prog.mk>. 2029 2030LINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log 2031is used. The defaults may be modified by other bsd.*.mk files which 2032include bsd.links.mk. In the future, these variables may be replaced 2033by a method for explicitly recording hard links in a metadata log. 2034 2035LINKS The list of hard links, consisting of pairs of paths: 2036 source-file target-file 2037 ${DESTDIR} is prepended to both paths before linking. 2038 For example, to link /bin/test and /bin/[, use: 2039 LINKS=/bin/test /bin/[ 2040 2041CONFIGLINKS Similar semantics to LINKS, except that the links 2042 are installed by the `configinstall' target, 2043 not the `install' target. 2044 2045SYMLINKS The list of symbolic links, consisting of pairs of paths: 2046 source-file target-file 2047 ${DESTDIR} is only prepended to target-file before linking. 2048 For example, to symlink /usr/bin/tar to /bin/tar resulting 2049 in ${DESTDIR}/usr/bin/tar -> /bin/tar: 2050 SYMLINKS=/bin/tar /usr/bin/tar 2051 2052CONFIGSYMLINKS Similar semantics to SYMLINKS, except that the symbolic links 2053 are installed by the `configinstall' target, 2054 not the `install' target. 2055 2056LINKSOWN Link owner. [${BINOWN}] 2057 2058LINKSGRP Link group. [${BINGRP}] 2059 2060LINKSMODE Link mode. [${NONBINMODE}] 2061 2062LINKSOWN_<fn> Link owner of the specific file <fn>. 2063 2064LINKSGRP_<fn> Link group of the specific file <fn>. 2065 2066LINKSMODE_<fn> Link mode of the specific file <fn>. 2067 2068 2069=-=-=-=-= bsd.man.mk =-=-=-=-= 2070 2071The include file <bsd.man.mk> handles installing manual pages and their 2072links. 2073 2074It has a three targets: 2075 2076 catinstall: 2077 Install the preformatted manual pages and their links. 2078 htmlinstall: 2079 Install the HTML manual pages and their links. 2080 maninstall: 2081 Install the manual page sources and their links. 2082 2083It sets/uses the following variables: 2084 2085MANDIR Base path for manual installation. 2086 2087MANGRP Manual group. 2088 2089MANOWN Manual owner. 2090 2091MANMODE Manual mode. 2092 2093MANSUBDIR Subdirectory under the manual page section, i.e. "/vax" 2094 or "/tahoe" for machine specific manual pages. 2095 2096MAN The manual pages to be installed (use a .1 - .9 suffix). 2097 2098MLINKS List of manual page links (using a .1 - .9 suffix). The 2099 linked-to file must come first, the linked file second, 2100 and there may be multiple pairs. 2101 2102The include file <bsd.man.mk> includes a file named "../Makefile.inc" if 2103it exists. 2104 2105 2106=-=-=-=-= bsd.obj.mk =-=-=-=-= 2107 2108The include file <bsd.obj.mk> defines targets related to the creation 2109and use of separated object and source directories. 2110 2111If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses 2112${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if 2113it exists. Otherwise make(1) looks for the existence of a 2114subdirectory (or a symlink to a directory) of the source directory 2115into which built targets should be placed. If an environment variable 2116named MAKEOBJDIR is set, make(1) uses its value as the name of the 2117object directory; failing that, make first looks for a subdirectory 2118named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj". 2119 2120Object directories are not created automatically by make(1) if they 2121don't exist; you need to run a separate "make obj". (This will happen 2122during a top-level build if "MKOBJDIRS" is set to a value other than 2123"no"). When the source directory is a subdirectory of ${BSDSRCDIR} -- 2124and this is determined by a simple string prefix comparison -- object 2125directories are created in a separate object directory tree, and a 2126symlink to the object directory in that tree is created in the source 2127directory; otherwise, "make obj" assumes that you're not in the main 2128source tree and that it's not safe to use a separate object tree. 2129 2130Several variables used by <bsd.obj.mk> control exactly what 2131directories and links get created during a "make obj": 2132 2133MAKEOBJDIR If set, this is the component name of the object 2134 directory. 2135 2136OBJMACHINE If this is set but MAKEOBJDIR is not set, creates 2137 object directories or links named "obj.${MACHINE}"; 2138 otherwise, just creates ones named "obj". 2139 2140OBJMACHINE_ARCH If set with OBJMACHINE, creates object directories or 2141 links named "obj.${MACHINE}-${MACHINE_ARCH}". 2142 2143USR_OBJMACHINE If set, and the current directory is a subdirectory of 2144 ${BSDSRCDIR}, create object directory in the 2145 corresponding subdirectory of ${BSDOBJDIR}.${MACHINE}; 2146 otherwise, create it in the corresponding subdirectory 2147 of ${BSDOBJDIR} 2148 2149BUILDID If set, the contents of this variable are appended 2150 to the object directory name. If OBJMACHINE is also 2151 set, ".${BUILDID}" is added after ".${MACHINE}". 2152 2153 2154=-=-=-=-= bsd.prog.mk =-=-=-=-= 2155 2156The include file <bsd.prog.mk> handles building programs from one or 2157more source files, along with their manual pages. It has a limited number 2158of suffixes, consistent with the current needs of the BSD tree. 2159<bsd.prog.mk> includes <bsd.shlib.mk> to get shared library parameters. 2160 2161It has eight targets: 2162 2163 all: 2164 build the program and its manual page. This also 2165 creates a GDB initialization file (.gdbinit) in 2166 the objdir. The .gdbinit file sets the shared library 2167 prefix to ${DESTDIR} to facilitate cross-debugging. 2168 clean: 2169 remove the program, any object files and the files a.out, 2170 Errs, errs, mklog, and ${PROG}.core. 2171 cleandir: 2172 remove all of the files removed by the target clean, as 2173 well as .depend, tags, and any manual pages. 2174 `distclean' is a synonym for `cleandir'. 2175 depend: 2176 make the dependencies for the source files, and store 2177 them in the file .depend. 2178 includes: 2179 install any header files. 2180 install: 2181 install the program and its manual pages; if the Makefile 2182 does not itself define the target install, the targets 2183 beforeinstall and afterinstall may also be used to cause 2184 actions immediately before and after the install target 2185 is executed. 2186 lint: 2187 run lint on the source files 2188 tags: 2189 create a tags file for the source files. 2190 2191It sets/uses the following variables: 2192 2193BINGRP Binary group. 2194 2195BINOWN Binary owner. 2196 2197BINMODE Binary mode. 2198 2199CLEANDIRFILES Additional files to remove for the cleandir target. 2200 2201CLEANFILES Additional files to remove for the clean and cleandir targets. 2202 2203CONFIGOPTS Additional flags to config(1) when building kernels. 2204 2205COPTS Additional flags to the compiler when creating C objects. 2206 2207COPTS.<fn> Additional flags to the compiler when creating the 2208 C objects for <fn>. 2209 For <fn>.[ly], "<fn>.c" must be used. 2210 2211CPUFLAGS Additional flags to the compiler/assembler to select 2212 CPU instruction set options, CPU tuning options, etc. 2213 2214CPUFLAGS.<fn> Additional flags to the compiler/assembler for <fn>. 2215 For <fn>.[ly], "<fn>.c" must be used. 2216 2217CPPFLAGS Additional flags to the C pre-processor. 2218 2219CPPFLAGS.<fn> Additional flags to the C pre-processor for <fn>. 2220 For <fn>.[ly], "<fn>.c" must be used. 2221 2222GDBINIT List of GDB initialization files to add to "source" 2223 directives in the .gdbinit file that is created in the 2224 objdir. 2225 2226LDADD Additional loader objects. Usually used for libraries. 2227 For example, to load with the compatibility and utility 2228 libraries, use: 2229 2230 LDADD+=-lutil -lcompat 2231 2232LDFLAGS Additional linker flags (passed to ${CC} during link). 2233 2234LINKS See <bsd.links.mk> 2235 2236OBJCOPTS Additional flags to the compiler when creating ObjC objects. 2237 2238OBJCOPTS.<fn> Additional flags to the compiler when creating the 2239 ObjC objects for <fn>. 2240 For <fn>.[ly], "<fn>.c" must be used. 2241 2242SYMLINKS See <bsd.links.mk> 2243 2244MAN Manual pages (should end in .1 - .9). If no MAN variable is 2245 defined, "MAN=${PROG}.1" is assumed. 2246 2247PAXCTL_FLAGS If defined, run paxctl(1) on the program binary after link 2248 time, with the value of this variable as args to paxctl(1). 2249 2250PAXCTL_FLAGS.${PROG} Custom override for PAXCTL_FLAGS. 2251 2252PROG The name of the program to build. If not supplied, nothing 2253 is built. 2254 2255PROG_CXX If defined, the name of the program to build. Also 2256 causes <bsd.prog.mk> to link the program with the C++ 2257 compiler rather than the C compiler. PROG_CXX overrides 2258 the value of PROG if PROG is also set. 2259 2260PROGNAME The name that the above program will be installed as, if 2261 different from ${PROG}. 2262 2263PROGS Multiple programs to build from a single directory. 2264 Defaults to PROG. For each program ${_P} in ${PROGS}, 2265 uses SRCS.${_P}, defaulting to ${_P}.c. 2266 2267PROGS_CXX Multiple C++ programs to build from a single directory. 2268 Defaults to PROG_CXX. For each program ${_P} in ${PROGS_CXX}, 2269 uses SRCS.${_P}, defaulting to ${_P}.cc. 2270 2271SRCS List of source files to build the program. If SRCS is not 2272 defined, it's assumed to be ${PROG}.c or ${PROG_CXX}.cc. 2273 2274DPSRCS List of source files which are needed for generating 2275 dependencies, but are not needed in ${SRCS}. 2276 2277DPADD Additional dependencies for the program. Usually used for 2278 libraries. For example, to depend on the compatibility and 2279 utility libraries use: 2280 2281 DPADD+=${LIBCOMPAT} ${LIBUTIL} 2282 2283 The following system libraries are predefined for DPADD: 2284 2285 LIBARCHIVE?= ${DESTDIR}/usr/lib/libarchive.a 2286 LIBASN1?= ${DESTDIR}/usr/lib/libasn1.a 2287 LIBATF_C?= ${DESTDIR}/usr/lib/libatf-c.a 2288 LIBATF_CXX?= ${DESTDIR}/usr/lib/libatf-c++.a 2289 LIBBIND9?= ${DESTDIR}/usr/lib/libbind9.a 2290 LIBBLOCKLIST?= ${DESTDIR}/usr/lib/libblocklist.a 2291 LIBBLUETOOTH?= ${DESTDIR}/usr/lib/libbluetooth.a 2292 LIBBSDMALLOC?= ${DESTDIR}/usr/lib/libbsdmalloc.a 2293 LIBBZ2?= ${DESTDIR}/usr/lib/libbz2.a 2294 LIBC?= ${DESTDIR}/usr/lib/libc.a 2295 LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a 2296 LIBCBOR?= ${DESTDIR}/usr/lib/libcbor.a 2297 LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a 2298 LIBCOM_ERR?= ${DESTDIR}/usr/lib/libcom_err.a 2299 LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a 2300 LIBCRYPTO?= ${DESTDIR}/usr/lib/libcrypto.a 2301 LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a 2302 LIBCXX?= ${DESTDIR}/usr/lib/libc++.a 2303 LIBDES?= ${DESTDIR}/usr/lib/libdes.a 2304 LIBDNS?= ${DESTDIR}/usr/lib/libdns.a 2305 LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a 2306 LIBEVENT?= ${DESTDIR}/usr/lib/libevent.a 2307 LIBEVENT_OPENSSL?= ${DESTDIR}/usr/lib/libevent_openssl.a 2308 LIBEVENT_PTHREADS?= ${DESTDIR}/usr/lib/libevent_pthreads.a 2309 LIBEXECINFO?= ${DESTDIR}/usr/lib/libexecinfo.a 2310 LIBEXPAT?= ${DESTDIR}/usr/lib/libexpat.a 2311 LIBFETCH?= ${DESTDIR}/usr/lib/libfetch.a 2312 LIBFIDO2?= ${DESTDIR}/usr/lib/libfido2.a 2313 LIBFL?= ${DESTDIR}/usr/lib/libfl.a 2314 LIBFORM?= ${DESTDIR}/usr/lib/libform.a 2315 LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a 2316 LIBGNUCTF?= ${DESTDIR}/usr/lib/libgnuctf.a 2317 LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a 2318 LIBGSSAPI?= ${DESTDIR}/usr/lib/libgssapi.a 2319 LIBHDB?= ${DESTDIR}/usr/lib/libhdb.a 2320 LIBHEIMBASE?= ${DESTDIR}/usr/lib/libheimbase.a 2321 LIBHEIMNTLM?= ${DESTDIR}/usr/lib/libheimntlm.a 2322 LIBHX500?= ${DESTDIR}/usr/lib/libhx500.a 2323 LIBINTL?= ${DESTDIR}/usr/lib/libintl.a 2324 LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a 2325 LIBISC?= ${DESTDIR}/usr/lib/libisc.a 2326 LIBISCCC?= ${DESTDIR}/usr/lib/libisccc.a 2327 LIBISCFG?= ${DESTDIR}/usr/lib/libiscfg.a 2328 LIBKADM5CLNT?= ${DESTDIR}/usr/lib/libkadm5clnt.a 2329 LIBKADM5SRV?= ${DESTDIR}/usr/lib/libkadm5srv.a 2330 LIBKAFS?= ${DESTDIR}/usr/lib/libkafs.a 2331 LIBKRB5?= ${DESTDIR}/usr/lib/libkrb5.a 2332 LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a 2333 LIBL?= ${DESTDIR}/usr/lib/libl.a 2334 LIBLBER?= ${DESTDIR}/usr/lib/liblber.a 2335 LIBLDAP?= ${DESTDIR}/usr/lib/libldap.a 2336 LIBLDAP_R?= ${DESTDIR}/usr/lib/libldap_r.a 2337 LIBLUA?= ${DESTDIR}/usr/lib/liblua.a 2338 LIBM?= ${DESTDIR}/usr/lib/libm.a 2339 LIBMAGIC?= ${DESTDIR}/usr/lib/libmagic.a 2340 LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a 2341 LIBNETPGPVERIFY?= ${DESTDIR}/usr/lib/libnetpgpverify.a 2342 LIBNS?= ${DESTDIR}/usr/lib/libns.a 2343 LIBOBJC?= ${DESTDIR}/usr/lib/libobjc.a 2344 LIBOSSAUDIO?= ${DESTDIR}/usr/lib/libossaudio.a 2345 LIBPAM?= ${DESTDIR}/usr/lib/libpam.a 2346 LIBPANEL?= ${DESTDIR}/usr/lib/libpanel.a 2347 LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a 2348 LIBPCI?= ${DESTDIR}/usr/lib/libpci.a 2349 LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a 2350 LIBPTHREAD?= ${DESTDIR}/usr/lib/libpthread.a 2351 LIBPUFFS?= ${DESTDIR}/usr/lib/libpuffs.a 2352 LIBQUOTA?= ${DESTDIR}/usr/lib/libquota.a 2353 LIBRADIUS?= ${DESTDIR}/usr/lib/libradius.a 2354 LIBREFUSE?= ${DESTDIR}/usr/lib/librefuse.a 2355 LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a 2356 LIBRMT?= ${DESTDIR}/usr/lib/librmt.a 2357 LIBROKEN?= ${DESTDIR}/usr/lib/libroken.a 2358 LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a 2359 LIBRT?= ${DESTDIR}/usr/lib/librt.a 2360 LIBRUMP?= ${DESTDIR}/usr/lib/librump.a 2361 LIBRUMPFS_CD9660?= ${DESTDIR}/usr/lib/librumpfs_cd9660.a 2362 LIBRUMPFS_EFS?= ${DESTDIR}/usr/lib/librumpfs_efs.a 2363 LIBRUMPFS_EXT2FS?= ${DESTDIR}/usr/lib/librumpfs_ext2fs.a 2364 LIBRUMPFS_FFS?= ${DESTDIR}/usr/lib/librumpfs_ffs.a 2365 LIBRUMPFS_HFS?= ${DESTDIR}/usr/lib/librumpfs_hfs.a 2366 LIBRUMPFS_LFS?= ${DESTDIR}/usr/lib/librumpfs_lfs.a 2367 LIBRUMPFS_MSDOS?= ${DESTDIR}/usr/lib/librumpfs_msdos.a 2368 LIBRUMPFS_NFS?= ${DESTDIR}/usr/lib/librumpfs_nfs.a 2369 LIBRUMPFS_NTFS?= ${DESTDIR}/usr/lib/librumpfs_ntfs.a 2370 LIBRUMPFS_SYSPUFFS?= ${DESTDIR}/usr/lib/librumpfs_syspuffs.a 2371 LIBRUMPFS_TMPFS?= ${DESTDIR}/usr/lib/librumpfs_tmpfs.a 2372 LIBRUMPFS_UDF?= ${DESTDIR}/usr/lib/librumpfs_udf.a 2373 LIBRUMPUSER?= ${DESTDIR}/usr/lib/librumpuser.a 2374 LIBSASLC?= ${DESTDIR}/usr/lib/libsaslc.a 2375 LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a 2376 LIBSL?= ${DESTDIR}/usr/lib/libsl.a 2377 LIBSQLITE3?= ${DESTDIR}/usr/lib/libsqlite3.a 2378 LIBSSH?= ${DESTDIR}/usr/lib/libssh.a 2379 LIBSSL?= ${DESTDIR}/usr/lib/libssl.a 2380 LIBSTDCXX?= ${DESTDIR}/usr/lib/libstdc++.a 2381 LIBSUPCXX?= ${DESTDIR}/usr/lib/libsupc++.a 2382 LIBTERMINFO?= ${DESTDIR}/usr/lib/libterminfo.a 2383 LIBTRE?= ${DESTDIR}/usr/lib/libtre.a 2384 LIBUNBOUND?= ${DESTDIR}/usr/lib/libunbound.a 2385 LIBUSBHID?= ${DESTDIR}/usr/lib/libusbhid.a 2386 LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a 2387 LIBWIND?= ${DESTDIR}/usr/lib/libwind.a 2388 LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a 2389 LIBY?= ${DESTDIR}/usr/lib/liby.a 2390 LIBZ?= ${DESTDIR}/usr/lib/libz.a 2391 2392 The following c startup files. 2393 2394 LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o 2395 LIBCRTI?= ${DESTDIR}/usr/lib/crti.o 2396 LIBCRTBEGIN?= ${DESTDIR}/usr/lib/crti.o 2397 LIBCRTEND?= ${DESTDIR}/usr/lib/crtn.o 2398 2399 The following X-Windows libraries are predefined for DPADD: 2400 2401 LIBDPS?= ${DESTDIR}/usr/X11R7/lib/libdps.a 2402 LIBFNTSTUBS?= ${DESTDIR}/usr/X11R7/lib/libfntstubs.a 2403 LIBFONTCACHE?= ${DESTDIR}/usr/X11R7/lib/libfontcache.a 2404 LIBFONTCONFIG?= ${DESTDIR}/usr/X11R7/lib/libfontconfig.a 2405 LIBFONTENC?= ${DESTDIR}/usr/X11R7/lib/libfontenc.a 2406 LIBFREETYPE?= ${DESTDIR}/usr/X11R7/lib/libfreetype.a 2407 LIBFS?= ${DESTDIR}/usr/X11R7/lib/libFS.a 2408 LIBGL?= ${DESTDIR}/usr/X11R7/lib/libGL.a 2409 LIBGLU?= ${DESTDIR}/usr/X11R7/lib/libGLU.a 2410 LIBICE?= ${DESTDIR}/usr/X11R7/lib/libICE.a 2411 LIBLBXUTIL?= ${DESTDIR}/usr/X11R7/lib/liblbxutil.a 2412 LIBSM?= ${DESTDIR}/usr/X11R7/lib/libSM.a 2413 LIBX11?= ${DESTDIR}/usr/X11R7/lib/libX11.a 2414 LIBX11_XCB?= ${DESTDIR}/usr/X11R7/lib/libX11-xcb.a 2415 LIBXAU?= ${DESTDIR}/usr/X11R7/lib/libXau.a 2416 LIBXAW?= ${DESTDIR}/usr/X11R7/lib/libXaw.a 2417 LIBXCB?= ${DESTDIR}/usr/X11R7/lib/libxcb.a 2418 LIBXCOMPOSITE?= ${DESTDIR}/usr/X11R7/lib/libXcomposite.a 2419 LIBXCVT?= ${DESTDIR}/usr/X11R7/lib/libxcvt.a 2420 LIBXDAMAGE?= ${DESTDIR}/usr/X11R7/lib/libXdamage.a 2421 LIBXDMCP?= ${DESTDIR}/usr/X11R7/lib/libXdmcp.a 2422 LIBXEXT?= ${DESTDIR}/usr/X11R7/lib/libXext.a 2423 LIBXFIXES?= ${DESTDIR}/usr/X11R7/lib/libXfixes.a 2424 LIBXFONT2?= ${DESTDIR}/usr/X11R7/lib/libXfont2.a 2425 LIBXFONT?= ${DESTDIR}/usr/X11R7/lib/libXfont.a 2426 LIBXFT?= ${DESTDIR}/usr/X11R7/lib/libXft.a 2427 LIBXI?= ${DESTDIR}/usr/X11R7/lib/libXi.a 2428 LIBXINERAMA?= ${DESTDIR}/usr/X11R7/lib/libXinerama.a 2429 LIBXKBFILE?= ${DESTDIR}/usr/X11R7/lib/libxkbfile.a 2430 LIBXMU?= ${DESTDIR}/usr/X11R7/lib/libXmu.a 2431 LIBXMUU?= ${DESTDIR}/usr/X11R7/lib/libXmuu.a 2432 LIBXPM?= ${DESTDIR}/usr/X11R7/lib/libXpm.a 2433 LIBXRANDR?= ${DESTDIR}/usr/X11R7/lib/libXrandr.a 2434 LIBXRENDER?= ${DESTDIR}/usr/X11R7/lib/libXrender.a 2435 LIBXSS?= ${DESTDIR}/usr/X11R7/lib/libXss.a 2436 LIBXT?= ${DESTDIR}/usr/X11R7/lib/libXt.a 2437 LIBXTRAP?= ${DESTDIR}/usr/X11R7/lib/libXTrap.a 2438 LIBXTST?= ${DESTDIR}/usr/X11R7/lib/libXtst.a 2439 LIBXV?= ${DESTDIR}/usr/X11R7/lib/libXv.a 2440 LIBXXF86DGA?= ${DESTDIR}/usr/X11R7/lib/libXxf86dga.a 2441 LIBXXF86MISC?= ${DESTDIR}/usr/X11R7/lib/libXxf86misc.a 2442 LIBXXF86VM?= ${DESTDIR}/usr/X11R7/lib/libXxf86vm.a 2443 2444STRIPFLAG The flag passed to the install program to cause the binary 2445 to be stripped. 2446 2447SUBDIR A list of subdirectories that should be built as well. 2448 Each of the targets will execute the same target in the 2449 subdirectories. 2450 2451SCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}]. 2452 These are installed exactly like programs. 2453 2454SCRIPTSDIR The location to install the scripts. Each script can be 2455 installed to a separate path by setting SCRIPTSDIR_<script>. 2456 2457SCRIPTSNAME The name that the above program will be installed as, if 2458 different from ${SCRIPTS}. These can be further specialized 2459 by setting SCRIPTSNAME_<script>. 2460 2461FILES See description of <bsd.files.mk>. 2462 2463SHLINKDIR Target directory for shared linker. See description of 2464 <bsd.own.mk> for additional information about this variable. 2465 2466The include file <bsd.prog.mk> includes the file named "../Makefile.inc" 2467if it exists, as well as the include file <bsd.man.mk>. 2468 2469Some simple examples: 2470 2471To build foo from foo.c with a manual page foo.1, use: 2472 2473 PROG= foo 2474 2475 .include <bsd.prog.mk> 2476 2477To build foo from foo.c with a manual page foo.2, add the line: 2478 2479 MAN= foo.2 2480 2481If foo does not have a manual page at all, add the line: 2482 2483 MKMAN= no 2484 2485If foo has multiple source files, add the line: 2486 2487 SRCS= a.c b.c c.c d.c 2488 2489 2490=-=-=-=-= bsd.rpc.mk =-=-=-=-= 2491 2492The include file <bsd.rpc.mk> contains a makefile fragment used to 2493construct source files built by rpcgen. 2494 2495The following macros may be defined in makefiles which include 2496<bsd.rpc.mk> in order to control which files get built and how they 2497are to be built: 2498 2499RPC_INCS construct .h file from .x file 2500RPC_XDRFILES construct _xdr.c from .x file 2501 (for marshalling/unmarshalling data types) 2502RPC_SVCFILES construct _svc.c from .x file 2503 (server-side stubs) 2504RPC_SVCFLAGS Additional flags passed to builds of RPC_SVCFILES. 2505 2506RPC_XDIR Directory containing .x/.h files 2507 2508 2509=-=-=-=-= bsd.shlib.mk =-=-=-=-= 2510 2511The include file <bsd.shlib.mk> computes parameters for shared library 2512installation and use. It defines no targets. <bsd.own.mk> MUST be 2513included before <bsd.shlib.mk>. 2514 2515<bsd.own.mk> sets the following variables, if they are not already defined 2516(defaults are in brackets): 2517 2518SHLIBINSTALLDIR If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR} 2519 instead of ${LIBDIR} as the base path for shared library 2520 installation. [/lib] 2521 2522SHLIBDIR The path to USE_SHLIBDIR shared libraries to use when building 2523 a program. [/lib for programs in /bin and /sbin, /usr/lib 2524 for all others.] 2525 2526_LIBSODIR Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no", 2527 otherwise set to ${LIBDIR} 2528 2529SHLINKINSTALLDIR Base path for shared linker. [/libexec] 2530 2531SHLINKDIR Path to use for shared linker when building a program. 2532 [/libexec for programs in /bin and /sbin, /usr/libexec for 2533 all others.] 2534 2535 2536=-=-=-=-= bsd.subdir.mk =-=-=-=-= 2537 2538The include file <bsd.subdir.mk> contains the default targets for building 2539subdirectories. It has the same eight targets as <bsd.prog.mk>: all, 2540clean, cleandir, depend, includes, install, lint, and tags. It uses the 2541following variables: 2542 2543NOSUBDIR If this variable is defined, then the SUBDIR variable 2544 will be ignored and subdirectories will not be processed. 2545 2546SUBDIR For all of the directories listed in ${SUBDIR}, the 2547 specified directory will be visited and the target made. 2548 2549 As a special case, the use of a token .WAIT as an 2550 entry in SUBDIR acts as a synchronization barrier 2551 when multiple make jobs are run; subdirs before the 2552 .WAIT must complete before any subdirs after .WAIT are 2553 started. See make(1) for some caveats on use of .WAIT 2554 and other special sources. 2555 2556 2557=-=-=-=-= bsd.x11.mk =-=-=-=-= 2558 2559The include file <bsd.x11.mk> contains parameters and targets for 2560cross-building X11 from ${X11SRCDIR.<package>}. It should be included 2561after the general Makefile contents but before the include files such as 2562<bsd.prog.mk> and <bsd.lib.mk>. 2563 2564It provides the following targets: 2565 .man.1 .man.3 .man.4 .man.5 .man.7: 2566 If ${MAN} or ${PROG} is set and ${MKMAN} != "no", 2567 these rules convert from X11's manual page source 2568 into an mdoc.old source file. 2569 2570It sets the following variables: 2571 2572BINDIR Set to ${X11BINDIR}. 2573 To override, define after including <bsd.x11.mk> 2574 2575LIBDIR Set to ${X11USRLIBDIR}. 2576 To override, define after including <bsd.x11.mk> 2577 2578MANDIR Set to ${X11MANDIR}. 2579 To override, define after including <bsd.x11.mk> 2580 2581CPPFLAGS Appended with definitions to include from 2582 ${DESTDIR}${X11INCDIR} 2583 2584LDFLAGS Appended with definitions to link from 2585 ${DESTDIR}${X11USRLIBDIR} 2586 2587X11FLAGS.CONNECTION Equivalent to X11's CONNECTION_FLAGS. 2588 2589X11FLAGS.EXTENSION Equivalent to X11's EXT_DEFINES. 2590 2591X11FLAGS.LOADABLE Equivalent to X11's LOADABLE. 2592 2593X11FLAGS.OS_DEFINES Equivalent to X11's OS_DEFINES. 2594 2595X11FLAGS.SERVER Equivalent to X11's ServerDefines. 2596 2597X11FLAGS.THREADLIB Equivalent to X11's THREADS_DEFINES for libraries. 2598 2599X11FLAGS.THREADS Equivalent to X11's THREADS_DEFINES. 2600 2601X11FLAGS.VERSION cpp(1) definitions of OSMAJORVERSION and OSMINORVERSION. 2602 2603X11FLAGS.DIX Equivalent to X11's DIX_DEFINES. 2604 2605X11TOOL_UNXCOMM Commandline to convert `XCOMM' comments to `#' 2606 2607It uses the following variables: 2608 2609APPDEFS List of app-default files to install. 2610 2611CPPSCRIPTS List of files/scripts to run through cpp(1) 2612 and then ${X11TOOL_UNXCOMM}. The source files 2613 have a `.cpp' suffix, the generated files do not. 2614 2615CPPSCRIPTFLAGS Additional flags to cpp(1) when building CPPSCRIPTS. 2616 2617CPPSCRIPTFLAGS_<fn> Additional flags to cpp(1) when building CPPSCRIPT <fn>. 2618 2619 2620=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2621 2622The following files are described here for completion, but they are not 2623supposed to be included directly from other Makefiles; they are used 2624internally by other system files. 2625 2626=-=-=-=-= bsd.sys.mk =-=-=-=-= 2627 2628The include file <bsd.sys.mk> is used by other system mk files and 2629it is not intended to be included standalone. It contains rules and 2630system build variables. It requires bsd.own.mk to be included first. 2631It contains overrides that are used when building the NetBSD source tree. 2632 2633The following variables control how various files are compiled/built. 2634(Note that these may be overridden in <bsd.own.mk> if USETOOLS == "yes"): 2635 2636AR Create, modify, and extract from archives. [ar] 2637 2638ARFLAGS Options to ${AR}. [rl] 2639 2640ARM_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout] 2641 2642AS Assembler. [as] 2643 2644AFLAGS Options to ${CC} when compiling or linking .s or .S 2645 assembly source files. [] 2646 2647BUILDSEED GCC uses random numbers when compiling C++ code. 2648 If this option is present, seed the random number 2649 generator based on the value, source file names and 2650 the output file name to make builds more deterministic. 2651 Additional information is available in the GCC 2652 documentation of -frandom-seed. 2653 2654CC C compiler. [cc] 2655 2656CFLAGS Options to ${CC}. [Usually -O or -O2] 2657 2658CPP C Pre-Processor. [cpp] 2659 2660CPPFLAGS Options to ${CPP}. [] 2661 2662CPUFLAGS Optimization flags for ${CC}. [] 2663 2664CXX C++ compiler. [c++] 2665 2666CXXFLAGS Options to ${CXX}. [${CFLAGS}] 2667 2668M68K_ELF2AOUT Convert ELF-format executable to a.out. [elf2aout] 2669 2670MIPS_ELF2ECOFF Convert ELF-format executable to ECOFF. [elf2ecoff] 2671 2672FC Fortran compiler. [f77] 2673 2674FFLAGS Options to {$FC}. [-O] 2675 2676HOST_SH Shell. This must be an absolute path, because it may be 2677 substituted into "#!" lines in scripts. [/bin/sh] 2678 2679INSTALL install(1) command. [install] 2680 2681LEX Lexical analyzer. [lex] 2682 2683LFLAGS Options to ${LEX}. [] 2684 2685LPREFIX Symbol prefix for ${LEX} (see -P option in lex(1)) [yy] 2686 2687LD Linker. [ld] 2688 2689LDFLAGS Options to ${CC} during the link process. [] 2690 2691LINT C program verifier. [lint] 2692 2693LINTFLAGS Options to ${LINT}. [-chapbrxzgFS] 2694 2695LORDER List dependencies for object files. [lorder] 2696 2697MAKE make(1). [make] 2698 2699MKDEP Construct Makefile dependency list. [mkdep] 2700 2701MKDEPCXX Construct Makefile dependency list for C++ files. [mkdep] 2702 2703NM List symbols from object files. [nm] 2704 2705PC Pascal compiler. [pc] (Not present) 2706 2707PFLAGS Options to ${PC}. [] 2708 2709OBJC Objective C compiler. [${CC}] 2710 2711OBJCFLAGS Options to ${OBJC}. [${CFLAGS}] 2712 2713OBJCOPY Copy and translate object files. [objcopy] 2714 2715OBJCOPYLIBFLAGS Flags to pass to objcopy when library objects are 2716 being built. [${.TARGET} =~ "*.po" ? -X : -x] 2717 2718OBJDUMP Display information from object files. [objdump] 2719 2720RANLIB Generate index to archive. [ranlib] 2721 2722READELF Display information from ELF object files. [readelf] 2723 2724SIZE List section sizes and total size. [size] 2725 2726STRINGS Display printable character sequences in files. [strings] 2727 2728STRIP Discard symbols from object files. [strip] 2729 2730TSORT Topological sort of a directed graph. [tsort -q] 2731 2732YACC LALR(1) parser generator. [yacc] 2733 2734YFLAGS Options to ${YACC}. [] 2735 2736YHEADER If defined, add "-d" to YFLAGS, and add dependencies 2737 from <file>.y to <file>.h and <file>.c, and add 2738 <foo>.h to CLEANFILES. 2739 2740YPREFIX If defined, add "-p ${YPREFIX}" to YFLAGS. 2741 2742 2743Other variables of note (incomplete list): 2744 2745NOCLANGERROR If defined and clang is used as C compiler, -Werror is not 2746 passed to it. 2747 2748NOGCCERROR If defined, prevents passing certain ${CFLAGS} to GCC 2749 that cause warnings to be fatal, such as: 2750 -Werror -Wa,--fatal-warnings 2751 (The latter being for as(1).) 2752 2753WARNS Crank up compiler warning options; the distinct levels are: 2754 WARNS=1 2755 WARNS=2 2756 WARNS=3 2757 WARNS=4 2758 WARNS=5 2759 WARNS=6 2760 2761=-=-=-=-= bsd.host.mk =-=-=-=-= 2762 2763This file is automatically included from bsd.own.mk. It contains settings 2764for all the HOST_* variables that are used in host programs and libraries. 2765 2766HOST_AR The host archive processing command 2767 2768HOST_CC The host c compiler 2769 2770HOST_CFLAGS The host c compiler flags 2771 2772HOST_COMPILE.c The host c compiler line with flags 2773 2774HOST_COMPILE.cc The host c++ compiler line with flags 2775 2776HOST_CPP The host c pre-processor 2777 2778HOST_CPPFLAGS The host c pre-processor flags 2779 2780HOST_CXX The host c++ compiler 2781 2782HOST_CXXFLAGS The host c++ compiler flags 2783 2784HOST_INSTALL_DIR The host command to install a directory 2785 2786HOST_INSTALL_FILE The host command to install a file 2787 2788HOST_INSTALL_SYMLINK The host command to install a symlink 2789 2790HOST_LD The host linker command 2791 2792HOST_LDFLAGS The host linker flags 2793 2794HOST_LINK.c The host c linker line with flags 2795 2796HOST_LINK.cc The host c++ linker line with flags 2797 2798HOST_LN The host command to link two files 2799 2800HOST_MKDEP The host command to create dependencies for c programs 2801 2802HOST_MKDEPCXX The host command to create dependencies for c++ programs 2803 2804HOST_OSTYPE The host OSNAME-RELEASE-ARCH tupple 2805 2806HOST_RANLIB The host command to create random access archives 2807 2808HOST_SH The host Bourne shell interpreter name (absolute path) 2809 2810=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2811