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