8e77acb8a2d3a97a9e410b7affaba1633e710fe9
[dragonfly.git] / usr.sbin / ppp / Makefile
1 # $FreeBSD: src/usr.sbin/ppp/Makefile,v 1.73.2.8 2002/09/01 02:12:22 brian Exp $
2 # $DragonFly: src/usr.sbin/ppp/Makefile,v 1.4 2005/09/06 18:55:47 dillon Exp $
3
4 PROG=   ppp
5 MAN=    ppp.8
6 SRCS=   acf.c arp.c async.c auth.c bundle.c cbcp.c ccp.c chap.c chat.c \
7         command.c datalink.c deflate.c defs.c exec.c filter.c fsm.c hdlc.c \
8         iface.c ip.c ipcp.c ipv6cp.c iplist.c lcp.c link.c log.c lqr.c main.c \
9         mbuf.c mp.c ncp.c ncpaddr.c pap.c physical.c pred.c probe.c prompt.c \
10         proto.c route.c server.c sig.c slcompress.c sync.c systems.c tcp.c \
11         tcpmss.c throughput.c timer.c tty.c tun.c udp.c vjcomp.c
12 .if defined(RELEASE_CRUNCH)
13 CFLAGS+=-DRELEASE_CRUNCH
14 NOATM=          true
15 NOI4B=          true
16 NONAT=          true
17 NOKLDLOAD=      true
18 NORADIUS=       true
19 NOSUID=         true
20 .endif
21
22 .if defined(NOSUID) || defined(PPP_NOSUID)
23 BINMODE=554
24 .else
25 BINMODE=4554
26 BINOWN= root
27 .endif
28 BINGRP= network
29 M4FLAGS=
30
31 LDADD= -lcrypt -lmd -lutil -lz
32 DPADD=  ${LIBCRYPT} ${LIBMD} ${LIBUTIL} ${LIBZ}
33
34 WARNS?= 1
35
36 .SUFFIXES: .8 .8.m4
37
38 .8.m4.8:
39         m4 ${M4FLAGS} ${.IMPSRC} >${.TARGET}
40
41 CLEANFILES= ppp.8
42
43 .if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
44 CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
45 .endif
46
47 .if defined(NOKLDLOAD)
48 CFLAGS+=-DNOKLDLOAD
49 .endif
50
51 .if defined(NOINET6)
52 CFLAGS+=-DNOINET6
53 .endif
54
55 .if defined(NOALIAS) || defined(NONAT)
56 CFLAGS+=-DNONAT
57 .else
58 SRCS+=  nat_cmd.c
59 LDADD+= -lalias
60 DPADD+= ${LIBALIAS}
61 .endif
62
63 .if defined(NOATM)
64 CFLAGS+=-DNOATM
65 .else
66 SRCS+=  atm.c
67 .endif
68
69 .if defined(NOSUID) || defined(PPP_NOSUID)
70 CFLAGS+=-DNOSUID
71 .else
72 SRCS+=  id.c
73 .endif
74
75 .if !exists(${.CURDIR}/../../secure) || defined(NO_CRYPT) || defined(NO_OPENSSL) || defined(NODES)
76 CFLAGS+=-DNODES
77 .else
78 DISTRIBUTION=crypto
79 SRCS+=  chap_ms.c mppe.c
80 LDADD+= -lcrypto
81 DPADD+= ${LIBCRYPTO}
82 .endif
83
84 .if defined(NORADIUS)
85 CFLAGS+=-DNORADIUS
86 .else
87 SRCS+=  radius.c
88 LDADD+= -lradius
89 DPADD+= ${LIBRADIUS}
90 .endif
91
92 .if defined(NOI4B) || ${MACHINE_ARCH} != "i386"
93 CFLAGS+=-DNOI4B
94 .else
95 SRCS+=  i4b.c
96 .endif
97
98 .if defined(NONETGRAPH)
99 CFLAGS+=-DNONETGRAPH
100 .else
101 SRCS+=  ether.c
102 LDADD+= -lnetgraph
103 DPADD+= ${LIBNETGRAPH}
104 .if defined(EXPERIMENTAL_NETGRAPH)
105 CFLAGS+=-DEXPERIMENTAL_NETGRAPH
106 SRCS+=  netgraph.c
107 .endif
108 .endif
109
110 .include <bsd.prog.mk>