1 | #***************************************************************************
|
---|
2 | # _ _ ____ _
|
---|
3 | # Project ___| | | | _ \| |
|
---|
4 | # / __| | | | |_) | |
|
---|
5 | # | (__| |_| | _ <| |___
|
---|
6 | # \___|\___/|_| \_\_____|
|
---|
7 | #
|
---|
8 | # Copyright (C) 1999 - 2021, Daniel Stenberg, <[email protected]>, et al.
|
---|
9 | #
|
---|
10 | # This software is licensed as described in the file COPYING, which
|
---|
11 | # you should have received as part of this distribution. The terms
|
---|
12 | # are also available at https://curl.se/docs/copyright.html.
|
---|
13 | #
|
---|
14 | # You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
---|
15 | # copies of the Software, and permit persons to whom the Software is
|
---|
16 | # furnished to do so, under the terms of the COPYING file.
|
---|
17 | #
|
---|
18 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
---|
19 | # KIND, either express or implied.
|
---|
20 | #
|
---|
21 | #***************************************************************************
|
---|
22 |
|
---|
23 | ###########################################################################
|
---|
24 | #
|
---|
25 | ## Makefile for building libcurl.a with MingW (GCC-3.2 or later or LLVM/Clang)
|
---|
26 | ## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4),
|
---|
27 | ## brotli (1.0.1), zstd (1.4.5)
|
---|
28 | ##
|
---|
29 | ## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
|
---|
30 | ## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-sspi-winidn
|
---|
31 | ##
|
---|
32 | ## Hint: you can also set environment vars to control the build, f.e.:
|
---|
33 | ## set ZLIB_PATH=c:/zlib-1.2.8
|
---|
34 | ## set ZLIB=1
|
---|
35 | #
|
---|
36 | ###########################################################################
|
---|
37 |
|
---|
38 | # Edit the path below to point to the base of your Zlib sources.
|
---|
39 | ifndef ZLIB_PATH
|
---|
40 | ZLIB_PATH = ../../zlib-1.2.8
|
---|
41 | endif
|
---|
42 | # Edit the path below to point to the base of your Zstandard sources.
|
---|
43 | ifndef ZSTD_PATH
|
---|
44 | ZSTD_PATH = ../../zstd-1.4.5
|
---|
45 | endif
|
---|
46 | # Edit the path below to point to the base of your Brotli sources.
|
---|
47 | ifndef BROTLI_PATH
|
---|
48 | BROTLI_PATH = ../../brotli-1.0.1
|
---|
49 | endif
|
---|
50 | # Edit the path below to point to the base of your OpenSSL package.
|
---|
51 | ifndef OPENSSL_PATH
|
---|
52 | OPENSSL_PATH = ../../openssl-1.0.2a
|
---|
53 | endif
|
---|
54 | # Edit the path below to point to the base of your LibSSH2 package.
|
---|
55 | ifndef LIBSSH2_PATH
|
---|
56 | LIBSSH2_PATH = ../../libssh2-1.5.0
|
---|
57 | endif
|
---|
58 | # Edit the path below to point to the base of your librtmp package.
|
---|
59 | ifndef LIBRTMP_PATH
|
---|
60 | LIBRTMP_PATH = ../../librtmp-2.4
|
---|
61 | endif
|
---|
62 | # Edit the path below to point to the base of your libgsasl package.
|
---|
63 | ifndef LIBGSASL_PATH
|
---|
64 | LIBGSASL_PATH = ../../libgsasl-1.10.0
|
---|
65 | endif
|
---|
66 | # Edit the path below to point to the base of your libidn2 package.
|
---|
67 | ifndef LIBIDN2_PATH
|
---|
68 | LIBIDN2_PATH = ../../libidn2-2.0.3
|
---|
69 | endif
|
---|
70 | # Edit the path below to point to the base of your MS IDN package.
|
---|
71 | # Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
|
---|
72 | # https://www.microsoft.com/en-us/download/details.aspx?id=734
|
---|
73 | ifndef WINIDN_PATH
|
---|
74 | WINIDN_PATH = ../../Microsoft IDN Mitigation APIs
|
---|
75 | endif
|
---|
76 | # Edit the path below to point to the base of your Novell LDAP NDK.
|
---|
77 | ifndef LDAP_SDK
|
---|
78 | LDAP_SDK = c:/novell/ndk/cldapsdk/win32
|
---|
79 | endif
|
---|
80 | # Edit the path below to point to the base of your nghttp2 package.
|
---|
81 | ifndef NGHTTP2_PATH
|
---|
82 | NGHTTP2_PATH = ../../nghttp2-1.0.0
|
---|
83 | endif
|
---|
84 | # Edit the path below to point to the base of your nghttp3 package.
|
---|
85 | ifndef NGHTTP3_PATH
|
---|
86 | NGHTTP3_PATH = ../../nghttp3-1.0.0
|
---|
87 | endif
|
---|
88 | # Edit the path below to point to the base of your ngtcp2 package.
|
---|
89 | ifndef NGTCP2_PATH
|
---|
90 | NGTCP2_PATH = ../../ngtcp2-1.0.0
|
---|
91 | endif
|
---|
92 |
|
---|
93 | PROOT = ..
|
---|
94 |
|
---|
95 | # Edit the path below to point to the base of your c-ares package.
|
---|
96 | ifndef LIBCARES_PATH
|
---|
97 | LIBCARES_PATH = $(PROOT)/ares
|
---|
98 | endif
|
---|
99 |
|
---|
100 | ifeq ($(CURL_CC),)
|
---|
101 | CURL_CC := $(CROSSPREFIX)gcc
|
---|
102 | endif
|
---|
103 | ifeq ($(CURL_AR),)
|
---|
104 | CURL_AR := $(CROSSPREFIX)ar
|
---|
105 | endif
|
---|
106 | ifeq ($(CURL_RANLIB),)
|
---|
107 | CURL_RANLIB := $(CROSSPREFIX)ranlib
|
---|
108 | endif
|
---|
109 |
|
---|
110 | CC = $(CURL_CC)
|
---|
111 | CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall -W
|
---|
112 | CFLAGS += -fno-strict-aliasing
|
---|
113 | # comment LDFLAGS below to keep debug info
|
---|
114 | LDFLAGS = $(CURL_LDFLAG_EXTRAS) $(CURL_LDFLAG_EXTRAS_DLL) -s
|
---|
115 | AR = $(CURL_AR)
|
---|
116 | RANLIB = $(CURL_RANLIB)
|
---|
117 | RC = $(CROSSPREFIX)windres
|
---|
118 | RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O coff
|
---|
119 | STRIP = $(CROSSPREFIX)strip -g
|
---|
120 |
|
---|
121 | # Set environment var ARCH to your architecture to override autodetection.
|
---|
122 | ifndef ARCH
|
---|
123 | ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64)
|
---|
124 | ARCH = w64
|
---|
125 | else
|
---|
126 | ARCH = w32
|
---|
127 | endif
|
---|
128 | endif
|
---|
129 |
|
---|
130 | ifeq ($(ARCH),w64)
|
---|
131 | CFLAGS += -m64 -D_AMD64_
|
---|
132 | LDFLAGS += -m64
|
---|
133 | RCFLAGS += -F pe-x86-64
|
---|
134 | else
|
---|
135 | CFLAGS += -m32
|
---|
136 | LDFLAGS += -m32
|
---|
137 | RCFLAGS += -F pe-i386
|
---|
138 | endif
|
---|
139 |
|
---|
140 | # Platform-dependent helper tool macros
|
---|
141 | ifeq ($(findstring /sh,$(SHELL)),/sh)
|
---|
142 | DEL = rm -f $1
|
---|
143 | RMDIR = rm -fr $1
|
---|
144 | MKDIR = mkdir -p $1
|
---|
145 | COPY = -cp -afv $1 $2
|
---|
146 | #COPYR = -cp -afr $1/* $2
|
---|
147 | COPYR = -rsync -aC $1/* $2
|
---|
148 | TOUCH = touch $1
|
---|
149 | CAT = cat
|
---|
150 | ECHONL = echo ""
|
---|
151 | DL = '
|
---|
152 | else
|
---|
153 | ifeq "$(OS)" "Windows_NT"
|
---|
154 | DEL = -del 2>NUL /q /f $(subst /,\,$1)
|
---|
155 | RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
|
---|
156 | else
|
---|
157 | DEL = -del 2>NUL $(subst /,\,$1)
|
---|
158 | RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
|
---|
159 | endif
|
---|
160 | MKDIR = -md 2>NUL $(subst /,\,$1)
|
---|
161 | COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
|
---|
162 | COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
|
---|
163 | TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
|
---|
164 | CAT = type
|
---|
165 | ECHONL = $(ComSpec) /c echo.
|
---|
166 | endif
|
---|
167 |
|
---|
168 | ########################################################
|
---|
169 | ## Nothing more to do below this line!
|
---|
170 |
|
---|
171 | ifneq ($(findstring -dyn,$(CFG)),)
|
---|
172 | DYN = 1
|
---|
173 | endif
|
---|
174 | ifneq ($(findstring -ares,$(CFG)),)
|
---|
175 | ARES = 1
|
---|
176 | endif
|
---|
177 | ifneq ($(findstring -sync,$(CFG)),)
|
---|
178 | SYNC = 1
|
---|
179 | endif
|
---|
180 | ifneq ($(findstring -rtmp,$(CFG)),)
|
---|
181 | RTMP = 1
|
---|
182 | ZLIB = 1
|
---|
183 | endif
|
---|
184 | ifneq ($(findstring -ssh2,$(CFG)),)
|
---|
185 | SSH2 = 1
|
---|
186 | ZLIB = 1
|
---|
187 | endif
|
---|
188 | ifneq ($(findstring -ssl,$(CFG)),)
|
---|
189 | SSL = 1
|
---|
190 | endif
|
---|
191 | ifneq ($(findstring -srp,$(CFG)),)
|
---|
192 | SRP = 1
|
---|
193 | endif
|
---|
194 | ifneq ($(findstring -zlib,$(CFG)),)
|
---|
195 | ZLIB = 1
|
---|
196 | endif
|
---|
197 | ifneq ($(findstring -zstd,$(CFG)),)
|
---|
198 | ZSTD = 1
|
---|
199 | endif
|
---|
200 | ifneq ($(findstring -brotli,$(CFG)),)
|
---|
201 | BROTLI = 1
|
---|
202 | endif
|
---|
203 | ifneq ($(findstring -gsasl,$(CFG)),)
|
---|
204 | GSASL = 1
|
---|
205 | endif
|
---|
206 | ifneq ($(findstring -idn2,$(CFG)),)
|
---|
207 | IDN2 = 1
|
---|
208 | endif
|
---|
209 | ifneq ($(findstring -winidn,$(CFG)),)
|
---|
210 | WINIDN = 1
|
---|
211 | endif
|
---|
212 | ifneq ($(findstring -sspi,$(CFG)),)
|
---|
213 | SSPI = 1
|
---|
214 | endif
|
---|
215 | ifneq ($(findstring -ldaps,$(CFG)),)
|
---|
216 | LDAPS = 1
|
---|
217 | endif
|
---|
218 | ifneq ($(findstring -ipv6,$(CFG)),)
|
---|
219 | IPV6 = 1
|
---|
220 | endif
|
---|
221 | ifneq ($(findstring -schannel,$(CFG))$(findstring -winssl,$(CFG)),)
|
---|
222 | SCHANNEL = 1
|
---|
223 | SSPI = 1
|
---|
224 | endif
|
---|
225 | ifneq ($(findstring -nghttp2,$(CFG)),)
|
---|
226 | NGHTTP2 = 1
|
---|
227 | endif
|
---|
228 | ifneq ($(findstring -nghttp3,$(CFG)),)
|
---|
229 | NGHTTP3 = 1
|
---|
230 | endif
|
---|
231 | ifneq ($(findstring -ngtcp2,$(CFG)),)
|
---|
232 | NGTCP2 = 1
|
---|
233 | endif
|
---|
234 | ifneq ($(findstring -unicode,$(CFG)),)
|
---|
235 | UNICODE = 1
|
---|
236 | endif
|
---|
237 |
|
---|
238 | # SSH2 and RTMP require an SSL library; assume OpenSSL if none specified
|
---|
239 | ifneq ($(SSH2)$(RTMP),)
|
---|
240 | ifeq ($(SSL)$(SCHANNEL),)
|
---|
241 | SSL = 1
|
---|
242 | endif
|
---|
243 | endif
|
---|
244 |
|
---|
245 | INCLUDES = -I. -I../include
|
---|
246 | CFLAGS += -DBUILDING_LIBCURL
|
---|
247 | ifdef SSL
|
---|
248 | ifdef SCHANNEL
|
---|
249 | CFLAGS += -DCURL_WITH_MULTI_SSL
|
---|
250 | endif
|
---|
251 | endif
|
---|
252 | ifdef UNICODE
|
---|
253 | CFLAGS += -DUNICODE -D_UNICODE
|
---|
254 | endif
|
---|
255 |
|
---|
256 | ifdef SYNC
|
---|
257 | CFLAGS += -DUSE_SYNC_DNS
|
---|
258 | else
|
---|
259 | ifdef ARES
|
---|
260 | INCLUDES += -I"$(LIBCARES_PATH)"
|
---|
261 | CFLAGS += -DUSE_ARES -DCARES_STATICLIB
|
---|
262 | DLL_LIBS += -L"$(LIBCARES_PATH)" -lcares
|
---|
263 | libcurl_dll_DEPENDENCIES = $(LIBCARES_PATH)/libcares.a
|
---|
264 | endif
|
---|
265 | endif
|
---|
266 | ifdef RTMP
|
---|
267 | INCLUDES += -I"$(LIBRTMP_PATH)"
|
---|
268 | CFLAGS += -DUSE_LIBRTMP
|
---|
269 | DLL_LIBS += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm
|
---|
270 | endif
|
---|
271 | ifdef NGHTTP2
|
---|
272 | INCLUDES += -I"$(NGHTTP2_PATH)/include"
|
---|
273 | CFLAGS += -DUSE_NGHTTP2
|
---|
274 | DLL_LIBS += -L"$(NGHTTP2_PATH)/lib" -lnghttp2
|
---|
275 | endif
|
---|
276 | ifdef SSH2
|
---|
277 | INCLUDES += -I"$(LIBSSH2_PATH)/include" -I"$(LIBSSH2_PATH)/win32"
|
---|
278 | CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
|
---|
279 | DLL_LIBS += -L"$(LIBSSH2_PATH)/win32" -lssh2
|
---|
280 | ifdef SCHANNEL
|
---|
281 | ifndef DYN
|
---|
282 | DLL_LIBS += -lbcrypt -lcrypt32
|
---|
283 | endif
|
---|
284 | endif
|
---|
285 | endif
|
---|
286 | ifdef SSL
|
---|
287 | ifdef NGHTTP3
|
---|
288 | INCLUDES += -I"$(NGHTTP3_PATH)/include"
|
---|
289 | CFLAGS += -DUSE_NGHTTP3
|
---|
290 | DLL_LIBS += -L"$(NGHTTP3_PATH)/lib" -lnghttp3
|
---|
291 | ifdef NGTCP2
|
---|
292 | INCLUDES += -I"$(NGTCP2_PATH)/include"
|
---|
293 | CFLAGS += -DUSE_NGTCP2
|
---|
294 | DLL_LIBS += -L"$(NGTCP2_PATH)/lib" -lngtcp2 -lngtcp2_crypto_openssl
|
---|
295 | endif
|
---|
296 | endif
|
---|
297 |
|
---|
298 | ifndef OPENSSL_INCLUDE
|
---|
299 | ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
|
---|
300 | OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
|
---|
301 | endif
|
---|
302 | ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include"
|
---|
303 | OPENSSL_INCLUDE = $(OPENSSL_PATH)/include
|
---|
304 | endif
|
---|
305 | endif
|
---|
306 | ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h"
|
---|
307 | $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
|
---|
308 | endif
|
---|
309 | ifndef OPENSSL_LIBPATH
|
---|
310 | ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
|
---|
311 | OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
|
---|
312 | OPENSSL_LIBS = -leay32 -lssl32
|
---|
313 | endif
|
---|
314 | ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
|
---|
315 | OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
|
---|
316 | OPENSSL_LIBS = -lcrypto -lssl
|
---|
317 | endif
|
---|
318 | endif
|
---|
319 | ifndef DYN
|
---|
320 | OPENSSL_LIBS += -lgdi32 -lcrypt32
|
---|
321 | endif
|
---|
322 | INCLUDES += -I"$(OPENSSL_INCLUDE)"
|
---|
323 | CFLAGS += -DUSE_OPENSSL -DHAVE_OPENSSL_PKCS12_H \
|
---|
324 | -DOPENSSL_NO_KRB5
|
---|
325 | DLL_LIBS += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
|
---|
326 | ifdef SRP
|
---|
327 | ifeq "$(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h)" "$(OPENSSL_INCLUDE)/openssl/srp.h"
|
---|
328 | CFLAGS += -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP
|
---|
329 | endif
|
---|
330 | endif
|
---|
331 | endif
|
---|
332 | ifdef SCHANNEL
|
---|
333 | CFLAGS += -DUSE_SCHANNEL
|
---|
334 | DLL_LIBS += -lcrypt32
|
---|
335 | endif
|
---|
336 | ifdef ZLIB
|
---|
337 | INCLUDES += -I"$(ZLIB_PATH)"
|
---|
338 | CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
|
---|
339 | DLL_LIBS += -L"$(ZLIB_PATH)" -lz
|
---|
340 | endif
|
---|
341 | ifdef ZSTD
|
---|
342 | INCLUDES += -I"$(ZSTD_PATH)/include"
|
---|
343 | CFLAGS += -DHAVE_ZSTD
|
---|
344 | DLL_LIBS += -L"$(ZSTD_PATH)/lib"
|
---|
345 | ifdef ZSTD_LIBS
|
---|
346 | DLL_LIBS += $(ZSTD_LIBS)
|
---|
347 | else
|
---|
348 | DLL_LIBS += -lzstd
|
---|
349 | endif
|
---|
350 | endif
|
---|
351 | ifdef BROTLI
|
---|
352 | INCLUDES += -I"$(BROTLI_PATH)/include"
|
---|
353 | CFLAGS += -DHAVE_BROTLI
|
---|
354 | DLL_LIBS += -L"$(BROTLI_PATH)/lib"
|
---|
355 | ifdef BROTLI_LIBS
|
---|
356 | DLL_LIBS += $(BROTLI_LIBS)
|
---|
357 | else
|
---|
358 | DLL_LIBS += -lbrotlidec
|
---|
359 | endif
|
---|
360 | endif
|
---|
361 | ifdef GSASL
|
---|
362 | INCLUDES += -I"$(LIBGSASL_PATH)/include"
|
---|
363 | CFLAGS += -DUSE_GSASL
|
---|
364 | DLL_LIBS += -L"$(LIBGSASL_PATH)/lib" -lgsasl
|
---|
365 | endif
|
---|
366 | ifdef IDN2
|
---|
367 | INCLUDES += -I"$(LIBIDN2_PATH)/include"
|
---|
368 | CFLAGS += -DUSE_LIBIDN2
|
---|
369 | DLL_LIBS += -L"$(LIBIDN2_PATH)/lib" -lidn2
|
---|
370 | else
|
---|
371 | ifdef WINIDN
|
---|
372 | CFLAGS += -DUSE_WIN32_IDN
|
---|
373 | CFLAGS += -DWANT_IDN_PROTOTYPES
|
---|
374 | DLL_LIBS += -L"$(WINIDN_PATH)" -lnormaliz
|
---|
375 | endif
|
---|
376 | endif
|
---|
377 | ifdef SSPI
|
---|
378 | CFLAGS += -DUSE_WINDOWS_SSPI
|
---|
379 | endif
|
---|
380 | ifdef SPNEGO
|
---|
381 | CFLAGS += -DHAVE_SPNEGO
|
---|
382 | endif
|
---|
383 | ifdef IPV6
|
---|
384 | CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
|
---|
385 | endif
|
---|
386 | ifdef LDAPS
|
---|
387 | CFLAGS += -DHAVE_LDAP_SSL
|
---|
388 | endif
|
---|
389 | ifdef USE_LDAP_NOVELL
|
---|
390 | INCLUDES += -I"$(LDAP_SDK)/inc"
|
---|
391 | CFLAGS += -DCURL_HAS_NOVELL_LDAPSDK
|
---|
392 | DLL_LIBS += -L"$(LDAP_SDK)/lib/mscvc" -lldapsdk -lldapssl -lldapx
|
---|
393 | endif
|
---|
394 | ifdef USE_LDAP_OPENLDAP
|
---|
395 | INCLUDES += -I"$(LDAP_SDK)/include"
|
---|
396 | CFLAGS += -DCURL_HAS_OPENLDAP_LDAPSDK
|
---|
397 | DLL_LIBS += -L"$(LDAP_SDK)/lib" -lldap -llber
|
---|
398 | endif
|
---|
399 | ifndef USE_LDAP_NOVELL
|
---|
400 | ifndef USE_LDAP_OPENLDAP
|
---|
401 | DLL_LIBS += -lwldap32
|
---|
402 | endif
|
---|
403 | endif
|
---|
404 | DLL_LIBS += -lws2_32
|
---|
405 |
|
---|
406 | # Makefile.inc provides the CSOURCES and HHEADERS defines
|
---|
407 | include Makefile.inc
|
---|
408 |
|
---|
409 | ifeq ($(CURL_DLL_A_SUFFIX),)
|
---|
410 | CURL_DLL_A_SUFFIX := dll
|
---|
411 | endif
|
---|
412 |
|
---|
413 | libcurl_dll_LIBRARY = libcurl$(CURL_DLL_SUFFIX).dll
|
---|
414 | libcurl_dll_a_LIBRARY = libcurl$(CURL_DLL_A_SUFFIX).a
|
---|
415 | libcurl_a_LIBRARY = libcurl.a
|
---|
416 |
|
---|
417 | libcurl_a_OBJECTS := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
|
---|
418 | libcurl_a_DEPENDENCIES := $(strip $(CSOURCES) $(HHEADERS))
|
---|
419 |
|
---|
420 | RESOURCE = libcurl.res
|
---|
421 |
|
---|
422 |
|
---|
423 | all: $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY)
|
---|
424 |
|
---|
425 | $(libcurl_a_LIBRARY): $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
|
---|
426 | @$(call DEL, $@)
|
---|
427 | $(AR) cru $@ $(libcurl_a_OBJECTS)
|
---|
428 | $(RANLIB) $@
|
---|
429 | $(STRIP) $@
|
---|
430 |
|
---|
431 | # remove the last line above to keep debug info
|
---|
432 |
|
---|
433 | $(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENCIES)
|
---|
434 | @$(call DEL, $@)
|
---|
435 | $(CC) $(LDFLAGS) -shared -o $@ \
|
---|
436 | -Wl,--output-def,$(@:.dll=.def),--out-implib,$(libcurl_dll_a_LIBRARY) \
|
---|
437 | $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS)
|
---|
438 |
|
---|
439 | %.o: %.c
|
---|
440 | $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
|
---|
441 |
|
---|
442 | %.res: %.rc
|
---|
443 | $(RC) $(RCFLAGS) -i $< -o $@
|
---|
444 |
|
---|
445 | clean:
|
---|
446 | @$(call DEL, $(libcurl_a_OBJECTS) $(RESOURCE))
|
---|
447 |
|
---|
448 | distclean vclean: clean
|
---|
449 | @$(call DEL, $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_LIBRARY:.dll=.def) $(libcurl_dll_a_LIBRARY))
|
---|
450 |
|
---|
451 | $(LIBCARES_PATH)/libcares.a:
|
---|
452 | $(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32
|
---|