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