Revert to previous state, plus a few cleanups pointed out by bde.

Instead, make the decision as to whether to build this KLD in ../Makefile.
This commit is contained in:
Archie Cobbs 2000-04-12 19:56:16 +00:00
parent f167e54283
commit ee5bb5a822

View File

@ -1,43 +1,24 @@
# $Whistle: Makefile,v 1.1 1999/12/08 20:20:39 archie Exp $
# $FreeBSD$
# Determine which of compression and encryption to support
#
NETGRAPH_MPPC_COMPRESSION?= 0
.if !defined(NETGRAPH_MPPC_ENCRYPTION)
.if defined(NOCRYPT)
NETGRAPH_MPPC_ENCRYPTION= 0
.else
NETGRAPH_MPPC_ENCRYPTION= 1
.endif
.endif
# No point in building module if neither is enabled
#
.if ${NETGRAPH_MPPC_COMPRESSION} == 0 && ${NETGRAPH_MPPC_ENCRYPTION} == 0
all depend distribute install load unload:
@echo '>>>' Neither compression nor encryption enabled, skipping KLD netgraph/mppc.
.else
KMOD= ng_mppc
SRCS= ng_mppc.c opt_netgraph.h
MAN8= ng_mppc.8
KMODDEPS= netgraph
CFLAGS+= ${PROTOS}
CLEANFILES+= opt_netgraph.h
NETGRAPH_MPPC_COMPRESSION?= 0
NETGRAPH_MPPC_ENCRYPTION?= 1
.if ${NETGRAPH_MPPC_COMPRESSION} > 0
# XXX These files don't exist yet, but hopefully someday they will...
SRCS+= mppcc.c mppcd.c
.PATH: ${.CURDIR}/../../../net
SRCS+= mppcc.c mppcd.c
.endif
.if ${NETGRAPH_MPPC_ENCRYPTION} > 0
SRCS+= rc4.c sha1.c
.PATH: ${.CURDIR}/../../../crypto
.PATH: ${.CURDIR}/../../../crypto/rc4
SRCS+= rc4.c sha1.c
.endif
opt_netgraph.h:
@ -50,4 +31,3 @@ opt_netgraph.h:
.endif
.include <bsd.kmod.mk>
.endif