xref: /freebsd/share/examples/etc/make.conf (revision eda7eff0d266b9644f047469ce7c739a4ef2681a)
1da63052fSPoul-Henning Kamp#
28057e004SBen Smithurst# NOTE:  Please would any committer updating this file also update the
38057e004SBen Smithurst# make.conf(5) manual page, if necessary, which is located in
48057e004SBen Smithurst# src/share/man/man5/make.conf.5.
58057e004SBen Smithurst#
6d33a962dSAlexander Langer# /etc/make.conf, if present, will be read by make (see
7d33a962dSAlexander Langer# /usr/share/mk/sys.mk).  It allows you to override macro definitions
8d33a962dSAlexander Langer# to make without changing your source tree, or anything the source
9d33a962dSAlexander Langer# tree installs.
102c5fdcb6SRodney W. Grimes#
112c5fdcb6SRodney W. Grimes# This file must be in valid Makefile syntax.
12da63052fSPoul-Henning Kamp#
13d33a962dSAlexander Langer# There are additional things you can put into /etc/make.conf.
14d33a962dSAlexander Langer# You have to find those in the Makefiles and documentation of
15d33a962dSAlexander Langer# the source tree.
16da63052fSPoul-Henning Kamp#
1747a4e0e5SHartmut Brandt# Note, that you should not set MAKEOBJDIRPREFIX or MAKEOBJDIR
1847a4e0e5SHartmut Brandt# from make.conf (or as command line variables to make).
1947a4e0e5SHartmut Brandt# Both variables are environment variables for make and must be used as:
2047a4e0e5SHartmut Brandt#
2147a4e0e5SHartmut Brandt# env MAKEOBJDIRPREFIX=/big/directory make
2247a4e0e5SHartmut Brandt#
230937df81SKris Kennaway#
24e8800144SJohan Karlsson# The CPUTYPE variable controls which processor should be targeted for
2562d90fb7SKris Kennaway# generated code.  This controls processor-specific optimizations in
2662d90fb7SKris Kennaway# certain code (currently only OpenSSL) as well as modifying the value
27a9259c1eSJung-uk Kim# of CFLAGS to contain the appropriate optimization directive to cc.
2862d90fb7SKris Kennaway# The automatic setting of CFLAGS may be overridden using the
2962d90fb7SKris Kennaway# NO_CPU_CFLAGS variable below.
3008e90c14SJung-uk Kim# Currently the following CPU types are recognized:
31181b6941SKris Kennaway#   Intel x86 architecture:
32105e5f55SDaniel Engberg#       (AMD CPUs)	znver4, znver3, znver2, znver1, bdver4, bdver3, bdver2,
33105e5f55SDaniel Engberg#			bdver1, btver2, btver1, amdfam10, opteron-sse3,
34105e5f55SDaniel Engberg#			athlon64-sse3, k8-sse3, opteron, athlon64, athlon-fx,
35105e5f55SDaniel Engberg#			k8, athlon-mp, athlon-xp, athlon-4, athlon-tbird,
36105e5f55SDaniel Engberg#			athlon, k7, geode, k6-3, k6-2, k6
3709e7341cSJung-uk Kim#       (Intel CPUs)	alderlake, sapphirerapids, tigerlake, cooperlake,
3809e7341cSJung-uk Kim#			cascadelake, tremont, goldmont-plus, icelake-server,
3909e7341cSJung-uk Kim#			icelake-client, cannonlake, knm, skylake-avx512, knl,
4009e7341cSJung-uk Kim#			goldmont, skylake, broadwell, haswell, ivybridge,
4109e7341cSJung-uk Kim#			sandybridge, westmere, nehalem, silvermont, bonnell,
4209e7341cSJung-uk Kim#			core2, core, nocona, pentium4m, pentium4, prescott,
4309e7341cSJung-uk Kim#			pentium3m, pentium3, pentium-m, pentium2, pentiumpro,
4409e7341cSJung-uk Kim#			pentium-mmx, pentium, i486
45c5672d15SJung-uk Kim#       (VIA CPUs)	c7, c3-2, c3
46*eda7eff0SAndrew Turner#   ARM architecture:	armv7, armv7-a, armv7ve, generic-armv7-a, cortex-a5,
4705b62601SWarner Losh#			cortex-a7, cortex-a8, cortex-a9, cortex-a12,
4805b62601SWarner Losh#			cortex-a15, cortex-a17
496300e58aSGordon Bergling#   ARM64 architecture:	cortex-a53, cortex-a57, cortex-a72,
5005b62601SWarner Losh#				exynos-m1
510937df81SKris Kennaway#
5232f8ca45SRuslan Ermilov# (?= allows to buildworld for a different CPUTYPE.)
5332f8ca45SRuslan Ermilov#
54ffea66bcSDavid E. O'Brien#CPUTYPE?=pentium3
558bf62bdaSRuslan Ermilov#NO_CPU_CFLAGS=		# Don't add -march=<cpu> to CFLAGS automatically
560937df81SKris Kennaway#
5768d2e26cSKris Kennaway# CFLAGS controls the compiler settings used when compiling C code.
586063af3dSDag-Erling Smørgrav# Note that optimization settings other than -O and -O2 are not recommended
5968d2e26cSKris Kennaway# or supported for compiling the world or the kernel - please revert any
60acc4b9ecSEitan Adler# nonstandard optimization settings
61bb077f2dSRuslan Ermilov# before submitting bug reports without patches to the developers.
62da63052fSPoul-Henning Kamp#
6344653522SIan Lepore# CFLAGS.arch provides a mechanism for applying CFLAGS only when building
6444653522SIan Lepore# the given architecture.  This is useful primarily on a system used for
6544653522SIan Lepore# cross-building, when you have a set of flags to apply to the TARGET_ARCH
6644653522SIan Lepore# being cross-built but don't want those settings applied to building the
6744653522SIan Lepore# cross-tools or other components that run on the build host machine.
6844653522SIan Lepore#
690e8d7e82SDavid E. O'Brien# CXXFLAGS controls the compiler settings used when compiling C++ code.
700e8d7e82SDavid E. O'Brien# Note that CXXFLAGS is initially set to the value of CFLAGS.  If you wish
710e8d7e82SDavid E. O'Brien# to add to CXXFLAGS value, "+=" must be used rather than "=".  Using "="
720e8d7e82SDavid E. O'Brien# alone will remove the often needed contents of CFLAGS from CXXFLAGS.
730e8d7e82SDavid E. O'Brien#
74acc4b9ecSEitan Adler# Additional compiler flags can be specified that extend or override
75acc4b9ecSEitan Adler# default ones. However, neither the base system nor ports are guaranteed
76acc4b9ecSEitan Adler# to build and function without problems with non-default settings.
77acc4b9ecSEitan Adler#
78acc4b9ecSEitan Adler# CFLAGS+=	-msse3
79acc4b9ecSEitan Adler# CXXFLAGS+=	-msse3
80*eda7eff0SAndrew Turner# CFLAGS.armv7+= -mfloat-abi=softfp
81da63052fSPoul-Henning Kamp#
827cfab3bbSJuli Mallett# MAKE_SHELL controls the shell used internally by make(1) to process the
837cfab3bbSJuli Mallett# command scripts in makefiles.  Three shells are supported, sh, ksh, and
847cfab3bbSJuli Mallett# csh.  Using sh is most common, and advised.  Using ksh *may* work, but is
857cfab3bbSJuli Mallett# not guaranteed to.  Using csh is absurd.  The default is to use sh.
867cfab3bbSJuli Mallett#
877cfab3bbSJuli Mallett#MAKE_SHELL?=sh
887cfab3bbSJuli Mallett#
89c5225ad9SDavid E. O'Brien# BDECFLAGS are a set of gcc warning settings that Bruce Evans has suggested
90c5225ad9SDavid E. O'Brien# for use in developing FreeBSD and testing changes.  They can be used by
91791da841SPeter Wemm# putting "CFLAGS+=${BDECFLAGS}" in /etc/make.conf.  -Wconversion is not
92e8800144SJohan Karlsson# included here due to compiler bugs, e.g., mkdir()'s mode_t argument.
93c5225ad9SDavid E. O'Brien#
94d33a962dSAlexander Langer#BDECFLAGS=	-W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \
95d33a962dSAlexander Langer#		-Wcast-qual -Wchar-subscripts -Winline \
96d33a962dSAlexander Langer#		-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
97d33a962dSAlexander Langer#		-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings
98c5225ad9SDavid E. O'Brien#
9909980f43SDoug Barton# To compile just the kernel with special optimizations, you should use
100a450541bSDavid E. O'Brien# this instead of CFLAGS (which is not applicable to kernel builds anyway).
101a450541bSDavid E. O'Brien# There is very little to gain by using higher optimization levels, and doing
102a450541bSDavid E. O'Brien# so can cause problems.
1033a77147bSDavid E. O'Brien#
1043a77147bSDavid E. O'Brien#COPTFLAGS= -O -pipe
1053a77147bSDavid E. O'Brien#
106ffce9a99SJens Schweikhardt# Compare before install.
107fdcb6453SBryan Drewery#INSTALL+= -C
108b7574f89SAndrey A. Chernov#
109ffce9a99SJens Schweikhardt# Mtree will follow symlinks.
1105901f438SAndrey A. Chernov#MTREE_FOLLOWS_SYMLINKS= -L
111a938a1fcSAndrey A. Chernov#
1127cc8320aSTim J. Robbins# To enable installing newgrp(1) with the setuid bit turned on.
1137cc8320aSTim J. Robbins# Without the setuid bit, newgrp cannot change users' groups.
1148bf62bdaSRuslan Ermilov#ENABLE_SUID_NEWGRP=
1157cc8320aSTim J. Robbins#
11677dec3a0SPeter Wemm# To avoid building various parts of the base system:
1178bf62bdaSRuslan Ermilov#NO_MODULES=		# do not build modules with the kernel
1186495335eSRuslan Ermilov#NO_SHARE=		# do not go into the share subdir
119bf148c3eSTom Rhodes#NO_SHARED= 		# build /bin and /sbin statically linked (bad idea)
1200d854656SMark Murray#
12199b6fea1STom Rhodes# Variables that control how ppp(8) is built.
122dd991de0SRuslan Ermilov#PPP_NO_NAT= 		# do not build with NAT support (see make.conf(5))
123dd991de0SRuslan Ermilov#PPP_NO_NETGRAPH= 	# do not build with Netgraph support
1247c802bacSMaxim Konovalov#PPP_NO_RADIUS= 	# do not build with RADIUS support
125dd991de0SRuslan Ermilov#PPP_NO_SUID=		# build with normal permissions
12699b6fea1STom Rhodes#
1278340281fSRuslan Ermilov#TRACEROUTE_NO_IPSEC= 	# do not build traceroute(8) with IPSEC support
1288340281fSRuslan Ermilov#
129ffce9a99SJens Schweikhardt# To build sys/modules when building the world (our old way of doing things).
1308bf62bdaSRuslan Ermilov#MODULES_WITH_WORLD=	# do not build modules when building kernel
131f94a3783SDavid E. O'Brien#
1323a289cbaSRuslan Ermilov# The list of modules to build instead of all of them.
1333a289cbaSRuslan Ermilov#MODULES_OVERRIDE=	linux ipfw
13485a0c815SPeter Wemm#
135008c6018SWes Peters# The list of modules to never build, applied *after* MODULES_OVERRIDE.
136fbf8e324SMark Murray#WITHOUT_MODULES=	plip
137008c6018SWes Peters#
138624ca996SGeoff Rehmet# If you do not want unformatted manual pages to be compressed
139624ca996SGeoff Rehmet# when they are installed:
140624ca996SGeoff Rehmet#
1410abe2561SWarner Losh#WITHOUT_MANCOMPRESS=t
142476a2205SAndrey A. Chernov#
143476a2205SAndrey A. Chernov#
144abb0d7d3SCeri Davies# Default format for system documentation in share/doc, depends on
145abb0d7d3SCeri Davies# your printer.  Set this to "ascii" for simple printers or screen.
146476a2205SAndrey A. Chernov#
1471a827e9fSAndreas Klemm#PRINTERDEVICE=	ps
1484a1bed68SAdam David#
1494a1bed68SAdam David#
1506f3ce68fSAdam David# How long to wait for a console keypress before booting the default kernel.
1516f3ce68fSAdam David# This value is approximately in milliseconds. Keypresses are accepted by the
1526f3ce68fSAdam David# BIOS before booting from disk, making it possible to give custom boot
1536f3ce68fSAdam David# parameters even when this is set to 0.
1544a1bed68SAdam David#
15533d04130SAdam David#BOOTWAIT=0
1562c5fdcb6SRodney W. Grimes#BOOTWAIT=30000
1574a1bed68SAdam David#
158972a3f28SPaul Traina# By default, the system will always use the keyboard/video card as system
159fa03459eSBruce Evans# console.  However, the boot blocks may be dynamically configured to use a
160fa03459eSBruce Evans# serial port in addition to or instead of the keyboard/video console.
161972a3f28SPaul Traina#
162972a3f28SPaul Traina# By default we use COM1 as our serial console port *if* we're going to use
163f3fd3a00SNik Clayton# a serial port as our console at all.  Alter as necessary.
164f3fd3a00SNik Clayton#
165f3fd3a00SNik Clayton#   COM1: = 0x3F8, COM2: = 0x2F8, COM3: = 0x3E8, COM4: = 0x2E8
166972a3f28SPaul Traina#
167c27ebf26SPaul Traina#BOOT_COMCONSOLE_PORT=	0x3F8
168972a3f28SPaul Traina#
1693ff06779SEd Maste# The default serial console speed is 115200. It can be set to a different
1703ff06779SEd Maste# rate, if desired in your environment.
171972a3f28SPaul Traina#
1724722ceb7SEd Maste#BOOT_COMCONSOLE_SPEED=	9600
173972a3f28SPaul Traina#
1749193b128SPaul Saab# By default the 'pxeboot' loader retrieves the kernel via NFS.  Defining
175ca987d46SWarner Losh# this and recompiling /usr/src/stand will cause it to retrieve the kernel
1769193b128SPaul Saab# via TFTP.  This allows pxeboot to load a custom BOOTP diskless kernel yet
177e8800144SJohan Karlsson# still mount the server's '/' (i.e. rather than load the server's kernel).
1789193b128SPaul Saab#
1799193b128SPaul Saab#LOADER_TFTP_SUPPORT= YES
180c27ebf26SPaul Traina#
1814ed950adSNik Clayton#
18295ba4330SJacques Vidrine# Kerberos 5 su (k5su)
18395ba4330SJacques Vidrine# If you want to use the k5su utility, define this to have it installed
18495ba4330SJacques Vidrine# set-user-ID.
1858bf62bdaSRuslan Ermilov#ENABLE_SUID_K5SU=
18695ba4330SJacques Vidrine#
1876f5a2406SMark Murray#
1883a0d8e27SJoerg Wunsch# top(1) uses a hash table for the user names.  The size of this hash
1893a0d8e27SJoerg Wunsch# can be tuned to match the number of local users.  The table size should
1903a0d8e27SJoerg Wunsch# be a prime number approximately twice as large as the number of lines in
1913a0d8e27SJoerg Wunsch# /etc/passwd.  The default number is 20011.
1923a0d8e27SJoerg Wunsch#
1933a0d8e27SJoerg Wunsch#TOP_TABLE_SIZE= 101
194ec29d178SNik Clayton#
195ec29d178SNik Clayton# Documentation
196ec29d178SNik Clayton#
197abb0d7d3SCeri Davies# The list of languages to build and install.
198ec29d178SNik Clayton#
199abb0d7d3SCeri Davies#DOC_LANG=	en ru
200cf1fec42SGregory Neil Shapiro#
201cf1fec42SGregory Neil Shapiro#
202cf1fec42SGregory Neil Shapiro# sendmail
20325219d25SGregory Neil Shapiro#
20425219d25SGregory Neil Shapiro# The following sets the default m4 configuration file to use at
20525219d25SGregory Neil Shapiro# install time.  Use with caution as a make install will overwrite
20625219d25SGregory Neil Shapiro# any existing /etc/mail/sendmail.cf.  Note that SENDMAIL_CF is now
207d1885c41SGregory Neil Shapiro# deprecated.  The value should be a fully qualified path name.
20825219d25SGregory Neil Shapiro#
2096b81e27fSGregory Neil Shapiro#SENDMAIL_MC=/etc/mail/myconfig.mc
21025219d25SGregory Neil Shapiro#
21114d6d765SGregory Neil Shapiro# The following sets the default m4 configuration file for mail
21214d6d765SGregory Neil Shapiro# submission to use at install time.  Use with caution as a make
21314d6d765SGregory Neil Shapiro# install will overwrite any existing /etc/mail/submit.cf.  The
21414d6d765SGregory Neil Shapiro# value should be a fully qualified path name.
21514d6d765SGregory Neil Shapiro#
21614d6d765SGregory Neil Shapiro#SENDMAIL_SUBMIT_MC=/etc/mail/mysubmit.mc
21714d6d765SGregory Neil Shapiro#
218e6c77250SGregory Neil Shapiro# If you need to build additional .cf files during a make buildworld,
219e6c77250SGregory Neil Shapiro# include the full paths to the .mc files in SENDMAIL_ADDITIONAL_MC.
220e6c77250SGregory Neil Shapiro#
221e6c77250SGregory Neil Shapiro#SENDMAIL_ADDITIONAL_MC=/etc/mail/foo.mc /etc/mail/bar.mc
222e6c77250SGregory Neil Shapiro#
22377e399e8SGregory Neil Shapiro# The following overrides the default location for the m4 configuration
22477e399e8SGregory Neil Shapiro# files used to build a .cf file from a .mc file.
22577e399e8SGregory Neil Shapiro#
22677e399e8SGregory Neil Shapiro#SENDMAIL_CF_DIR=/usr/local/share/sendmail/cf
22777e399e8SGregory Neil Shapiro#
228f4843be9SGregory Neil Shapiro# Setting the following variable modifies the flags passed to m4 when
229f4843be9SGregory Neil Shapiro# building a .cf file from a .mc file.  It can be used to enable
230f4843be9SGregory Neil Shapiro# features disabled by default.
231f4843be9SGregory Neil Shapiro#
232f4843be9SGregory Neil Shapiro#SENDMAIL_M4_FLAGS=
233f4843be9SGregory Neil Shapiro#
234f87b85b2SGregory Neil Shapiro# Setting the following variables modifies the build environment for
235cf1fec42SGregory Neil Shapiro# sendmail and its related utilities. For example, SASL support can be
236cf1fec42SGregory Neil Shapiro# added with settings such as:
237cf1fec42SGregory Neil Shapiro#
238b838ab7cSHajimu UMEMOTO#    with SASLv1:
23968966e04SHajimu UMEMOTO#	SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
240c5112a4eSGregory Neil Shapiro#	SENDMAIL_LDADD=/usr/local/lib/libsasl.so
241cf1fec42SGregory Neil Shapiro#
242b838ab7cSHajimu UMEMOTO#    with SASLv2:
243b838ab7cSHajimu UMEMOTO#	SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2
244c5112a4eSGregory Neil Shapiro#	SENDMAIL_LDADD=/usr/local/lib/libsasl2.so
245b838ab7cSHajimu UMEMOTO#
246b6f094a0SGregory Neil Shapiro# Note: If you are using Cyrus SASL with other applications which require
247f0654170SHajimu UMEMOTO#	access to the sasldb file, you should add the following to your
248f0654170SHajimu UMEMOTO#	sendmail.mc file:
249b6f094a0SGregory Neil Shapiro#
25040a8850bSHajimu UMEMOTO#	define(`confDONT_BLAME_SENDMAIL',`GroupReadableSASLDBFile')
251b6f094a0SGregory Neil Shapiro#
252cf1fec42SGregory Neil Shapiro#SENDMAIL_CFLAGS=
253cf1fec42SGregory Neil Shapiro#SENDMAIL_LDFLAGS=
254cf1fec42SGregory Neil Shapiro#SENDMAIL_LDADD=
255cf1fec42SGregory Neil Shapiro#SENDMAIL_DPADD=
256474c81fdSGregory Neil Shapiro#
257474c81fdSGregory Neil Shapiro# Setting SENDMAIL_SET_USER_ID will install the sendmail binary as a
258474c81fdSGregory Neil Shapiro# set-user-ID root binary instead of a set-group-ID smmsp binary and will
259474c81fdSGregory Neil Shapiro# prevent the installation of /etc/mail/submit.cf.
260474c81fdSGregory Neil Shapiro# This is a deprecated mode of operation.  See etc/mail/README for more
261474c81fdSGregory Neil Shapiro# information.
262474c81fdSGregory Neil Shapiro#
263474c81fdSGregory Neil Shapiro#SENDMAIL_SET_USER_ID=
26434925ba6SGregory Neil Shapiro#
26534925ba6SGregory Neil Shapiro# The permissions to use on alias and map databases generated using
26634925ba6SGregory Neil Shapiro# /etc/mail/Makefile.  Defaults to 0640.
26734925ba6SGregory Neil Shapiro#
26834925ba6SGregory Neil Shapiro#SENDMAIL_MAP_PERMS=
26949b96401SBenedict Reuschling#
27049b96401SBenedict Reuschling#
27149b96401SBenedict Reuschling# It is also possible to set variables in make.conf which will only be
27249b96401SBenedict Reuschling# used when compiling a specific port.  For more details see make(1).
27349b96401SBenedict Reuschling#
27449b96401SBenedict Reuschling#.if ${.CURDIR:M*/irc/irssi-devel*}
27549b96401SBenedict Reuschling#WITH_DEBUG=YES
27649b96401SBenedict Reuschling#.endif
27749b96401SBenedict Reuschling#
27849b96401SBenedict Reuschling# Another approach is to use /usr/ports/ports-mgmt/portconf which has
27949b96401SBenedict Reuschling# its own config file for port specific options.
280