aboutsummaryrefslogtreecommitdiff
path: root/net/mpd5/files/patch-src-Makefile
blob: 8b37480e471170e0fe7c80bb63c1dc2da12615b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
--- src/Makefile.orig
+++ src/Makefile
@@ -9,11 +9,12 @@
 
 PROG?=			mpd5
 PREFIX?=		/usr/local
+LOCALBASE?=		${PREFIX}
 BINDIR?=		${PREFIX}/sbin
 VERSION=		5.8
-NOMAN=
-NO_MAN=
 
+MAN=
+
 BINOWN!=		/usr/bin/id -n -u
 BINGRP!=		/usr/bin/id -n -g
 
@@ -59,9 +60,6 @@
 USE_AUTH_PAM=		yes
 USE_AUTH_SYSTEM=	yes
 
-# Build with builtin libpdel
-NOLIBPDEL=		yes
-
 # Build without builtin web server.
 #NOWEB=			yes
 
@@ -71,7 +69,7 @@
 
 # Print wide protocol names instead of short names.
 # Comment this line, to save about 10 KB space
-COPTS+=			-DPROTO_NAME_LIST
+CFLAGS+=	-DPROTO_NAME_LIST
 
 # Reduce some internal structures size to save more memory
 # This is to limit amount of active sessions
@@ -83,27 +81,27 @@
 ## filter TCP accept connections
 LDADD+=		-lwrap
 DPADD+=		${LIBWRAP}
-COPTS+=		-DUSE_WRAP
+CFLAGS+=	-DUSE_WRAP
 .endif
 
 ## authentication methods: opie, pam, /etc/password
 .if defined ( USE_AUTH_OPIE )
 LDADD+=		-lopie
 DPADD+=		${LIBOPIE}
-COPTS+=		-DUSE_OPIE
+CFLAGS+=	-DUSE_OPIE
 .endif
 
 .if exists ( /usr/lib/libpam.so ) && defined ( USE_AUTH_PAM )
 LDADD+=		-lpam
 DPADD+=		${LIBPAM}
-COPTS+=		-DUSE_PAM
+CFLAGS+=	-DUSE_PAM
 .endif
 
 .if defined ( USE_AUTH_SYSTEM )
 ## based on /etc/password
 LDADD+=		-lcrypt
 DPADD+=		${LIBCRYPT} ${LIBUTIL}
-COPTS+=		-DUSE_SYSTEM
+CFLAGS+=	-DUSE_SYSTEM
 .endif
 
 LDADD+=		-lnetgraph -lutil
@@ -112,19 +110,12 @@
 LDADD+=		-L/usr/lib -lradius
 DPADD+=		${LIBRADIUS}
 
-## libpdel needs ssl and libexpat (libxml2 cannot be used)
-.if !defined ( NOLIBPDEL )
-LDADD+=		-L${PREFIX}/lib
-LDADD+=		-lpdel
-LDADD+=		-lexpat
-.endif
-
 MPD_VERSION!=	echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)"
 
-COPTS+=		-DPATH_CONF_DIR='"${MPD_CONF_DIR}"'
-COPTS+=		-DMPD_VERSION='"${MPD_VERSION}"'
-COPTS+=		-g
-COPTS+=		-Wall \
+CFLAGS+=	-DPATH_CONF_DIR='"${MPD_CONF_DIR}"'
+CFLAGS+=	-DMPD_VERSION='"${MPD_VERSION}"'
+CFLAGS+=	-g
+CFLAGS+=	-Wall \
 		-Wcast-align \
 		-Wchar-subscripts \
 		-Wformat \
@@ -134,15 +125,14 @@
 		-Wnested-externs \
 		-Wpointer-arith \
 		-Wwrite-strings \
-		-pthread \
-		-I${PREFIX}/include
+		-pthread
 
 .if defined ( MPD_VENDOR )
-COPTS+=		-DMPD_VENDOR='"${MPD_VENDOR}"'
+CFLAGS+=	-DMPD_VENDOR='"${MPD_VENDOR}"'
 .endif
 
 .if defined ( SYSLOG_FACILITY )
-COPTS+=		-DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"'
+CFLAGS+=	-DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"'
 .endif
 
 # Standard sources
@@ -154,14 +144,13 @@
 		util.c vars.c eap.c msoft.c ippool.c
 
 .if defined ( NOWEB )
-COPTS+=		-DNOWEB
+CFLAGS+=	-DNOWEB
 .else
 STDSRCS+=	web.c
 LDADD+=		-lssl
 .endif
 
-.if defined ( NOLIBPDEL )
-COPTS+=		-DNOLIBPDEL -I./contrib/libpdel
+CFLAGS+=	-DNOLIBPDEL -I./contrib/libpdel
 PDPATH1=	contrib/libpdel/util:contrib/libpdel/structs
 PDPATH2=	contrib/libpdel/structs/type
 .if defined ( NOWEB )
@@ -199,60 +188,59 @@
 		string_fp.c \
 		timeout_fp.c
 .endif
-.endif
 
 # Add sources and flags for the various physical layer types
 
 .if defined ( PHYSTYPE_MODEM )
 SRCS+=		modem.c chat.c
-COPTS+=		-DPHYSTYPE_MODEM
+CFLAGS+=	-DPHYSTYPE_MODEM
 .endif
 .if defined ( PHYSTYPE_UDP )
 SRCS+=		udp.c
-COPTS+=		-DPHYSTYPE_UDP
+CFLAGS+=	-DPHYSTYPE_UDP
 .endif
 .if defined ( PHYSTYPE_TCP )
 SRCS+=		tcp.c
-COPTS+=		-DPHYSTYPE_TCP
+CFLAGS+=	-DPHYSTYPE_TCP
 .endif
 .if defined ( PHYSTYPE_NG_SOCKET )
 SRCS+=		ng.c
-COPTS+=		-DPHYSTYPE_NG_SOCKET
+CFLAGS+=	-DPHYSTYPE_NG_SOCKET
 .endif
 .if defined ( PHYSTYPE_PPTP )
 SRCS+=		pptp.c pptp_ctrl.c
-COPTS+=		-DPHYSTYPE_PPTP
-COPTS+=		-DRANDOMIZE_CID
-#COPTS+=		-DLOOK_LIKE_NT
+CFLAGS+=	-DPHYSTYPE_PPTP
+CFLAGS+=	-DRANDOMIZE_CID
+#CFLAGS+=	-DLOOK_LIKE_NT
 .endif
 .if defined ( PHYSTYPE_PPPOE )
 SRCS+=		pppoe.c
-COPTS+=		-DPHYSTYPE_PPPOE
+CFLAGS+=	-DPHYSTYPE_PPPOE
 .endif
 .if defined ( PHYSTYPE_L2TP )
 SRCS+=		l2tp.c l2tp_avp.c l2tp_ctrl.c
-COPTS+=		-DPHYSTYPE_L2TP
+CFLAGS+=	-DPHYSTYPE_L2TP
 .endif
 
 # CCP
 
 .if defined ( CCP_DEFLATE ) && defined ( USE_NG_DEFLATE )
 SRCS+=		ccp_deflate.c
-COPTS+=		-DCCP_DEFLATE
-COPTS+=         -DUSE_NG_DEFLATE
+CFLAGS+=	-DCCP_DEFLATE
+CFLAGS+=	-DUSE_NG_DEFLATE
 .endif
 
 .if defined ( CCP_MPPC ) && defined ( USE_NG_MPPC )
 SRCS+=		ccp_mppc.c
-COPTS+=		-DCCP_MPPC
-COPTS+=         -DUSE_NG_MPPC
+CFLAGS+=	-DCCP_MPPC
+CFLAGS+=	-DUSE_NG_MPPC
 .endif
 
 .if defined ( CCP_PRED1 )
 SRCS+=		ccp_pred1.c
-COPTS+=		-DCCP_PRED1
+CFLAGS+=	-DCCP_PRED1
 .if defined ( USE_NG_PRED1 )
-COPTS+=         -DUSE_NG_PRED1
+CFLAGS+=	-DUSE_NG_PRED1
 .endif
 .endif
 
@@ -261,46 +249,46 @@
 .if defined ( ECP_DES )
 SRCS+=		ecp_dese.c
 SRCS+=		ecp_dese_bis.c
-COPTS+=		-DECP_DES
+CFLAGS+=	-DECP_DES
 NEED_DES=	yes
 .endif
 
 # Features
 
 .if defined ( USE_NG_BPF )
-COPTS+=		-DUSE_NG_BPF
+CFLAGS+=	-DUSE_NG_BPF
 LDADD+=		-lpcap
 DPADD+=		${LIBPCAP}
 .endif
 .if defined ( USE_NG_CAR )
-COPTS+=         -DUSE_NG_CAR
+CFLAGS+=	-DUSE_NG_CAR
 .endif
 .if defined ( USE_NG_IPACCT )
-COPTS+=         -DUSE_NG_IPACCT
+CFLAGS+=	-DUSE_NG_IPACCT -nostdinc -I/usr/include -I${LOCALBASE}/include
 .endif
 .if defined ( USE_NG_NAT )
 SRCS+=		nat.c
-COPTS+=         -DUSE_NG_NAT
+CFLAGS+=	-DUSE_NG_NAT
 .endif
 .if defined ( USE_NG_NETFLOW )
-COPTS+=         -DUSE_NG_NETFLOW
+CFLAGS+=	-DUSE_NG_NETFLOW
 .endif
 .if defined ( USE_NG_TCPMSS )
-COPTS+=         -DUSE_NG_TCPMSS
+CFLAGS+=	-DUSE_NG_TCPMSS
 .endif
 .if defined ( USE_NG_VJC )
-COPTS+=         -DUSE_NG_VJC
+CFLAGS+=	-DUSE_NG_VJC
 .endif
 .if defined ( USE_IPFW )
-COPTS+=         -DUSE_IPFW
+CFLAGS+=	-DUSE_IPFW
 .endif
 .if defined ( USE_FETCH )
-COPTS+=         -DUSE_FETCH
+CFLAGS+=	-DUSE_FETCH
 LDADD+=		-lfetch
 DPADD+=		${LIBFETCH}
 .endif
 .if defined ( SMALL_SYSTEM )
-COPTS+=         -DSMALL_SYSTEM
+CFLAGS+=	-DSMALL_SYSTEM
 .endif
 
 # Add in required support files and libraries
@@ -309,15 +297,12 @@
 
 .if exists ( /usr/lib/libexecinfo.so )
 LDADD+=		-lexecinfo
-COPTS+=		-DUSE_BACKTRACE
+CFLAGS+=	-DUSE_BACKTRACE
 .endif
 
 # Now add standard sources
 
 SRCS+=		${STDSRCS}
-
-.if defined ( NOLIBPDEL )
 SRCS+=		${PDELSRCS}
-.endif
 
 .include <bsd.prog.mk>