xref: /freebsd/usr.sbin/ppp/Makefile (revision 36d7818975359fd2aacb19e4f9442a841dc954bb)
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)
15PPP_NO_DES=
16PPP_NO_KLDLOAD=
17PPP_NO_NAT=
18PPP_NO_PAM=
19PPP_NO_RADIUS=
20PPP_NO_SUID=
21.endif
22CONFS=	ppp.conf
23CONFSDIR=	${CONFDIR}/ppp
24CONFSMODE=	600
25
26.if ${MK_NETGRAPH} == "no"
27PPP_NO_NETGRAPH=
28.endif
29.if ${MK_PAM_SUPPORT} == "no"
30PPP_NO_PAM=
31.endif
32.if ${MK_RADIUS_SUPPORT} == "no"
33PPP_NO_RADIUS=
34.endif
35
36.if defined(PPP_NO_SUID)
37BINMODE=554
38.else
39BINMODE=4554
40BINOWN=	root
41.endif
42BINGRP=	network
43M4FLAGS=
44
45LIBADD=	md util z
46
47.if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
48CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
49.endif
50
51.if defined(PPP_NO_KLDLOAD)
52CFLAGS+=-DNOKLDLOAD
53.endif
54
55.if ${MK_INET6_SUPPORT} == "no"
56CFLAGS+=-DNOINET6
57.endif
58
59.if defined(PPP_NO_NAT)
60CFLAGS+=-DNONAT
61.else
62SRCS+=	nat_cmd.c
63LIBADD+=	alias
64.endif
65
66.if defined(PPP_NO_SUID)
67CFLAGS+=-DNOSUID
68.else
69SRCS+=	id.c
70.endif
71
72.if ${MK_OPENSSL} == "no" || defined(PPP_NO_DES)
73CFLAGS+=-DNODES
74.else
75SRCS+=	chap_ms.c mppe.c
76LIBADD+=	crypto
77.endif
78
79.if defined(PPP_NO_RADIUS)
80CFLAGS+=-DNORADIUS
81.else
82SRCS+=	radius.c
83LIBADD+=	radius
84.endif
85
86.if defined(PPP_NO_NETGRAPH)
87CFLAGS+=-DNONETGRAPH
88.else
89SRCS+=	ether.c
90LIBADD+=	netgraph
91.if defined(EXPERIMENTAL_NETGRAPH)
92CFLAGS+=-DEXPERIMENTAL_NETGRAPH
93SRCS+=	netgraph.c
94.endif
95.endif
96
97.if defined(PPP_NO_PAM)
98CFLAGS+=-DNOPAM
99LIBADD+=	crypt
100.else
101LIBADD+=	pam
102.endif
103
104.include <bsd.prog.mk>
105