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_bpf.h: 12 echo "#define DEV_BPF 1" > ${.TARGET} 13.if ${MK_INET_SUPPORT} != "no" 14opt_inet.h: 15 @echo "#define INET 1" > ${.TARGET} 16 @echo "#define TCP_OFFLOAD 1" >> ${.TARGET} 17.endif 18.if ${MK_INET6_SUPPORT} != "no" 19opt_inet6.h: 20 @echo "#define INET6 1" > ${.TARGET} 21.endif 22.if ${MK_EISA} != "no" 23opt_eisa.h: 24 @echo "#define DEV_EISA 1" > ${.TARGET} 25.endif 26opt_mrouting.h: 27 echo "#define MROUTING 1" > ${.TARGET} 28opt_natm.h: 29 echo "#define NATM 1" > ${.TARGET} 30opt_scsi.h: 31 echo "#define SCSI_DELAY 15000" > ${.TARGET} 32opt_wlan.h: 33 echo "#define IEEE80211_DEBUG 1" > ${.TARGET} 34 echo "#define IEEE80211_AMPDU_AGE 1" >> ${.TARGET} 35 echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET} 36KERN_OPTS.i386=NEW_PCIB DEV_PCI 37KERN_OPTS.pc98=NEW_PCIB DEV_PCI 38KERN_OPTS.amd64=NEW_PCIB DEV_PCI 39KERN_OPTS.powerpc=NEW_PCIB DEV_PCI 40KERN_OPTS=MROUTING NATM IEEE80211_DEBUG \ 41 IEEE80211_AMPDU_AGE IEEE80211_SUPPORT_MESH DEV_BPF \ 42 ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA} 43.if ${MK_INET_SUPPORT} != "no" 44KERN_OPTS+= INET TCP_OFFLOAD 45.endif 46.if ${MK_INET6_SUPPORT} != "no" 47KERN_OPTS+= INET6 48.endif 49.if ${MK_EISA} != "no" 50KERN_OPTS+= DEV_EISA 51.endif 52.else 53KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u 54.endif 55