1# $FreeBSD$ 2 3# Options set in the build system that affect the kernel somehow. 4 5# 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 8# make(1) environment. 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. 12# 13 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). 19.include <bsd.own.mk> 20 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 23# src tree. 24 25__DEFAULT_YES_OPTIONS = \ 26 ARM_EABI \ 27 BLUETOOTH \ 28 CDDL \ 29 CRYPT \ 30 FORMAT_EXTENSIONS \ 31 INET \ 32 INET6 \ 33 IPFILTER \ 34 KERNEL_SYMBOLS \ 35 NETGRAPH \ 36 PF \ 37 SOURCELESS_HOST \ 38 SOURCELESS_UCODE \ 39 USB_GADGET_EXAMPLES \ 40 ZFS 41 42__DEFAULT_NO_OPTIONS = \ 43 EISA \ 44 NAND \ 45 OFED 46 47# expanded inline from bsd.mkopt.mk to avoid share/mk dependency 48 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 53MK_${var}:= no 54.else 55MK_${var}:= yes 56.endif 57.endif 58.endfor 59.undef __DEFAULT_YES_OPTIONS 60 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 65MK_${var}:= yes 66.else 67MK_${var}:= no 68.endif 69.endif 70.endfor 71.undef __DEFAULT_NO_OPTIONS 72 73# 74# MK_*_SUPPORT options which default to "yes" unless their corresponding 75# MK_* variable is set to "no". 76# 77.for var in \ 78 INET \ 79 INET6 80.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 81MK_${var}_SUPPORT:= no 82.else 83MK_${var}_SUPPORT:= yes 84.endif 85.endfor 86