]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/curl/lib/Makefile.m32
Various Mac OS X tweaks to get this to build. Probably breaking things.
[icculus/iodoom3.git] / neo / curl / lib / Makefile.m32
1 #############################################################
2 #
3 ## Makefile for building libcurl.a with MingW32 (GCC-3.2) and
4 ## optionally OpenSSL (0.9.7)
5 ## Use: make -f Makefile.m32
6 ##
7 ## Comments to: Troy Engel <tengel@sonic.net> or
8 ##              Joern Hartroth <hartroth@acm.org>
9
10 CC = gcc
11 AR = ar
12 RM = rm -f 
13 RANLIB = ranlib
14 STRIP = strip -g
15 OPENSSL_PATH = ../../openssl-0.9.7c
16 ZLIB_PATH = ../../zlib-1.2.1
17
18 ########################################################
19 ## Nothing more to do below this line!
20
21 INCLUDES = -I. -I.. -I../include -I../src
22 CFLAGS = -g -O2 -DMINGW32
23 ifdef SSL
24   INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl"
25   CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
26   DLL_LIBS = -L$(OPENSSL_PATH)/out -leay32 -lssl32
27 endif
28 ifdef ZLIB
29   INCLUDES += -I"$(ZLIB_PATH)"
30   CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
31   DLL_LIBS += -L$(ZLIB_PATH) -lz
32 endif
33 COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
34
35 libcurl_a_LIBRARIES = libcurl.a
36
37 libcurl_a_SOURCES = arpa_telnet.h file.c netrc.h timeval.c base64.c \
38         file.h hostip.c progress.c timeval.h base64.h formdata.c hostip.h     \
39         progress.h cookie.c formdata.h http.c sendf.c cookie.h ftp.c          \
40         http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h          \
41         dict.h getdate.c if2ip.h speedcheck.h urldata.h transfer.c getdate.h  \
42         ldap.c ssluse.c version.c transfer.h getenv.c                         \
43         ldap.h ssluse.h escape.c getenv.h mprintf.c telnet.c escape.h         \
44         netrc.c telnet.h getinfo.c strequal.c strequal.h easy.c     \
45         security.h security.c krb4.h krb4.c memdebug.h memdebug.c             \
46         inet_ntoa_r.h http_chunks.h http_chunks.c                             \
47         strtok.c connect.c hash.c llist.c multi.c share.c share.h             \
48         content_encoding.h content_encoding.c http_digest.h http_digest.c     \
49         http_negotiate.c http_negotiate.h http_ntlm.c http_ntlm.h md5.h       \
50         md5.c strtoofft.c inet_pton.c
51
52 libcurl_a_OBJECTS =  file.o timeval.o base64.o hostip.o progress.o \
53         formdata.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \
54         speedcheck.o getdate.o transfer.o ldap.o ssluse.o version.o \
55         getenv.o escape.o mprintf.o telnet.o netrc.o getinfo.o \
56         strequal.o easy.o security.o krb4.o memdebug.o http_chunks.o \
57         strtok.o connect.o hash.o llist.o multi.o share.o \
58         content_encoding.o http_digest.o http_negotiate.o http_ntlm.o md5.o \
59         strtoofft.o inet_pton.o
60
61 LIBRARIES =  $(libcurl_a_LIBRARIES)
62 SOURCES = $(libcurl_a_SOURCES)
63 OBJECTS = $(libcurl_a_OBJECTS)
64
65
66 all: libcurl.a libcurl.dll libcurldll.a
67
68 libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
69         $(RM) libcurl.a
70         $(AR) cru libcurl.a $(libcurl_a_OBJECTS)
71         $(RANLIB) libcurl.a
72         $(STRIP) $@
73
74 RESOURCE = libcurl.res
75
76 # remove the last line above to keep debug info
77
78 libcurl.dll libcurldll.a: libcurl.a libcurl.def $(RESOURCE)
79         $(RM) $@
80         dllwrap --dllname $@ --output-lib libcurldll.a --export-all --def libcurl.def $(libcurl_a_LIBRARIES) $(RESOURCE) $(DLL_LIBS) -lwsock32 -lws2_32 -lwinmm
81         $(STRIP) $@
82
83 # remove the last line above to keep debug info
84
85 .c.o:
86         $(COMPILE) -c $<
87
88 .s.o:
89         $(COMPILE) -c $<
90
91 .S.o:
92         $(COMPILE) -c $<
93
94 libcurl.res: libcurl.rc
95         windres -DCURLDEBUG=0 -O COFF -o $@ -i $^
96
97 clean:
98         $(RM) $(libcurl_a_OBJECTS) $(RESOURCE)
99
100 distrib: clean
101         $(RM) $(libcurl_a_LIBRARIES)
102