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
26 # We may need these someday
30 ########################################################
31 ## Nothing more to do below this line!
33 INCLUDES = -I. -I.. -I../include -I../lib -I$(ZLIB_PATH)
36 COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
37 LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
39 curl_PROGRAMS = curl.exe
41 curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
42 curl_LDADD = -L../lib -lcurldll
44 curl_DEPENDENCIES = ../lib/libcurl.a
45 curl_LDADD = -L../lib -lcurl
46 COMPILE += -DCURL_STATICLIB
49 CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
50 curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
53 CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
54 curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
56 curl_LDADD += -lwsock32 -lws2_32 -lwinmm -L$(ZLIB_PATH) -lz
58 # Makefile.inc provides the CSOURCES and HHEADERS defines
61 curl_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURL_SOURCES) ../lib/timeval.c)))
62 # curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
68 curl.exe: $(curl_OBJECTS) $(curl_DEPENDENCIES)
70 $(LINK) $(curl_OBJECTS) $(curl_LDADD)
73 timeval.o: ../lib/timeval.c
76 # We don't have nroff normally under win32
77 # hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
79 # $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
91 $(RM) $(curl_OBJECTS) curl.exe
94 $(RM) $(curl_PROGRAMS)