config.mk revision 365270
1278958Simp# $FreeBSD: stable/11/sys/conf/config.mk 365270 2020-09-02 19:02:48Z 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
22365270Sjhbopt_ipsec.h:
23365270Sjhb	@echo "#define IPSEC_SUPPORT 1" > ${.TARGET}
24278958Simp.if ${MK_EISA} != "no"
25278958Simpopt_eisa.h:
26278958Simp	@echo "#define DEV_EISA 1" > ${.TARGET}
27278958Simp.endif
28278958Simpopt_mrouting.h:
29278958Simp	echo "#define MROUTING 1" > ${.TARGET}
30278958Simpopt_natm.h:
31278958Simp	echo "#define NATM 1" > ${.TARGET}
32278958Simpopt_scsi.h:
33278958Simp	echo "#define SCSI_DELAY 15000" > ${.TARGET}
34278958Simpopt_wlan.h:
35278958Simp	echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
36278958Simp	echo "#define IEEE80211_AMPDU_AGE 1" >> ${.TARGET}
37278958Simp	echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET}
38278958SimpKERN_OPTS.i386=NEW_PCIB DEV_PCI
39278958SimpKERN_OPTS.pc98=NEW_PCIB DEV_PCI
40278958SimpKERN_OPTS.amd64=NEW_PCIB DEV_PCI
41278958SimpKERN_OPTS.powerpc=NEW_PCIB DEV_PCI
42278958SimpKERN_OPTS=MROUTING NATM IEEE80211_DEBUG \
43278958Simp	IEEE80211_AMPDU_AGE IEEE80211_SUPPORT_MESH DEV_BPF \
44278958Simp	${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA}
45278958Simp.if ${MK_INET_SUPPORT} != "no"
46278958SimpKERN_OPTS+= INET TCP_OFFLOAD
47278958Simp.endif
48278958Simp.if ${MK_INET6_SUPPORT} != "no"
49278958SimpKERN_OPTS+= INET6
50278958Simp.endif
51278958Simp.if ${MK_EISA} != "no"
52278958SimpKERN_OPTS+= DEV_EISA
53278958Simp.endif
54296770Sbdrewery.elif !defined(KERN_OPTS)
55278958SimpKERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u
56296770Sbdrewery.export KERN_OPTS
57278958Simp.endif
58296771Sbdrewery
59303314Sbdrewery.if !defined(NO_MODULES) && !defined(__MPATH)
60296771Sbdrewery__MPATH!=find ${SYSDIR:tA}/ -name \*_if.m
61296771Sbdrewery.export __MPATH
62296771Sbdrewery.endif
63