kern.opts.mk revision 269812
1265785Simp# $FreeBSD: head/sys/conf/kern.opts.mk 269812 2014-08-11 14:50:49Z imp $
2265785Simp
3265785Simp# Options set in the build system that affect the kernel somehow.
4265785Simp
5265785Simp#
6265785Simp# Define MK_* variables (which are either "yes" or "no") for users
7265785Simp# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
8265785Simp# make(1) environment.
9265785Simp# These should be tested with `== "no"' or `!= "no"' in makefiles.
10265785Simp# The NO_* variables should only be set by makefiles for variables
11265785Simp# that haven't been converted over.
12265785Simp#
13265785Simp
14269812Simp# Note: bsd.own.mk must be included before the rest of kern.opts.mk to make
15269812Simp# building on 10.x and earlier work. This should be removed when that's no
16269812Simp# longer supported since it confounds the defaults (since it uses the host's
17269812Simp# notion of defaults rather than what's default in current when building
18269812Simp# within sys/modules).
19269812Simp.include <bsd.own.mk>
20269812Simp
21265785Simp# These options are used by the kernel build process (kern.mk and kmod.mk)
22265785Simp# They have to be listed here so we can build modules outside of the
23265785Simp# src tree.
24265785Simp
25265785Simp__DEFAULT_YES_OPTIONS = \
26266446Simp    ARM_EABI \
27269812Simp    BLUETOOTH \
28269812Simp    CDDL \
29269812Simp    CRYPT \
30265791Simp    FORMAT_EXTENSIONS \
31269540Simp    INET \
32269540Simp    INET6 \
33269812Simp    IPFILTER \
34269812Simp    KERNEL_SYMBOLS \
35269812Simp    NETGRAPH \
36269812Simp    PF \
37269812Simp    SOURCELESS_HOST \
38269812Simp    SOURCELESS_UCODE \
39269812Simp    USB_GADGET_EXAMPLES \
40269812Simp    ZFS
41265785Simp
42269812Simp__DEFAULT_NO_OPTIONS = \
43269812Simp    EISA \
44269812Simp    NAND \
45269812Simp    OFED
46265785Simp
47269812Simp# expanded inline from bsd.mkopt.mk to avoid share/mk dependency
48269812Simp
49269812Simp# Those that default to yes
50266349Simp.for var in ${__DEFAULT_YES_OPTIONS}
51266349Simp.if !defined(MK_${var})
52266349Simp.if defined(WITHOUT_${var})			# WITHOUT always wins
53266349SimpMK_${var}:=	no
54265898Simp.else
55266349SimpMK_${var}:=	yes
56265898Simp.endif
57266349Simp.endif
58266349Simp.endfor
59266349Simp.undef __DEFAULT_YES_OPTIONS
60269540Simp
61269812Simp# Those that default to no
62269812Simp.for var in ${__DEFAULT_NO_OPTIONS}
63269812Simp.if !defined(MK_${var})
64269812Simp.if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins
65269812SimpMK_${var}:=	yes
66269812Simp.else
67269812SimpMK_${var}:=	no
68269812Simp.endif
69269812Simp.endif
70269812Simp.endfor
71269812Simp.undef __DEFAULT_NO_OPTIONS
72269812Simp
73269540Simp#
74269540Simp# MK_*_SUPPORT options which default to "yes" unless their corresponding
75269540Simp# MK_* variable is set to "no".
76269540Simp#
77269540Simp.for var in \
78269540Simp    INET \
79269540Simp    INET6
80269540Simp.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
81269540SimpMK_${var}_SUPPORT:= no
82269540Simp.else
83269540SimpMK_${var}_SUPPORT:= yes
84269540Simp.endif
85269540Simp.endfor
86