aboutsummaryrefslogtreecommitdiff
path: root/winbuild/MakefileBuild.vc
diff options
context:
space:
mode:
authorSam Schanken <windexlight@gmail.com>2014-12-29 10:57:21 -0800
committerSteve Holme <steve_holme@hotmail.com>2015-01-08 21:12:43 +0000
commit659d252b6f646cc51eb2caae710183330b34a717 (patch)
tree211e925e7bb003304aed8c82a0d979b684beea71 /winbuild/MakefileBuild.vc
parentc712fe01a9aedb3fdc6f693f7340ff7c8e992b10 (diff)
winbuild: Added option to build with c-ares
Added support for a WITH_CARES option to be used when invoking nmake via Makefile.vc. This option enables linking against both the DLL and static versions of the c-ares libraries, as well as the debug and release varients, depending on the value of DEBUG. The USE_ARES preprocessor symbol is also defined.
Diffstat (limited to 'winbuild/MakefileBuild.vc')
-rw-r--r--winbuild/MakefileBuild.vc27
1 files changed, 27 insertions, 0 deletions
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
index b9e150c43..985c1bcc2 100644
--- a/winbuild/MakefileBuild.vc
+++ b/winbuild/MakefileBuild.vc
@@ -121,6 +121,27 @@ SSL = static
SSL_CFLAGS = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl"
!ENDIF
+!IF "$(WITH_CARES)"=="dll"
+!IF "$(DEBUG)"=="yes"
+CARES_LIBS = caresd.lib
+!ELSE
+CARES_LIBS = cares.lib
+!ENDIF
+USE_CARES = true
+CARES = dll
+!ELSEIF "$(WITH_CARES)"=="static"
+!IF "$(DEBUG)"=="yes"
+CARES_LIBS = libcaresd.lib
+!ELSE
+CARES_LIBS = libcares.lib
+!ENDIF
+USE_CARES = true
+CARES = static
+!ENDIF
+
+!IFDEF USE_CARES
+CARES_CFLAGS = /DUSE_ARES /I"$(DEVEL_INCLUDE)/cares"
+!ENDIF
!IF "$(WITH_ZLIB)"=="dll"
ZLIB_LIBS = zlib.lib
@@ -297,6 +318,11 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
!ENDIF
+!IF "$(USE_CARES)"=="true"
+CFLAGS = $(CFLAGS) $(CARES_CFLAGS)
+LFLAGS = $(LFLAGS) $(CARES_LFLAGS) $(CARES_LIBS)
+!ENDIF
+
!IF "$(USE_ZLIB)"=="true"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
@@ -376,6 +402,7 @@ package: $(TARGET)
$(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)
@echo Using SSL: $(USE_SSL)
+ @echo Using c-ares: $(USE_CARES)
@echo Using SSH2: $(USE_SSH2)
@echo Using ZLIB: $(USE_ZLIB)
@echo Using IDN: $(USE_IDN)