3 # Common code to marry kernel config(8) goo and module building goo.
6 # Generate options files that otherwise would be built
7 # in substantially similar ways through the tree. Move
8 # the code here when they all produce identical results
10 .if !defined(KERNBUILDDIR)
13 @echo "#define SMP 1" >> ${.TARGET}
14 @echo "#define MAC 1" >> ${.TARGET}
15 @echo "#define VIMAGE 1" >> ${.TARGET}
16 .if ${MK_BHYVE_SNAPSHOT} != "no"
18 @echo "#define BHYVE_SNAPSHOT 1" > ${.TARGET}
21 echo "#define DEV_BPF 1" > ${.TARGET}
22 .if ${MK_INET_SUPPORT} != "no"
24 @echo "#define INET 1" > ${.TARGET}
25 @echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
27 .if ${MK_INET6_SUPPORT} != "no"
29 @echo "#define INET6 1" > ${.TARGET}
31 .if ${MK_IPSEC_SUPPORT} != "no"
33 @echo "#define IPSEC_SUPPORT 1" > ${.TARGET}
35 .if ${MK_RATELIMIT} != "no"
37 @echo "#define RATELIMIT 1" > ${.TARGET}
40 echo "#define MROUTING 1" > ${.TARGET}
42 echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET}
44 echo "#define SCSI_DELAY 15000" > ${.TARGET}
45 .if ${MK_SCTP_SUPPORT} != "no"
47 @echo "#define SCTP_SUPPORT 1" > ${.TARGET}
50 echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
51 echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET}
52 KERN_OPTS.i386=NEW_PCIB DEV_PCI
53 KERN_OPTS.amd64=NEW_PCIB DEV_PCI
54 KERN_OPTS.powerpc=NEW_PCIB DEV_PCI
55 KERN_OPTS=MROUTING IEEE80211_DEBUG \
56 IEEE80211_SUPPORT_MESH DEV_BPF \
57 ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA}
58 .if ${MK_BHYVE_SNAPSHOT} != "no"
59 KERN_OPTS+= BHYVE_SNAPSHOT
61 .if ${MK_INET_SUPPORT} != "no"
62 KERN_OPTS+= INET TCP_OFFLOAD
64 .if ${MK_INET6_SUPPORT} != "no"
67 .if ${MK_IPSEC_SUPPORT} != "no"
68 KERN_OPTS+= IPSEC_SUPPORT
70 .if ${MK_SCTP_SUPPORT} != "no"
71 KERN_OPTS+= SCTP_SUPPORT
73 .elif !defined(KERN_OPTS)
74 # Add all the options that are mentioned in any opt_*.h file when we
75 # have a kernel build directory to pull them from.
76 KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u
80 .if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \
81 (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH))
82 __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m