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