Move most of the 15 variations on generating opt_inet.h and

opt_inet6.h into kmod.mk by forcing almost everybody to eat the same
dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h
targets here too.
This commit is contained in:
imp 2014-08-04 22:37:02 +00:00
parent 3877f6fdd8
commit 661b96f06e
69 changed files with 47 additions and 674 deletions

View File

@ -18,6 +18,8 @@
__DEFAULT_YES_OPTIONS = \
ARM_EABI \
FORMAT_EXTENSIONS \
INET \
INET6 \
KERNEL_SYMBOLS
# expanded inline from bsd.mkopt.mk:
@ -32,3 +34,17 @@ MK_${var}:= yes
.endif
.endfor
.undef __DEFAULT_YES_OPTIONS
#
# MK_*_SUPPORT options which default to "yes" unless their corresponding
# MK_* variable is set to "no".
#
.for var in \
INET \
INET6
.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
MK_${var}_SUPPORT:= no
.else
MK_${var}_SUPPORT:= yes
.endif
.endfor

View File

@ -315,6 +315,34 @@ unload:
${KMODUNLOAD} -v ${PROG}
.endif
# Generate options files that otherwise would be built
# in substantially similar ways through the tree. Move
# the code here when they all produce identical results
# (or should)
.if !defined(KERNBUILDDIR)
opt_bpf.h:
echo "#define DEV_BPF 1" > ${.TARGET}
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
opt_mrouting.h:
echo "#define MROUTING 1" > ${.TARGET}
opt_natm.h:
echo "#define NATM 1" > ${.TARGET}
opt_scsi.h:
echo "#define SCSI_DELAY 15000" > ${.TARGET}
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
echo "#define IEEE80211_AMPDU_AGE 1" >> ${.TARGET}
echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET}
.endif
.if defined(KERNBUILDDIR)
.PATH: ${KERNBUILDDIR}
CFLAGS+= -I${KERNBUILDDIR}

View File

@ -7,9 +7,4 @@ SRCS= if_an.c if_an_pccard.c if_an_pci.c if_an_isa.c
SRCS+= opt_inet.h device_if.h bus_if.h pci_if.h isa_if.h card_if.h
SRCS+= pccarddevs.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -16,12 +16,4 @@ EXPORT_SYMS= arc_frag_init \
arc_output \
arc_storelladdr
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -43,9 +43,4 @@ SRCS+= ata_pmp.c
EXPORT_SYMS= YES # XXX evaluate
.if !defined(KERNBUILDDIR)
opt_scsi.h:
echo "#define SCSI_DELAY 15000" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -3,23 +3,9 @@
.PATH: ${.CURDIR}/../../netinet
.PATH: ${.CURDIR}/../../crypto
.include <src.opts.mk>
KMOD= carp
SRCS= ip_carp.c sha1.c
SRCS+= device_if.h bus_if.h vnode_if.h
SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
CXGB = ${.CURDIR}/../../../dev/cxgb
.PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys
@ -15,17 +13,4 @@ SRCS+= uipc_mvec.c
CFLAGS+= -g -DDEFAULT_JUMBO -I${CXGB}
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
CXGB = ${.CURDIR}/../../../dev/cxgb
.PATH: ${CXGB}/ulp/iw_cxgb
@ -13,12 +11,4 @@ SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h opt_ktr.h
SRCS+= opt_inet.h opt_ofed.h vnode_if.h
CFLAGS+= -I${CXGB} -I${.CURDIR}/../../../ofed/include -DLINUX_TYPES_DEFINED
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
CXGB = ${.CURDIR}/../../../dev/cxgb
.PATH: ${CXGB}/ulp/tom
@ -14,12 +12,4 @@ CFLAGS+= -g -I${CXGB}
#CFLAGS+= -DDEBUG_PRINT -DDEBUG
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -2,8 +2,6 @@
# $FreeBSD$
#
.include <src.opts.mk>
CXGBE= ${.CURDIR}/../../../dev/cxgbe
.PATH: ${CXGBE} ${CXGBE}/common
@ -26,17 +24,4 @@ SRCS+= t4_tracer.c
CFLAGS+= -I${CXGBE}
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
CXGBE= ${.CURDIR}/../../../dev/cxgbe
.PATH: ${CXGBE}/iw_cxgbe
@ -27,17 +25,4 @@ SRCS+= vnode_if.h
CFLAGS+= -I${CXGBE} -I${.CURDIR}/../../../ofed/include -DLINUX_TYPES_DEFINED
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -2,8 +2,6 @@
# $FreeBSD$
#
.include <src.opts.mk>
CXGBE= ${.CURDIR}/../../../dev/cxgbe
.PATH: ${CXGBE}/tom
@ -22,17 +20,4 @@ SRCS+= t4_tom_l2t.c
CFLAGS+= -I${CXGBE}
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../netpfil/ipfw
KMOD= dummynet
SRCS= ip_dummynet.c
@ -10,11 +8,4 @@ SRCS+= dn_heap.c dn_sched_fifo.c dn_sched_qfq.c dn_sched_rr.c dn_sched_wf2q.c
SRCS+= dn_sched_prio.c
SRCS+= opt_inet6.h
.if !defined(KERNBUILDDIR)
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../dev/e1000
KMOD = if_em
SRCS = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h
@ -21,16 +19,4 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000
# DEVICE_POLLING for a non-interrupt-driven method
#CFLAGS += -DDEVICE_POLLING
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -8,15 +8,4 @@ SRCS+= opt_inet.h opt_natm.h opt_ddb.h
CFLAGS+= -DENABLE_BPF
# CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS -DEN_DEBUG=0
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_natm.h:
echo "#define NATM 1" > ${.TARGET}
# opt_ddb.h:
# echo "#define DDB 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -9,12 +9,4 @@ SRCS= if_fatm.c device_if.h bus_if.h pci_if.h opt_inet.h opt_natm.h
# CFLAGS+= -DFATM_DEBUG=0 -DINVARIANT_SUPPORT -DINVARIANTS
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_natm.h:
echo "#define NATM 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -11,11 +11,6 @@ SRCS = bus_if.h device_if.h \
firewire.h firewirereg.h \
if_fwsubr.c
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
#CFLAGS += -DDEVICE_POLLING
.include <bsd.kmod.mk>

View File

@ -11,12 +11,4 @@ SRCS= if_hatm.c if_hatm_intr.c if_hatm_ioctl.c if_hatm_tx.c if_hatm_rx.c \
CFLAGS+= -DENABLE_BPF
# CFLAGS+= -DHATM_DEBUG -DINVARIANT_SUPPORT -DINVARIANTS
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_natm.h:
echo "#define NATM 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
#$FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../dev/i40e
KMOD = if_i40e
@ -18,16 +16,4 @@ CFLAGS += -DSMP
# Debug messages / sysctls
# CFLAGS += -DI40E_DEBUG
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,19 +1,7 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../net
KMOD= if_bridge
SRCS= if_bridge.c opt_inet.h opt_inet6.h opt_carp.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -5,12 +5,4 @@
KMOD= if_disc
SRCS= if_disc.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
#opt_inet6.h:
# echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -5,12 +5,4 @@
KMOD= if_faith
SRCS= if_faith.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -7,21 +7,10 @@
KMOD= if_gif
SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mrouting.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
opt_mrouting.h:
echo "#define MROUTING 1" > ${.TARGET}
.else
.if defined(KERNBUILDDIR)
OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h
.if empty(OPT_INET6)
MK_INET6_SUPPORT= no
.if !empty(OPT_INET6)
MK_INET6_SUPPORT=no
.endif
.endif

View File

@ -5,12 +5,4 @@
KMOD= if_gre
SRCS= if_gre.c ip_gre.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -1,19 +1,7 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../net
KMOD= if_lagg
SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -5,12 +5,4 @@
KMOD= if_stf
SRCS= if_stf.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -10,9 +10,6 @@ SRCS= if_tap.c opt_compat.h opt_inet.h vnode_if.h
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_FREEBSD6 1" > ${.TARGET}
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -5,12 +5,4 @@
KMOD= if_tun
SRCS= if_tun.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
#$FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../dev/e1000
KMOD = if_igb
SRCS = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h opt_rss.h
@ -23,20 +21,4 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 -DSMP
# ALTQ.
#CFLAGS += -DIGB_LEGACY_TX
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
opt_rss.h:
@echo "" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -7,11 +7,4 @@ KMOD= ip6_mroute
SRCS= ip6_mroute.c
SRCS+= opt_inet6.h opt_mrouting.h
.if !defined(KERNBUILDDIR)
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
opt_mrouting.h:
echo "#define MROUTING 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -7,11 +7,4 @@ KMOD= ip_mroute
SRCS= ip_mroute.c
SRCS+= opt_inet.h opt_mrouting.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_mrouting.h:
echo "#define MROUTING 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -1,21 +1,8 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../netinet
KMOD= ipdivert
SRCS= ip_divert.c opt_inet.h opt_inet6.h opt_sctp.h
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../contrib/ipfilter/netinet
KMOD= ipl
@ -11,15 +9,6 @@ SRCS= mlfk_ipl.c ip_nat.c ip_frag.c ip_state.c ip_proxy.c ip_auth.c \
ip_nat6.c ip_rules.c ip_scan.c ip_dstlist.c radix_ipf.c
SRCS+= opt_bpf.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_bpf.h:
echo "#define DEV_BPF 1" > ${.TARGET}
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
CFLAGS+= -I${.CURDIR}/../../contrib/ipfilter
CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP
#

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../netpfil/ipfw
KMOD= ipfw
@ -20,15 +18,4 @@ CFLAGS+= -DIPFIREWALL
#CFLAGS+= -DIPFIREWALL_DEFAULT_TO_ACCEPT
#
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -2,8 +2,6 @@
.PATH: ${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib
.PATH: ${.CURDIR}/../../ofed/include/linux
.include <src.opts.mk>
KMOD = ipoib
SRCS = device_if.h bus_if.h opt_ofed.h vnode_if.h opt_inet.h opt_inet6.h
SRCS += ipoib_cm.c ipoib_ib.c ipoib_main.c ipoib_multicast.c ipoib_verbs.c ipoib.h
@ -14,18 +12,6 @@ CFLAGS+= -I${.CURDIR}/../ibcore
CFLAGS+= -I${.CURDIR}/../../ofed/include/
CFLAGS+= -DINET6 -DINET -DOFED
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -1,7 +1,5 @@
#$FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../dev/ixgbe
KMOD = if_ixgbe
@ -14,20 +12,4 @@ SRCS += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
SRCS += ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c
CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP -DIXGBE_FDIR
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
opt_rss.h:
@echo "" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -32,13 +32,4 @@ SRCS+= xdr.c \
SRCS+= opt_inet6.h
.if !defined(KERNBUILDDIR)
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
.if ${NFS_INET6} > 0
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -56,8 +56,6 @@ linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine x86
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
.if !defined(KERNBUILDDIR)
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.if defined(KTR)
CFLAGS+= -DKTR
.endif

View File

@ -10,15 +10,9 @@ SRCS += opt_netgraph.h
SRCS += opt_global.h
SRCS += opt_bpf.h
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 0" > ${.TARGET}
opt_netgraph.h:
echo "#define NETGRAPH 1" > ${.TARGET}
opt_global.h:
echo "#define ALTQ 1" > ${.TARGET}
opt_bpf.h: # FreeBSD-5:
echo "#define DEV_BPF 1" > ${.TARGET}
.include <bsd.kmod.mk>

View File

@ -1,8 +1,5 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../ofed/include/linux
KMOD = mlx4
SRCS = device_if.h bus_if.h pci_if.h vnode_if.h
@ -12,18 +9,6 @@ SRCS+= pd.c port.c profile.c qp.c reset.c sense.c srq.c resource_tracker.c sys_t
CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4
CFLAGS+= -I${.CURDIR}/../../ofed/include/
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -2,8 +2,6 @@
.PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4
.PATH: ${.CURDIR}/../../ofed/include/linux
.include <src.opts.mk>
KMOD = mlx4ib
SRCS = device_if.h bus_if.h pci_if.h vnode_if.h
SRCS+= linux_compat.c linux_radix.c linux_idr.c
@ -17,18 +15,6 @@ CFLAGS+= -I${.CURDIR}/../../ofed/include/
CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM
CFLAGS+= -DINET6 -DINET -DOFED
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -1,8 +1,6 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4
.include <src.opts.mk>
KMOD = mlxen
SRCS = device_if.h bus_if.h pci_if.h vnode_if.h
SRCS += en_cq.c en_frag.c en_main.c en_netdev.c en_port.c en_resources.c
@ -11,18 +9,6 @@ SRCS += opt_inet.h opt_inet6.h
CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4
CFLAGS+= -I${.CURDIR}/../../ofed/include/
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -2,8 +2,6 @@
.PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mthca
.include <src.opts.mk>
KMOD = mthca
SRCS = device_if.h bus_if.h pci_if.h vnode_if.h
SRCS+= mthca_allocator.c mthca_av.c mthca_catas.c mthca_cmd.c mthca_cq.c
@ -14,18 +12,6 @@ SRCS+= opt_inet.h opt_inet6.h
CFLAGS+= -I${.CURDIR}/../../ofed/include
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -3,12 +3,4 @@
KMOD= ng_gif
SRCS= ng_gif.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -4,12 +4,4 @@
KMOD= ng_iface
SRCS= ng_iface.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -1,20 +1,6 @@
# $FreeBSD$
.include <src.opts.mk>
KMOD= ng_ipfw
SRCS= ng_ipfw.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -3,20 +3,9 @@
# Author: Gleb Smirnoff <glebius@freebsd.org>
#
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../../netgraph/netflow
KMOD= ng_netflow
SRCS= ng_netflow.c netflow.c netflow_v9.c opt_inet6.h opt_route.h
.if !defined(KERNBUILDDIR)
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -23,20 +23,8 @@ SRCS= vnode_if.h \
opt_ufs.h
.if !defined(KERNBUILDDIR)
NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
NFS_ROOT?= 1 # 0/1 - requires NFS_ROOT to be configured in kernel
.if ${NFS_INET} > 0
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${NFS_INET6} > 0
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.if ${NFS_ROOT} > 0
opt_nfsroot.h:
echo "#define NFS_ROOT 1" > ${.TARGET}

View File

@ -10,20 +10,8 @@ SRCS= vnode_if.h \
SRCS+= opt_inet6.h opt_kgssapi.h
.if !defined(KERNBUILDDIR)
NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
NFS_ROOT?= 1 # 0/1 - requires NFS_ROOT to be configured in kernel
.if ${NFS_INET} > 0
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${NFS_INET6} > 0
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.if ${NFS_ROOT} > 0
opt_nfsroot.h:
echo "#define NFS_ROOT 1" > ${.TARGET}

View File

@ -12,14 +12,4 @@ SRCS= vnode_if.h \
sm_inter_xdr.c
SRCS+= opt_inet6.h opt_nfs.h
.if !defined(KERNBUILDDIR)
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
.if ${NFS_INET6} > 0
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -9,13 +9,4 @@ SRCS= vnode_if.h \
opt_nfs.h
SRCS+= opt_inet6.h
.if !defined(KERNBUILDDIR)
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
.if ${NFS_INET6} > 0
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -12,12 +12,4 @@ SRCS= if_patm.c if_patm_attach.c if_patm_ioctl.c if_patm_intr.c \
CFLAGS+= -DENABLE_BPF
# CFLAGS+= -DPATM_DEBUG=0x0 -DINVARIANT_SUPPORT -DINVARIANTS -DDIAGNOSTIC
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_natm.h:
echo "#define NATM 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../netpfil/pf
KMOD= pf
@ -11,19 +9,6 @@ SRCS= pf.c pf_if.c pf_lb.c pf_osfp.c pf_ioctl.c pf_norm.c pf_table.c \
opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h opt_global.h
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
opt_bpf.h:
echo "#define DEV_BPF 1" > ${.TARGET}
# pflog can be loaded as a module, have the additional checks turned on
# pfsync can be loaded as a module, have the additional checks turned on
opt_pf.h:

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../netpfil/pf
KMOD= pflog
@ -12,19 +10,6 @@ SRCS+= bus_if.h device_if.h
.if defined(KERNBUILDDIR)
MKDEP+= -include ${KERNBUILDDIR}/opt_global.h
.else
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
opt_bpf.h:
echo "#define DEV_BPF 1" > ${.TARGET}
.if defined(VIMAGE)
opt_global.h:
echo "#define VIMAGE 1" >> ${.TARGET}

View File

@ -1,7 +1,5 @@
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../netpfil/pf
KMOD= pfsync
@ -12,16 +10,6 @@ SRCS+= bus_if.h device_if.h
.if defined(KERNBUILDDIR)
MKDEP+= -include ${KERNBUILDDIR}/opt_global.h
.else
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.if defined(VIMAGE)
opt_global.h:
echo "#define VIMAGE 1" >> ${.TARGET}

View File

@ -26,20 +26,10 @@ SRCS+= des_enc.S
SRCS+= des_enc.c
.endif
# Build with INET support (1|0)
SMB_INET?= 1
CFLAGS+= ${KDEBUG}
.if defined(VNPRINT)
CFLAGS+= -DVNPRINT
.endif
.if !defined(KERNBUILDDIR)
.if ${SMB_INET} > 0
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -6,9 +6,4 @@ KMOD= if_snc
SRCS= if_snc.c if_snc_cbus.c if_snc_pccard.c dp83932.c dp83932subr.c
SRCS+= opt_inet.h device_if.h bus_if.h isa_if.h card_if.h pccarddevs.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -15,12 +15,4 @@ EXPORT_SYMS= sppp_attach \
sppp_isempty \
sppp_flush
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -6,9 +6,4 @@ KMOD= trm
SRCS= trm.c trm.h opt_cam.h device_if.h bus_if.h \
opt_scsi.h pci_if.h
.if !defined(KERNBUILDDIR)
opt_scsi.h:
echo "#define SCSI_DELAY 15000" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -23,8 +23,6 @@
# SUCH DAMAGE.
#
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../../dev/virtio/network
KMOD= if_vtnet
@ -36,16 +34,4 @@ SRCS+= opt_inet.h opt_inet6.h
MFILES= kern/bus_if.m kern/device_if.m \
dev/virtio/virtio_bus_if.m dev/virtio/virtio_if.m
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -23,8 +23,6 @@
# SUCH DAMAGE.
#
.include <src.opts.mk>
.PATH: ${.CURDIR}/../../../dev/vmware/vmxnet3
KMOD= if_vmx
@ -35,16 +33,4 @@ SRCS+= bus_if.h device_if.h pci_if.h opt_inet.h opt_inet6.h
# capable if_start interface.
#CFLAGS+= -DVMXNET3_LEGACY_TX
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
@echo "#define INET 1" > ${.TARGET}
.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

View File

@ -16,18 +16,6 @@ SRCS= ieee80211.c ieee80211_action.c ieee80211_ageq.c \
SRCS+= bus_if.h device_if.h opt_ddb.h opt_inet.h opt_inet6.h \
opt_tdma.h opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
echo "#define IEEE80211_AMPDU_AGE 1" >> ${.TARGET}
echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET}
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
# override to get ddb support?
opt_ddb.h:
:> ${.TARGET}
.endif
.include <bsd.kmod.mk>
CWARNFLAGS.ieee80211_adhoc.c= -Wno-unused-function

View File

@ -6,9 +6,4 @@ KMOD= wlan_acl
SRCS= ieee80211_acl.c
SRCS+= opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -6,9 +6,4 @@ KMOD= wlan_amrr
SRCS= ieee80211_amrr.c
SRCS+= opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -8,9 +8,4 @@ SRCS= ieee80211_crypto_ccmp.c
SRCS+= rijndael-alg-fst.c rijndael-api.c
SRCS+= opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -6,9 +6,4 @@ KMOD= wlan_rssadapt
SRCS= ieee80211_rssadapt.c
SRCS+= opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -6,9 +6,4 @@ KMOD= wlan_tkip
SRCS= ieee80211_crypto_tkip.c
SRCS+= opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -6,9 +6,4 @@ KMOD= wlan_wep
SRCS= ieee80211_crypto_wep.c
SRCS+= opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

View File

@ -6,9 +6,4 @@ KMOD= wlan_xauth
SRCS= ieee80211_xauth.c
SRCS+= opt_wlan.h
.if !defined(KERNBUILDDIR)
opt_wlan.h:
echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>