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