freebsd-skq/sys/modules/cx/Makefile
Yaroslav Tykhiy 822923447e 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
2005-10-14 23:30:17 +00:00

28 lines
564 B
Makefile

# Cronyx Id: sys.modules.cx.Makefile,v 1.1.2.2 2003/01/21 15:15:49 rik Exp $
# $FreeBSD$
.PATH: ${.CURDIR}/../../dev/cx
KMOD= if_cx
SRCS= if_cx.c cxddk.c csigma.c opt_netgraph.h opt_ng_cronyx.h \
device_if.h bus_if.h isa_if.h
.if !defined(KERNBUILDDIR)
PROTOS?= -DINET
NG_CRONYX?= 0
NETGRAPH= ${NG_CRONYX}
CFLAGS+= ${PROTOS}
.if ${NETGRAPH} != 0
opt_netgraph.h:
echo "#define NETGRAPH $(NETGRAPH)" > opt_netgraph.h
.endif
.if ${NG_CRONYX} != 0
opt_ng_cronyx.h:
echo "#define NETGRAPH_CRONYX 1" > opt_ng_cronyx.h
.endif
.endif
.include <bsd.kmod.mk>