From 661b96f06e13e80cbb17562fe9f9672c7759429d Mon Sep 17 00:00:00 2001 From: imp Date: Mon, 4 Aug 2014 22:37:02 +0000 Subject: [PATCH] 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. --- sys/conf/kern.opts.mk | 16 +++++++++++++++ sys/conf/kmod.mk | 28 +++++++++++++++++++++++++++ sys/modules/an/Makefile | 5 ----- sys/modules/arcnet/Makefile | 8 -------- sys/modules/cam/Makefile | 5 ----- sys/modules/carp/Makefile | 14 -------------- sys/modules/cxgb/cxgb/Makefile | 15 -------------- sys/modules/cxgb/iw_cxgb/Makefile | 10 ---------- sys/modules/cxgb/tom/Makefile | 10 ---------- sys/modules/cxgbe/if_cxgbe/Makefile | 15 -------------- sys/modules/cxgbe/iw_cxgbe/Makefile | 15 -------------- sys/modules/cxgbe/tom/Makefile | 15 -------------- sys/modules/dummynet/Makefile | 9 --------- sys/modules/em/Makefile | 14 -------------- sys/modules/en/Makefile | 11 ----------- sys/modules/fatm/Makefile | 8 -------- sys/modules/firewire/fwip/Makefile | 5 ----- sys/modules/hatm/Makefile | 8 -------- sys/modules/i40e/Makefile | 14 -------------- sys/modules/if_bridge/Makefile | 12 ------------ sys/modules/if_disc/Makefile | 8 -------- sys/modules/if_faith/Makefile | 8 -------- sys/modules/if_gif/Makefile | 17 +++------------- sys/modules/if_gre/Makefile | 8 -------- sys/modules/if_lagg/Makefile | 12 ------------ sys/modules/if_stf/Makefile | 8 -------- sys/modules/if_tap/Makefile | 3 --- sys/modules/if_tun/Makefile | 8 -------- sys/modules/igb/Makefile | 18 ----------------- sys/modules/ip6_mroute_mod/Makefile | 7 ------- sys/modules/ip_mroute_mod/Makefile | 7 ------- sys/modules/ipdivert/Makefile | 13 ------------- sys/modules/ipfilter/Makefile | 11 ----------- sys/modules/ipfw/Makefile | 13 ------------- sys/modules/ipoib/Makefile | 14 -------------- sys/modules/ixgbe/Makefile | 18 ----------------- sys/modules/krpc/Makefile | 9 --------- sys/modules/linux/Makefile | 2 -- sys/modules/lmc/Makefile | 6 ------ sys/modules/mlx4/Makefile | 15 -------------- sys/modules/mlx4ib/Makefile | 14 -------------- sys/modules/mlxen/Makefile | 14 -------------- sys/modules/mthca/Makefile | 14 -------------- sys/modules/netgraph/gif/Makefile | 8 -------- sys/modules/netgraph/iface/Makefile | 8 -------- sys/modules/netgraph/ipfw/Makefile | 14 -------------- sys/modules/netgraph/netflow/Makefile | 11 ----------- sys/modules/nfscl/Makefile | 12 ------------ sys/modules/nfsclient/Makefile | 12 ------------ sys/modules/nfslockd/Makefile | 10 ---------- sys/modules/nfsserver/Makefile | 9 --------- sys/modules/patm/Makefile | 8 -------- sys/modules/pf/Makefile | 15 -------------- sys/modules/pflog/Makefile | 15 -------------- sys/modules/pfsync/Makefile | 12 ------------ sys/modules/smbfs/Makefile | 10 ---------- sys/modules/snc/Makefile | 5 ----- sys/modules/sppp/Makefile | 8 -------- sys/modules/trm/Makefile | 5 ----- sys/modules/virtio/network/Makefile | 14 -------------- sys/modules/vmware/vmxnet3/Makefile | 14 -------------- sys/modules/wlan/Makefile | 12 ------------ sys/modules/wlan_acl/Makefile | 5 ----- sys/modules/wlan_amrr/Makefile | 5 ----- sys/modules/wlan_ccmp/Makefile | 5 ----- sys/modules/wlan_rssadapt/Makefile | 5 ----- sys/modules/wlan_tkip/Makefile | 5 ----- sys/modules/wlan_wep/Makefile | 5 ----- sys/modules/wlan_xauth/Makefile | 5 ----- 69 files changed, 47 insertions(+), 674 deletions(-) diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index c7842b65343f..aab1808eee62 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -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 diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 2399c4cfe4bc..090031c774c3 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -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} diff --git a/sys/modules/an/Makefile b/sys/modules/an/Makefile index b22f9d1144fb..82c4421fffb7 100644 --- a/sys/modules/an/Makefile +++ b/sys/modules/an/Makefile @@ -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 diff --git a/sys/modules/arcnet/Makefile b/sys/modules/arcnet/Makefile index 0b55a591bd17..2b2b4654f774 100644 --- a/sys/modules/arcnet/Makefile +++ b/sys/modules/arcnet/Makefile @@ -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 diff --git a/sys/modules/cam/Makefile b/sys/modules/cam/Makefile index c3ecf56af8f9..7e5465edebb3 100644 --- a/sys/modules/cam/Makefile +++ b/sys/modules/cam/Makefile @@ -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 diff --git a/sys/modules/carp/Makefile b/sys/modules/carp/Makefile index 6b1bde0c4345..e1890d4c4f92 100644 --- a/sys/modules/carp/Makefile +++ b/sys/modules/carp/Makefile @@ -3,23 +3,9 @@ .PATH: ${.CURDIR}/../../netinet .PATH: ${.CURDIR}/../../crypto -.include - 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 diff --git a/sys/modules/cxgb/cxgb/Makefile b/sys/modules/cxgb/cxgb/Makefile index 3f0f68af2de4..911f2bb2ee14 100644 --- a/sys/modules/cxgb/cxgb/Makefile +++ b/sys/modules/cxgb/cxgb/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - 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 diff --git a/sys/modules/cxgb/iw_cxgb/Makefile b/sys/modules/cxgb/iw_cxgb/Makefile index 2ee4990b4646..8df1ffc28005 100644 --- a/sys/modules/cxgb/iw_cxgb/Makefile +++ b/sys/modules/cxgb/iw_cxgb/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - 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 diff --git a/sys/modules/cxgb/tom/Makefile b/sys/modules/cxgb/tom/Makefile index f4a277641fdb..64eecaf367fd 100644 --- a/sys/modules/cxgb/tom/Makefile +++ b/sys/modules/cxgb/tom/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - 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 diff --git a/sys/modules/cxgbe/if_cxgbe/Makefile b/sys/modules/cxgbe/if_cxgbe/Makefile index ec13ffe94cc7..e4828f7787ad 100644 --- a/sys/modules/cxgbe/if_cxgbe/Makefile +++ b/sys/modules/cxgbe/if_cxgbe/Makefile @@ -2,8 +2,6 @@ # $FreeBSD$ # -.include - 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 diff --git a/sys/modules/cxgbe/iw_cxgbe/Makefile b/sys/modules/cxgbe/iw_cxgbe/Makefile index b462032b0588..e1f362aa0b97 100644 --- a/sys/modules/cxgbe/iw_cxgbe/Makefile +++ b/sys/modules/cxgbe/iw_cxgbe/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - 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 diff --git a/sys/modules/cxgbe/tom/Makefile b/sys/modules/cxgbe/tom/Makefile index b0e2ef727259..5f460e04d65a 100644 --- a/sys/modules/cxgbe/tom/Makefile +++ b/sys/modules/cxgbe/tom/Makefile @@ -2,8 +2,6 @@ # $FreeBSD$ # -.include - 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 diff --git a/sys/modules/dummynet/Makefile b/sys/modules/dummynet/Makefile index c1f8bb1cfad7..d7d8b1be86e5 100644 --- a/sys/modules/dummynet/Makefile +++ b/sys/modules/dummynet/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .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 diff --git a/sys/modules/em/Makefile b/sys/modules/em/Makefile index 5e71f2f00eaf..3112d010a372 100644 --- a/sys/modules/em/Makefile +++ b/sys/modules/em/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .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 diff --git a/sys/modules/en/Makefile b/sys/modules/en/Makefile index 8f342e32fb3b..05672f03cdb8 100644 --- a/sys/modules/en/Makefile +++ b/sys/modules/en/Makefile @@ -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 diff --git a/sys/modules/fatm/Makefile b/sys/modules/fatm/Makefile index 3e0b8410fe25..8e1e7bb5d7bc 100644 --- a/sys/modules/fatm/Makefile +++ b/sys/modules/fatm/Makefile @@ -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 diff --git a/sys/modules/firewire/fwip/Makefile b/sys/modules/firewire/fwip/Makefile index f26f98c15dae..992d35601c98 100644 --- a/sys/modules/firewire/fwip/Makefile +++ b/sys/modules/firewire/fwip/Makefile @@ -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 diff --git a/sys/modules/hatm/Makefile b/sys/modules/hatm/Makefile index ec1a8788ebef..557819956597 100644 --- a/sys/modules/hatm/Makefile +++ b/sys/modules/hatm/Makefile @@ -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 diff --git a/sys/modules/i40e/Makefile b/sys/modules/i40e/Makefile index 0cd6cf434dfa..52608ce3bf58 100755 --- a/sys/modules/i40e/Makefile +++ b/sys/modules/i40e/Makefile @@ -1,7 +1,5 @@ #$FreeBSD$ -.include - .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 diff --git a/sys/modules/if_bridge/Makefile b/sys/modules/if_bridge/Makefile index 0cc231e3da1b..c4febee5006b 100644 --- a/sys/modules/if_bridge/Makefile +++ b/sys/modules/if_bridge/Makefile @@ -1,19 +1,7 @@ # $FreeBSD$ -.include - .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 diff --git a/sys/modules/if_disc/Makefile b/sys/modules/if_disc/Makefile index 9dc5742eaa0b..7a501f151c13 100644 --- a/sys/modules/if_disc/Makefile +++ b/sys/modules/if_disc/Makefile @@ -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 diff --git a/sys/modules/if_faith/Makefile b/sys/modules/if_faith/Makefile index a46d5fd399d6..fe78ec9be48c 100644 --- a/sys/modules/if_faith/Makefile +++ b/sys/modules/if_faith/Makefile @@ -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 diff --git a/sys/modules/if_gif/Makefile b/sys/modules/if_gif/Makefile index f2db9136f5fa..d9ad0046b0f3 100644 --- a/sys/modules/if_gif/Makefile +++ b/sys/modules/if_gif/Makefile @@ -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 diff --git a/sys/modules/if_gre/Makefile b/sys/modules/if_gre/Makefile index 4f79ec147ad5..9c618d3651ff 100644 --- a/sys/modules/if_gre/Makefile +++ b/sys/modules/if_gre/Makefile @@ -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 diff --git a/sys/modules/if_lagg/Makefile b/sys/modules/if_lagg/Makefile index f2f1a6e48406..cdcc8928f6c7 100644 --- a/sys/modules/if_lagg/Makefile +++ b/sys/modules/if_lagg/Makefile @@ -1,19 +1,7 @@ # $FreeBSD$ -.include - .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 diff --git a/sys/modules/if_stf/Makefile b/sys/modules/if_stf/Makefile index 5e8bd2fba27f..709c2555132b 100644 --- a/sys/modules/if_stf/Makefile +++ b/sys/modules/if_stf/Makefile @@ -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 diff --git a/sys/modules/if_tap/Makefile b/sys/modules/if_tap/Makefile index b993093a29db..af35fdbb5bfa 100644 --- a/sys/modules/if_tap/Makefile +++ b/sys/modules/if_tap/Makefile @@ -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 diff --git a/sys/modules/if_tun/Makefile b/sys/modules/if_tun/Makefile index 293846e585c1..4226329ddcde 100644 --- a/sys/modules/if_tun/Makefile +++ b/sys/modules/if_tun/Makefile @@ -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 diff --git a/sys/modules/igb/Makefile b/sys/modules/igb/Makefile index 0aa044dd6882..57a74fa89ff5 100644 --- a/sys/modules/igb/Makefile +++ b/sys/modules/igb/Makefile @@ -1,7 +1,5 @@ #$FreeBSD$ -.include - .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 diff --git a/sys/modules/ip6_mroute_mod/Makefile b/sys/modules/ip6_mroute_mod/Makefile index b868a7ab6737..a0f94f1e73f8 100644 --- a/sys/modules/ip6_mroute_mod/Makefile +++ b/sys/modules/ip6_mroute_mod/Makefile @@ -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 diff --git a/sys/modules/ip_mroute_mod/Makefile b/sys/modules/ip_mroute_mod/Makefile index 544c4dbc35c0..1c82717cbede 100644 --- a/sys/modules/ip_mroute_mod/Makefile +++ b/sys/modules/ip_mroute_mod/Makefile @@ -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 diff --git a/sys/modules/ipdivert/Makefile b/sys/modules/ipdivert/Makefile index 9e1e89d29d0a..f67ce4b5a171 100644 --- a/sys/modules/ipdivert/Makefile +++ b/sys/modules/ipdivert/Makefile @@ -1,21 +1,8 @@ # $FreeBSD$ -.include - .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 diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index 0bdfbf2dfcee..0d8fa8a05816 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .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 # diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile index 46cd70b98f3b..6920e6a84366 100644 --- a/sys/modules/ipfw/Makefile +++ b/sys/modules/ipfw/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .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 diff --git a/sys/modules/ipoib/Makefile b/sys/modules/ipoib/Makefile index 6cf805dcde1b..70a3f6f7cec5 100644 --- a/sys/modules/ipoib/Makefile +++ b/sys/modules/ipoib/Makefile @@ -2,8 +2,6 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib .PATH: ${.CURDIR}/../../ofed/include/linux -.include - 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 CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/ixgbe/Makefile b/sys/modules/ixgbe/Makefile index df70e31d4cf4..16bee5b1e1d0 100644 --- a/sys/modules/ixgbe/Makefile +++ b/sys/modules/ixgbe/Makefile @@ -1,7 +1,5 @@ #$FreeBSD$ -.include - .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 diff --git a/sys/modules/krpc/Makefile b/sys/modules/krpc/Makefile index b6a21a454731..0f4b5362fff2 100644 --- a/sys/modules/krpc/Makefile +++ b/sys/modules/krpc/Makefile @@ -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 diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index f79ad1b7a1c0..25615a7464b8 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -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 diff --git a/sys/modules/lmc/Makefile b/sys/modules/lmc/Makefile index 70e27b50eddd..7a53f3e4bb07 100644 --- a/sys/modules/lmc/Makefile +++ b/sys/modules/lmc/Makefile @@ -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 diff --git a/sys/modules/mlx4/Makefile b/sys/modules/mlx4/Makefile index 1af961ff81ca..94957e882446 100644 --- a/sys/modules/mlx4/Makefile +++ b/sys/modules/mlx4/Makefile @@ -1,8 +1,5 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4 - -.include - .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 CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mlx4ib/Makefile b/sys/modules/mlx4ib/Makefile index 68a8cd826096..e6a78fa0b6e9 100644 --- a/sys/modules/mlx4ib/Makefile +++ b/sys/modules/mlx4ib/Makefile @@ -2,8 +2,6 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 .PATH: ${.CURDIR}/../../ofed/include/linux -.include - 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 CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mlxen/Makefile b/sys/modules/mlxen/Makefile index 3611f25fa8e1..64ed50d7a053 100644 --- a/sys/modules/mlxen/Makefile +++ b/sys/modules/mlxen/Makefile @@ -1,8 +1,6 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4 -.include - 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 CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mthca/Makefile b/sys/modules/mthca/Makefile index dd34d70114f3..25daedb0e3d3 100644 --- a/sys/modules/mthca/Makefile +++ b/sys/modules/mthca/Makefile @@ -2,8 +2,6 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mthca -.include - 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 CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/netgraph/gif/Makefile b/sys/modules/netgraph/gif/Makefile index acf4373f26bf..ecfb7d73d089 100644 --- a/sys/modules/netgraph/gif/Makefile +++ b/sys/modules/netgraph/gif/Makefile @@ -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 diff --git a/sys/modules/netgraph/iface/Makefile b/sys/modules/netgraph/iface/Makefile index e688004c198e..8b50a3c4a46f 100644 --- a/sys/modules/netgraph/iface/Makefile +++ b/sys/modules/netgraph/iface/Makefile @@ -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 diff --git a/sys/modules/netgraph/ipfw/Makefile b/sys/modules/netgraph/ipfw/Makefile index 5805c09f8a49..c51546bdb311 100644 --- a/sys/modules/netgraph/ipfw/Makefile +++ b/sys/modules/netgraph/ipfw/Makefile @@ -1,20 +1,6 @@ # $FreeBSD$ -.include - 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 diff --git a/sys/modules/netgraph/netflow/Makefile b/sys/modules/netgraph/netflow/Makefile index 2a8fd626cc02..10345c1517e5 100644 --- a/sys/modules/netgraph/netflow/Makefile +++ b/sys/modules/netgraph/netflow/Makefile @@ -3,20 +3,9 @@ # Author: Gleb Smirnoff # -.include - .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 diff --git a/sys/modules/nfscl/Makefile b/sys/modules/nfscl/Makefile index ba78d05d4451..171b1e1c644f 100644 --- a/sys/modules/nfscl/Makefile +++ b/sys/modules/nfscl/Makefile @@ -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} diff --git a/sys/modules/nfsclient/Makefile b/sys/modules/nfsclient/Makefile index aaa6a04449d5..a015f343b64e 100644 --- a/sys/modules/nfsclient/Makefile +++ b/sys/modules/nfsclient/Makefile @@ -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} diff --git a/sys/modules/nfslockd/Makefile b/sys/modules/nfslockd/Makefile index 337314470d4e..407a4aba0221 100644 --- a/sys/modules/nfslockd/Makefile +++ b/sys/modules/nfslockd/Makefile @@ -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 diff --git a/sys/modules/nfsserver/Makefile b/sys/modules/nfsserver/Makefile index cdf24ed3febc..d00fe47bd03a 100644 --- a/sys/modules/nfsserver/Makefile +++ b/sys/modules/nfsserver/Makefile @@ -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 diff --git a/sys/modules/patm/Makefile b/sys/modules/patm/Makefile index 5d5200e73945..7df3165d3eea 100644 --- a/sys/modules/patm/Makefile +++ b/sys/modules/patm/Makefile @@ -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 diff --git a/sys/modules/pf/Makefile b/sys/modules/pf/Makefile index e327b5c5c3ea..b934e0566133 100644 --- a/sys/modules/pf/Makefile +++ b/sys/modules/pf/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .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: diff --git a/sys/modules/pflog/Makefile b/sys/modules/pflog/Makefile index 4da24b3a0dfa..18896815c2a9 100644 --- a/sys/modules/pflog/Makefile +++ b/sys/modules/pflog/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .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} diff --git a/sys/modules/pfsync/Makefile b/sys/modules/pfsync/Makefile index 9c085fceafdd..d38bde7acd31 100644 --- a/sys/modules/pfsync/Makefile +++ b/sys/modules/pfsync/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .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} diff --git a/sys/modules/smbfs/Makefile b/sys/modules/smbfs/Makefile index 031933fa239c..04ffc9a65c9a 100644 --- a/sys/modules/smbfs/Makefile +++ b/sys/modules/smbfs/Makefile @@ -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 diff --git a/sys/modules/snc/Makefile b/sys/modules/snc/Makefile index 056619e78b72..837248609c87 100644 --- a/sys/modules/snc/Makefile +++ b/sys/modules/snc/Makefile @@ -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 diff --git a/sys/modules/sppp/Makefile b/sys/modules/sppp/Makefile index 9a3ed7684cfe..643308e54045 100644 --- a/sys/modules/sppp/Makefile +++ b/sys/modules/sppp/Makefile @@ -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 diff --git a/sys/modules/trm/Makefile b/sys/modules/trm/Makefile index 48df9f5bff32..7c42e401a678 100644 --- a/sys/modules/trm/Makefile +++ b/sys/modules/trm/Makefile @@ -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 diff --git a/sys/modules/virtio/network/Makefile b/sys/modules/virtio/network/Makefile index 41a5101b8d72..bc5de9740603 100644 --- a/sys/modules/virtio/network/Makefile +++ b/sys/modules/virtio/network/Makefile @@ -23,8 +23,6 @@ # SUCH DAMAGE. # -.include - .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 diff --git a/sys/modules/vmware/vmxnet3/Makefile b/sys/modules/vmware/vmxnet3/Makefile index 9d4299707ec9..340e593c25bc 100644 --- a/sys/modules/vmware/vmxnet3/Makefile +++ b/sys/modules/vmware/vmxnet3/Makefile @@ -23,8 +23,6 @@ # SUCH DAMAGE. # -.include - .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 diff --git a/sys/modules/wlan/Makefile b/sys/modules/wlan/Makefile index d25e5f3fab35..7c5a4190ea33 100644 --- a/sys/modules/wlan/Makefile +++ b/sys/modules/wlan/Makefile @@ -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 CWARNFLAGS.ieee80211_adhoc.c= -Wno-unused-function diff --git a/sys/modules/wlan_acl/Makefile b/sys/modules/wlan_acl/Makefile index 6de7be405965..f0ce538ab1e0 100644 --- a/sys/modules/wlan_acl/Makefile +++ b/sys/modules/wlan_acl/Makefile @@ -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 diff --git a/sys/modules/wlan_amrr/Makefile b/sys/modules/wlan_amrr/Makefile index d4593389ac58..1c9ef8c3ece6 100644 --- a/sys/modules/wlan_amrr/Makefile +++ b/sys/modules/wlan_amrr/Makefile @@ -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 diff --git a/sys/modules/wlan_ccmp/Makefile b/sys/modules/wlan_ccmp/Makefile index 8655c801f663..99274dc6805c 100644 --- a/sys/modules/wlan_ccmp/Makefile +++ b/sys/modules/wlan_ccmp/Makefile @@ -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 diff --git a/sys/modules/wlan_rssadapt/Makefile b/sys/modules/wlan_rssadapt/Makefile index be70989d9d85..732db05b1e2f 100644 --- a/sys/modules/wlan_rssadapt/Makefile +++ b/sys/modules/wlan_rssadapt/Makefile @@ -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 diff --git a/sys/modules/wlan_tkip/Makefile b/sys/modules/wlan_tkip/Makefile index 46a7257a915c..13ea0638899b 100644 --- a/sys/modules/wlan_tkip/Makefile +++ b/sys/modules/wlan_tkip/Makefile @@ -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 diff --git a/sys/modules/wlan_wep/Makefile b/sys/modules/wlan_wep/Makefile index 89fca2fb2632..6ebbdb03baa5 100644 --- a/sys/modules/wlan_wep/Makefile +++ b/sys/modules/wlan_wep/Makefile @@ -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 diff --git a/sys/modules/wlan_xauth/Makefile b/sys/modules/wlan_xauth/Makefile index ccab4d3d51a0..308d8f2ebb94 100644 --- a/sys/modules/wlan_xauth/Makefile +++ b/sys/modules/wlan_xauth/Makefile @@ -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