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 .if ${MACHINE} != "mips"
14 @echo "#define VIMAGE 1" >> ${.TARGET}
17 echo "#define DEV_BPF 1" > ${.TARGET}
18 .if ${MK_INET_SUPPORT} != "no"
20 @echo "#define INET 1" > ${.TARGET}
21 @echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
23 .if ${MK_INET6_SUPPORT} != "no"
25 @echo "#define INET6 1" > ${.TARGET}
27 .if ${MK_RATELIMIT} != "no"
29 @echo "#define RATELIMIT 1" > ${.TARGET}
32 echo "#define MROUTING 1" > ${.TARGET}
34 echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET}
36 echo "#define SCSI_DELAY 15000" > ${.TARGET}
38 echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
39 echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET}
40 KERN_OPTS.i386=NEW_PCIB DEV_PCI
41 KERN_OPTS.amd64=NEW_PCIB DEV_PCI
42 KERN_OPTS.powerpc=NEW_PCIB DEV_PCI
43 KERN_OPTS=MROUTING IEEE80211_DEBUG \
44 IEEE80211_SUPPORT_MESH DEV_BPF \
45 ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA}
46 .if ${MK_INET_SUPPORT} != "no"
47 KERN_OPTS+= INET TCP_OFFLOAD
49 .if ${MK_INET6_SUPPORT} != "no"
52 .elif !defined(KERN_OPTS)
53 # Add all the options that are mentioned in any opt_*.h file when we
54 # have a kernel build directory to pull them from.
55 KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u
59 .if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \
60 (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH))
61 __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m