5378c22be10a406018b97b3f05abba27724cdcc4
[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
3 PROG=   ppp
4 MAN=    ppp.8
5 SRCS=   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
11
12 .if defined(NOSUID) || defined(PPP_NOSUID)
13 BINMODE=554
14 .else
15 BINMODE=4554
16 BINOWN= root
17 .endif
18 BINGRP= network
19 M4FLAGS=
20
21 LDADD= -lcrypt -lmd -lutil -lz
22 DPADD=  ${LIBCRYPT} ${LIBMD} ${LIBUTIL} ${LIBZ}
23
24 WARNS?= 5
25
26 .SUFFIXES: .8 .8.m4
27
28 .8.m4.8:
29         m4 ${M4FLAGS} ${.IMPSRC} >${.TARGET}
30
31 CLEANFILES= ppp.8
32
33 .if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
34 CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
35 .endif
36
37 .if defined(NOKLDLOAD)
38 CFLAGS+=-DNOKLDLOAD
39 .endif
40
41 .if defined(NOINET6)
42 CFLAGS+=-DNOINET6
43 .endif
44
45 .if defined(NOALIAS) || defined(NONAT)
46 CFLAGS+=-DNONAT
47 .else
48 SRCS+=  nat_cmd.c
49 LDADD+= -lalias
50 DPADD+= ${LIBALIAS}
51 .endif
52
53 .if defined(NOATM)
54 CFLAGS+=-DNOATM
55 .else
56 SRCS+=  atm.c
57 .endif
58
59 .if defined(NOSUID) || defined(PPP_NOSUID)
60 CFLAGS+=-DNOSUID
61 .else
62 SRCS+=  id.c
63 .endif
64
65 .if !exists(${.CURDIR}/../../secure) || defined(NO_CRYPT) || defined(NO_OPENSSL) || defined(NODES)
66 CFLAGS+=-DNODES
67 .else
68 SRCS+=  chap_ms.c mppe.c
69 LDADD+= -lcrypto
70 DPADD+= ${LIBCRYPTO}
71 .endif
72
73 .if defined(NORADIUS)
74 CFLAGS+=-DNORADIUS
75 .else
76 SRCS+=  radius.c
77 LDADD+= -lradius
78 DPADD+= ${LIBRADIUS}
79 .endif
80
81 .if defined(WANT_NETGRAPH7)
82 CFLAGS+=-DWANT_NETGRAPH7
83 .endif
84
85 .if defined(NONETGRAPH)
86 CFLAGS+=-DNONETGRAPH
87 .else
88 SRCS+=  ether.c
89 LDADD+= -lnetgraph
90 DPADD+= ${LIBNETGRAPH}
91 .if defined(EXPERIMENTAL_NETGRAPH)
92 CFLAGS+=-DEXPERIMENTAL_NETGRAPH
93 SRCS+=  netgraph.c
94 .endif
95 .endif
96
97 .include <bsd.prog.mk>