1 #############################################################
4 ## Makefile for building curl.exe with MingW32 (GCC-3.2) and
5 ## optionally OpenSSL (0.9.7)
7 ## Use: make -f Makefile.m32 [SSL=1] [DYN=1]
9 ## Comments to: Troy Engel <tengel@sonic.net> or
10 ## Joern Hartroth <hartroth@acm.org>
13 OPENSSL_PATH = ../../openssl-0.9.7d
16 ZLIB_PATH = ../../zlib-1.2.1
23 # We may need these someday
27 ########################################################
28 ## Nothing more to do below this line!
30 INCLUDES = -I. -I.. -I../include -I../lib -I$(ZLIB_PATH)
31 CFLAGS = -g -O2 -DMINGW32
33 CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
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
47 curl_LDADD += -lwsock32 -lws2_32 -lwinmm -L$(ZLIB_PATH) -lz
49 curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
52 # Makefile.inc provides the CSOURCES and HHEADERS defines
55 curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_SOURCES)))
56 # curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
62 curl.exe: $(curl_OBJECTS) $(curl_DEPENDENCIES)
64 $(LINK) $(curl_OBJECTS) $(curl_LDADD)
67 # We don't have nroff normally under win32
68 # hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
70 # $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
82 $(RM) $(curl_OBJECTS) curl.exe
85 $(RM) $(curl_PROGRAMS)