MAKE.CONF(5)
π MAKE.CONF(5) π
File Formats Manual
πΈ NAME πΈ
make.conf β system build information
β¨ DESCRIPTION β¨
Okay bestie, so make.conf is literally the file that holds system-wide settings, and those settings apply to every single build that uses make(1) and the standard sys.mk file. The way it works is: make(1) processes the system makefile sys.mk before any other file by default, and sys.mk includes make.conf. Cute, right? π
make.conf uses standard makefile syntax. But β and this is important β make.conf should not specify any dependencies to make(1). Instead, make.conf is there to set make(1) variables that control what other makefiles do.
The default location of make.conf is /etc/make.conf, but you can point to a different location with the make(1) variable __MAKE_CONF. You might need to override where make.conf lives if the system-wide settings are not suitable for a particular build. For example, setting __MAKE_CONF to /dev/null effectively resets all build controls to their defaults. Iconic little reset button, honestly. π
The primary purpose of make.conf is to control the compilation of the FreeBSD sources, documentation, and ported applications, which are usually found in /usr/src, /usr/doc, and /usr/ports. As a rule, the system administrator creates make.conf when the values of certain control variables need to be changed from their defaults.
The system build procedures happen in four broad areas: the world, the kernel, documentation, and ports. Variables set in make.conf may be applicable in one, two, or all four of these areas. Also, control variables can be specified for a particular build via the -D option of make(1) or in environ(7). For world and kernel builds, you can put these variables into src.conf(5) instead of make.conf. That way, the environment for documentation and ports builds is not polluted by unrelated variables. We love a clean vibe check. π¦
The following lists give a name and short description for each variable you can use during the indicated builds. The values of variables flagged as bool are ignored; the variable being set at all β even to "FALSE" or "NO" β causes it to be treated as if it were set. Not me warning you that the vibe of being set is enough. π
The following list gives a name and short description for variables that are used for all builds, or are used by the makefiles for things other than builds.
ALWAYS_CHECK_MAKE(bool) β Instructs the top-level makefile in the source tree (normally/usr/src) to always check ifmake(1)is up-to-date. Normally this is only done for theworldandbuildworldtargets to handle upgrades from older versions of FreeBSD.CFLAGS(str) β Controls the compiler setting when compiling C code. Optimization levels other than-Oand-O2are not supported.CPUTYPE(str) β Controls which processor should be targeted for generated code. This controls processor-specific optimizations in certain code (currently only OpenSSL) as well as modifying the value ofCFLAGSandCOPTFLAGSto contain the appropriate optimization directive tocc(1). To set theCPUTYPEvalue, use?=instead of=so that it can be overridden bymake(1)targets. The automatic setting ofCFLAGSmay be overridden using theNO_CPU_CFLAGSvariable. Refer to/usr/share/examples/etc/make.conffor a list of recognizedCPUTYPEoptions.CXXFLAGS(str) β Controls the compiler settings when compiling C++ code.CXXFLAGSis initially set to the value ofCFLAGS. If you want to add to theCXXFLAGSvalue, use+=instead of=.DTC(str) β Select the compiler for DTS (Device Tree Syntax) file.DTCis initially set to the value ofdtc.INSTALL(str) β the default install command. To install only files for which the target differs or does not exist, use
INSTALL+= -C
Note that some makefiles (including those in /usr/share/mk) may hardcode options for the supplied install command.
LOCAL_DIRS(str) β List any directories that should be entered when doing make's in/usr/srcin this variable.MAKE_SHELL(str) β Controls the shell used internally bymake(1)to process the command scripts in makefiles.sh(1),ksh(1), andcsh(1)all currently supported.
MAKE_SHELL?=sh
MTREE_FOLLOWS_SYMLINKS(str) β Set this to-Lto causemtree(8)to follow symlinks.NO_CPU_CFLAGS(str) β Setting this variable will prevent CPU specific compiler flags from being automatically added toCFLAGSduring compile time.
π₯ BUILDING THE KERNEL π₯
The following list gives a name and short description for variables that are only used doing a kernel build:
BOOTWAIT(int) β Controls the amount of time the kernel waits for a console keypress before booting the default kernel. The value is approximately milliseconds. Keypresses are accepted by the BIOS before booting from disk, making it possible to give custom boot parameters even when this is set to0.COPTFLAGS(str) β Controls the compiler settings when building the kernel. Optimization levels above[-O (-O2, ...)]are not guaranteed to work.KERNCONF(str) β Controls which kernel configurations will be built by${MAKE} buildkerneland installed by${MAKE} installkernel. For example,
KERNCONF=MINE DEBUG GENERIC OTHERMACHINE
will build the kernels specified by the config files MINE, DEBUG, GENERIC, and OTHERMACHINE, and install the kernel specified by the config file MINE. It defaults to GENERIC.
MODULES_OVERRIDE(str) β Set to a list of modules to build instead of all of them.NO_KERNELCLEAN(bool) β Set this to skip running${MAKE} cleanduring${MAKE} buildkernel.NO_KERNELCONFIG(bool) β Set this to skip runningconfig(8)during${MAKE} buildkernel.NO_KERNELOBJ(bool) β Set this to skip running${MAKE} objduring${MAKE} buildkernel.NO_MODULES(bool) β Set to not build modules with the kernel.PORTS_MODULESβ Set this to the list of ports you wish to rebuild every time the kernel is built.WITHOUT_MODULES(str) β Set to a list of modules to exclude from the build. This provides a somewhat easier way to exclude modules you are certain you will never need than specifyingMODULES_OVERRIDE. This is applied afterMODULES_OVERRIDE.
π BUILDING THE WORLD π
The following list gives a name and short description for variables that are used during the world build:
BOOT_COMCONSOLE_PORT(str) β The port address to use for the console if the boot blocks have been configured to use a serial console instead of the keyboard/video card.BOOT_COMCONSOLE_SPEED(int) β The baud rate to use for the console if the boot blocks have been configured to use a serial console instead of the keyboard/video card.BOOT_PXELDR_ALWAYS_SERIAL(bool) β Compile in the code intopxeboot(8)that forces the use of a serial console. This is analogous to the-hoption inboot(8)blocks.BOOT_PXELDR_PROBE_KEYBOARD(bool) β Compile in the code intopxeboot(8)that probes the keyboard. If no keyboard is found, boot with the dual console configuration. This is analogous to the-Doption inboot(8)blocks.ENABLE_SUID_K5SU(bool) β Set this if you wish to use theksuutility. Otherwise, it will be installed without the set-user-ID bit set.ENABLE_SUID_NEWGRP(bool) β Set this to installnewgrp(1)with the set-user-ID bit set. Otherwise,newgrp(1)will not be able to change users' groups.LOADER_TFTP_SUPPORT(bool) β By default thepxeboot(8)loader retrieves the kernel via NFS. Defining this and recompiling/usr/src/standwill cause it to retrieve the kernel via TFTP. This allowspxeboot(8)to load a custom BOOTP diskless kernel yet still mount the server's/rather than load the server's kernel.LOADER_FIREWIRE_SUPPORT(bool) β Defining this and recompiling/usr/src/stand/i386will adddcons(4)console driver toloader(8)and allow access over FireWire(IEEE1394) usingdconschat(8). Currently, only i386 and amd64 are supported.MAN_ARCH(str) β Space-delimited list of one or moreMACHINEand/orMACHINE_ARCHvalues for which section 4 man pages will be installed. The special valueallinstalls all available architectures. It is also the default value.MODULES_WITH_WORLD(bool) β Set to build modules with the system instead of the kernel.NO_CLEAN(bool) β Set this to disable cleaning duringmake buildworld. This should not be set unless you know what you are doing. > bestie, do not set this unless you really know what you are doing. fr fr.NO_CLEANDIR(bool) β Set this to run${MAKE} cleaninstead of${MAKE} cleandir.WITH_MANCOMPRESS(defined) β Set to install manual pages compressed.WITHOUT_MANCOMPRESS(defined) β Set to install manual pages uncompressed.NO_SHARE(bool) β Set to not build in thesharesubdir.NO_SHARED(bool) β Set to build/binand/sbinstatically linked, this can be bad. If set, every utility that usesbsd.prog.mkwill be linked statically.PKG_REPO_SIGNING_KEY(str) β Path to rsa private key passed topkg-repo(8)to sign packages created when building the packages target, i.e.:pkgbase. The variable is named the same inpoudriere(8)so it will automatically be picked up when buildingpkgbasewithpoudriere.PPP_NO_NAT(bool) β Buildppp(8)without support for network address translation (NAT).PPP_NO_NETGRAPH(bool) β set this andppp(8)gets built without Netgraph support. Bye Netgraph πPPP_NO_RADIUS(bool) β set this andppp(8)gets built without RADIUS support. No radius, no problem.PPP_NO_SUID(bool) β set this to turn off installingppp(8)as a set-user-ID root program. Safer vibes πSENDMAIL_ADDITIONAL_MC(str) β extra.mcfiles that should get built into.cffiles at build time. Bestie, put the full path to the.mcfile(s) in here, like/etc/mail/foo.mc,/etc/mail/bar.mc.SENDMAIL_ALIASES(str) β the list ofaliases(5)files to rebuild when you're using/etc/mail/Makefile. Default is/etc/mail/aliases.SENDMAIL_CFLAGS(str) β flags handed to the compile command when buildingsendmail(8). You can use theSENDMAIL_*flags to get SASL support going, like so:
SENDMAIL_CFLAGS=-I/usr/local/include -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl
SENDMAIL_CF_DIR(str) β overrides the default location of them4(1)config files used to build a.cffile from a.mcfile.SENDMAIL_DPADD(str) β extra dependencies to tack on when buildingsendmail(8).SENDMAIL_LDADD(str) β flags to add to the end of theld(1)command when buildingsendmail(8).SENDMAIL_LDFLAGS(str) β flags to pass to theld(1)command when buildingsendmail(8).SENDMAIL_M4_FLAGS(str) β flags passed tom4(1)when building a.cffile from a.mcfile.SENDMAIL_MAP_PERMS(str) β the mode to use when generating alias and map database files via/etc/mail/Makefile. Default is0640.SENDMAIL_MAP_SRC(str) β additional maps to rebuild when using/etc/mail/Makefile. Heads up: theaccess,bitdomain,domaintable,genericstable,mailertable,uucpdomain, andvirtusertablemaps always get rebuilt if they exist. Always. β¨SENDMAIL_MAP_TYPE(str) β the database map type to use when generating map database files with/etc/mail/Makefile. Default ishash, and the alternative isbtree.SENDMAIL_MC(str) β the defaultm4(1)config file to use at install time. The value should include the full path to the.mcfile, e.g./etc/mail/myconfig.mc.
β οΈ Use with caution, bestie β amake installwill overwrite any existing/etc/mail/sendmail.cf. Also note thatSENDMAIL_CFis deprecated.
SENDMAIL_SET_USER_ID(bool) β if set, installssendmail(8)as a set-user-ID root binary instead of a set-group-ID binary, and does not install/etc/mail/submit.{cf,mc}.
π¨ Using this flag is not recommended. If it's at all possible, follow the alternative advice in /etc/mail/README instead. Periodt.
SENDMAIL_START_SCRIPT(str) β the script that/etc/mail/Makefileuses to start, stop, and restartsendmail(8). Default is/etc/rc.d/sendmail.SENDMAIL_SUBMIT_MC(str) β the defaultm4(1)config file for mail submission, used at install time. The value should include the full path to the.mcfile, e.g./etc/mail/mysubmit.mc.
β οΈ Again, with caution: amake installwill overwrite any existing/etc/mail/submit.cf.
TOP_TABLE_SIZE(int) βtop(1)uses a hash table for the user names, and you can tune the size of that hash to match your number of local users. The table size should be a prime number approximately twice as large as the number of lines in/etc/passwd. Default is20011.WANT_FORCE_OPTIMIZATION_DOWNGRADE(int) β makes the system compiler get built in a way that forces high optimization levels down to a lower one.cc(1)-O2and above is known to trigger known optimizer bugs at various times π. The value you assign is the highest optimization value used.
π¦ BUILDING DOCUMENTATION π¦
Here's the name-and-short-description list for the variables used when building documentation:
DOC_LANG(str) β the list of languages to build and install when building documentation in/usr/doc.PRINTERDEVICE(str) β the default format for system documentation in/usr/src/share/doc, depends on your printer. Set it toβasciiβfor simple printers, orβpsβfor postscript or graphics printers with a ghostscript filter, or both. Your printer, your rules π¨οΈ
π BUILDING PORTS π
Several make variables can be set that affect the building of ports. These variables and their effects are documented in ports(7), ${PORTSDIR}/Mk/* and the FreeBSD Porter's Handbook.
π FILES π
/etc/make.conf
/usr/doc/Makefile
/usr/ports/Makefile
/usr/share/examples/etc/make.conf
/usr/share/mk/sys.mk
/usr/src/Makefile
/usr/src/Makefile.inc1
π SEE ALSO π
cc(1), install(1), make(1), src.conf(5), style.Makefile(5), environ(7), ports(7), sendmail(8)
β HISTORY β
The make.conf file appeared sometime before FreeBSD 4.0. Ancient lore, fr fr πΊ
π AUTHORS π
This manual page was written by Mike W. Meyer <mwm@mired.org>. Gotta give credit where it's due π«Ά
π CAVEATS π
Okay so this one actually matters: MAKEOBJDIRPREFIX and MAKEOBJDIR are environment variables and should not be set in make.conf or as command line arguments to make(1) β put them in make's environment instead. Not me watching you put them in the wrong place π
π BUGS π
This manual page may occasionally be out of date with respect to the options currently available for use in make.conf. Please check the /usr/share/examples/etc/make.conf file for the latest options which are available. Yes, the manpage has trust issues, check the file bestie π
This iconic little page comes to you from Debian, dated November 15, 2022 β MAKE.CONF(5), slay. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2000 Mike W. Meyer
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms