1278958Simp# $FreeBSD: stable/11/sys/conf/config.mk 365281 2020-09-02 21:36:55Z jhb $
2278958Simp#
3278958Simp# Common code to marry kernel config(8) goo and module building goo.
4278958Simp#
5278958Simp
6278958Simp# Generate options files that otherwise would be built
7278958Simp# in substantially similar ways through the tree. Move
8278958Simp# the code here when they all produce identical results
9278958Simp# (or should)
10278958Simp.if !defined(KERNBUILDDIR)
11278958Simpopt_bpf.h:
12278958Simp	echo "#define DEV_BPF 1" > ${.TARGET}
13278958Simp.if ${MK_INET_SUPPORT} != "no"
14278958Simpopt_inet.h:
15278958Simp	@echo "#define INET 1" > ${.TARGET}
16278958Simp	@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
17278958Simp.endif
18278958Simp.if ${MK_INET6_SUPPORT} != "no"
19278958Simpopt_inet6.h:
20278958Simp	@echo "#define INET6 1" > ${.TARGET}
21278958Simp.endif
22365281Sjhb.if ${MK_IPSEC_SUPPORT} != "no"
23365270Sjhbopt_ipsec.h:
24365270Sjhb	@echo "#define IPSEC_SUPPORT 1" > ${.TARGET}
25365281Sjhb.endif
26278958Simp.if ${MK_EISA} != "no"
27278958Simpopt_eisa.h:
28278958Simp	@echo "#define DEV_EISA 1" > ${.TARGET}
29278958Simp.endif
30278958Simpopt_mrouting.h:
31278958Simp	echo "#define MROUTING 1" > ${.TARGET}
32278958Simpopt_natm.h:
33278958Simp	echo "#define NATM 1" > ${.TARGET}
34278958Simpopt_scsi.h:
35278958Simp	echo "#define SCSI_DELAY 15000" > ${.TARGET}
36278958Simpopt_wlan.h:
37278958Simp	echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
38278958Simp	echo "#define IEEE80211_AMPDU_AGE 1" >> ${.TARGET}
39278958Simp	echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET}
40278958SimpKERN_OPTS.i386=NEW_PCIB DEV_PCI
41278958SimpKERN_OPTS.pc98=NEW_PCIB DEV_PCI
42278958SimpKERN_OPTS.amd64=NEW_PCIB DEV_PCI
43278958SimpKERN_OPTS.powerpc=NEW_PCIB DEV_PCI
44278958SimpKERN_OPTS=MROUTING NATM IEEE80211_DEBUG \
45278958Simp	IEEE80211_AMPDU_AGE IEEE80211_SUPPORT_MESH DEV_BPF \
46278958Simp	${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA}
47278958Simp.if ${MK_INET_SUPPORT} != "no"
48278958SimpKERN_OPTS+= INET TCP_OFFLOAD
49278958Simp.endif
50278958Simp.if ${MK_INET6_SUPPORT} != "no"
51278958SimpKERN_OPTS+= INET6
52278958Simp.endif
53365281Sjhb.if ${MK_IPSEC_SUPPORT} != "no"
54365281SjhbKERN_OPTS+= IPSEC_SUPPORT
55365281Sjhb.endif
56278958Simp.if ${MK_EISA} != "no"
57278958SimpKERN_OPTS+= DEV_EISA
58278958Simp.endif
59296770Sbdrewery.elif !defined(KERN_OPTS)
60278958SimpKERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u
61296770Sbdrewery.export KERN_OPTS
62278958Simp.endif
63296771Sbdrewery
64303314Sbdrewery.if !defined(NO_MODULES) && !defined(__MPATH)
65296771Sbdrewery__MPATH!=find ${SYSDIR:tA}/ -name \*_if.m
66296771Sbdrewery.export __MPATH
67296771Sbdrewery.endif
68