1# $FreeBSD: src/usr.sbin/ppp/Makefile,v 1.110.12.1 2010/12/21 17:10:29 kensmith Exp $
2
3.include <bsd.own.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_I4B=
19PPP_NO_KLDLOAD=
20PPP_NO_NAT=
21PPP_NO_PAM=
22PPP_NO_RADIUS=
23PPP_NO_SUID=
24.endif
25
26.if ${MK_ATM} == "no"
27PPP_NO_ATM=
28.endif
29.if ${MK_I4B} == "no"
30PPP_NO_I4B=
31.endif
32.if ${MK_PAM_SUPPORT} == "no"
33PPP_NO_PAM=
34.endif
35
36.if defined(PPP_NO_SUID)
37BINMODE=550
38.else
39BINMODE=4550
40BINOWN=	root
41.endif
42BINGRP=	network
43M4FLAGS=
44
45LDADD= -lcrypt -lmd -lutil -lz
46DPADD=	${LIBCRYPT} ${LIBMD} ${LIBUTIL} ${LIBZ}
47
48.SUFFIXES: .8 .8.m4
49
50.8.m4.8:
51	m4 ${M4FLAGS} ${.IMPSRC} >${.TARGET}
52
53CLEANFILES= ppp.8
54
55.if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
56CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
57.endif
58
59.if defined(PPP_NO_KLDLOAD)
60CFLAGS+=-DNOKLDLOAD
61.endif
62
63.if ${MK_INET6_SUPPORT} == "no"
64CFLAGS+=-DNOINET6
65.endif
66
67.if defined(PPP_NO_NAT)
68CFLAGS+=-DNONAT
69.else
70SRCS+=	nat_cmd.c
71LDADD+=	-lalias
72DPADD+= ${LIBALIAS}
73.endif
74
75.if defined(PPP_NO_ATM)
76CFLAGS+=-DNOATM
77.else
78SRCS+=	atm.c
79.endif
80
81.if defined(PPP_NO_SUID)
82CFLAGS+=-DNOSUID
83.else
84SRCS+=	id.c
85.endif
86
87.if defined(RELEASE_CRUNCH) || ${MK_OPENSSL} == "no" || \
88    defined(PPP_NO_DES)
89CFLAGS+=-DNODES
90.else
91SRCS+=	chap_ms.c mppe.c
92LDADD+= -lcrypto
93DPADD+= ${LIBCRYPTO}
94.endif
95
96.if defined(PPP_NO_RADIUS)
97CFLAGS+=-DNORADIUS
98.else
99SRCS+=	radius.c
100LDADD+=	-lradius
101DPADD+= ${LIBRADIUS}
102.endif
103
104.if defined(PPP_NO_I4B) || ${MACHINE_ARCH} != "i386"
105CFLAGS+=-DNOI4B
106.else
107SRCS+=	i4b.c
108.endif
109
110.if defined(PPP_NO_NETGRAPH)
111CFLAGS+=-DNONETGRAPH
112.else
113SRCS+=	ether.c
114LDADD+=	-lnetgraph
115DPADD+= ${LIBNETGRAPH}
116.if defined(EXPERIMENTAL_NETGRAPH)
117CFLAGS+=-DEXPERIMENTAL_NETGRAPH
118SRCS+=	netgraph.c
119.endif
120.endif
121
122.if defined(PPP_NO_PAM)
123CFLAGS+=-DNOPAM
124.else
125LDADD+=	${MINUSLPAM}
126DPADD+=	${LIBPAM}
127.endif
128
129.include <bsd.prog.mk>
130