aboutsummaryrefslogtreecommitdiff
path: root/winbuild/Makefile.vc
diff options
context:
space:
mode:
authorHenrik Gaßmann <henrik@gassmann.onl>2016-04-21 23:23:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-04-21 23:23:49 +0200
commit5d8093e7d561749b092c7cc4862d932b7e8e7061 (patch)
tree8cf8b101b15e9f6bb8d23d79daabd630bdb09eac /winbuild/Makefile.vc
parent14c9b70caea8f3765bea9b546d8b833e07e72a2a (diff)
winbuild: add mbedtls support
Add WITH_MBEDTLS option. Make WITH_SSL, WITH_MBEDTLS and ENABLE_WINSSL options mutual exclusive. Closes #606
Diffstat (limited to 'winbuild/Makefile.vc')
-rw-r--r--winbuild/Makefile.vc16
1 files changed, 15 insertions, 1 deletions
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index 4f90e4a2a..9e1eb07d0 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -24,6 +24,7 @@ CFGSET=true
!MESSAGE WITH_CARES=<dll or static> - Enable c-ares support, DLL or static
!MESSAGE WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
!MESSAGE WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static
+!MESSAGE WITH_MBEDTLS=<dll or static> - Enable mbedTLS support, DLL or static
!MESSAGE ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to yes
!MESSAGE Requires Windows Vista or later, or installation from:
!MESSAGE https://www.microsoft.com/en-us/download/details.aspx?id=734
@@ -37,6 +38,10 @@ CFGSET=true
!ENDIF
+!IF DEFINED(WITH_SSL) && DEFINED(ENABLE_WINSSL) || DEFINED(WITH_SSL) && DEFINED(WITH_MBEDTLS) || DEFINED(WITH_MBEDTLS) && DEFINED(ENABLE_WINSSL)
+!ERROR WITH_SSL, WITH_MBEDTLS and ENABLE_WINSSL are mutual exclusive options.
+!ENDIF
+
!INCLUDE "../lib/Makefile.inc"
LIBCURL_OBJS=$(CSOURCES:.c=.obj)
@@ -87,7 +92,7 @@ USE_SSPI = false
!ENDIF
!IFNDEF ENABLE_WINSSL
-!IFDEF WITH_SSL
+!IF DEFINED(WITH_SSL) || DEFINED(WITH_MBEDTLS)
USE_WINSSL = false
!ELSE
USE_WINSSL = $(USE_SSPI)
@@ -108,6 +113,11 @@ USE_SSL = true
SSL = static
!ENDIF
+!IF "$(WITH_MBEDTLS)"=="dll" || "$(WITH_MBEDTLS)"=="static"
+USE_MBEDTLS = true
+MBEDTLS = $(WITH_MBEDTLS)
+!ENDIF
+
!IF "$(WITH_CARES)"=="dll"
USE_CARES = true
CARES = dll
@@ -150,6 +160,10 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
!ENDIF
+!IF "$(USE_MBEDTLS)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-mbedtls-$(MBEDTLS)
+!ENDIF
+
!IF "$(USE_CARES)"=="true"
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-cares-$(CARES)
!ENDIF