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 November 12, 2015 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 cc 1 147settings suggested by 148.An Bruce Evans Aq Mt 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 cc 1 . 166The automatic setting of 167.Va CFLAGS 168may be overridden using the 169.Va NO_CPU_CFLAGS 170variable. 171Refer to 172.Pa /usr/share/examples/etc/make.conf 173for a list of recognized 174.Va CPUTYPE 175options. 176.It Va CXXFLAGS 177.Pq Vt str 178Controls the compiler settings when compiling C++ code. 179.Va CXXFLAGS 180is initially set to the value of 181.Va CFLAGS . 182If you want to 183add to the 184.Va CXXFLAGS 185value, use 186.Dq Li += 187instead of 188.Dq Li = . 189.It Va INSTALL 190.Pq Vt str 191the default install command. 192To install only files for which the target differs or does not exist, use 193.Bd -literal -offset indent 194INSTALL+= -C 195.Ed 196Note that some makefiles (including those in 197.Pa /usr/share/mk ) 198may hardcode options for the supplied install command. 199.It Va LOCAL_DIRS 200.Pq Vt str 201List any directories that should be entered when doing 202make's in 203.Pa /usr/src 204in this variable. 205.It Va MAKE_SHELL 206.Pq Vt str 207Controls the shell used internally by 208.Xr make 1 209to process the command scripts in makefiles. 210.Xr sh 1 , 211.Xr ksh 1 , 212and 213.Xr csh 1 214all currently supported. 215.Pp 216.Dl "MAKE_SHELL?=sh" 217.It Va MTREE_FOLLOWS_SYMLINKS 218.Pq Vt str 219Set this to 220.Dq Fl L 221to cause 222.Xr mtree 8 223to follow symlinks. 224.It Va NO_CPU_CFLAGS 225.Pq Vt str 226Setting this variable will prevent CPU specific compiler flags 227from being automatically added to 228.Va CFLAGS 229during compile time. 230.It Va NO_DOCUPDATE 231.Pq Vt bool 232Set this to not update the doc tree during 233.Dq Li "make update" . 234.It Va NO_PORTSUPDATE 235.Pq Vt bool 236Set this to not update the ports tree during 237.Dq Li "make update" . 238.It Va SVN_UPDATE 239.Pq Vt bool 240Set this to use 241.Xr svn 1 242to update your 243.Pa src 244tree with 245.Dq Li "make update" . 246Note that since a subversion client is not included in the base system, 247you will need to set 248.Va SVN 249to the full path of a 250.Xr svn 1 251binary. 252.El 253.Ss "BUILDING THE KERNEL" 254The following list provides a name and short description for variables 255that are only used doing a kernel build: 256.Bl -tag -width Ar 257.It Va BOOTWAIT 258.Pq Vt int 259Controls the amount of time the kernel waits for a console keypress 260before booting the default kernel. 261The value is approximately milliseconds. 262Keypresses are accepted by the BIOS before booting from disk, 263making it possible to give custom boot parameters even when this is 264set to 0. 265.It Va COPTFLAGS 266.Pq Vt str 267Controls the compiler settings when building the 268kernel. 269Optimization levels above 270.Oo Fl O ( O2 , No ...\& ) Oc 271are not guaranteed to work. 272.It Va KERNCONF 273.Pq Vt str 274Controls which kernel configurations will be 275built by 276.Dq Li "${MAKE} buildkernel" 277and installed by 278.Dq Li "${MAKE} installkernel" . 279For example, 280.Bd -literal -offset indent 281KERNCONF=MINE DEBUG GENERIC OTHERMACHINE 282.Ed 283.Pp 284will build the kernels specified by the config files 285.Pa MINE , DEBUG , GENERIC , 286and 287.Pa OTHERMACHINE , 288and install the kernel specified by the config file 289.Pa MINE . 290It defaults to 291.Pa GENERIC . 292.It Va MODULES_OVERRIDE 293.Pq Vt str 294Set to a list of modules to build instead of all of them. 295.It Va NO_KERNELCLEAN 296.Pq Vt bool 297Set this to skip running 298.Dq Li "${MAKE} clean" 299during 300.Dq Li "${MAKE} buildkernel" . 301.It Va NO_KERNELCONFIG 302.Pq Vt bool 303Set this to skip running 304.Xr config 8 305during 306.Dq Li "${MAKE} buildkernel" . 307.It Va NO_KERNELDEPEND 308.Pq Vt bool 309Set this to skip running 310.Dq Li "${MAKE} depend" 311during 312.Dq Li "${MAKE} buildkernel" . 313.It Va NO_KERNELOBJ 314.Pq Vt bool 315Set this to skip running 316.Dq Li "${MAKE} obj" 317during 318.Dq Li "${MAKE} buildkernel" . 319.It Va NO_MODULES 320.Pq Vt bool 321Set to not build modules with the kernel. 322.It Va PORTS_MODULES 323Set this to the list of ports you wish to rebuild every time the kernel 324is built. 325.It Va WITHOUT_MODULES 326.Pq Vt str 327Set to a list of modules to exclude from the build. 328This provides a 329somewhat easier way to exclude modules you are certain you will never 330need than specifying 331.Va MODULES_OVERRIDE . 332This is applied 333.Em after 334.Va MODULES_OVERRIDE . 335.El 336.Ss "BUILDING THE WORLD" 337The following list provides a name and short description for variables 338that are used during the world build: 339.Bl -tag -width Ar 340.It Va BOOT_COMCONSOLE_PORT 341.Pq Vt str 342The port address to use for the console if the boot blocks have 343been configured to use a serial console instead of the keyboard/video card. 344.It Va BOOT_COMCONSOLE_SPEED 345.Pq Vt int 346The baud rate to use for the console if the boot blocks have 347been configured to use a serial console instead of the keyboard/video card. 348.It Va BOOT_PXELDR_ALWAYS_SERIAL 349.Pq Vt bool 350Compile in the code into 351.Xr pxeboot 8 352that forces the use of a serial console. 353This is analogous to the 354.Fl h 355option in 356.Xr boot 8 357blocks. 358.It Va BOOT_PXELDR_PROBE_KEYBOARD 359.Pq Vt bool 360Compile in the code into 361.Xr pxeboot 8 362that probes the keyboard. 363If no keyboard is found, boot with the dual console configuration. 364This is analogous to the 365.Fl D 366option in 367.Xr boot 8 368blocks. 369.It Va ENABLE_SUID_K5SU 370.Pq Vt bool 371Set this if you wish to use the ksu utility. 372Otherwise, it will be 373installed without the set-user-ID bit set. 374.It Va ENABLE_SUID_NEWGRP 375.Pq Vt bool 376Set this to install 377.Xr newgrp 1 378with the set-user-ID bit set. 379Otherwise, 380.Xr newgrp 1 381will not be able to change users' groups. 382.It Va LOADER_TFTP_SUPPORT 383.Pq Vt bool 384By default the 385.Xr pxeboot 8 386loader retrieves the kernel via NFS. 387Defining this and recompiling 388.Pa /usr/src/sys/boot 389will cause it to retrieve the kernel via TFTP. 390This allows 391.Xr pxeboot 8 392to load a custom BOOTP diskless kernel yet 393still mount the server's 394.Pa / 395rather than load the server's kernel. 396.It Va LOADER_FIREWIRE_SUPPORT 397.Pq Vt bool 398Defining this and recompiling 399.Pa /usr/src/sys/boot/i386 400will add 401.Xr dcons 4 402console driver to 403.Xr loader 8 404and allow access over FireWire(IEEE1394) using 405.Xr dconschat 8 . 406Currently, only i386 and amd64 are supported. 407.It Va MALLOC_PRODUCTION 408.Pq Vt bool 409Set this to disable assertions and statistics gathering in 410.Xr malloc 3 . 411It also defaults the A and J runtime options to off. 412Disabled by default on -CURRENT. 413.It Va MODULES_WITH_WORLD 414.Pq Vt bool 415Set to build modules with the system instead of the kernel. 416.It Va NO_CLEAN 417.Pq Vt bool 418Set this to disable cleaning during 419.Dq Li "make buildworld" . 420This should not be set unless you know what you are doing. 421.It Va NO_CLEANDIR 422.Pq Vt bool 423Set this to run 424.Dq Li "${MAKE} clean" 425instead of 426.Dq Li "${MAKE} cleandir" . 427.It Va WITH_MANCOMPRESS 428.Pq Vt defined 429Set to install manual pages compressed. 430.It Va WITHOUT_MANCOMPRESS 431.Pq Vt defined 432Set to install manual pages uncompressed. 433.It Va NO_SHARE 434.Pq Vt bool 435Set to not build in the 436.Pa share 437subdir. 438.It Va NO_SHARED 439.Pq Vt bool 440Set to build 441.Pa /bin 442and 443.Pa /sbin 444statically linked, this can be bad. 445If set, every utility that uses 446.Pa bsd.prog.mk 447will be linked statically. 448.It Va PPP_NO_NAT 449.Pq Vt bool 450Build 451.Xr ppp 8 452without support for network address translation (NAT). 453.It Va PPP_NO_NETGRAPH 454.Pq Vt bool 455Set to build 456.Xr ppp 8 457without support for Netgraph. 458.It Va PPP_NO_RADIUS 459.Pq Vt bool 460Set to build 461.Xr ppp 8 462without support for RADIUS. 463.It Va PPP_NO_SUID 464.Pq Vt bool 465Set to disable the installation of 466.Xr ppp 8 467as a set-user-ID root program. 468.It Va SENDMAIL_ADDITIONAL_MC 469.Pq Vt str 470Additional 471.Pa .mc 472files which should be built into 473.Pa .cf 474files at build time. 475The value should include the full path to the 476.Pa .mc 477file(s), e.g., 478.Pa /etc/mail/foo.mc , 479.Pa /etc/mail/bar.mc . 480.It Va SENDMAIL_ALIASES 481.Pq Vt str 482List of 483.Xr aliases 5 484files to rebuild when using 485.Pa /etc/mail/Makefile . 486The default value is 487.Pa /etc/mail/aliases . 488.It Va SENDMAIL_CFLAGS 489.Pq Vt str 490Flags to pass to the compile command when building 491.Xr sendmail 8 . 492The 493.Va SENDMAIL_* 494flags can be used to provide SASL support with setting such as: 495.Bd -literal -offset indent 496SENDMAIL_CFLAGS=-I/usr/local/include -DSASL 497SENDMAIL_LDFLAGS=-L/usr/local/lib 498SENDMAIL_LDADD=-lsasl 499.Ed 500.It Va SENDMAIL_CF_DIR 501.Pq Vt str 502Override the default location for the 503.Xr m4 1 504configuration files used to build a 505.Pa .cf 506file from a 507.Pa .mc 508file. 509.It Va SENDMAIL_DPADD 510.Pq Vt str 511Extra dependencies to add when building 512.Xr sendmail 8 . 513.It Va SENDMAIL_LDADD 514.Pq Vt str 515Flags to add to the end of the 516.Xr ld 1 517command when building 518.Xr sendmail 8 . 519.It Va SENDMAIL_LDFLAGS 520.Pq Vt str 521Flags to pass to the 522.Xr ld 1 523command when building 524.Xr sendmail 8 . 525.It Va SENDMAIL_M4_FLAGS 526.Pq Vt str 527Flags passed to 528.Xr m4 1 529when building a 530.Pa .cf 531file from a 532.Pa .mc 533file. 534.It Va SENDMAIL_MAP_PERMS 535.Pq Vt str 536Mode to use when generating alias and map database files using 537.Pa /etc/mail/Makefile . 538The default value is 0640. 539.It Va SENDMAIL_MAP_SRC 540.Pq Vt str 541Additional maps to rebuild when using 542.Pa /etc/mail/Makefile . 543The 544.Pa access , 545.Pa bitdomain , 546.Pa domaintable , 547.Pa genericstable , 548.Pa mailertable , 549.Pa uucpdomain , 550and 551.Pa virtusertable 552maps are always rebuilt if they exist. 553.It Va SENDMAIL_MAP_TYPE 554.Pq Vt str 555Database map type to use when generating map database files using 556.Pa /etc/mail/Makefile . 557The default value is hash. 558The alternative is btree. 559.It Va SENDMAIL_MC 560.Pq Vt str 561The default 562.Xr m4 1 563configuration file to use at install time. 564The value should include the full path to the 565.Pa .mc 566file, e.g., 567.Pa /etc/mail/myconfig.mc . 568Use with caution as a make install will overwrite any existing 569.Pa /etc/mail/sendmail.cf . 570Note that 571.Va SENDMAIL_CF 572is now deprecated. 573.It Va SENDMAIL_SET_USER_ID 574.Pq Vt bool 575If set, install 576.Xr sendmail 8 577as a set-user-ID root binary instead of a set-group-ID binary 578and do not install 579.Pa /etc/mail/submit.{cf,mc} . 580Use of this flag is not recommended and the alternative advice in 581.Pa /etc/mail/README 582should be followed instead if at all possible. 583.It Va SENDMAIL_START_SCRIPT 584.Pq Vt str 585The script used by 586.Pa /etc/mail/Makefile 587to start, stop, and restart 588.Xr sendmail 8 . 589The default value is 590.Pa /etc/rc.sendmail . 591This value should match the 592.Dq Li mta_start_script 593setting in 594.Xr rc.conf 5 . 595.It Va SENDMAIL_SUBMIT_MC 596.Pq Vt str 597The default 598.Xr m4 1 599configuration file for mail submission 600to use at install time. 601The value should include the full path to the 602.Pa .mc 603file, e.g., 604.Pa /etc/mail/mysubmit.mc . 605Use with caution as a make install will overwrite any existing 606.Pa /etc/mail/submit.cf . 607.It Va TOP_TABLE_SIZE 608.Pq Vt int 609.Xr top 1 610uses a hash table for the user names. 611The size of this hash can be tuned to match the number of local users. 612The table size should be a prime number 613approximately twice as large as the number of lines in 614.Pa /etc/passwd . 615The default number is 20011. 616.It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE 617.Pq Vt int 618Causes the system compiler to be built such that it forces high optimization 619levels to a lower one. 620.Xr cc 1 621.Fl O2 622and above is known to trigger known optimizer bugs at various 623times. 624The value assigned is the highest optimization value used. 625.El 626.Ss "BUILDING DOCUMENTATION" 627The following list provides a name and short description for variables 628that are used when building documentation. 629.Bl -tag -width ".Va PRINTERDEVICE" 630.It Va DISTDIR 631.Pq Vt str 632Where distfiles are kept. 633Normally, this is 634.Pa distfiles 635in 636.Va PORTSDIR . 637.It Va DOC_LANG 638.Pq Vt str 639The list of languages and encodings to build and install. 640.It Va PRINTERDEVICE 641.Pq Vt str 642The default format for system documentation, depends on your 643printer. 644This can be set to 645.Dq Li ascii 646for simple printers, or 647.Dq Li ps 648for postscript or graphics printers with a ghostscript 649filter, or both. 650.El 651.Ss "BUILDING PORTS" 652Several make variables can be set that affect the building of ports. 653These variables and their effects are documented in 654.Xr ports 7 , 655.Pa ${PORTSDIR}/Mk/* 656and the 657.Fx 658Porter's Handbook. 659.Sh FILES 660.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 661.It Pa /etc/make.conf 662.It Pa /usr/doc/Makefile 663.It Pa /usr/ports/Makefile 664.It Pa /usr/share/examples/etc/make.conf 665.It Pa /usr/share/mk/sys.mk 666.It Pa /usr/src/Makefile 667.It Pa /usr/src/Makefile.inc1 668.El 669.Sh SEE ALSO 670.Xr cc 1 , 671.Xr install 1 , 672.Xr make 1 , 673.Xr src.conf 5 , 674.Xr environ 7 , 675.Xr ports 7 , 676.Xr sendmail 8 677.Sh HISTORY 678The 679.Nm 680file appeared sometime before 681.Fx 4.0 . 682.Sh AUTHORS 683This 684manual page was written by 685.An Mike W. Meyer Aq Mt mwm@mired.org . 686.Sh CAVEATS 687Note, that 688.Ev MAKEOBJDIRPREFIX 689and 690.Ev MAKEOBJDIR 691are environment variables and should not be set in 692.Nm 693or as command line arguments to 694.Xr make 1 , 695but in make's environment. 696.Sh BUGS 697This manual page may occasionally be out of date with respect to 698the options currently available for use in 699.Nm . 700Please check the 701.Pa /usr/share/examples/etc/make.conf 702file for the latest options which are available. 703