summaryrefslogtreecommitdiffstats
path: root/sys/modules/if_ppp/Makefile
blob: ce7bdb0719ac8f97df8eb699a9d00535fdee8a78 (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
54
55
56
# $FreeBSD$

.PATH:  ${.CURDIR}/../../net

KMOD=	if_ppp
SRCS=	if_ppp.c ppp_tty.c slcompress.c \
	opt_inet.h opt_inet6.h opt_ipx.h opt_mac.h opt_ppp.h

PPP_BSDCOMP?=	1	# 0/1
PPP_DEFLATE?=	1	# 0/1
PPP_FILTER?=	1	# 0/1 - requires bpf to be configured in kernel
PPP_INET?=	1	# 0/1 - requires INET to be configured in kernel
.if defined(NO_INET6)
PPP_INET6?=	0	# 0/1 - requires INET6 to be configured in kernel
.else
PPP_INET6?=	1	# 0/1 - requires INET6 to be configured in kernel
.endif
PPP_IPX?=	0	# 0/1 - requires IPX to be configured in kernel

.if ${PPP_BSDCOMP} > 0
SRCS+=	bsd_comp.c
.endif
.if ${PPP_DEFLATE} > 0
SRCS+=	ppp_deflate.c
.endif

.if !defined(KERNBUILDDIR)
.if ${PPP_INET} > 0
opt_inet.h:
	echo "#define INET 1" > ${.TARGET}
.endif

.if ${PPP_INET6} > 0
opt_inet6.h:
	echo "#define INET6 1" > ${.TARGET}
.endif

.if ${PPP_IPX} > 0
opt_ipx.h:
	echo "#define IPX ${PPP_IPX}" > ${.TARGET}
.endif

opt_ppp.h:
	:> ${.TARGET}
.if ${PPP_BSDCOMP} > 0
	echo "#define PPP_BSDCOMP ${PPP_BSDCOMP}" >> ${.TARGET}
.endif
.if ${PPP_DEFLATE} > 0
	echo "#define PPP_DEFLATE ${PPP_DEFLATE}" >> ${.TARGET}
.endif
.if ${PPP_FILTER} > 0
	echo "#define PPP_FILTER ${PPP_FILTER}" >> ${.TARGET}
.endif
.endif

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