xref: /freebsd/usr.sbin/ppp/Makefile (revision 86c9d9918f1db7cdd968b60f8902466887bcd9e9)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5PROG=	ppp
6MAN=	ppp.8
7SRCS=	acf.c arp.c async.c auth.c bundle.c cbcp.c ccp.c chap.c chat.c \
8	command.c datalink.c deflate.c defs.c exec.c filter.c fsm.c hdlc.c \
9	iface.c ip.c ipcp.c ipv6cp.c iplist.c lcp.c link.c log.c lqr.c main.c \
10	mbuf.c mp.c ncp.c ncpaddr.c pap.c physical.c pred.c probe.c prompt.c \
11	proto.c route.c server.c sig.c slcompress.c sync.c systems.c tcp.c \
12	tcpmss.c throughput.c timer.c tty.c tun.c udp.c vjcomp.c
13WARNS?=	3
14.if defined(RELEASE_CRUNCH)
15CFLAGS+=-DRELEASE_CRUNCH
16PPP_NO_ATM=
17PPP_NO_DES=
18PPP_NO_KLDLOAD=
19PPP_NO_NAT=
20PPP_NO_PAM=
21PPP_NO_RADIUS=
22PPP_NO_SUID=
23.endif
24CONFS=	ppp.conf
25CONFSDIR=	${CONFDIR}/ppp
26CONFSMODE=	600
27
28.if ${MK_ATM} == "no"
29PPP_NO_ATM=
30.endif
31.if ${MK_NETGRAPH} == "no"
32PPP_NO_NETGRAPH=
33.endif
34.if ${MK_PAM_SUPPORT} == "no"
35PPP_NO_PAM=
36.endif
37.if ${MK_RADIUS_SUPPORT} == "no"
38PPP_NO_RADIUS=
39.endif
40
41.if defined(PPP_NO_SUID)
42BINMODE=554
43.else
44BINMODE=4554
45BINOWN=	root
46.endif
47BINGRP=	network
48M4FLAGS=
49
50LIBADD=	md util z
51
52.if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
53CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
54.endif
55
56.if defined(PPP_NO_KLDLOAD)
57CFLAGS+=-DNOKLDLOAD
58.endif
59
60.if ${MK_INET6_SUPPORT} == "no"
61CFLAGS+=-DNOINET6
62.endif
63
64.if defined(PPP_NO_NAT)
65CFLAGS+=-DNONAT
66.else
67SRCS+=	nat_cmd.c
68LIBADD+=	alias
69.endif
70
71.if defined(PPP_NO_ATM)
72CFLAGS+=-DNOATM
73.else
74SRCS+=	atm.c
75.endif
76
77.if defined(PPP_NO_SUID)
78CFLAGS+=-DNOSUID
79.else
80SRCS+=	id.c
81.endif
82
83.if ${MK_OPENSSL} == "no" || defined(PPP_NO_DES)
84CFLAGS+=-DNODES
85.else
86SRCS+=	chap_ms.c mppe.c
87LIBADD+=	crypto
88.endif
89
90.if defined(PPP_NO_RADIUS)
91CFLAGS+=-DNORADIUS
92.else
93SRCS+=	radius.c
94LIBADD+=	radius
95.endif
96
97.if defined(PPP_NO_NETGRAPH)
98CFLAGS+=-DNONETGRAPH
99.else
100SRCS+=	ether.c
101LIBADD+=	netgraph
102.if defined(EXPERIMENTAL_NETGRAPH)
103CFLAGS+=-DEXPERIMENTAL_NETGRAPH
104SRCS+=	netgraph.c
105.endif
106.endif
107
108.if defined(PPP_NO_PAM)
109CFLAGS+=-DNOPAM
110.else
111LIBADD+=	pam
112.endif
113
114.include <bsd.prog.mk>
115