3 # Options set in the build system that affect the kernel somehow.
6 # Define MK_* variables (which are either "yes" or "no") for users
7 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
9 # These should be tested with `== "no"' or `!= "no"' in makefiles.
10 # The NO_* variables should only be set by makefiles for variables
11 # that haven't been converted over.
14 # Note: bsd.own.mk must be included before the rest of kern.opts.mk to make
15 # building on 10.x and earlier work. This should be removed when that's no
16 # longer supported since it confounds the defaults (since it uses the host's
17 # notion of defaults rather than what's default in current when building
18 # within sys/modules).
21 # These options are used by the kernel build process (kern.mk and kmod.mk)
22 # They have to be listed here so we can build modules outside of the
25 __DEFAULT_YES_OPTIONS = \
42 __DEFAULT_NO_OPTIONS = \
47 # expanded inline from bsd.mkopt.mk to avoid share/mk dependency
49 # Those that default to yes
50 .for var in ${__DEFAULT_YES_OPTIONS}
51 .if !defined(MK_${var})
52 .if defined(WITHOUT_${var}) # WITHOUT always wins
59 .undef __DEFAULT_YES_OPTIONS
61 # Those that default to no
62 .for var in ${__DEFAULT_NO_OPTIONS}
63 .if !defined(MK_${var})
64 .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins
71 .undef __DEFAULT_NO_OPTIONS
74 # MK_*_SUPPORT options which default to "yes" unless their corresponding
75 # MK_* variable is set to "no".
80 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
81 MK_${var}_SUPPORT:= no
83 MK_${var}_SUPPORT:= yes