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