From f6ee2913053fae980acb28ff2a09726dcfc90ff0 Mon Sep 17 00:00:00 2001 From: Yaroslav Tykhiy Date: Fri, 10 Feb 2006 00:38:08 +0000 Subject: MFC: Avoid creating (and subsequently using) fake opt_*.h files when the modules are built with the kernel and hence actual opt_*.h files are available in ${KERNBUILDDIR}. Fix a few small bugs that would prevent this from working. At last the build options of the modules become consistent with those of the kernel unless the MODULES_WITH_WORLD way still is used. Approved by: re (kensmith, scottl) Requested by: ru Tested on: amd64 i386 sparc64 Tested by: md5 --- sys/modules/cx/Makefile | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'sys/modules/cx') diff --git a/sys/modules/cx/Makefile b/sys/modules/cx/Makefile index ce9932c1e0c1..0716f9055b93 100644 --- a/sys/modules/cx/Makefile +++ b/sys/modules/cx/Makefile @@ -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 +.endif -opt_ng_cronyx.h: .if ${NG_CRONYX} != 0 +opt_ng_cronyx.h: 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 - .include -- cgit v1.3