2014-05-09 21:11:27 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
# Options set in the build system that affect the kernel somehow.
|
|
|
|
|
|
|
|
#
|
|
|
|
# Define MK_* variables (which are either "yes" or "no") for users
|
|
|
|
# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
|
|
|
|
# make(1) environment.
|
|
|
|
# These should be tested with `== "no"' or `!= "no"' in makefiles.
|
|
|
|
# The NO_* variables should only be set by makefiles for variables
|
|
|
|
# that haven't been converted over.
|
|
|
|
#
|
|
|
|
|
2014-08-11 14:50:49 +00:00
|
|
|
# Note: bsd.own.mk must be included before the rest of kern.opts.mk to make
|
|
|
|
# building on 10.x and earlier work. This should be removed when that's no
|
|
|
|
# longer supported since it confounds the defaults (since it uses the host's
|
|
|
|
# notion of defaults rather than what's default in current when building
|
|
|
|
# within sys/modules).
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2014-05-09 21:11:27 +00:00
|
|
|
# These options are used by the kernel build process (kern.mk and kmod.mk)
|
|
|
|
# They have to be listed here so we can build modules outside of the
|
|
|
|
# src tree.
|
|
|
|
|
|
|
|
__DEFAULT_YES_OPTIONS = \
|
2015-01-26 07:15:49 +00:00
|
|
|
AUTOFS \
|
2015-01-26 06:44:48 +00:00
|
|
|
BHYVE \
|
2014-08-11 14:50:49 +00:00
|
|
|
BLUETOOTH \
|
2015-01-25 04:52:48 +00:00
|
|
|
CCD \
|
2014-08-11 14:50:49 +00:00
|
|
|
CDDL \
|
|
|
|
CRYPT \
|
2015-01-25 05:13:15 +00:00
|
|
|
CUSE \
|
2014-05-10 00:42:43 +00:00
|
|
|
FORMAT_EXTENSIONS \
|
2014-08-04 22:37:02 +00:00
|
|
|
INET \
|
|
|
|
INET6 \
|
2014-08-11 14:50:49 +00:00
|
|
|
IPFILTER \
|
2015-01-25 04:20:11 +00:00
|
|
|
ISCSI \
|
2014-08-11 14:50:49 +00:00
|
|
|
KERNEL_SYMBOLS \
|
|
|
|
NETGRAPH \
|
|
|
|
PF \
|
|
|
|
SOURCELESS_HOST \
|
|
|
|
SOURCELESS_UCODE \
|
|
|
|
USB_GADGET_EXAMPLES \
|
|
|
|
ZFS
|
|
|
|
|
|
|
|
__DEFAULT_NO_OPTIONS = \
|
|
|
|
EISA \
|
|
|
|
NAND \
|
|
|
|
OFED
|
2014-05-09 21:11:27 +00:00
|
|
|
|
2014-08-11 14:50:49 +00:00
|
|
|
# expanded inline from bsd.mkopt.mk to avoid share/mk dependency
|
2014-05-09 21:11:27 +00:00
|
|
|
|
2014-08-11 14:50:49 +00:00
|
|
|
# Those that default to yes
|
2014-05-17 20:31:34 +00:00
|
|
|
.for var in ${__DEFAULT_YES_OPTIONS}
|
|
|
|
.if !defined(MK_${var})
|
|
|
|
.if defined(WITHOUT_${var}) # WITHOUT always wins
|
|
|
|
MK_${var}:= no
|
2014-05-11 23:22:32 +00:00
|
|
|
.else
|
2014-05-17 20:31:34 +00:00
|
|
|
MK_${var}:= yes
|
2014-05-11 23:22:32 +00:00
|
|
|
.endif
|
2015-02-09 16:03:55 +00:00
|
|
|
.else
|
|
|
|
.if ${MK_${var}} != "yes" && ${MK_${var}} != "no"
|
|
|
|
.error "Illegal value for MK_${var}: ${MK_${var}}"
|
2014-05-17 20:31:34 +00:00
|
|
|
.endif
|
2015-02-09 16:03:55 +00:00
|
|
|
.endif # !defined(MK_${var})
|
2014-05-17 20:31:34 +00:00
|
|
|
.endfor
|
|
|
|
.undef __DEFAULT_YES_OPTIONS
|
2014-08-04 22:37:02 +00:00
|
|
|
|
2014-08-11 14:50:49 +00:00
|
|
|
# Those that default to no
|
|
|
|
.for var in ${__DEFAULT_NO_OPTIONS}
|
|
|
|
.if !defined(MK_${var})
|
|
|
|
.if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins
|
|
|
|
MK_${var}:= yes
|
|
|
|
.else
|
|
|
|
MK_${var}:= no
|
|
|
|
.endif
|
2015-02-09 16:03:55 +00:00
|
|
|
.else
|
|
|
|
.if ${MK_${var}} != "yes" && ${MK_${var}} != "no"
|
|
|
|
.error "Illegal value for MK_${var}: ${MK_${var}}"
|
2014-08-11 14:50:49 +00:00
|
|
|
.endif
|
2015-02-09 16:03:55 +00:00
|
|
|
.endif # !defined(MK_${var})
|
2014-08-11 14:50:49 +00:00
|
|
|
.endfor
|
|
|
|
.undef __DEFAULT_NO_OPTIONS
|
|
|
|
|
2014-08-04 22:37:02 +00:00
|
|
|
#
|
|
|
|
# MK_*_SUPPORT options which default to "yes" unless their corresponding
|
|
|
|
# MK_* variable is set to "no".
|
|
|
|
#
|
|
|
|
.for var in \
|
|
|
|
INET \
|
|
|
|
INET6
|
|
|
|
.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
|
|
|
|
MK_${var}_SUPPORT:= no
|
|
|
|
.else
|
2014-11-14 21:10:45 +00:00
|
|
|
.if defined(KERNBUILDDIR) # See if there's an opt_foo.h
|
|
|
|
OPT_${var}!= cat ${KERNBUILDDIR}/opt_${var:tl}.h; echo
|
|
|
|
.if ${OPT_${var}} == "" # nothing -> no
|
|
|
|
MK_${var}_SUPPORT:= no
|
|
|
|
.else
|
|
|
|
MK_${var}_SUPPORT:= yes
|
|
|
|
.endif
|
|
|
|
.else # otherwise, yes
|
2014-08-04 22:37:02 +00:00
|
|
|
MK_${var}_SUPPORT:= yes
|
|
|
|
.endif
|
2014-11-14 21:10:45 +00:00
|
|
|
.endif
|
2014-08-04 22:37:02 +00:00
|
|
|
.endfor
|
2014-11-14 21:10:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|