Annotation of embedaddon/mpd/src/Makefile, revision 1.1.1.1
1.1 misho 1: # $Id: Makefile,v 1.106 2011/12/21 14:08:10 amotin Exp $
2: #
3: # Makefile for mpd, multi-link PPP daemon for FreeBSD
4: #
5: # Written by Archie Cobbs <archie@freebsd.org>
6: # Copyright (c) 1995-1999 Whistle Communications, Inc. All rights reserved.
7: # See ``COPYRIGHT.whistle''
8: #
9:
10: PROG?= mpd5
11: PREFIX?= /usr/local
12: BINDIR?= ${PREFIX}/sbin
13: VERSION= 5.6
14: NOMAN=
15: NO_MAN=
16:
17: # Default configuration directory
18:
19: MPD_CONF_DIR?= ${PREFIX}/etc/mpd5
20:
21: # Define supported physical layer types
22:
23: PHYSTYPE_MODEM= yes
24: PHYSTYPE_TCP= yes
25: PHYSTYPE_UDP= yes
26: PHYSTYPE_NG_SOCKET= yes
27: PHYSTYPE_PPTP= yes
28: PHYSTYPE_PPPOE= yes
29: PHYSTYPE_L2TP= yes
30:
31: # Define supported CCP types
32:
33: CCP_DEFLATE= yes
34: CCP_MPPC= yes
35: CCP_PRED1= yes
36:
37: # Define supported ECP types
38:
39: ECP_DES= yes
40:
41: # Define system features wanted to use (if present)
42:
43: USE_NG_BPF= yes
44: USE_NG_CAR= yes
45: USE_NG_DEFLATE= yes
46: USE_NG_IPACCT= yes
47: USE_NG_MPPC= yes
48: USE_NG_NAT= yes
49: USE_NG_NETFLOW= yes
50: USE_NG_PRED1= yes
51: USE_NG_TCPMSS= yes
52: USE_NG_VJC= yes
53: USE_IPFW= yes
54: USE_FETCH= yes
55: USE_TCP_WRAP= yes
56: #USE_AUTH_OPIE= yes
57: USE_AUTH_PAM= yes
58: USE_AUTH_SYSTEM= yes
59:
60: # Build with builtin libpdel
61:
62: NOLIBPDEL= yes
63:
64: # Build without builtin web server
65:
66: #NOWEB= yes
67:
68: # Set syslog logging facility. Change LOG_DAEMON to whatever you like.
69:
70: SYSLOG_FACILITY= LOG_DAEMON
71: COPTS+= -DPROTO_NAME_LIST
72:
73: # Compiler & linker flags
74:
75: .if defined ( USE_TCP_WRAP )
76: ## filter TCP accept connections
77: LDADD+= -lwrap
78: DPADD+= ${LIBWRAP}
79: COPTS+= -DUSE_WRAP
80: .endif
81:
82: ## authentication methods: opie, pam, /etc/password
83: .if defined ( USE_AUTH_OPIE )
84: LDADD+= -lopie
85: DPADD+= ${LIBOPIE}
86: COPTS+= -DUSE_OPIE
87: .endif
88:
89: .if defined ( USE_AUTH_PAM )
90: LDADD+= -lpam
91: DPADD+= ${LIBPAM}
92: COPTS+= -DUSE_PAM
93: .endif
94:
95: .if defined ( USE_AUTH_SYSTEM )
96: ## based on /etc/password
97: LDADD+= -lcrypt -lutil
98: DPADD+= ${LIBCRYPT} ${LIBUTIL}
99: COPTS+= -DUSE_SYSTEM
100: .endif
101:
102: LDADD+= -lnetgraph
103: DPADD+= ${LIBNETGRAPH}
104:
105: LDADD+= -L/usr/lib -lradius
106: DPADD+= ${LIBRADIUS}
107:
108: ## libpdel needs ssl and libexpat (libxml2 cannot be used)
109: .if !defined ( NOLIBPDEL )
110: LDADD+= -L${PREFIX}/lib
111: LDADD+= -lpdel
112: LDADD+= -lexpat
113: .endif
114: LDADD+= -lssl
115:
116: MPD_VERSION!= echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)"
117:
118: COPTS+= -DPATH_CONF_DIR=\"${MPD_CONF_DIR}\"
119: COPTS+= -DSYSLOG_FACILITY=${SYSLOG_FACILITY}
120: COPTS+= -DMPD_VERSION='"${MPD_VERSION}"'
121: COPTS+= -g
122: COPTS+= -Wall \
123: -Wcast-align \
124: -Wchar-subscripts \
125: -Wformat \
126: -Winline \
127: -Wmissing-declarations \
128: -Wmissing-prototypes \
129: -Wnested-externs \
130: -Wpointer-arith \
131: -Wwrite-strings \
132: -pthread \
133: -I${PREFIX}/include
134:
135: .if defined ( MPD_VENDOR )
136: COPTS+= '-DMPD_VENDOR="${MPD_VENDOR}"'
137: .endif
138:
139: # Standard sources
140:
141: STDSRCS= assert.c auth.c bund.c rep.c ccp.c chap.c \
142: console.c command.c ecp.c event.c fsm.c iface.c input.c \
143: ip.c ipcp.c ipv6cp.c lcp.c link.c log.c main.c mbuf.c mp.c \
144: msg.c ngfunc.c pap.c phys.c proto.c radius.c radsrv.c timer.c \
145: util.c vars.c eap.c msoft.c ippool.c
146:
147: .if defined ( NOWEB )
148: COPTS+= -DNOWEB
149: .else
150: STDSRCS+= web.c
151: .endif
152:
153: .if defined ( NOLIBPDEL )
154: COPTS+= -DNOLIBPDEL -I./contrib/libpdel
155: PDPATH1= contrib/libpdel/util:contrib/libpdel/structs
156: PDPATH2= contrib/libpdel/structs/type
157: .if defined ( NOWEB )
158: VPATH+= $(PDPATH1):$(PDPATH2)
159: .else
160: PDPATH3= contrib/libpdel/http:contrib/libpdel/http/servlet
161: PDPATH4= contrib/libpdel/io
162: VPATH+= $(PDPATH1):$(PDPATH2):$(PDPATH3):$(PDPATH4)
163: .endif
164: PDELSRCS= typed_mem.c \
165: pevent.c \
166: paction.c \
167: ghash.c \
168: gtree.c \
169: mesg_port.c \
170: structs.c \
171: structs_generic.c \
172: structs_type_array.c \
173: structs_type_int.c \
174: structs_type_string.c \
175: structs_type_struct.c
176: .if !defined ( NOWEB )
177: PDELSRCS+= http_connection.c \
178: http_head.c \
179: http_message.c \
180: http_mime.c \
181: http_request.c \
182: http_response.c \
183: http_server.c \
184: http_servlet_basicauth.c \
185: http_ssl.c \
186: http_status.c \
187: boundary_fp.c \
188: ssl_fp.c \
189: string_fp.c \
190: timeout_fp.c
191: .endif
192: .endif
193:
194: # Add sources and flags for the various physical layer types
195:
196: .if defined ( PHYSTYPE_MODEM )
197: SRCS+= modem.c chat.c
198: COPTS+= -DPHYSTYPE_MODEM
199: .endif
200: .if defined ( PHYSTYPE_UDP )
201: SRCS+= udp.c
202: COPTS+= -DPHYSTYPE_UDP
203: .endif
204: .if defined ( PHYSTYPE_TCP )
205: SRCS+= tcp.c
206: COPTS+= -DPHYSTYPE_TCP
207: .endif
208: .if defined ( PHYSTYPE_NG_SOCKET )
209: SRCS+= ng.c
210: COPTS+= -DPHYSTYPE_NG_SOCKET
211: .endif
212: .if defined ( PHYSTYPE_PPTP )
213: SRCS+= pptp.c pptp_ctrl.c
214: COPTS+= -DPHYSTYPE_PPTP
215: COPTS+= -DRANDOMIZE_CID
216: #COPTS+= -DLOOK_LIKE_NT
217: .endif
218: .if defined ( PHYSTYPE_PPPOE )
219: SRCS+= pppoe.c
220: COPTS+= -DPHYSTYPE_PPPOE
221: .endif
222: .if defined ( PHYSTYPE_L2TP )
223: SRCS+= l2tp.c l2tp_avp.c l2tp_ctrl.c
224: COPTS+= -DPHYSTYPE_L2TP
225: .endif
226:
227: # CCP
228:
229: .if defined ( CCP_DEFLATE ) && defined ( USE_NG_DEFLATE )
230: SRCS+= ccp_deflate.c
231: COPTS+= -DCCP_DEFLATE
232: COPTS+= -DUSE_NG_DEFLATE
233: .endif
234:
235: .if defined ( CCP_MPPC ) && defined ( USE_NG_MPPC )
236: SRCS+= ccp_mppc.c
237: COPTS+= -DCCP_MPPC
238: COPTS+= -DUSE_NG_MPPC
239: .endif
240:
241: .if defined ( CCP_PRED1 )
242: SRCS+= ccp_pred1.c
243: COPTS+= -DCCP_PRED1
244: .if defined ( USE_NG_PRED1 )
245: COPTS+= -DUSE_NG_PRED1
246: .endif
247: .endif
248:
249: # ECP
250:
251: .if defined ( ECP_DES )
252: SRCS+= ecp_dese.c
253: SRCS+= ecp_dese_bis.c
254: COPTS+= -DECP_DES
255: NEED_DES= yes
256: .endif
257:
258: # Features
259:
260: .if defined ( USE_NG_BPF )
261: COPTS+= -DUSE_NG_BPF
262: LDADD+= -lpcap
263: DPADD+= ${LIBPCAP}
264: .endif
265: .if defined ( USE_NG_CAR )
266: COPTS+= -DUSE_NG_CAR
267: .endif
268: .if defined ( USE_NG_IPACCT )
269: COPTS+= -DUSE_NG_IPACCT
270: .endif
271: .if defined ( USE_NG_NAT )
272: SRCS+= nat.c
273: COPTS+= -DUSE_NG_NAT
274: .endif
275: .if defined ( USE_NG_NETFLOW )
276: COPTS+= -DUSE_NG_NETFLOW
277: .endif
278: .if defined ( USE_NG_TCPMSS )
279: COPTS+= -DUSE_NG_TCPMSS
280: .endif
281: .if defined ( USE_NG_VJC )
282: COPTS+= -DUSE_NG_VJC
283: .endif
284: .if defined ( USE_IPFW )
285: COPTS+= -DUSE_IPFW
286: .endif
287: .if defined ( USE_FETCH )
288: COPTS+= -DUSE_FETCH
289: LDADD+= -lfetch
290: DPADD+= ${LIBFETCH}
291: .endif
292:
293: # Add in required support files and libraries
294:
295: .if defined ( NEED_DES )
296: LDADD+= -lcrypto
297: DPADD+= ${LIBCRYPTO}
298: .endif
299:
300: # Now add standard sources
301:
302: SRCS+= ${STDSRCS}
303:
304: .if defined ( NOLIBPDEL )
305: SRCS+= ${PDELSRCS}
306: .endif
307:
308: .include <bsd.prog.mk>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>