removed unused define.
[platform/upstream/curl.git] / src / Makefile.m32
1 #############################################################
2 # $Id$
3 #
4 ## Makefile for building curl.exe with MingW32 (GCC-3.2) and
5 ## optionally OpenSSL (0.9.8)
6 ##
7 ## Use: make -f Makefile.m32 [SSL=1] [SSH2=1] [DYN=1]
8 ##
9 ## Comments to: Troy Engel <tengel@sonic.net> or
10 ##              Joern Hartroth <hartroth@acm.org>
11
12 ifndef OPENSSL_PATH
13 OPENSSL_PATH = ../../openssl-0.9.8d
14 endif
15 ifndef LIBSSH2_PATH
16 LIBSSH2_PATH = ../../libssh2-0.14
17 endif
18 ifndef ZLIB_PATH
19 ZLIB_PATH = ../../zlib-1.2.3
20 endif
21
22 CC = gcc
23 RM = rm -f
24 STRIP = strip -s
25
26 # We may need these someday
27 # PERL = perl
28 # NROFF = nroff
29
30 ########################################################
31 ## Nothing more to do below this line!
32
33 INCLUDES = -I. -I.. -I../include -I../lib -I$(ZLIB_PATH)
34 CFLAGS = -g -O2
35 LDFLAGS =
36 COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
37 LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
38
39 curl_PROGRAMS = curl.exe
40 ifdef DYN
41   curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
42   curl_LDADD = -L../lib -lcurldll
43 else
44   curl_DEPENDENCIES = ../lib/libcurl.a
45   curl_LDADD = -L../lib -lcurl
46   COMPILE += -DCURL_STATICLIB
47 endif
48 ifdef SSH2
49   CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
50   curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
51 endif
52 ifdef SSL
53   CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
54   curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
55 endif
56 curl_LDADD += -lwsock32 -lws2_32 -lwinmm -L$(ZLIB_PATH) -lz
57
58 # Makefile.inc provides the CSOURCES and HHEADERS defines
59 include Makefile.inc
60
61 curl_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURL_SOURCES) ../lib/timeval.c)))
62 # curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
63 # vpath %.c ../lib
64
65
66 all: curl.exe
67
68 curl.exe: $(curl_OBJECTS) $(curl_DEPENDENCIES)
69         $(RM) $@
70         $(LINK) $(curl_OBJECTS) $(curl_LDADD)
71         $(STRIP) $@
72
73 timeval.o: ../lib/timeval.c
74         $(COMPILE) -c $<
75
76 # We don't have nroff normally under win32
77 # hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
78 #       $(RM) hugehelp.c
79 #       $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
80
81 .c.o:
82         $(COMPILE) -c $<
83
84 .s.o:
85         $(COMPILE) -c $<
86
87 .S.o:
88         $(COMPILE) -c $<
89
90 clean:
91         $(RM) $(curl_OBJECTS) curl.exe
92
93 distrib: clean
94         $(RM) $(curl_PROGRAMS)