Initial revision
[platform/upstream/curl.git] / lib / Makefile.m32
1 #############################################################
2 ## Makefile for building libcurl.a with MingW32 (GCC-2.95) and
3 ## optionally OpenSSL (0.9.4)
4 ## Use: make -f Makefile.m32
5 ##
6 ## Comments to: Troy Engel <tengel@sonic.net> or
7 ##              Joern Hartroth <hartroth@acm.org>
8
9 CC = gcc
10 AR = ar
11 RANLIB = ranlib
12 OPENSSL_PATH = ../../openssl-0.9.4
13
14 ########################################################
15 ## Nothing more to do below this line!
16
17 INCLUDES = -I. -I.. -I../include
18 CFLAGS = -g -O2
19 ifdef SSL
20   INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl"
21   CFLAGS += -DUSE_SSLEAY
22 endif
23 COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
24
25 libcurl_a_LIBRARIES = libcurl.a
26
27 libcurl_a_SOURCES =  base64.c getenv.c if2ip.h progress.h upload.h \
28 base64.h getenv.h mprintf.c setup.h url.c download.c getpass.c \
29 mprintf.h ssluse.c url.h download.h hostip.c netrc.c ssluse.h \
30 urldata.h formdata.c hostip.h netrc.h stdcheaders.h formdata.h \
31 if2ip.c progress.c upload.c sendf.c sendf.h speedcheck.c speedcheck.h \
32 ftp.c ftp.h getpass.c getpass.h version.c timeval.c  timeval.h cookie.c \
33 cookie.h escape.c escape.h getdate.c getdate.h dict.h dict.c http.c \
34 http.h telnet.c telnet.h file.c file.h ldap.c ldap.h
35
36 libcurl_a_OBJECTS =  base64.o getenv.o mprintf.o url.o download.o \
37 getpass.o ssluse.o hostip.o netrc.o formdata.o if2ip.o progress.o \
38 upload.o sendf.o speedcheck.o ftp.o getpass.o version.o timeval.o \
39 cookie.o escape.o getdate.o dict.o http.o telnet.o file.o ldap.o
40
41 LIBRARIES =  $(libcurl_a_LIBRARIES)
42 SOURCES = $(libcurl_a_SOURCES)
43 OBJECTS = $(libcurl_a_OBJECTS)
44
45
46 all: libcurl.a
47
48 libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
49         -@erase libcurl.a
50         $(AR) cru libcurl.a $(libcurl_a_OBJECTS)
51         $(RANLIB) libcurl.a
52
53 .c.o:
54         $(COMPILE) -c $<
55
56 .s.o:
57         $(COMPILE) -c $<
58
59 .S.o:
60         $(COMPILE) -c $<
61
62 clean:
63         -@erase $(libcurl_a_OBJECTS)
64
65 distrib: clean
66         -@erase $(libcurl_a_LIBRARIES)
67