kernel: Clean up some module Makefiles.
[dragonfly.git] / sys / net / ppp_layer / Makefile
CommitLineData
984263bc
MD
1# $FreeBSD: src/sys/modules/if_ppp/Makefile,v 1.21 1999/11/28 18:52:51 bde Exp $
2
fc7e203e 3.PATH: ${.CURDIR}/../ppp ${.CURDIR}/..
984263bc
MD
4KMOD= if_ppp
5SRCS= if_ppp.c ppp_tty.c slcompress.c \
2d3e977e 6 use_ppp.h opt_inet.h opt_ipx.h opt_ppp.h
984263bc
MD
7
8NPPP?= 2
9PPP_BSDCOMP?= 1 # 0/1
10PPP_DEFLATE?= 1 # 0/1
11PPP_FILTER?= 1 # 0/1 - requires bpf to be configured in kernel
12PPP_INET?= 1 # 0/1 - requires INET to be configured in kernel
13PPP_IPX?= 0 # 0/1 - requires IPX to be configured in kernel
14
984263bc
MD
15.if ${PPP_BSDCOMP} > 0
16SRCS+= bsd_comp.c
17.endif
18.if ${PPP_DEFLATE} > 0
19SRCS+= ppp_deflate.c zlib.c
20.endif
21
9ea0a480 22CLEANFILES= use_ppp.h
984263bc 23
9ea0a480 24use_ppp.h:
e3f58167 25 echo "#define NPPP ${NPPP}" > ${.TARGET}
984263bc
MD
26
27opt_inet.h:
28 touch opt_inet.h
29.if ${PPP_INET} > 0
e3f58167 30 echo "#define INET 1" > ${.TARGET}
984263bc
MD
31.endif
32
33opt_ipx.h:
34 touch opt_ipx.h
35.if ${PPP_IPX} > 0
e3f58167 36 echo "#define IPX ${PPP_IPX}" > ${.TARGET}
984263bc
MD
37.endif
38
39opt_ppp.h:
e3f58167 40 touch ${.TARGET}
984263bc 41.if ${PPP_BSDCOMP} > 0
e3f58167 42 echo "#define PPP_BSDCOMP ${PPP_BSDCOMP}" > ${.TARGET}
984263bc
MD
43.endif
44.if ${PPP_DEFLATE} > 0
e3f58167 45 echo "#define PPP_DEFLATE ${PPP_DEFLATE}" >> ${.TARGET}
984263bc
MD
46.endif
47.if ${PPP_FILTER} > 0
e3f58167 48 echo "#define PPP_FILTER ${PPP_FILTER}" >> ${.TARGET}
984263bc
MD
49.endif
50
51.include <bsd.kmod.mk>