Imported Upstream version 7.59.0
[platform/upstream/curl.git] / winbuild / Makefile.vc
index f78da43..46919fc 100644 (file)
@@ -1,3 +1,25 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1999 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
 !IF "$(MODE)"=="static"
 TARGET = $(LIB_NAME_STATIC)
 AS_DLL = false
@@ -15,14 +37,13 @@ CFGSET=true
 
 !MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>
 !MESSAGE where <options> is one or many of:
-!MESSAGE   VC=<6,7,8,9,10,11,12,14>     - VC versions
+!MESSAGE   VC=<6,7,8,9,10,11,12,14,15>  - VC versions
 !MESSAGE   WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)
 !MESSAGE                                  Defaults to sibbling directory deps: ../deps
 !MESSAGE                                  Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
 !MESSAGE                                  Uncompress them into the deps folder.
 !MESSAGE   WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static
-!MESSAGE   ENABLE_NGHTTP2=<yes or no>   - Enable HTTP/2 support, defaults to no
-!MESSAGE                                  Requires OpenSSL
+!MESSAGE   WITH_NGHTTP2=<dll or static> - Enable HTTP/2 support, DLL or static
 !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
@@ -114,10 +135,17 @@ USE_SSL = true
 SSL     = static
 !ENDIF
 
-!IF "$(USE_SSL)"=="true"
 !IF "$(ENABLE_NGHTTP2)"=="yes"
+# compatibility bit, WITH_NGHTTP2 is the correct flag
+WITH_NGHTTP2 = dll
+USE_NGHTTP2  = true
+NGHTTP2      = dll
+!ELSEIF "$(WITH_NGHTTP2)"=="dll"
 USE_NGHTTP2 = true
-!ENDIF
+NGHTTP2     = dll
+!ELSEIF "$(WITH_NGHTTP2)"=="static"
+USE_NGHTTP2 = true
+NGHTTP2     = static
 !ENDIF
 
 !IFNDEF USE_NGHTTP2
@@ -205,6 +233,10 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl
 !ENDIF
 
+!IF "$(USE_NGHTTP2)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-nghttp2-$(NGHTTP2)
+!ENDIF
+
 !MESSAGE configuration name: $(CONFIG_NAME_LIB)
 
 BUILD_DIR=../builds/$(CONFIG_NAME_LIB)
@@ -213,18 +245,15 @@ CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
 DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
 
 $(MODE):
-       @IF NOT EXIST ..\include\curl\curlbuild.h ( \
-          CALL ..\buildconf.bat \
-       )
        @SET DIROBJ=$(LIBCURL_DIROBJ)
        @SET MACRO_NAME=LIBCURL_OBJS
        @SET OUTFILE=LIBCURL_OBJS.inc
-       @gen_resp_file.bat $(LIBCURL_OBJS)
+       @CALL gen_resp_file.bat $(LIBCURL_OBJS)
 
        @SET DIROBJ=$(CURL_DIROBJ)
        @SET MACRO_NAME=CURL_OBJS
        @SET OUTFILE=CURL_OBJS.inc
-       @gen_resp_file.bat $(CURL_OBJS)
+       @CALL gen_resp_file.bat $(CURL_OBJS)
 
        @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
        @SET MACHINE=$(MACHINE)
@@ -233,6 +262,9 @@ $(MODE):
        @SET USE_IPV6=$(USE_IPV6)
        @SET USE_SSPI=$(USE_SSPI)
        @SET USE_WINSSL=$(USE_WINSSL)
+# compatibility bit
+       @SET WITH_NGHTTP2=$(WITH_NGHTTP2)
+
        @$(MAKE) /NOLOGO /F MakefileBuild.vc
 
 copy_from_lib: