1# $FreeBSD$ 2# 3# Common code to marry kernel config(8) goo and module building goo. 4# 5 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 9# (or should) 10.if !defined(KERNBUILDDIR) 11opt_global.h: 12 echo "#define DEV_RANDOM 1" >> ${.TARGET} 13opt_bpf.h: 14 echo "#define DEV_BPF 1" > ${.TARGET} 15.if ${MK_INET_SUPPORT} != "no" 16opt_inet.h: 17 @echo "#define INET 1" > ${.TARGET} 18 @echo "#define TCP_OFFLOAD 1" >> ${.TARGET} 19.endif 20.if ${MK_INET6_SUPPORT} != "no" 21opt_inet6.h: 22 @echo "#define INET6 1" > ${.TARGET} 23.endif 24.if ${MK_RATELIMIT} != "no" 25opt_ratelimit.h: 26 @echo "#define RATELIMIT 1" > ${.TARGET} 27.endif 28opt_mrouting.h: 29 echo "#define MROUTING 1" > ${.TARGET} 30opt_printf.h: 31 echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET} 32opt_scsi.h: 33 echo "#define SCSI_DELAY 15000" > ${.TARGET} 34opt_wlan.h: 35 echo "#define IEEE80211_DEBUG 1" > ${.TARGET} 36 echo "#define IEEE80211_AMPDU_AGE 1" >> ${.TARGET} 37 echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET} 38KERN_OPTS.i386=NEW_PCIB DEV_PCI 39KERN_OPTS.amd64=NEW_PCIB DEV_PCI 40KERN_OPTS.powerpc=NEW_PCIB DEV_PCI 41KERN_OPTS=MROUTING IEEE80211_DEBUG \ 42 IEEE80211_AMPDU_AGE IEEE80211_SUPPORT_MESH DEV_BPF \ 43 ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA} 44.if ${MK_INET_SUPPORT} != "no" 45KERN_OPTS+= INET TCP_OFFLOAD 46.endif 47.if ${MK_INET6_SUPPORT} != "no" 48KERN_OPTS+= INET6 49.endif 50.elif !defined(KERN_OPTS) 51KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u 52.export KERN_OPTS 53.endif 54 55.if !defined(NO_MODULES) && !defined(__MPATH) 56__MPATH!=find ${SYSDIR:tA}/ -name \*_if.m 57.export __MPATH 58.endif 59