summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.dist28
-rw-r--r--lib/Makefile.m3244
-rw-r--r--src/Makefile.m3244
3 files changed, 90 insertions, 26 deletions
diff --git a/Makefile.dist b/Makefile.dist
index bc532ce9a..55bab370a 100644
--- a/Makefile.dist
+++ b/Makefile.dist
@@ -70,30 +70,18 @@ mingw32:
$(MAKE) -C lib -f Makefile.m32
$(MAKE) -C src -f Makefile.m32
-mingw32-zlib:
- $(MAKE) -C lib -f Makefile.m32 ZLIB=1
- $(MAKE) -C src -f Makefile.m32 ZLIB=1
-
-mingw32-ssl-zlib:
- $(MAKE) -C lib -f Makefile.m32 SSL=1 ZLIB=1
- $(MAKE) -C src -f Makefile.m32 SSL=1 ZLIB=1
-
-mingw32-ssh2-ssl-zlib:
- $(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
- $(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
-
-mingw32-ssh2-ssl-sspi-zlib:
- $(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
- $(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
-
-mingw32-rtmp-ssh2-ssl-sspi-zlib:
- $(MAKE) -C lib -f Makefile.m32 RTMP=1 SSH2=1 SSL=1 SSPI=1 ZLIB=1
- $(MAKE) -C src -f Makefile.m32 RTMP=1 SSH2=1 SSL=1 SSPI=1 ZLIB=1
-
mingw32-clean:
$(MAKE) -C lib -f Makefile.m32 clean
$(MAKE) -C src -f Makefile.m32 clean
+mingw32-vclean mingw32-distclean:
+ $(MAKE) -C lib -f Makefile.m32 vclean
+ $(MAKE) -C src -f Makefile.m32 vclean
+
+mingw32%:
+ $(MAKE) -C lib -f Makefile.m32 CFG=$@
+ $(MAKE) -C src -f Makefile.m32 CFG=$@
+
vc-clean: $(VC)
cd lib
nmake -f Makefile.$(VC) clean
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index fdc064daa..76171cb9b 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -1,10 +1,10 @@
#########################################################################
#
## Makefile for building libcurl.a 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] [WINIDN=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-sspi-winidn
##
## Hint: you can also set environment vars to control the build, f.e.:
## set ZLIB_PATH=c:/zlib-1.2.5
@@ -64,6 +64,44 @@ STRIP = strip -g
########################################################
## 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../include
CFLAGS += -DBUILDING_LIBCURL
ifdef ARES
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 $@