1.\" $NetBSD: mk.conf.5,v 1.59 2012/03/11 23:42:06 njoly 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 6, 2011 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 MKBINUTILS 228.YorN 229Indicates whether any of the binutils tools or libraries should be built. 230That is, the libraries 231.Sy libbfd , 232.Sy libiberty , 233or any of the things that depend upon them, e.g. 234.Xr as 1 , 235.Xr ld 1 , 236.Xr dbsym 8 , 237or 238.Xr mdsetimage 8 . 239.DFLTy 240. 241.It Sy MKCATPAGES 242.YorN 243Indicates whether preformatted plaintext manual pages will be created 244and installed. 245.DFLTy 246. 247.It Sy MKCOMPLEX 248.YorN 249Indicates whether the 250.Lb libm 251is compiled with support for 252.In complex.h . 253.DFLTy 254. 255.It Sy MKCRYPTO 256.YorN 257Indicates whether cryptographic code will be included in a build; 258provided for the benefit of countries that do not allow strong 259cryptography. 260Will not affect use of the standard low-security password encryption system, 261.Xr crypt 3 . 262.DFLTy 263.Pp 264If 265.Dq no , 266acts as 267.Sy MKKERBEROS=no . 268. 269.It Sy MKCRYPTO_IDEA 270.YorN 271Indicates whether IDEA support will be built into 272.Sy libcrypto_idea.a . 273.DFLTn 274. 275.It Sy MKCRYPTO_MDC2 276.YorN 277Indicates whether MDC2 support will be built into 278.Sy libcrypto_mdc2.a . 279.DFLTn 280. 281.It Sy MKCRYPTO_RC5 282.YorN 283Indicates whether RC5 support will be built into 284.Sy libcrypto_rc5.a . 285.DFLTn 286. 287.It Sy MKCVS 288.YorN 289Indicates whether 290.Xr cvs 1 291is built. 292.DFLTy 293. 294.It Sy MKDEBUG 295.YorN 296Indicates whether separate debugging symbols should be installed into 297.Sy DESTDIR Ns Pa /usr/libdata/debug . 298.DFLTn 299. 300.It Sy MKDEBUGLIB 301.YorN 302Indicates whether debug libraries 303.Sy ( lib*_g.a ) 304will be built and installed. 305Debug libraries are compiled with 306.Dq Li -g -DDEBUG . 307.DFLTn 308. 309.It Sy MKDOC 310.YorN 311Indicates whether system documentation destined for 312.Sy DESTDIR Ns Pa /usr/share/doc 313will be installed. 314.DFLTy 315. 316.It Sy MKDYNAMICROOT 317.YorN 318Indicates whether all programs should be dynamically linked, 319and to install shared libraries required by 320.Pa /bin 321and 322.Pa /sbin 323and the shared linker 324.Xr ld.elf_so 1 325into 326.Pa /lib . 327If 328.Sq no , 329link programs in 330.Pa /bin 331and 332.Pa /sbin 333statically. 334.DFLTy 335. 336.It Sy MKGCC 337.YorN 338Indicates whether 339.Xr gcc 1 340or any related libraries 341.Pq Sy libg2c , libgcc , libobjc , libstdc++ 342are built. 343.DFLTy 344. 345.It Sy MKGCCCMDS 346.YorN 347Indicates whether 348.Xr gcc 1 349is built. 350If 351.Dq no , 352then 353.Sy MKGCC 354controls if the 355GCC libraries are built. 356.DFLTy 357. 358.It Sy MKGDB 359.YorN 360Indicates whether 361.Xr gdb 1 362is built. 363.DFLTy 364. 365.It Sy MKHESIOD 366.YorN 367Indicates whether the Hesiod infrastructure 368(libraries and support programs) is built and installed. 369.DFLTy 370. 371.It Sy MKHOSTOBJ 372.YorN 373If set to 374.Dq yes , 375then for programs intended to be run on the compile host, 376the name, release, and architecture of the host operating system 377will be suffixed to the name of the object directory created by 378.Dq make obj . 379(This allows multiple host systems to compile 380.Nx 381for a single target.) 382If set to 383.Dq no , 384then programs built to be run on the compile host will use the same 385object directory names as programs built to be run on the target. 386.DFLTn 387. 388.It Sy MKHTML 389.YorN 390Indicates whether the HTML manual pages are created and installed. 391.DFLTy 392. 393.It Sy MKIEEEFP 394.YorN 395Indicates whether code for IEEE754/IEC60559 conformance is built. 396Has no effect on most platforms. 397.DFLTy 398. 399.It Sy MKINET6 400Indicates whether INET6 (IPv6) infrastructure 401(libraries and support programs) is built and installed. 402.DFLTy 403. 404.It Sy MKINFO 405.YorN 406Indicates whether GNU Info files, used for the documentation for 407most of the compilation tools, will be built and installed. 408.DFLTy 409. 410.It Sy MKIPFILTER 411.YorN 412Indicates whether the 413.Xr ipf 4 414programs, headers and other components will be built and installed. 415.DFLTy 416. 417.It Sy MKISCSI 418.YorN 419Indicates whether the iSCSI library and applications are 420built and installed. 421.DFLTy 422. 423.It Sy MKKERBEROS 424.YorN 425Indicates whether the Kerberos v5 infrastructure 426(libraries and support programs) is built and installed. 427Caution: the default 428.Xr pam 8 429configuration requires that Kerberos be present even if not used. 430Do not install a userland without Kerberos without also either 431updating the 432.Xr pam.conf 5 433files or disabling PAM via 434.Sy MKPAM . 435Otherwise all logins will fail. 436.DFLTy 437. 438.It Sy MKKMOD 439.YorN 440Indicates whether kernel modules are built and installed. 441.DFLTy 442. 443.It Sy MKLDAP 444.YorN 445Indicates whether the Lightweight Directory Access Protocol (LDAP) 446infrastructure 447(libraries and support programs) is built and installed. 448.DFLTy 449. 450.It Sy MKLINKLIB 451.YorN 452Indicates whether all of the shared library infrastructure is built. 453If 454.Sq no , 455prevents: 456installation of the 457.Sy *.a 458libraries, 459installation of the 460.Sy *_pic.a 461libraries on PIC systems, 462building of 463.Sy *.a 464libraries on PIC systems, 465or 466installation of 467.Sy .so 468symlinks on ELF systems. 469.DFLTy 470.Pp 471If 472.Dq no , 473acts as 474.Sy MKPICINSTALL=no MKPROFILE=no . 475. 476.It Sy MKLINT 477.YorN 478Indicates whether 479.Xr lint 1 480will be run against portions of the 481.Nx 482source code during the build, and whether lint libraries will be 483installed into 484.Sy DESTDIR Ns Pa /usr/libdata/lint . 485.DFLTy 486. 487.It Sy MKMAN 488.YorN 489Indicates whether manual pages will be installed. 490.DFLTy 491.Pp 492If 493.Dq no , 494acts as 495.Sy MKCATPAGES=no MKHTML=no . 496. 497.It Sy MKMANZ 498.YorN 499Indicates whether manual pages should be compressed with 500.Xr gzip 1 501at installation time. 502.DFLTn 503. 504.It Sy MKMDNS 505.YorN 506Indicates whether the mDNS (Multicast DNS) infrastructure 507(libraries and support programs) is built and installed. 508.DFLTy 509. 510.It Sy MKNLS 511.YorN 512Indicates whether Native Language System (NLS) locale zone files will be 513built and installed. 514.DFLTy 515. 516.It Sy MKOBJ 517.YorN 518Indicates whether object directories will be created when running 519.Dq make obj . 520If set to 521.Dq no , 522then all built files will be located inside the regular source tree. 523.DFLTy 524.Pp 525If 526.Dq no , 527acts as 528.Sy MKOBJDIRS=no . 529. 530.It Sy MKOBJDIRS 531.YorN 532Indicates whether object directories will be created automatically 533(via a 534.Dq make obj 535pass) at the start of a build. 536.DFLTn 537. 538.It Sy MKPAM 539.YorN 540Indicates whether the 541.Xr pam 8 542framework (libraries and support files) is built. 543The pre-PAM code is not supported and may be removed in the future. 544.DFLTy 545. 546.It Sy MKPCC 547.YorN 548Indicates whether 549.Xr pcc 1 550or any related libraries 551.Pq Sy libpcc , libpccsoftfloat 552are built. 553.DFLTn 554. 555.It Sy MKPF 556.YorN 557Indicates whether the 558.Xr pf 4 559programs, headers and LKM will be built and installed. 560.DFLTy 561. 562.It Sy MKPIC 563.YorN 564Indicates whether shared objects and libraries will be created and 565installed. 566If set to 567.Dq no , 568the entire built system will be statically linked. 569.DFLT 570Platform dependent. 571As of this writing, all platforms except 572.Sy m68000 573and 574.Sy sh3 575default to 576.Dq yes . 577.Pp 578If 579.Dq no , 580acts as 581.Sy MKPICLIB=no . 582. 583.It Sy MKPICINSTALL 584.YorN 585Indicates whether the 586.Xr ar 1 587format libraries 588.Sy ( lib*_pic.a ) , 589used to generate shared libraries, are installed. 590.DFLTy 591. 592.It Sy MKPICLIB 593.YorN 594Indicates whether the 595.Xr ar 1 596format libraries 597.Sy ( lib*_pic.a ) , 598used to generate shared libraries. 599.DFLTy 600. 601.It Sy MKPIE 602Indicates whether Position Independent Executables (PIE) 603are built and installed. 604.DFLTn 605. 606.It Sy MKPOSTFIX 607.YorN 608Indicates whether Postfix is built. 609.DFLTy 610. 611.It Sy MKPROFILE 612.YorN 613Indicates whether profiled libraries 614.Sy ( lib*_p.a ) 615will be built and installed. 616.DFLT 617.Dq yes ; 618however, some platforms turn off 619.Sy MKPROFILE 620by default at times due to toolchain problems with profiled code. 621. 622.It Sy MKSHARE 623.YorN 624Indicates whether files destined to reside in 625.Sy DESTDIR Ns Pa /usr/share 626will be built and installed. 627.DFLTy 628.Pp 629If 630.Dq no , 631acts as 632.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no . 633. 634.It Sy MKSKEY 635.YorN 636Indicates whether the S/key infrastructure 637(libraries and support programs) is built. 638.DFLTy 639. 640.It Sy MKSOFTFLOAT 641.YorN 642Indicates whether the compiler generates output containing 643library calls for floating point and possibly soft-float library 644support. 645.DFLTn 646. 647.It Sy MKSTATICLIB 648.YorN 649Indicates whether the normal static libraries 650.Sy ( lib*_g.a ) 651will be built and installed. 652.DFLTy 653. 654.It Sy MKSTRIPIDENT 655.YorN 656Indicates whether program binaries and shared libraries should be built 657to include RCS IDs for use with 658.Xr ident 1 . 659.DFLTn 660. 661.It Sy MKUNPRIVED 662.YorN 663Indicates whether an unprivileged install will occur. 664The user, group, permissions, and file flags, will not be set on 665the installed item; instead the information will be appended to 666a file called 667.Pa METALOG 668in 669.Sy DESTDIR . 670The contents of 671.Pa METALOG 672is used during the generation of the distribution tar files to ensure 673that the appropriate file ownership is stored. 674.DFLTn 675. 676.It Sy MKUPDATE 677.YorN 678Indicates whether all install operations intended to write to 679.Sy DESTDIR 680will compare file timestamps before installing, and skip the install 681phase if the destination files are up-to-date. 682This also has implications on full builds (see next subsection). 683.DFLTn 684. 685.It Sy MKX11 686.YorN 687Indicates whether X11 is built and installed 688(by descending into 689.Pa src/x11 690or 691.Pa src/external/mit/xorg 692depending on the value of 693.Sy X11FLAVOUR ) . 694.DFLTn 695.Pp 696. 697.It Sy MKYP 698.YorN 699Indicates whether the YP (NIS) infrastructure 700(libraries and support programs) is built. 701.DFLTy 702. 703.It Sy OBJMACHINE 704If defined, creates objdirs of the form 705.Pa obj. Ns Sy MACHINE , 706where 707.Sy MACHINE 708is the current architecture (as per 709.Sq "uname -m" ) . 710. 711.It Sy RELEASEDIR 712If set, specifies the directory to which a 713.Xr release 7 714layout will be written at the end of a 715.Dq make release . 716.DFLTu 717.Pp 718.Em Note : 719.Sy build.sh 720will provide a default of 721.Pa releasedir 722(in the top-level 723.Sy .OBJDIR ) 724unless run in 725.Sq expert 726mode 727. 728.It Sy TOOLDIR 729Directory to hold the host tools, once built. 730This directory should be unique to a given host system and 731.Nx 732source tree. 733(However, multiple targets may share the same 734.Sy TOOLDIR ; 735the target-dependent files have unique names.) 736If unset, a default based 737on the 738.Xr uname 1 739information of the host platform will be created in the 740.Sy .OBJDIR 741of 742.Pa src . 743.DFLTu 744. 745.It Sy USE_FORT 746Indicates whether the so-called 747.Dq FORTIFY_SOURCE 748.Xr security 7 749extensions are enabled; see 750.Xr ssp 3 751for details. 752This imposes some performance penalty. 753.DFLTn 754. 755.It Sy USE_HESIOD 756.YorN 757Indicates whether Hesiod support is 758enabled in the various applications that support it. 759If 760.Sy MKHESIOD=no , 761.Sy USE_HESIOD 762will also be forced to 763.Dq no . 764.DFLTy 765. 766.It Sy USE_INET6 767.YorN 768Indicates whether INET6 (IPv6) support is 769enabled in the various applications that support it. 770If 771.Sy MKINET6=no , 772.Sy USE_INET6 773will also be forced to 774.Dq no . 775.DFLTy 776. 777.It Sy USE_JEMALLOC 778.YorN 779Indicates whether the 780.Em jemalloc 781allocator 782.Pq which is designed for improved performance with threaded applications 783is used instead of the 784.Em phkmalloc 785allocator 786.Pq that was the default until Nx 5.0 . 787.DFLTy 788. 789.It Sy USE_KERBEROS 790.YorN 791Indicates whether Kerberos v5 support is 792enabled in the various applications that support it. 793If 794.Sy MKKERBEROS=no , 795.Sy USE_KERBEROS 796will also be forced to 797.Dq no . 798.DFLTy 799. 800.It Sy USE_LDAP 801.YorN 802Indicates whether LDAP support is 803enabled in the various applications that support it. 804If 805.Sy MKLDAP=no , 806.Sy USE_LDAP 807will also be forced to 808.Dq no . 809.DFLTy 810. 811.It Sy USE_PAM 812.YorN 813Indicates whether 814.Xr pam 8 815support is enabled in the various applications that support it. 816If 817.Sy MKPAM=no , 818.Sy USE_PAM 819will also be forced to 820.Dq no . 821.DFLTy 822. 823.It Sy USE_SKEY 824.YorN 825Indicates whether S/key support is 826enabled in the various applications that support it. 827If 828.Sy MKSKEY=no , 829.Sy USE_SKEY 830will also be forced to 831.Dq no . 832.DFLTy 833.Pp 834This is mutually exclusive to 835.Sy USE_PAM!=no . 836. 837.It Sy USE_SSP 838.YorN 839Indicates whether GCC stack-smashing protection (SSP) support, 840which detects stack overflows and aborts the program, 841is enabled. 842This imposes some performance penalty. 843.DFLTn 844. 845.It Sy USE_YP 846.YorN 847Indicates whether YP (NIS) support is 848enabled in the various applications that support it. 849If 850.Sy MKYP=no , 851.Sy USE_YP 852will also be forced to 853.Dq no . 854.DFLTy 855. 856.It Sy USETOOLS 857Indicates whether the tools specified by 858.Sy TOOLDIR 859should be used as part of a build in progress. 860Must be set to 861.Dq yes 862if cross-compiling. 863.Bl -tag -width "never" 864.It Sy yes 865Use the tools from 866.Sy TOOLDIR . 867.It Sy no 868Do not use the tools from 869.Sy TOOLDIR , 870but refuse to build native compilation tool components that are 871version-specific for that tool. 872.It Sy never 873Do not use the tools from 874.Sy TOOLDIR , 875even when building native tool components. 876This is similar to the traditional 877.Nx 878build method, but does 879.Em not 880verify that the compilation tools in use are up-to-date enough in order 881to build the tree successfully. 882This may cause build or runtime problems when building the whole 883.Nx 884source tree. 885.El 886.DFLT 887.Dq yes 888if building all or part of a whole 889.Nx 890source tree (detected automatically); 891.Dq no 892otherwise (to preserve traditional semantics of the 893.Aq bsd.*.mk 894.Xr make 1 895include files). 896. 897.It Sy X11FLAVOUR 898Picks which X11 distribution to cross-build with 899.Nx . 900Set to either 901.Dq Xorg 902or 903.Dq XFree86 . 904Only relevant if 905.Sy MKX11!=no . 906.Pp 907.Em Default : 908.Dq Xorg 909on alpha, i386, macppc, shark and sparc64 platforms. 910.Dq XFree86 911on everything else. 912. 913.El 914. 915.Ss pkgsrc system variables 916. 917Please see the pkgsrc guide at 918.Lk http://www.netbsd.org/Documentation/pkgsrc/ 919or 920.Pa pkgsrc/doc/pkgsrc.txt 921for more variables used internally by the package system and 922.Pa ${PKGSRCDIR}/mk/defaults/mk.conf 923for package-specific examples. 924. 925.Sh FILES 926.Bl -tag -width /etc/mk.conf 927. 928.It Pa /etc/mk.conf 929This file. 930. 931.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf 932Examples for settings regarding the pkgsrc collection. 933.El 934. 935.Sh SEE ALSO 936.Xr make 1 , 937.Pa /usr/share/mk/bsd.README , 938.Pa pkgsrc/doc/pkgsrc.txt , 939.Lk http://www.netbsd.org/Documentation/pkgsrc/ 940.Sh HISTORY 941The 942.Nm 943file appeared in 944.Nx 1.2 . 945