From eb65a49befa040746b222e693bba19ee56814e85 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 19 Apr 2011 20:59:24 +0200 Subject: Improve MinGW static makefile builds. It is now possible to use any combination of features without having to 1st add makefile targets to the main makefile. The main makefile now passes the 'mingw32-feat1-feat2' as var CFG, and the ./[lib|src]/Makefile.m32 parses the CFG var to determine the features to be enabled. --- src/Makefile.m32 | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Makefile.m32 b/src/Makefile.m32 index c5a9e2a99..3cafae7bb 100644 --- a/src/Makefile.m32 +++ b/src/Makefile.m32 @@ -1,10 +1,10 @@ ######################################################################### # ## Makefile for building curl.exe with MingW32 (GCC-3.2 or later) -## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5) +## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5), librtmp (2.3) ## -## Usage: -## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [RTMP=1] [DYN=1] +## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...] +## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn ## ## Hint: you can also set environment vars to control the build, f.e.: ## set ZLIB_PATH=c:/zlib-1.2.5 @@ -66,6 +66,44 @@ CP = copy ######################################################## ## Nothing more to do below this line! +ifeq ($(findstring -dyn,$(CFG)),-dyn) +DYN = 1 +endif +ifeq ($(findstring -ares,$(CFG)),-ares) +ARES = 1 +endif +ifeq ($(findstring -rtmp,$(CFG)),-rtmp) +RTMP = 1 +SSL = 1 +ZLIB = 1 +endif +ifeq ($(findstring -ssh2,$(CFG)),-ssh2) +SSH2 = 1 +SSL = 1 +ZLIB = 1 +endif +ifeq ($(findstring -ssl,$(CFG)),-ssl) +SSL = 1 +endif +ifeq ($(findstring -zlib,$(CFG)),-zlib) +ZLIB = 1 +endif +ifeq ($(findstring -idn,$(CFG)),-idn) +IDN = 1 +endif +ifeq ($(findstring -winidn,$(CFG)),-winidn) +WINIDN = 1 +endif +ifeq ($(findstring -sspi,$(CFG)),-sspi) +SSPI = 1 +endif +ifeq ($(findstring -ldaps,$(CFG)),-ldaps) +LDAPS = 1 +endif +ifeq ($(findstring -ipv6,$(CFG)),-ipv6) +IPV6 = 1 +endif + INCLUDES = -I. -I.. -I../include -I../lib LINK = $(CC) $(LDFLAGS) -o $@ -- cgit v1.2.3