summaryrefslogtreecommitdiffstats
path: root/sys/modules/netgraph/mppc/Makefile
blob: 4c7b03154c00981144cb42765d5bdb35c586959a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $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

.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
.endif

.if ${NETGRAPH_MPPC_ENCRYPTION} > 0
SRCS+=		rc4.c sha1.c
.PATH:		${.CURDIR}/../../../crypto
.PATH:		${.CURDIR}/../../../crypto/rc4
.endif

opt_netgraph.h:
	touch ${.TARGET}
.if ${NETGRAPH_MPPC_COMPRESSION} > 0
	echo "#define NETGRAPH_MPPC_COMPRESSION 1" >> ${.TARGET}
.endif
.if ${NETGRAPH_MPPC_ENCRYPTION} > 0
	echo "#define NETGRAPH_MPPC_ENCRYPTION 1" >> ${.TARGET}
.endif

.include <bsd.kmod.mk>
.endif
OpenPOWER on IntegriCloud