1.\" Copyright (c) 2000 2.\" Mike W. Meyer 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd June 16, 2011 28.Dt MAKE.CONF 5 29.Os 30.Sh NAME 31.Nm make.conf 32.Nd system build information 33.Sh DESCRIPTION 34The file 35.Nm 36contains system-wide settings that will apply to every build using 37.Xr make 1 38and the standard 39.Pa sys.mk 40file. 41This is achieved as follows: 42.Xr make 1 43processes the system makefile 44.Pa sys.mk 45before any other file by default, and 46.Pa sys.mk 47includes 48.Nm . 49.Pp 50The file 51.Nm 52uses the standard makefile syntax. 53However, 54.Nm 55should not specify any dependencies to 56.Xr make 1 . 57Instead, 58.Nm 59is to set 60.Xr make 1 61variables that control the actions of other makefiles. 62.Pp 63The default location of 64.Nm 65is 66.Pa /etc/make.conf , 67though an alternative location can be specified in the 68.Xr make 1 69variable 70.Va __MAKE_CONF . 71You may need to override the location of 72.Nm 73if the system-wide settings are not suitable for a particular build. 74For instance, setting 75.Va __MAKE_CONF 76to 77.Pa /dev/null 78effectively resets all build controls to their defaults. 79.Pp 80The primary purpose of 81.Nm 82is to control the compilation of the 83.Fx 84sources, documentation, and ported applications, 85which are usually found in 86.Pa /usr/src , 87.Pa /usr/doc , 88and 89.Pa /usr/ports . 90As a rule, the system administrator creates 91.Nm 92when the values of certain control variables need to be changed 93from their defaults. 94.Pp 95The system build procedures occur in four broad areas: 96the world, the kernel, documentation and ports. 97Variables set in 98.Nm 99may be applicable in one, two, or all four of these areas. 100In addition, control variables can be specified 101for a particular build via the 102.Fl D 103option of 104.Xr make 1 105or in 106.Xr environ 7 . 107.Pp 108The following lists provide a name and short description for each 109variable you can use during the indicated builds. 110The values of 111variables flagged as 112.Vt bool 113are ignored; the variable being 114set at all (even to 115.Dq Li FALSE 116or 117.Dq Li NO ) 118causes it to 119be treated as if it were set. 120.Pp 121The following list provides a name and short description for variables 122that are used for all builds, or are used by the 123.Pa makefiles 124for things other than builds. 125.Bl -tag -width Ar 126.It Va ALWAYS_CHECK_MAKE 127.Pq Vt bool 128Instructs the top-level makefile in the source tree (normally 129.Pa /usr/src ) 130to always check if 131.Xr make 1 132is up-to-date. 133Normally this is only done for the world and buildworld targets to handle 134upgrades from older versions of 135.Fx . 136.It Va CFLAGS 137.Pq Vt str 138Controls the compiler setting when compiling C code. 139Optimization levels other than 140.Fl O 141and 142.Fl O2 143are not supported. 144.Va BDECFLAGS 145is provided as a set of 146.Xr gcc 1 147settings suggested by 148.An "Bruce Evans" Aq bde@FreeBSD.org 149for developing and testing changes. 150They can be used, if set, by: 151.Bd -literal -offset indent 152CFLAGS+=${BDECFLAGS} 153.Ed 154.It Va CPUTYPE 155.Pq Vt str 156Controls which processor should be targeted for generated 157code. 158This controls processor-specific optimizations in 159certain code (currently only OpenSSL) as well as modifying 160the value of 161.Va CFLAGS 162and 163.Va COPTFLAGS 164to contain the appropriate optimization directive to 165.Xr gcc 1 . 166The automatic setting of 167.Va CFLAGS 168and 169.Va COPTFLAGS 170may be overridden using the 171.Va NO_CPU_CFLAGS 172and 173.Va NO_CPU_COPTFLAGS 174variables, respectively. 175Refer to 176.Pa /usr/share/examples/etc/make.conf 177for a list of recognized 178.Va CPUTYPE 179options. 180.It Va CVS_UPDATE 181.Pq Vt bool 182Set this to use 183.Xr cvs 1 184to update your 185.Pa src , ports 186and 187.Pa doc 188trees with 189.Dq Li "make update" . 190.It Va CXXFLAGS 191.Pq Vt str 192Controls the compiler settings when compiling C++ code. 193.Va CXXFLAGS 194is initially set to the value of 195.Va CFLAGS . 196If you want to 197add to the 198.Va CXXFLAGS 199value, use 200.Dq Li += 201instead of 202.Dq Li = . 203.It Va DOCSUPFILE 204.Pq Vt str 205The documentation 206.Ar supfile 207to use when doing a 208.Dq Li "make update" . 209For example, 210.Pa /usr/share/examples/cvsup/doc-supfile . 211.It Va INSTALL 212.Pq Vt str 213the default install command. 214To install only files for which the target differs or does not exist, use 215.Bd -literal -offset indent 216INSTALL="install -C" 217.Ed 218Note that some makefiles (including those in 219.Pa /usr/share/mk ) 220may hardcode options for the supplied install command. 221.It Va LOCAL_DIRS 222.Pq Vt str 223List any directories that should be entered when doing 224make's in 225.Pa /usr/src 226in this variable. 227.It Va MAKE_SHELL 228.Pq Vt str 229Controls the shell used internally by 230.Xr make 1 231to process the command scripts in makefiles. 232.Xr sh 1 , 233.Xr ksh 1 , 234and 235.Xr csh 1 236all currently supported. 237.Pp 238.Dl "MAKE_SHELL?=sh" 239.It Va MTREE_FOLLOWS_SYMLINKS 240.Pq Vt str 241Set this to 242.Dq Fl L 243to cause 244.Xr mtree 8 245to follow symlinks. 246.It Va NO_CPU_CFLAGS 247.Pq Vt str 248Setting this variable will prevent CPU specific compiler flags 249from being automatically added to 250.Va CFLAGS 251during compile time. 252.It Va NO_CPU_COPTFLAGS 253.Pq Vt str 254Setting this variable will prevent CPU specific compiler flags 255from being automatically added to 256.Va COPTFLAGS 257during compile time. 258.It Va NO_DOCUPDATE 259.Pq Vt bool 260Set this to not update the doc tree during 261.Dq Li "make update" . 262.It Va NO_PORTSUPDATE 263.Pq Vt bool 264Set this to not update the ports tree during 265.Dq Li "make update" . 266.It Va NO_WWWUPDATE 267.Pq Vt bool 268Set this to not update the www tree during 269.Dq Li "make update" . 270.It Va PORTSSUPFILE 271.Pq Vt str 272The ports 273.Ar supfile 274to use when doing a 275.Dq Li "make update" . 276For example, 277.Pa /usr/share/examples/cvsup/ports-supfile . 278.It Va SUP 279.Pq Vt str 280The location of the 281.Xr csup 1 282or 283.Xr cvsup 1 284command for 285.Dq Li "make update" . 286.It Va SUPFILE 287.Pq Vt str 288The first 289.Ar supfile 290to use when doing a 291.Dq Li "make update" . 292For example, 293.Pa /usr/share/examples/cvsup/standard-supfile . 294.It Va SUPFILE1 295.Pq Vt str 296The second 297.Ar supfile 298to use when doing a 299.Dq Li "make update" . 300.It Va SUPFILE2 301.Pq Vt str 302The third 303.Ar supfile 304to use when doing a 305.Dq Li "make update" . 306.It Va SUPFLAGS 307.Pq Vt str 308The flag for the 309.Xr sup 1 310command when doing 311.Dq Li "make update" . 312This defaults to 313.Op Fl g L Ar 2 . 314.It Va SUPHOST 315.Pq Vt str 316The hostname of the sup server to use when doing 317.Dq Li "make update" . 318.It Va SUP_UPDATE 319.Pq Vt bool 320Set this to use 321.Xr cvsup 1 322to update your 323.Pa src , ports , doc 324and 325.Pa www 326trees with 327.Dq Li "make update" . 328.It Va SVN_UPDATE 329.Pq Vt bool 330Set this to use 331.Xr svn 1 332to update your 333.Pa src 334tree with 335.Dq Li "make update" . 336.It Va WWWSUPFILE 337.Pq Vt str 338The www 339.Ar supfile 340to use when doing a 341.Dq Li "make update" . 342For example, 343.Pa /usr/share/examples/cvsup/www-supfile . 344.El 345.Ss "BUILDING THE KERNEL" 346The following list provides a name and short description for variables 347that are only used doing a kernel build: 348.Bl -tag -width Ar 349.It Va BOOTWAIT 350.Pq Vt int 351Controls the amount of time the kernel waits for a console keypress 352before booting the default kernel. 353The value is approximately milliseconds. 354Keypresses are accepted by the BIOS before booting from disk, 355making it possible to give custom boot parameters even when this is 356set to 0. 357.It Va COPTFLAGS 358.Pq Vt str 359Controls the compiler settings when building the 360kernel. 361Optimization levels above 362.Oo Fl O ( O2 , No ...\& ) Oc 363are not guaranteed to work. 364.It Va KERNCONF 365.Pq Vt str 366Controls which kernel configurations will be 367built by 368.Dq Li "${MAKE} buildkernel" 369and installed by 370.Dq Li "${MAKE} installkernel" . 371For example, 372.Bd -literal -offset indent 373KERNCONF=MINE DEBUG GENERIC OTHERMACHINE 374.Ed 375.Pp 376will build the kernels specified by the config files 377.Pa MINE , DEBUG , GENERIC , 378and 379.Pa OTHERMACHINE , 380and install the kernel specified by the config file 381.Pa MINE . 382It defaults to 383.Pa GENERIC . 384.It Va MODULES_OVERRIDE 385.Pq Vt str 386Set to a list of modules to build instead of all of them. 387.It Va NO_KERNELCLEAN 388.Pq Vt bool 389Set this to skip running 390.Dq Li "${MAKE} clean" 391during 392.Dq Li "${MAKE} buildkernel" . 393.It Va NO_KERNELCONFIG 394.Pq Vt bool 395Set this to skip running 396.Xr config 8 397during 398.Dq Li "${MAKE} buildkernel" . 399.It Va NO_KERNELDEPEND 400.Pq Vt bool 401Set this to skip running 402.Dq Li "${MAKE} depend" 403during 404.Dq Li "${MAKE} buildkernel" . 405.It Va NO_KERNELOBJ 406.Pq Vt bool 407Set this to skip running 408.Dq Li "${MAKE} obj" 409during 410.Dq Li "${MAKE} buildkernel" . 411.It Va NO_MODULES 412.Pq Vt bool 413Set to not build modules with the kernel. 414.It Va PORTS_MODULES 415Set this to the list of ports you wish to rebuild every time the kernel 416is built. 417.It Va WITHOUT_MODULES 418.Pq Vt str 419Set to a list of modules to exclude from the build. 420This provides a 421somewhat easier way to exclude modules you are certain you will never 422need than specifying 423.Va MODULES_OVERRIDE . 424This is applied 425.Em after 426.Va MODULES_OVERRIDE . 427.El 428.Ss "BUILDING THE WORLD" 429The following list provides a name and short description for variables 430that are used during the world build: 431.Bl -tag -width Ar 432.It Va BOOT_COMCONSOLE_PORT 433.Pq Vt str 434The port address to use for the console if the boot blocks have 435been configured to use a serial console instead of the keyboard/video card. 436.It Va BOOT_COMCONSOLE_SPEED 437.Pq Vt int 438The baud rate to use for the console if the boot blocks have 439been configured to use a serial console instead of the keyboard/video card. 440.It Va BOOT_PXELDR_ALWAYS_SERIAL 441.Pq Vt bool 442Compile in the code into 443.Xr pxeboot 8 444that forces the use of a serial console. 445This is analogous to the 446.Fl h 447option in 448.Xr boot 8 449blocks. 450.It Va BOOT_PXELDR_PROBE_KEYBOARD 451.Pq Vt bool 452Compile in the code into 453.Xr pxeboot 8 454that probes the keyboard. 455If no keyboard is found, boot with the dual console configuration. 456This is analogous to the 457.Fl D 458option in 459.Xr boot 8 460blocks. 461.It Va ENABLE_SUID_K5SU 462.Pq Vt bool 463Set this if you wish to use the ksu utility. 464Otherwise, it will be 465installed without the set-user-ID bit set. 466.It Va ENABLE_SUID_NEWGRP 467.Pq Vt bool 468Set this to install 469.Xr newgrp 1 470with the set-user-ID bit set. 471Otherwise, 472.Xr newgrp 1 473will not be able to change users' groups. 474.It Va ENABLE_SUID_SSH 475.Pq Vt bool 476Set this to install 477.Xr ssh 1 478with the set-user-ID bit turned on. 479.It Va LOADER_TFTP_SUPPORT 480.Pq Vt bool 481By default the 482.Xr pxeboot 8 483loader retrieves the kernel via NFS. 484Defining this and recompiling 485.Pa /usr/src/sys/boot 486will cause it to retrieve the kernel via TFTP. 487This allows 488.Xr pxeboot 8 489to load a custom BOOTP diskless kernel yet 490still mount the server's 491.Pa / 492rather than load the server's kernel. 493.It Va LOADER_FIREWIRE_SUPPORT 494.Pq Vt bool 495Defining this and recompiling 496.Pa /usr/src/sys/boot/i386 497will add 498.Xr dcons 4 499console driver to 500.Xr loader 8 501and allow access over FireWire(IEEE1394) using 502.Xr dconschat 8 . 503Currently, only i386 and amd64 are supported. 504.It Va MALLOC_PRODUCTION 505.Pq Vt bool 506Set this to disable assertions and statistics gathering in 507.Xr malloc 3 . 508It also defaults the A and J runtime options to off. 509Disabled by default on -CURRENT. 510.It Va MODULES_WITH_WORLD 511.Pq Vt bool 512Set to build modules with the system instead of the kernel. 513.It Va NO_CLEAN 514.Pq Vt bool 515Set this to disable cleaning during 516.Dq Li "make buildworld" . 517This should not be set unless you know what you are doing. 518.It Va NO_CLEANDIR 519.Pq Vt bool 520Set this to run 521.Dq Li "${MAKE} clean" 522instead of 523.Dq Li "${MAKE} cleandir" . 524.It Va NO_MANCOMPRESS 525.Pq Vt bool 526Set to install manual pages uncompressed. 527.It Va NO_SHARE 528.Pq Vt bool 529Set to not build in the 530.Pa share 531subdir. 532.It Va NO_SHARED 533.Pq Vt bool 534Set to build 535.Pa /bin 536and 537.Pa /sbin 538statically linked, this can be bad. 539If set, every utility that uses 540.Pa bsd.prog.mk 541will be linked statically. 542.It Va PPP_NO_NAT 543.Pq Vt bool 544Build 545.Xr ppp 8 546without support for network address translation (NAT). 547.It Va PPP_NO_NETGRAPH 548.Pq Vt bool 549Set to build 550.Xr ppp 8 551without support for Netgraph. 552.It Va PPP_NO_RADIUS 553.Pq Vt bool 554Set to build 555.Xr ppp 8 556without support for RADIUS. 557.It Va PPP_NO_SUID 558.Pq Vt bool 559Set to disable the installation of 560.Xr ppp 8 561as a set-user-ID root program. 562.It Va SENDMAIL_ADDITIONAL_MC 563.Pq Vt str 564Additional 565.Pa .mc 566files which should be built into 567.Pa .cf 568files at build time. 569The value should include the full path to the 570.Pa .mc 571file(s), e.g., 572.Pa /etc/mail/foo.mc 573.Pa /etc/mail/bar.mc . 574.It Va SENDMAIL_ALIASES 575.Pq Vt str 576List of 577.Xr aliases 5 578files to rebuild when using 579.Pa /etc/mail/Makefile . 580The default value is 581.Pa /etc/mail/aliases . 582.It Va SENDMAIL_CFLAGS 583.Pq Vt str 584Flags to pass to the compile command when building 585.Xr sendmail 8 . 586The 587.Va SENDMAIL_* 588flags can be used to provide SASL support with setting such as: 589.Bd -literal -offset indent 590SENDMAIL_CFLAGS=-I/usr/local/include -DSASL 591SENDMAIL_LDFLAGS=-L/usr/local/lib 592SENDMAIL_LDADD=-lsasl 593.Ed 594.It Va SENDMAIL_CF_DIR 595.Pq Vt str 596Override the default location for the 597.Xr m4 1 598configuration files used to build a 599.Pa .cf 600file from a 601.Pa .mc 602file. 603.It Va SENDMAIL_DPADD 604.Pq Vt str 605Extra dependencies to add when building 606.Xr sendmail 8 . 607.It Va SENDMAIL_LDADD 608.Pq Vt str 609Flags to add to the end of the 610.Xr ld 1 611command when building 612.Xr sendmail 8 . 613.It Va SENDMAIL_LDFLAGS 614.Pq Vt str 615Flags to pass to the 616.Xr ld 1 617command when building 618.Xr sendmail 8 . 619.It Va SENDMAIL_M4_FLAGS 620.Pq Vt str 621Flags passed to 622.Xr m4 1 623when building a 624.Pa .cf 625file from a 626.Pa .mc 627file. 628.It Va SENDMAIL_MAP_PERMS 629.Pq Vt str 630Mode to use when generating alias and map database files using 631.Pa /etc/mail/Makefile . 632The default value is 0640. 633.It Va SENDMAIL_MAP_SRC 634.Pq Vt str 635Additional maps to rebuild when using 636.Pa /etc/mail/Makefile . 637The 638.Pa access , 639.Pa bitdomain , 640.Pa domaintable , 641.Pa genericstable , 642.Pa mailertable , 643.Pa uucpdomain , 644and 645.Pa virtusertable 646maps are always rebuilt if they exist. 647.It Va SENDMAIL_MAP_TYPE 648.Pq Vt str 649Database map type to use when generating map database files using 650.Pa /etc/mail/Makefile . 651The default value is hash. 652The alternative is btree. 653.It Va SENDMAIL_MC 654.Pq Vt str 655The default 656.Xr m4 1 657configuration file to use at install time. 658The value should include the full path to the 659.Pa .mc 660file, e.g., 661.Pa /etc/mail/myconfig.mc . 662Use with caution as a make install will overwrite any existing 663.Pa /etc/mail/sendmail.cf . 664Note that 665.Va SENDMAIL_CF 666is now deprecated. 667.It Va SENDMAIL_SET_USER_ID 668.Pq Vt bool 669If set, install 670.Xr sendmail 8 671as a set-user-ID root binary instead of a set-group-ID binary 672and do not install 673.Pa /etc/mail/submit.{cf,mc} . 674Use of this flag is not recommended and the alternative advice in 675.Pa /etc/mail/README 676should be followed instead if at all possible. 677.It Va SENDMAIL_START_SCRIPT 678.Pq Vt str 679The script used by 680.Pa /etc/mail/Makefile 681to start, stop, and restart 682.Xr sendmail 8 . 683The default value is 684.Pa /etc/rc.sendmail . 685This value should match the 686.Dq Li mta_start_script 687setting in 688.Xr rc.conf 5 . 689.It Va SENDMAIL_SUBMIT_MC 690.Pq Vt str 691The default 692.Xr m4 1 693configuration file for mail submission 694to use at install time. 695The value should include the full path to the 696.Pa .mc 697file, e.g., 698.Pa /etc/mail/mysubmit.mc . 699Use with caution as a make install will overwrite any existing 700.Pa /etc/mail/submit.cf . 701.It Va TOP_TABLE_SIZE 702.Pq Vt int 703.Xr top 1 704uses a hash table for the user names. 705The size of this hash can be tuned to match the number of local users. 706The table size should be a prime number 707approximately twice as large as the number of lines in 708.Pa /etc/passwd . 709The default number is 20011. 710.It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE 711.Pq Vt int 712Causes the system compiler to be built such that it forces high optimization 713levels to a lower one. 714.Xr gcc 1 715.Fl O2 716and above is known to trigger known optimizer bugs at various 717times. 718The value assigned is the highest optimization value used. 719.El 720.Ss "BUILDING DOCUMENTATION" 721The following list provides a name and short description for variables 722that are used when building documentation. 723.Bl -tag -width ".Va PRINTERDEVICE" 724.It Va DISTDIR 725.Pq Vt str 726Where distfiles are kept. 727Normally, this is 728.Pa distfiles 729in 730.Va PORTSDIR . 731.It Va DOC_LANG 732.Pq Vt str 733The list of languages and encodings to build and install. 734.It Va PRINTERDEVICE 735.Pq Vt str 736The default format for system documentation, depends on your 737printer. 738This can be set to 739.Dq Li ascii 740for simple printers, or 741.Dq Li ps 742for postscript or graphics printers with a ghostscript 743filter, or both. 744.El 745.Sh FILES 746.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 747.It Pa /etc/make.conf 748.It Pa /usr/doc/Makefile 749.It Pa /usr/ports/Makefile 750.It Pa /usr/share/examples/etc/make.conf 751.It Pa /usr/share/mk/sys.mk 752.It Pa /usr/src/Makefile 753.It Pa /usr/src/Makefile.inc1 754.El 755.Sh SEE ALSO 756.Xr gcc 1 , 757.Xr install 1 , 758.Xr make 1 , 759.Xr src.conf 5 , 760.Xr environ 7 , 761.Xr ports 7 , 762.Xr sendmail 8 763.Sh HISTORY 764The 765.Nm 766file appeared sometime before 767.Fx 4.0 . 768.Sh AUTHORS 769This 770manual page was written by 771.An Mike W. Meyer Aq mwm@mired.org . 772.Sh CAVEATS 773Note, that 774.Ev MAKEOBJDIRPREFIX 775and 776.Ev MAKEOBJDIR 777are environment variables and should not be set in 778.Nm 779but in make's environment. 780.Sh BUGS 781This manual page may occasionally be out of date with respect to 782the options currently available for use in 783.Nm . 784Please check the 785.Pa /usr/share/examples/etc/make.conf 786file for the latest options which are available. 787