1 #############################################################
4 ## Makefile for building curl.exe with MingW32 (GCC-3.2) and
5 ## optionally OpenSSL (0.9.8)
7 ## Use: make -f Makefile.m32 [SSL=1] [SSH2=1] [DYN=1]
9 ## Comments to: Troy Engel <tengel@sonic.net> or
10 ## Joern Hartroth <hartroth@acm.org>
13 OPENSSL_PATH = ../../openssl-0.9.8d
16 LIBSSH2_PATH = ../../libssh2-0.14
19 ZLIB_PATH = ../../zlib-1.2.3
24 RCFLAGS = --include-dir=../include -O COFF -i
28 # We may need these someday
32 ########################################################
33 ## Nothing more to do below this line!
35 INCLUDES = -I. -I.. -I../include -I../lib -I$(ZLIB_PATH)
38 COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
39 LINK = $(CC) $(LDFLAGS) -o $@
41 curl_PROGRAMS = curl.exe
43 curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
44 curl_LDADD = -L../lib -lcurldll
46 curl_DEPENDENCIES = ../lib/libcurl.a
47 curl_LDADD = -L../lib -lcurl
48 COMPILE += -DCURL_STATICLIB
51 CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
52 curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
55 CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
56 curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
58 curl_LDADD += -lwsock32 -lws2_32 -lwinmm -L$(ZLIB_PATH) -lz
60 # Makefile.inc provides the CSOURCES and HHEADERS defines
63 curl_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURL_SOURCES) ../lib/timeval.c)))
64 # curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
71 curl.exe: curl.res $(curl_OBJECTS) $(curl_DEPENDENCIES)
73 $(LINK) $< $(curl_OBJECTS) $(curl_LDADD)
76 timeval.o: ../lib/timeval.c
79 # We don't have nroff normally under win32
80 # hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
82 # $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
85 $(RC) $(RCFLAGS) $< -o $@
97 $(RM) $(curl_OBJECTS) curl.exe
100 $(RM) $(curl_PROGRAMS)