1.\" $NetBSD: mk.conf.5,v 1.46 2008/11/15 11:27:49 mrg Exp $ 2.\" 3.\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Luke Mewburn. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd November 12, 2008 31.Dt MK.CONF 5 32.Os 33.\" turn off hyphenation 34.hym 999 35. 36.Sh NAME 37.Nm mk.conf 38.Nd make configuration file 39. 40.Sh DESCRIPTION 41The 42.Nm 43file overrides various parameters used during the build of the system. 44.Pp 45Listed below are the 46.Nm 47variables that may be set, the values to which each may be set, 48a brief description of what each variable does, and a reference to 49relevant manual pages. 50. 51.Ss NetBSD System variables 52. 53.de YorN 54Can be set to 55.Dq yes 56or 57.Dq no . 58.. 59.de DFLT 60.Pp 61.Em Default : 62.. 63.de DFLTu 64.DFLT 65Unset. 66.. 67.de DFLTy 68.DFLT 69.Dq yes 70.. 71.de DFLTn 72.DFLT 73.Dq no 74.. 75.Bl -tag -width MKDYNAMICROOT 76. 77.It Sy NETBSDSRCDIR 78The path to the top level of the 79.Nx 80sources. 81If 82.Xr make 1 83is run from within the 84.Nx 85source tree, the default is the top 86level of that tree (as determined by the presence of 87.Pa build.sh 88and 89.Pa tools/ ) , 90otherwise 91.Sy BSDSRCDIR 92will be used. 93. 94.It Sy BSDOBJDIR 95The real path to the 96.Sq obj 97tree for the 98.Nx 99source tree. 100.DFLT 101.Pa /usr/obj 102. 103.It Sy BSDSRCDIR 104The real path to the 105.Nx 106source tree. 107.DFLT 108.Pa /usr/src 109. 110.It Sy BUILD 111If defined, 112.Sq "make install" 113checks that the targets in the source directories are up-to-date and 114re-makes them if they are out of date, instead of blindly trying to install 115out of date or non-existent targets. 116.DFLTu 117. 118.It Sy BUILDID 119Identifier for the build. 120The identifier will be appended to 121object directory names, and can be consulted in the 122.Xr make 1 123configuration file in order to set additional build parameters, 124such as compiler flags. 125.DFLTu 126. 127.It Sy COPTS 128Extra options for the C compiler. 129Should be appended to (e.g., 130.Sy COPTS+=-g ) , 131rather than explicitly set. 132Note that 133.Sy CPUFLAGS , 134not 135.Sy COPTS , 136should be used for 137compiler flags that select CPU-related options. 138Also note that 139.Sy CFLAGS 140should never be set in 141.Nm . 142. 143.It Sy CPUFLAGS 144Additional flags passed to the compiler/assembler to select 145CPU instruction set options, CPU tuning options, etc. 146Such options should not be specified in 147.Sy COPTS , 148because some parts of the build process need to override 149CPU-related compiler options. 150. 151.It Sy DESTDIR 152Directory to contain the built 153.Nx 154system. 155If set, special options are passed to the compilation tools to 156prevent their default use of the host system's 157.Sy /usr/include , /usr/lib , 158and so forth. 159This pathname should 160.Em not 161end with a slash 162.Pq / 163character (for installation into the system's root directory, set 164.Sy DESTDIR 165to an empty string). 166The directory must reside on a file system which supports long file 167names and hard links. 168.DFLT 169Empty string if 170.Sy USETOOLS 171is 172.Dq yes ; 173unset otherwise. 174.Pp 175.Em Note : 176.Sy build.sh 177will provide a default of 178.Pa destdir. Ns Sy MACHINE 179(in the top-level 180.Sy .OBJDIR ) 181unless run in 182.Sq expert 183mode 184. 185.It Sy MAKEVERBOSE 186Level of verbosity of status messages. 187Supported values: 188.Bl -tag -width xxx 189.It 0 190No descriptive messages or commands executed by 191.Xr make 1 192are shown. 193.It 1 194Brief messages are shown describing what is being done, 195but the actual commands executed by 196.Xr make 1 197are not displayed. 198.It 2 199Descriptive messages are shown as above (prefixed with a 200.Sq # ) , 201and ordinary commands performed by 202.Xr make 1 203are displayed. 204.It 3 205In addition to the above, all commands performed by 206.Xr make 1 207are displayed, even if they would ordinarily have been hidden 208through use of the 209.Dq \&@ 210prefix in the relevant makefile. 211.It 4 212In addition to the above, commands executed by 213.Xr make 1 214are traced through use of the 215.Xr sh 1 216.Dq Fl x 217flag. 218.El 219.DFLT 2202 221. 222.It Sy MKATF 223.YorN 224Indicates whether the Automated Testing Framework is built and installed. 225.DFLTy 226. 227.It Sy MKBFD 228.YorN 229Indicates whether 230.Sy libbfd , 231.Sy libiberty , 232or any of the things that depend 233upon them (such as the binutils, 234.Xr as 1 , 235.Xr gdb 1 , 236.Xr ld 1 , 237.Xr dbsym 8 , 238or 239.Xr mdsetimage 8 ) 240should be built. 241.DFLTy 242. 243.It Sy MKCATPAGES 244.YorN 245Indicates whether preformatted plaintext manual pages will be created 246and installed. 247.DFLTy 248. 249.It Sy MKCOMPLEX 250.YorN 251Indicates whether the 252.Lb libm 253is compiled with support for 254.In complex.h . 255.DFLTy 256. 257.It Sy MKCRYPTO 258.YorN 259Indicates whether cryptographic code will be included in a build; 260provided for the benefit of countries that do not allow strong 261cryptography. 262Will not affect use of the standard low-security password encryption system, 263.Xr crypt 3 . 264.DFLTy 265.Pp 266If 267.Dq no , 268acts as 269.Sy MKKERBEROS=no . 270. 271.It Sy MKCRYPTO_IDEA 272.YorN 273Indicates whether IDEA support will be built into 274.Sy libcrypto_idea.a . 275.DFLTn 276. 277.It Sy MKCRYPTO_MDC2 278.YorN 279Indicates whether MDC2 support will be built into 280.Sy libcrypto_mdc2.a . 281.DFLTn 282. 283.It Sy MKCRYPTO_RC5 284.YorN 285Indicates whether RC5 support will be built into 286.Sy libcrypto_rc5.a . 287.DFLTn 288. 289.It Sy MKCVS 290.YorN 291Indicates whether 292.Xr cvs 1 293is built. 294.DFLTy 295. 296.It Sy MKDEBUG 297.YorN 298Indicates whether separate debugging symbols should be installed into 299.Sy DESTDIR Ns Pa /usr/libdata/debug . 300.DFLTn 301. 302.It Sy MKDEBUGLIB 303.YorN 304Indicates whether debug libraries 305.Sy ( lib*_g.a ) 306will be built and installed. 307Debug libraries are compiled with 308.Dq Li -g -DDEBUG . 309.DFLTn 310. 311.It Sy MKDOC 312.YorN 313Indicates whether system documentation destined for 314.Sy DESTDIR Ns Pa /usr/share/doc 315will be installed. 316.DFLTy 317. 318.It Sy MKDYNAMICROOT 319.YorN 320Indicates whether all programs should be dynamically linked, 321and to install shared libraries required by 322.Pa /bin 323and 324.Pa /sbin 325and the shared linker 326.Xr ld.elf_so 1 327into 328.Pa /lib . 329If 330.Sq no , 331link programs in 332.Pa /bin 333and 334.Pa /sbin 335statically. 336.DFTLy 337. 338.It Sy MKGCC 339.YorN 340Indicates whether 341.Xr gcc 1 342or any related libraries 343.Pq Sy libg2c , libgcc , libobjc , libstdc++ 344are built. 345.DFLTy 346. 347.It Sy MKGCCCMDS 348.YorN 349Indicates whether 350.Xr gcc 1 351is built. 352If 353.Dq no , 354then 355.Sy MKGCC 356controls if the 357GCC libraries are built. 358.DFLTy 359. 360.It Sy MKGDB 361.YorN 362Indicates whether 363.Xr gdb 1 364is built. 365.DFLTy 366. 367.It Sy MKHESIOD 368.YorN 369Indicates whether the Hesiod infrastructure 370(libraries and support programs) is built and installed. 371.DFLTy 372. 373.It Sy MKHOSTOBJ 374.YorN 375If set to 376.Dq yes , 377then for programs intended to be run on the compile host, 378the name, release, and architecture of the host operating system 379will be suffixed to the name of the object directory created by 380.Dq make obj . 381(This allows multiple host systems to compile 382.Nx 383for a single target.) 384If set to 385.Dq no , 386then programs built to be run on the compile host will use the same 387object directory names as programs built to be run on the target. 388.DFLTn 389. 390.It Sy MKHTML 391.YorN 392Indicates whether the HTML manual pages are created and installed. 393.DFLTy 394. 395.It Sy MKIEEEFP 396.YorN 397Indicates whether code for IEEE754/IEC60559 conformance is built. 398Has no effect on most platforms. 399.DFLTy 400. 401.It Sy MKINET6 402Indicates whether INET6 (IPv6) infrastructure 403(libraries and support programs) is built and installed. 404.DFLTy 405. 406.It Sy MKINFO 407.YorN 408Indicates whether GNU Info files, used for the documentation for 409most of the compilation tools, will be built and installed. 410.DFLTy 411. 412.It Sy MKIPFILTER 413.YorN 414Indicates whether the 415.Xr ipf 4 416programs, headers and other components will be built and installed. 417.DFLTy 418. 419.It Sy MKISCSI 420.YorN 421Indicates whether the iSCSI library and applications are 422built and installed. 423.DFLTy 424. 425.It Sy MKKERBEROS 426.YorN 427Indicates whether the Kerberos v5 infrastructure 428(libraries and support programs) is built and installed. 429.DFLTy 430. 431.It Sy MKLDAP 432.YorN 433Indicates whether the Lightweight Directory Access Protocol (LDAP) 434infrastructure 435(libraries and support programs) is built and installed. 436.DFLTy 437. 438.It Sy MKLINKLIB 439.YorN 440Indicates whether all of the shared library infrastructure is built. 441If 442.Sq no , 443prevents: 444installation of the 445.Sy *.a 446libraries, 447installation of the 448.Sy *_pic.a 449libraries on PIC systems, 450building of 451.Sy *.a 452libraries on PIC systems, 453or 454installation of 455.Sy .so 456symlinks on ELF systems. 457.DFLTy 458.Pp 459If 460.Dq no , 461acts as 462.Sy MKPICINSTALL=no MKPROFILE=no . 463. 464.It Sy MKLINT 465.YorN 466Indicates whether 467.Xr lint 1 468will be run against portions of the 469.Nx 470source code during the build, and whether lint libraries will be 471installed into 472.Sy DESTDIR Ns Pa /usr/libdata/lint . 473.DFLTy 474. 475.It Sy MKMAN 476.YorN 477Indicates whether manual pages will be installed. 478.DFLTy 479.Pp 480If 481.Dq no , 482acts as 483.Sy MKCATPAGES=no MKHTML=no . 484. 485.It Sy MKMANZ 486.YorN 487Indicates whether manual pages should be compressed with 488.Xr gzip 1 489at installation time. 490.DFLTn 491. 492.It Sy MKNLS 493.YorN 494Indicates whether Native Language System (NLS) locale zone files will be 495built and installed. 496.DFLTy 497. 498.It Sy MKOBJ 499.YorN 500Indicates whether object directories will be created when running 501.Dq make obj . 502If set to 503.Dq no , 504then all built files will be located inside the regular source tree. 505.DFLTy 506.Pp 507If 508.Dq no , 509acts as 510.Sy MKOBJDIRS=no . 511. 512.It Sy MKOBJDIRS 513.YorN 514Indicates whether object directories will be created automatically 515(via a 516.Dq make obj 517pass) at the start of a build. 518.DFLTn 519. 520.It Sy MKPAM 521.YorN 522Indicates whether the 523.Xr pam 8 524framework (libraries and support files) is built. 525The pre-PAM code is not supported and may be removed in the future. 526.DFLTy 527. 528.It Sy MKPCC 529.YorN 530Indicates whether 531.Xr pcc 1 532or any related libraries 533.Pq Sy libpcc , libpccsoftfloat 534are built. 535.DFLTn 536. 537.It Sy MKPCCCMDS 538.YorN 539Indicates whether 540.Xr pcc 1 541is built. 542If 543.Dq no , 544then 545.Sy MKPCC 546controls if the 547PCC libraries are built. 548.DFLTn 549. 550.It Sy MKPF 551.YorN 552Indicates whether the 553.Xr pf 4 554programs, headers and LKM will be built and installed. 555.DFLTy 556. 557.It Sy MKPIC 558.YorN 559Indicates whether shared objects and libraries will be created and 560installed. 561If set to 562.Dq no , 563the entire built system will be statically linked. 564.DFLT 565Platform dependent. 566As of this writing, all platforms except 567.Sy m68000 568and 569.Sy sh3 570default to 571.Dq yes . 572.Pp 573If 574.Dq no , 575acts as 576.Sy MKPICLIB=no . 577. 578.It Sy MKPICINSTALL 579.YorN 580Indicates whether the 581.Xr ar 1 582format libraries 583.Sy ( lib*_pic.a ) , 584used to generate shared libraries, are installed. 585.DFLTy 586. 587.It Sy MKPICLIB 588.YorN 589Indicates whether the 590.Xr ar 1 591format libraries 592.Sy ( lib*_pic.a ) , 593used to generate shared libraries. 594.DFLTy 595. 596.It Sy MKPIE 597Indicates whether Position Independent Executables (PIE) 598are built and installed. 599.DFLTn 600. 601.It Sy MKPOSTFIX 602.YorN 603Indicates whether Postfix is built. 604.DFLTy 605. 606.It Sy MKPROFILE 607.YorN 608Indicates whether profiled libraries 609.Sy ( lib*_p.a ) 610will be built and installed. 611.DFLT 612.Dq yes ; 613however, some platforms turn off 614.Sy MKPROFILE 615by default at times due to toolchain problems with profiled code. 616. 617.It Sy MKSHARE 618.YorN 619Indicates whether files destined to reside in 620.Sy DESTDIR Ns Pa /usr/share 621will be built and installed. 622.DFLTy 623.Pp 624If 625.Dq no , 626acts as 627.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no . 628. 629.It Sy MKSKEY 630.YorN 631Indicates whether the S/key infrastructure 632(libraries and support programs) is built. 633.DFLTy 634. 635.It Sy MKSOFTFLOAT 636.YorN 637Indicates whether the compiler generates output containing 638library calls for floating point and possibly soft-float library 639support. 640.DFLTn 641. 642.It Sy MKSTATICLIB 643.YorN 644Indicates whether the normal static libraries 645.Sy ( lib*_g.a ) 646will be built and installed. 647.DFLTy 648. 649.It Sy MKSTRIPIDENT 650.YorN 651Indicates whether program binaries and shared libraries should be built 652to include RCS IDs for use with 653.Xr ident 1 . 654.DFLTn 655. 656.It Sy MKUNPRIVED 657.YorN 658Indicates whether an unprivileged install will occur. 659The user, group, permissions, and file flags, will not be set on 660the installed item; instead the information will be appended to 661a file called 662.Pa METALOG 663in 664.Sy DESTDIR . 665The contents of 666.Pa METALOG 667is used during the generation of the distribution tar files to ensure 668that the appropriate file ownership is stored. 669.DFLTn 670. 671.It Sy MKUPDATE 672.YorN 673Indicates whether all install operations intended to write to 674.Sy DESTDIR 675will compare file timestamps before installing, and skip the install 676phase if the destination files are up-to-date. 677This also has implications on full builds (see next subsection). 678.DFLTn 679. 680.It Sy MKX11 681.YorN 682Indicates whether X11 is built and installed 683(by descending into 684.Pa src/x11 685or 686.Pa src/external/mit/xorg 687depending on the value of 688.Sy X11FLAVOUR ) . 689.DFLTn 690.Pp 691. 692.It Sy MKYP 693.YorN 694Indicates whether the YP (NIS) infrastructure 695(libraries and support programs) is built. 696.DFLTy 697. 698.It Sy OBJMACHINE 699If defined, creates objdirs of the form 700.Pa obj. Ns Sy MACHINE , 701where 702.Sy MACHINE 703is the current architecture (as per 704.Sq "uname -m" ) . 705. 706.It Sy RELEASEDIR 707If set, specifies the directory to which a 708.Xr release 7 709layout will be written at the end of a 710.Dq make release . 711.DFLTu 712.Pp 713.Em Note : 714.Sy build.sh 715will provide a default of 716.Pa releasedir 717(in the top-level 718.Sy .OBJDIR ) 719unless run in 720.Sq expert 721mode 722. 723.It Sy TOOLDIR 724Directory to hold the host tools, once built. 725This directory should be unique to a given host system and 726.Nx 727source tree. 728(However, multiple targets may share the same 729.Sy TOOLDIR ; 730the target-dependent files have unique names.) 731If unset, a default based 732on the 733.Xr uname 1 734information of the host platform will be created in the 735.Sy .OBJDIR 736of 737.Pa src . 738.DFLTu 739. 740.It Sy USE_HESIOD 741.YorN 742Indicates whether Hesiod support is 743enabled in the various applications that support it. 744If 745.Sy MKHESIOD=no , 746.Sy USE_HESIOD 747will also be forced to 748.Dq no . 749.DFLTy 750. 751.It Sy USE_INET6 752.YorN 753Indicates whether INET6 (IPv6) support is 754enabled in the various applications that support it. 755If 756.Sy MKINET6=no , 757.Sy USE_INET6 758will also be forced to 759.Dq no . 760.DFLTy 761. 762.It Sy USE_JEMALLOC 763.YorN 764Indicates whether the 765.Em jemalloc 766allocator 767.Pq which is designed for improved performance with threaded applications 768is used instead of the 769.Em phkmalloc 770allocator 771.Pq that was the default until Nx 5.0 . 772.DFLTy 773. 774.It Sy USE_KERBEROS 775.YorN 776Indicates whether Kerberos v5 support is 777enabled in the various applications that support it. 778If 779.Sy MKKERBEROS=no , 780.Sy USE_KERBEROS 781will also be forced to 782.Dq no . 783.DFLTy 784. 785.It Sy USE_LDAP 786.YorN 787Indicates whether LDAP support is 788enabled in the various applications that support it. 789If 790.Sy MKLDAP=no , 791.Sy USE_LDAP 792will also be forced to 793.Dq no . 794.DFLTy 795. 796.It Sy USE_PAM 797.YorN 798Indicates whether 799.Xr pam 8 800support is enabled in the various applications that support it. 801If 802.Sy MKPAM=no , 803.Sy USE_PAM 804will also be forced to 805.Dq no . 806.DFLTy 807. 808.It Sy USE_SKEY 809.YorN 810Indicates whether S/key support is 811enabled in the various applications that support it. 812If 813.Sy MKSKEY=no , 814.Sy USE_SKEY 815will also be forced to 816.Dq no . 817.DFLTy 818.Pp 819This is mutually exclusive to 820.Sy USE_PAM!=no . 821. 822.It Sy USE_SSP 823.YorN 824Indicates whether GCC stack-smashing protection (SSP) support, 825which detects stack overflows and aborts the program, 826is enabled. 827This imposes some performance penalty. 828.DFLTn 829. 830.It Sy USE_YP 831.YorN 832Indicates whether YP (NIS) support is 833enabled in the various applications that support it. 834If 835.Sy MKYP=no , 836.Sy USE_YP 837will also be forced to 838.Dq no . 839.DFLTy 840. 841.It Sy USETOOLS 842Indicates whether the tools specified by 843.Sy TOOLDIR 844should be used as part of a build in progress. 845Must be set to 846.Dq yes 847if cross-compiling. 848.Bl -tag -width "never" 849.It Sy yes 850Use the tools from 851.Sy TOOLDIR . 852.It Sy no 853Do not use the tools from 854.Sy TOOLDIR , 855but refuse to build native compilation tool components that are 856version-specific for that tool. 857.It Sy never 858Do not use the tools from 859.Sy TOOLDIR , 860even when building native tool components. 861This is similar to the traditional 862.Nx 863build method, but does 864.Em not 865verify that the compilation tools in use are up-to-date enough in order 866to build the tree successfully. 867This may cause build or runtime problems when building the whole 868.Nx 869source tree. 870.El 871.DFLT 872.Dq yes 873if building all or part of a whole 874.Nx 875source tree (detected automatically); 876.Dq no 877otherwise (to preserve traditional semantics of the 878.Aq bsd.*.mk 879.Xr make 1 880include files). 881. 882.It Sy X11FLAVOUR 883Picks which X11 distribution to cross-build with 884.Nx . 885Set to either 886.Dq Xorg 887or 888.Dq XFree86 . 889Only relevant if 890.Sy MKX11!=no . 891.Pp 892.Em Default : 893.Dq Xorg 894on alpha, i386, macppc, shark and sparc64 platforms. 895.Dq XFree86 896on everything else. 897. 898.El 899. 900.Ss pkgsrc system variables 901. 902Please see the pkgsrc guide at 903.Pa http://www.netbsd.org/Documentation/pkgsrc/ 904or 905.Pa pkgsrc/doc/pkgsrc.txt 906for more variables used internally by the package system and 907.Pa ${PKGSRCDIR}/mk/defaults/mk.conf 908for package-specific examples. 909. 910.Sh FILES 911.Bl -tag -width /etc/mk.conf 912. 913.It Pa /etc/mk.conf 914This file. 915. 916.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf 917Examples for settings regarding the pkgsrc collection. 918.El 919. 920.Sh SEE ALSO 921.Xr make 1 , 922.Pa /usr/share/mk/bsd.README , 923.Pa pkgsrc/doc/pkgsrc.txt , 924.Pa http://www.netbsd.org/Documentation/pkgsrc/ 925.Sh HISTORY 926The 927.Nm 928file appeared in 929.Nx 1.2 . 930