xref: /freebsd/usr.sbin/ppp/Makefile (revision 6b806d21d144c25f4fad714e1c0cf780f5e27d7e)
1# $FreeBSD$
2
3PROG=	ppp
4MAN=	ppp.8
5SRCS=	acf.c arp.c async.c auth.c bundle.c cbcp.c ccp.c chap.c chat.c \
6	command.c datalink.c deflate.c defs.c exec.c filter.c fsm.c hdlc.c \
7	iface.c ip.c ipcp.c ipv6cp.c iplist.c lcp.c link.c log.c lqr.c main.c \
8	mbuf.c mp.c ncp.c ncpaddr.c pap.c physical.c pred.c probe.c prompt.c \
9	proto.c route.c server.c sig.c slcompress.c sync.c systems.c tcp.c \
10	tcpmss.c throughput.c timer.c tty.c tun.c udp.c vjcomp.c
11WARNS?=	3
12.if defined(RELEASE_CRUNCH)
13CFLAGS+=-DRELEASE_CRUNCH
14PPP_NO_ATM=
15PPP_NO_DES=
16PPP_NO_I4B=
17PPP_NO_KLDLOAD=
18PPP_NO_NAT=
19PPP_NO_PAM=
20PPP_NO_RADIUS=
21PPP_NO_SUID=
22.endif
23
24.if defined(NO_ATM)
25PPP_NO_ATM=
26.endif
27.if defined(NO_I4B)
28PPP_NO_I4B=
29.endif
30.if defined(NO_PAM)
31PPP_NO_PAM=
32.endif
33
34.if defined(PPP_NO_SUID)
35BINMODE=550
36.else
37BINMODE=4550
38BINOWN=	root
39.endif
40BINGRP=	network
41M4FLAGS=
42
43LDADD= -lcrypt -lmd -lutil -lz
44DPADD=	${LIBCRYPT} ${LIBMD} ${LIBUTIL} ${LIBZ}
45
46.SUFFIXES: .8 .8.m4
47
48.8.m4.8:
49	m4 ${M4FLAGS} ${.IMPSRC} >${.TARGET}
50
51CLEANFILES= ppp.8
52
53.if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
54CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
55.endif
56
57.if defined(PPP_NO_KLDLOAD)
58CFLAGS+=-DNOKLDLOAD
59.endif
60
61.if defined(NO_INET6)
62CFLAGS+=-DNOINET6
63.endif
64
65.if defined(PPP_NO_NAT)
66CFLAGS+=-DNONAT
67.else
68SRCS+=	nat_cmd.c
69LDADD+=	-lalias
70DPADD+= ${LIBALIAS}
71.endif
72
73.if defined(PPP_NO_ATM)
74CFLAGS+=-DNOATM
75.else
76SRCS+=	atm.c
77.endif
78
79.if defined(PPP_NO_SUID)
80CFLAGS+=-DNOSUID
81.else
82SRCS+=	id.c
83.endif
84
85.if defined(RELEASE_CRUNCH) || defined(NO_CRYPT) || defined(NO_OPENSSL) || \
86    defined(PPP_NO_DES)
87CFLAGS+=-DNODES
88.else
89SRCS+=	chap_ms.c mppe.c
90LDADD+= -lcrypto
91DPADD+= ${LIBCRYPTO}
92.endif
93
94.if defined(PPP_NO_RADIUS)
95CFLAGS+=-DNORADIUS
96.else
97SRCS+=	radius.c
98LDADD+=	-lradius
99DPADD+= ${LIBRADIUS}
100.endif
101
102.if defined(PPP_NO_I4B) || ${MACHINE_ARCH} != "i386"
103CFLAGS+=-DNOI4B
104.else
105SRCS+=	i4b.c
106.endif
107
108.if defined(PPP_NO_NETGRAPH)
109CFLAGS+=-DNONETGRAPH
110.else
111SRCS+=	ether.c
112LDADD+=	-lnetgraph
113DPADD+= ${LIBNETGRAPH}
114.if defined(EXPERIMENTAL_NETGRAPH)
115CFLAGS+=-DEXPERIMENTAL_NETGRAPH
116SRCS+=	netgraph.c
117.endif
118.endif
119
120.if defined(PPP_NO_PAM)
121CFLAGS+=-DNOPAM
122.else
123LDADD+=	${MINUSLPAM}
124DPADD+=	${LIBPAM}
125.endif
126
127.include <bsd.prog.mk>
128