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