Let modules use the kernel's opt_*.h files if built along with

the kernel by wrapping all targets for fake opt_*.h files in
.if defined(KERNBUILDDIR).  Thus, such fake files won't be
created at all if modules are built with the kernel.

Some modules undergo cleanup like removing unused or unneeded
options or .h files, without which they wouldn't build this way
or the other.

Reviewed by:	ru
Tested by:	no binary changes in modules built alone
Tested on:	i386 sparc64 amd64
This commit is contained in:
Yaroslav Tykhiy 2005-10-14 23:30:17 +00:00
parent 10d645b7e5
commit 822923447e
66 changed files with 161 additions and 78 deletions
sys/modules

@ -18,7 +18,9 @@ TDFX_OPTS= "\#define TDFX_LINUX"
# Uncomment this for debugging messages
#CFLAGS+= -DDEBUG
.if !defined(KERNBUILDDIR)
opt_tdfx.h:
echo $(TDFX_OPTS) > opt_tdfx.h
.endif
.include <bsd.kmod.mk>

@ -63,6 +63,7 @@ DBSRC+= dbinput.c dbstats.c dbutils.c dbxface.c
DBSRC+= dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c
DBSRC+= dmresrcs.c dmutils.c dmwalk.c
.if !defined(KERNBUILDDIR)
.if ACPI_MAX_THREADS
CFLAGS+=-DACPI_MAX_THREADS=${ACPI_MAX_THREADS}
.endif
@ -78,6 +79,7 @@ opt_ddb.h: Makefile
opt_ddb.h: Makefile
echo -n > ${.TARGET}
.endif
.endif
# Machine-specific code such as sleep/wakeup
SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c

@ -6,7 +6,9 @@ KMOD= aha
SRCS= aha.c aha_isa.c ahareg.h opt_cam.h device_if.h bus_if.h \
opt_scsi.h isa_if.h
.if !defined(KERNBUILDDIR)
opt_scsi.h:
echo "#define SCSI_DELAY 15000" > opt_scsi.h
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@ KMOD= ahb
SRCS= ahb.c opt_cam.h device_if.h bus_if.h \
eisa_if.h opt_scsi.h
.if !defined(KERNBUILDDIR)
opt_scsi.h:
echo "#define SCSI_DELAY 15000" > opt_scsi.h
.endif
.include <bsd.kmod.mk>

@ -7,7 +7,9 @@ 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" > opt_inet.h
.endif
.include <bsd.kmod.mk>

@ -5,13 +5,13 @@ KMOD = if_ar
SRCS = if_ar.c if_ar_isa.c if_ar_pci.c
SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
.if !defined(KERNBUILDDIR)
NETGRAPH?= 0
opt_netgraph.h:
.if ${NETGRAPH} != 0
opt_netgraph.h:
echo "#define NETGRAPH ${NETGRAPH}" > opt_netgraph.h
.else
echo "" > opt_netgraph.h
.endif
.endif
.include <bsd.kmod.mk>

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

@ -8,7 +8,9 @@ SRCS= if_arl.c if_arl_isa.c
SRCS+= opt_inet.h device_if.h bus_if.h isa_if.h
CFLAGS+= -I${.CURDIR}/../..
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > opt_inet.h
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@ KMOD= if_awi
SRCS= am79c930.c awi.c if_awi_pccard.c
SRCS+= bus_if.h card_if.h device_if.h opt_inet.h pccarddevs.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > opt_inet.h
.endif
.include <bsd.kmod.mk>

@ -9,7 +9,6 @@ SRCS= bktr_core.c bktr_os.c bktr_audio.c bktr_tuner.c bktr_card.c msp34xx.c \
opt_devfs.h opt_bktr.h bus_if.h device_if.h \
pci_if.h
opt_bktr.h:
echo "#define BKTR_FREEBSD_MODULE 1" > opt_bktr.h
CFLAGS+= -DBKTR_FREEBSD_MODULE
.include <bsd.kmod.mk>

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

@ -8,7 +8,9 @@ SRCS= vnode_if.h \
coda_venus.c coda_vfsops.c coda_vnops.c \
opt_coda.h
.if !defined(KERNBUILDDIR)
opt_coda.h:
echo "#define CODA_COMPAT_5" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -4,36 +4,26 @@
.PATH: ${.CURDIR}/../../dev/cp
KMOD = if_cp
SRCS = if_cp.c cpddk.c
SRCS += opt_netgraph.h opt_ng_cronyx.h device_if.h bus_if.h bpf.h\
pci_if.h sppp.h
SRCS += opt_netgraph.h opt_ng_cronyx.h device_if.h bus_if.h \
pci_if.h
NO_MAN=
NBPF?= 0
.if !defined(KERNBUILDDIR)
PROTOS?= -DINET
NG_CRONYX?= 0
NETGRAPH= ${NG_CRONYX}
CFLAGS+= ${PROTOS}
CLEANFILES+= bpf.h sppp.h
.if ${NETGRAPH} != 0
opt_netgraph.h:
echo "#define NETGRAPH ${NETGRAPH}" > opt_netgraph.h
opt_ng_cronyx.h:
.if ${NG_CRONYX} != 0
echo "#define NETGRAPH_CRONYX 1" > opt_ng_cronyx.h
.else
echo "" > opt_ng_cronyx.h
.endif
sppp.h:
.if ${NG_CRONYX} == 0
echo "#define NSPPP 1" > sppp.h
.else
echo "#define NSPPP 0" > sppp.h
.endif
bpf.h:
echo "#define NBPF ${NBPF}" > bpf.h
.if ${NG_CRONYX} != 0
opt_ng_cronyx.h:
echo "#define NETGRAPH_CRONYX 1" > opt_ng_cronyx.h
.endif
.endif
.include <bsd.kmod.mk>

@ -2,36 +2,26 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../dev/ctau
KMOD= if_ct
SRCS= if_ct.c ctddk.c ctau.c opt_netgraph.h opt_ng_cronyx.h bpf.h sppp.h \
SRCS= if_ct.c ctddk.c ctau.c opt_netgraph.h opt_ng_cronyx.h \
device_if.h bus_if.h isa_if.h
NBPF?= 0
.if !defined(KERNBUILDDIR)
NCTAU?= 3
PROTOS?= -DINET
NG_CRONYX?= 0
NETGRAPH= ${NG_CRONYX}
CFLAGS+= ${PROTOS}
CLEANFILES+= bpf.h sppp.h
.if ${NETGRAPH} != 0
opt_netgraph.h:
echo "#define NETGRAPH $(NETGRAPH)" > opt_netgraph.h
opt_ng_cronyx.h:
.if ${NG_CRONYX} != 0
echo "#define NETGRAPH_CRONYX 1" > opt_ng_cronyx.h
.else
echo "" > opt_ng_cronyx.h
.endif
sppp.h:
.if ${NG_CRONYX} == 0
echo "#define NSPPP 1" > sppp.h
.else
echo "#define NSPPP 0" > sppp.h
.endif
bpf.h:
echo "#define NBPF ${NBPF}" > bpf.h
.if ${NG_CRONYX} != 0
opt_ng_cronyx.h:
echo "#define NETGRAPH_CRONYX 1" > opt_ng_cronyx.h
.endif
.endif
.include <bsd.kmod.mk>

@ -3,36 +3,25 @@
.PATH: ${.CURDIR}/../../dev/cx
KMOD= if_cx
SRCS= if_cx.c cxddk.c csigma.c opt_netgraph.h opt_ng_cronyx.h bpf.h \
sppp.h device_if.h bus_if.h isa_if.h
SRCS= if_cx.c cxddk.c csigma.c opt_netgraph.h opt_ng_cronyx.h \
device_if.h bus_if.h isa_if.h
NBPF?= 0
.if !defined(KERNBUILDDIR)
PROTOS?= -DINET
NG_CRONYX?= 0
NETGRAPH= ${NG_CRONYX}
CFLAGS+= ${PROTOS}
CLEANFILES+= bpf.h sppp.h
.if ${NETGRAPH} != 0
opt_netgraph.h:
echo "#define NETGRAPH $(NETGRAPH)" > opt_netgraph.h
opt_ng_cronyx.h:
.if ${NG_CRONYX} != 0
echo "#define NETGRAPH_CRONYX 1" > opt_ng_cronyx.h
.else
echo "" > opt_ng_cronyx.h
.endif
sppp.h:
.if ${NG_CRONYX} == 0
echo "#define NSPPP 1" > sppp.h
.else
echo "#define NSPPP 0" > sppp.h
.if ${NG_CRONYX} != 0
opt_ng_cronyx.h:
echo "#define NETGRAPH_CRONYX 1" > opt_ng_cronyx.h
.endif
.endif
bpf.h:
echo "#define NBPF ${NBPF}" > bpf.h
.include <bsd.kmod.mk>

@ -7,11 +7,13 @@ KMOD = dcons
SRCS = dcons.c dcons.h dcons_os.c dcons_os.h \
opt_dcons.h opt_ddb.h opt_comconsole.h
.if !defined(KERNBUILDDIR)
opt_ddb.h:
echo "#define KDB 1" > $@
opt_comconsole.h:
echo "#define ALT_BREAK_TO_DEBUGGER 1" > $@
.endif
CFLAGS+= -I${.CURDIR}/../..

@ -7,7 +7,9 @@ SRCS+= digi.h digi_pci.h digireg.h digi_mod.h
SRCS+= bus_if.h pci_if.h device_if.h
SRCS+= opt_compat.h
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_43 1" > opt_compat.h
.endif
.include <bsd.kmod.mk>

@ -8,6 +8,7 @@ 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}
@ -16,5 +17,6 @@ opt_natm.h:
# opt_ddb.h:
# echo "#define DDB 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -9,10 +9,12 @@ 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" > opt_inet.h
opt_natm.h:
echo "#define NATM 1" > opt_natm.h
.endif
.include <bsd.kmod.mk>

@ -11,8 +11,10 @@ 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

@ -11,10 +11,12 @@ 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" > opt_inet.h
opt_natm.h:
echo "#define NATM 1" > opt_natm.h
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@ SRCS = hifn7751.c opt_hifn.h
SRCS += device_if.h bus_if.h pci_if.h
SRCS += opt_bus.h crypto_if.h
.if !defined(KERNBUILDDIR)
opt_hifn.h:
echo "#define HIFN_DEBUG 1" > opt_hifn.h
.endif
.include <bsd.kmod.mk>

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

@ -5,10 +5,12 @@
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>

@ -16,6 +16,7 @@ ETHER_SNAP=
CFLAGS+= -DEF_DEBUG
.endif
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > opt_inet.h
@ -28,5 +29,6 @@ opt_ef.h:
echo "#define ${frame} 1" >> opt_ef.h
.endif
.endfor
.endif
.include <bsd.kmod.mk>

@ -5,10 +5,12 @@
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>

@ -9,6 +9,7 @@ SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mac.h \
SRCS+= in6_gif.c
.endif
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
@ -19,5 +20,6 @@ opt_inet6.h:
opt_mrouting.h:
echo "#define MROUTING 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

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

@ -19,6 +19,7 @@ SRCS+= bsd_comp.c
SRCS+= ppp_deflate.c zlib.c
.endif
.if !defined(KERNBUILDDIR)
.if ${PPP_INET} > 0
opt_inet.h:
echo "#define INET 1" >> ${.TARGET}
@ -40,5 +41,6 @@ opt_ppp.h:
.if ${PPP_FILTER} > 0
echo "#define PPP_FILTER ${PPP_FILTER}" >> ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

@ -5,7 +5,9 @@
KMOD= if_sl
SRCS= if_sl.c slcompress.c opt_inet.h opt_slip.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -5,10 +5,12 @@
KMOD= if_stf
SRCS= if_stf.c opt_inet.h opt_inet6.h opt_mac.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>

@ -7,7 +7,9 @@
KMOD= if_tap
SRCS= if_tap.c opt_inet.h vnode_if.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > opt_inet.h
.endif
.include <bsd.kmod.mk>

@ -5,6 +5,7 @@
KMOD= if_tun
SRCS= if_tun.c opt_atalk.h opt_inet.h opt_inet6.h opt_ipx.h opt_mac.h
.if !defined(KERNBUILDDIR)
opt_atalk.h:
echo "#define NETATALK 1" > ${.TARGET}
@ -16,5 +17,6 @@ opt_inet6.h:
opt_ipx.h:
echo "#define IPX 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

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

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

@ -8,14 +8,15 @@ SRCS= mlfk_ipl.c ip_nat.c ip_frag.c ip_state.c ip_proxy.c ip_auth.c \
ip_sync.c
SRCS+= opt_bpf.h opt_inet6.h
.if !defined(KERNBUILDDIR)
opt_bpf.h:
echo "#define DEV_BPF 1" > ${.TARGET}
.if !defined(NO_INET6)
CFLAGS+= -DUSE_INET6
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
CFLAGS+= -I${.CURDIR}/../../contrib/ipfilter
CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP
#

@ -6,7 +6,9 @@
KMOD= kbdmux
SRCS= kbdmux.c opt_kbd.h
.if !defined(KERNBUILDDIR)
opt_kbd.h:
echo "#define KBD_INSTALL_CDEV 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -37,10 +37,12 @@ linux_locore.o: linux_locore.s linux_assym.h
linux_genassym.o: linux_genassym.c linux.h @ machine
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_43 1" > opt_compat.h
opt_inet6.h:
echo "#define INET6 1" > opt_inet6.h
.endif
.include <bsd.kmod.mk>

@ -3,10 +3,12 @@
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>

@ -4,6 +4,7 @@
KMOD= ng_iface
SRCS= ng_iface.c opt_atalk.h opt_inet.h opt_inet6.h opt_ipx.h
.if !defined(KERNBUILDDIR)
opt_atalk.h:
echo "#define NETATALK 1" > ${.TARGET}
@ -15,5 +16,6 @@ opt_inet6.h:
opt_ipx.h:
echo "#define IPX 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -18,6 +18,7 @@ SRCS+= mppcc.c mppcd.c
SRCS+= sha1.c
.endif
.if !defined(KERNBUILDDIR)
opt_netgraph.h:
touch ${.TARGET}
.if ${NETGRAPH_MPPC_COMPRESSION} > 0
@ -26,5 +27,6 @@ opt_netgraph.h:
.if ${NETGRAPH_MPPC_ENCRYPTION} > 0
echo "#define NETGRAPH_MPPC_ENCRYPTION 1" >> ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

@ -5,7 +5,9 @@ KMOD = ng_sync_ar
SRCS = if_ar.c if_ar_isa.c if_ar_pci.c
SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
.if !defined(KERNBUILDDIR)
opt_netgraph.h:
echo "#define NETGRAPH" > opt_netgraph.h
.endif
.include <bsd.kmod.mk>

@ -5,7 +5,9 @@ KMOD = ng_sync_sr
SRCS = if_sr.c if_sr_isa.c if_sr_pci.c
SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
.if !defined(KERNBUILDDIR)
opt_netgraph.h:
echo "#define NETGRAPH" > opt_netgraph.h
.endif
.include <bsd.kmod.mk>

@ -11,9 +11,6 @@ SRCS= vnode_if.h \
nfs4_vfs_subs.c nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c
SRCS+= opt_inet6.h
NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
# USE THE RPCCLNT:
CFLAGS+= -DRPCCLNT_DEBUG
SRCS+= rpcclnt.c
@ -21,6 +18,10 @@ SRCS+= rpcclnt.c
# USE THE NEW IDMAPPER
CFLAGS+= -DUSE_NEW_IDMAPPER
.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
.if ${NFS_INET} > 0
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
@ -30,6 +31,7 @@ opt_inet.h:
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

@ -12,9 +12,6 @@ SRCS+= nfs4_dev.c nfs4_idmap.c nfs4_socket.c nfs4_subs.c \
nfs4_vfs_subs.c nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c
SRCS+= opt_inet6.h
NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
# USE THE RPCCLNT:
CFLAGS+= -DRPCCLNT_DEBUG
SRCS+= rpcclnt.c
@ -22,6 +19,10 @@ SRCS+= rpcclnt.c
# USE THE NEW IDMAPPER
CFLAGS+= -DUSE_NEW_IDMAPPER
.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
.if ${NFS_INET} > 0
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
@ -31,6 +32,7 @@ opt_inet.h:
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

@ -8,11 +8,14 @@ SRCS= vnode_if.h \
opt_mac.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>

@ -6,10 +6,12 @@ KMOD= nmdm
SRCS= nmdm.c
SRCS+= opt_compat.h opt_tty.h vnode_if.h
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_43 1" >opt_compat.h
opt_tty.h:
echo "#define TTYHOG 8192" >opt_tty.h
.endif
.include <bsd.kmod.mk>

@ -6,13 +6,10 @@ KMOD= nwfs
SRCS= vnode_if.h \
nwfs_node.c nwfs_ioctl.c nwfs_io.c nwfs_vfsops.c nwfs_vnops.c \
nwfs_subr.c opt_ncp.h opt_vmpage.h
nwfs_subr.c opt_vmpage.h
.if defined(VNPRINT)
CFLAGS+= -DVNPRINT
.endif
opt_ncp.h:
echo "#define NCP 1" > ${.TARGET}
.include <bsd.kmod.mk>

@ -8,7 +8,9 @@ SRCS= osf1_ioctl.c osf1_misc.c osf1_signal.c osf1_sysent.c \
opt_ddb.h opt_mac.h opt_nfs.h device_if.h bus_if.h \
vnode_if.h
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_43 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -12,10 +12,12 @@ 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" > opt_inet.h
opt_natm.h:
echo "#define NATM 1" > opt_natm.h
.endif
.include <bsd.kmod.mk>

@ -12,6 +12,7 @@ SRCS = pf.c pf_if.c pf_subr.c pf_osfp.c pf_ioctl.c pf_norm.c pf_table.c \
CFLAGS+= -I${.CURDIR}/../../contrib/pf
.if !defined(KERNBUILDDIR)
opt_pf.h:
echo "#define DEV_PF 1" > opt_pf.h
echo "#define DEV_PFLOG 1" >> opt_pf.h
@ -26,5 +27,6 @@ opt_inet6.h:
opt_bpf.h:
echo "#define DEV_BPF 1" > opt_bpf.h
.endif
.include <bsd.kmod.mk>

@ -5,7 +5,9 @@
KMOD= rc
SRCS= rc.c device_if.h bus_if.h isa_if.h opt_tty.h
.if !defined(KERNBUILDDIR)
opt_tty.h:
echo "#define TTYHOG 8192" >opt_tty.h
.endif
.include <bsd.kmod.mk>

@ -5,7 +5,9 @@
KMOD= rp
SRCS= rp.c rp_pci.c device_if.h bus_if.h pci_if.h opt_compat.h
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_43 1" > opt_compat.h
.endif
.include <bsd.kmod.mk>

@ -32,7 +32,9 @@ SRCS = safe.c opt_safe.h
SRCS += device_if.h bus_if.h pci_if.h
SRCS += opt_bus.h crypto_if.h
.if !defined(KERNBUILDDIR)
opt_safe.h:
echo "#define SAFE_DEBUG 1" > opt_safe.h
.endif
.include <bsd.kmod.mk>

@ -15,6 +15,7 @@ SRCS+= sio_cbus.c
SRCS+= sio_isa.c
.endif
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_43 1" > ${.TARGET}
@ -23,5 +24,6 @@ opt_sio.h:
echo "#define COM_MULTIPORT 1" > ${.TARGET}
echo "#define COM_ESP 1" >> ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

@ -42,6 +42,7 @@ CFLAGS+= ${KDEBUG}
CFLAGS+= -DVNPRINT
.endif
.if !defined(KERNBUILDDIR)
.if ${SMB_INET} > 0
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
@ -52,10 +53,11 @@ opt_ipx.h:
echo "#define IPX 1" > ${.TARGET}
.endif
opt_netsmb.h:
echo "#define NETSMB 1" > ${.TARGET}
# XXX netsmb should be a separate module
.if defined(NETSMBCRYPTO)
echo "#define NETSMBCRYPTO 1" >> ${.TARGET}
opt_netsmb.h:
echo "#define NETSMBCRYPTO 1" > ${.TARGET}
.endif
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@ 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
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -15,6 +15,7 @@ EXPORT_SYMS= sppp_attach \
sppp_isempty \
sppp_flush
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > opt_inet.h
@ -23,5 +24,6 @@ opt_inet6.h:
opt_ipx.h:
echo "#define IPX 1" > opt_ipx.h
.endif
.include <bsd.kmod.mk>

@ -5,13 +5,13 @@ KMOD = if_sr
SRCS = if_sr.c if_sr_isa.c if_sr_pci.c
SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
.if !defined(KERNBUILDDIR)
NETGRAPH?= 0
opt_netgraph.h:
.if ${NETGRAPH} != 0
opt_netgraph.h:
echo "#define NETGRAPH ${NETGRAPH}" > opt_netgraph.h
.else
echo "" > opt_netgraph.h
.endif
.endif
.include <bsd.kmod.mk>

@ -26,6 +26,7 @@ svr4_locore.o: svr4_locore.s svr4_assym.h
svr4_genassym.o: svr4_genassym.c svr4.h @ machine
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
.if !defined(KERNBUILDDIR)
opt_compat.h:
echo "#define COMPAT_43 1" > opt_compat.h
@ -33,5 +34,6 @@ opt_compat.h:
opt_svr4.h:
echo "#define DEBUG_SVR4 1" > opt_svr4.h
.endif
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@ 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" > opt_scsi.h
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@ SRCS = ubsec.c opt_ubsec.h
SRCS += device_if.h bus_if.h pci_if.h
SRCS += opt_bus.h crypto_if.h
.if !defined(KERNBUILDDIR)
opt_ubsec.h:
echo "#define UBSEC_DEBUG 1" > opt_ubsec.h
.endif
.include <bsd.kmod.mk>

@ -5,7 +5,9 @@
KMOD= ukbd
SRCS= bus_if.h device_if.h opt_usb.h opt_kbd.h opt_ukbd.h usbdevs.h ukbd.c
.if !defined(KERNBUILDDIR)
opt_kbd.h:
echo "#define KBD_INSTALL_CDEV 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@
KMOD= vkbd
SRCS= vkbd.c opt_kbd.h
.if !defined(KERNBUILDDIR)
opt_kbd.h:
echo "#define KBD_INSTALL_CDEV 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -6,7 +6,9 @@ KMOD= if_wi
SRCS= opt_wi.h if_wi.c if_wi_pccard.c if_wi_pci.c \
card_if.h device_if.h bus_if.h pci_if.h pccarddevs.h
.if !defined(KERNBUILDDIR)
opt_wi.h:
echo "#define WI_SYMBOL_FIRMWARE 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>

@ -8,10 +8,12 @@ SRCS= ieee80211.c ieee80211_crypto.c ieee80211_crypto_none.c \
ieee80211_node.c ieee80211_output.c ieee80211_proto.c
SRCS+= bus_if.h device_if.h opt_inet.h opt_ipx.h
.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > opt_inet.h
opt_ipx.h:
echo "#define IPX 1" > opt_ipx.h
.endif
.include <bsd.kmod.mk>