1 #############################################################
\r
3 ## Makefile for building libcurl.a with MingW32 (GCC-2.95) and
\r
4 ## optionally OpenSSL (0.9.6)
\r
5 ## Use: make -f Makefile.m32
\r
7 ## Comments to: Troy Engel <tengel@sonic.net> or
\r
8 ## Joern Hartroth <hartroth@acm.org>
\r
14 OPENSSL_PATH = ../../openssl-0.9.6b
\r
16 ########################################################
\r
17 ## Nothing more to do below this line!
\r
19 INCLUDES = -I. -I.. -I../include -I../src
\r
20 CFLAGS = -g -O2 -DMINGW32
\r
22 INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl"
\r
23 CFLAGS += -DUSE_SSLEAY
\r
24 DLL_LIBS = -leay32 -lssl32 -lRSAglue
\r
26 COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
\r
28 libcurl_a_LIBRARIES = libcurl.a
\r
30 libcurl_a_SOURCES = arpa_telnet.h file.c getpass.h netrc.h timeval.c base64.c \
\r
31 file.h hostip.c progress.c timeval.h base64.h formdata.c hostip.h progress.h \
\r
32 cookie.c formdata.h http.c sendf.c cookie.h ftp.c http.h sendf.h url.c dict.c \
\r
33 ftp.h if2ip.c speedcheck.c url.h dict.h getdate.c if2ip.h speedcheck.h \
\r
34 urldata.h transfer.c getdate.h ldap.c ssluse.c version.c transfer.h getenv.c \
\r
35 ldap.h ssluse.h escape.c getenv.h mprintf.c telnet.c escape.h getpass.c netrc.c \
\r
36 telnet.h getinfo.c strequal.c strequal.h easy.c security.h \
\r
37 security.c krb4.h krb4.c memdebug.h memdebug.c inet_ntoa_r.h http_chunks.h http_chunks.c \
\r
38 strtok.c connect.c hash.c llist.c
\r
40 libcurl_a_OBJECTS = file.o timeval.o base64.o hostip.o progress.o \
\r
41 formdata.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \
\r
42 speedcheck.o getdate.o transfer.o ldap.o ssluse.o version.o \
\r
43 getenv.o escape.o mprintf.o telnet.o getpass.o netrc.o getinfo.o \
\r
44 strequal.o easy.o security.o krb4.o memdebug.o http_chunks.o \
\r
45 strtok.o connect.o hash.o llist.o
\r
47 LIBRARIES = $(libcurl_a_LIBRARIES)
\r
48 SOURCES = $(libcurl_a_SOURCES)
\r
49 OBJECTS = $(libcurl_a_OBJECTS)
\r
52 all: libcurl.a libcurl.dll libcurldll.a
\r
54 libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
\r
56 $(AR) cru libcurl.a $(libcurl_a_OBJECTS)
\r
60 # remove the last line above to keep debug info
\r
62 libcurl.dll libcurldll.a: libcurl.a libcurl.def dllinit.o
\r
64 dllwrap --dllname $@ --output-lib libcurldll.a --export-all --def libcurl.def $(libcurl_a_LIBRARIES) dllinit.o -L$(OPENSSL_PATH)/out $(DLL_LIBS) -lwsock32 -lws2_32 -lwinmm
\r
67 # remove the last line above to keep debug info
\r
79 -@erase $(libcurl_a_OBJECTS)
\r
83 -@erase $(libcurl_a_LIBRARIES)
\r