Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/curl/winbuild/Makefile.vc @ 3:2c135c81b16c
MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:44:09 +0200 |
| parents | b50eed0cc0ef |
| children |
comparison
equal
deleted
inserted
replaced
| 0:6015a75abc2d | 3:2c135c81b16c |
|---|---|
| 1 #*************************************************************************** | |
| 2 # _ _ ____ _ | |
| 3 # Project ___| | | | _ \| | | |
| 4 # / __| | | | |_) | | | |
| 5 # | (__| |_| | _ <| |___ | |
| 6 # \___|\___/|_| \_\_____| | |
| 7 # | |
| 8 # Copyright (C) 1999 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. | |
| 9 # | |
| 10 # This software is licensed as described in the file COPYING, which | |
| 11 # you should have received as part of this distribution. The terms | |
| 12 # are also available at https://curl.haxx.se/docs/copyright.html. | |
| 13 # | |
| 14 # You may opt to use, copy, modify, merge, publish, distribute and/or sell | |
| 15 # copies of the Software, and permit persons to whom the Software is | |
| 16 # furnished to do so, under the terms of the COPYING file. | |
| 17 # | |
| 18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |
| 19 # KIND, either express or implied. | |
| 20 # | |
| 21 #*************************************************************************** | |
| 22 | |
| 23 !IF "$(MODE)"=="static" | |
| 24 TARGET = $(LIB_NAME_STATIC) | |
| 25 AS_DLL = false | |
| 26 CFGSET=true | |
| 27 !ELSEIF "$(MODE)"=="dll" | |
| 28 TARGET = $(LIB_NAME_DLL) | |
| 29 AS_DLL = true | |
| 30 CFGSET=true | |
| 31 !ELSE | |
| 32 !MESSAGE Invalid mode: $(MODE) | |
| 33 | |
| 34 ####################### | |
| 35 # Usage | |
| 36 # | |
| 37 | |
| 38 !MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options> | |
| 39 !MESSAGE where <options> is one or many of: | |
| 40 !MESSAGE VC=<6,7,8,9,10,11,12,14,15> - VC versions | |
| 41 !MESSAGE WITH_DEVEL=<path> - Paths for the development files (SSL, zlib, etc.) | |
| 42 !MESSAGE Defaults to curl's sibling directory deps: ../deps | |
| 43 !MESSAGE Libraries can be fetched at https://windows.php.net/downloads/php-sdk/deps/ | |
| 44 !MESSAGE Uncompress them into the deps folder. | |
| 45 !MESSAGE WITH_PREFIX=<path> - Installation directory path | |
| 46 !MESSAGE Defaults to a configuration dependent (SSL, zlib, etc.) | |
| 47 !MESSAGE directory inside curl's subdirectory builds: ./builds | |
| 48 !MESSAGE Use backslashes as path separator | |
| 49 !MESSAGE WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static | |
| 50 !MESSAGE WITH_NGHTTP2=<dll or static> - Enable HTTP/2 support, DLL or static | |
| 51 !MESSAGE WITH_CARES=<dll or static> - Enable c-ares support, DLL or static | |
| 52 !MESSAGE WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static | |
| 53 !MESSAGE WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static | |
| 54 !MESSAGE WITH_MBEDTLS=<dll or static> - Enable mbedTLS support, DLL or static | |
| 55 !MESSAGE ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to yes | |
| 56 !MESSAGE Requires Windows Vista or later | |
| 57 !MESSAGE ENABLE_IPV6=<yes or no> - Enable IPv6, defaults to yes | |
| 58 !MESSAGE ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to yes | |
| 59 !MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes | |
| 60 !MESSAGE ENABLE_OPENSSL_AUTO_LOAD_CONFIG=<yes or no> | |
| 61 !MESSAGE - Whether the OpenSSL configuration will be loaded automatically, defaults to yes | |
| 62 !MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build) | |
| 63 !MESSAGE DEBUG=<yes or no> - Debug builds | |
| 64 !MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others) | |
| 65 !MESSAGE CARES_PATH=<path to cares> - Custom path for c-ares | |
| 66 !MESSAGE MBEDTLS_PATH=<path to mbedTLS> - Custom path for mbedTLS | |
| 67 !MESSAGE NGHTTP2_PATH=<path to HTTP/2> - Custom path for nghttp2 | |
| 68 !MESSAGE SSH2_PATH=<path to libSSH2> - Custom path for libSSH2 | |
| 69 !MESSAGE SSL_PATH=<path to OpenSSL> - Custom path for OpenSSL | |
| 70 !MESSAGE ZLIB_PATH=<path to zlib> - Custom path for zlib | |
| 71 !ERROR please choose a valid mode | |
| 72 | |
| 73 !ENDIF | |
| 74 | |
| 75 !INCLUDE "../lib/Makefile.inc" | |
| 76 LIBCURL_OBJS=$(CSOURCES:.c=.obj) | |
| 77 | |
| 78 !INCLUDE "../src/Makefile.inc" | |
| 79 | |
| 80 # tool_hugehelp has a special rule | |
| 81 CURL_OBJS=$(CURL_CFILES:tool_hugehelp.c=) | |
| 82 | |
| 83 CURL_OBJS=$(CURL_OBJS:.c=.obj) | |
| 84 | |
| 85 | |
| 86 # backwards compatible check for USE_SSPI | |
| 87 !IFDEF USE_SSPI | |
| 88 ENABLE_SSPI = $(USE_SSPI) | |
| 89 !ENDIF | |
| 90 | |
| 91 # default options | |
| 92 | |
| 93 !IFNDEF MACHINE | |
| 94 # Note: nmake magically changes the value of PROCESSOR_ARCHITECTURE from "AMD64" | |
| 95 # to "x86" when building in a 32 bit build environment on a 64 bit machine. | |
| 96 !IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64" | |
| 97 MACHINE = x64 | |
| 98 !ELSE | |
| 99 MACHINE = x86 | |
| 100 !ENDIF | |
| 101 !ENDIF | |
| 102 | |
| 103 !IFNDEF ENABLE_IDN | |
| 104 USE_IDN = true | |
| 105 !ELSEIF "$(ENABLE_IDN)"=="yes" | |
| 106 USE_IDN = true | |
| 107 !ELSEIF "$(ENABLE_IDN)"=="no" | |
| 108 USE_IDN = false | |
| 109 !ENDIF | |
| 110 | |
| 111 !IFNDEF ENABLE_IPV6 | |
| 112 USE_IPV6 = true | |
| 113 !ELSEIF "$(ENABLE_IPV6)"=="yes" | |
| 114 USE_IPV6 = true | |
| 115 !ELSEIF "$(ENABLE_IPV6)"=="no" | |
| 116 USE_IPV6 = false | |
| 117 !ENDIF | |
| 118 | |
| 119 !IFNDEF ENABLE_SSPI | |
| 120 USE_SSPI = true | |
| 121 !ELSEIF "$(ENABLE_SSPI)"=="yes" | |
| 122 USE_SSPI = true | |
| 123 !ELSEIF "$(ENABLE_SSPI)"=="no" | |
| 124 USE_SSPI = false | |
| 125 !ENDIF | |
| 126 | |
| 127 !IFNDEF ENABLE_WINSSL | |
| 128 !IF DEFINED(WITH_SSL) || DEFINED(WITH_MBEDTLS) | |
| 129 USE_WINSSL = false | |
| 130 !ELSE | |
| 131 USE_WINSSL = $(USE_SSPI) | |
| 132 !ENDIF | |
| 133 !ELSEIF "$(ENABLE_WINSSL)"=="yes" | |
| 134 USE_WINSSL = true | |
| 135 !ELSEIF "$(ENABLE_WINSSL)"=="no" | |
| 136 USE_WINSSL = false | |
| 137 !ENDIF | |
| 138 | |
| 139 !IFNDEF ENABLE_OPENSSL_AUTO_LOAD_CONFIG | |
| 140 ENABLE_OPENSSL_AUTO_LOAD_CONFIG = true | |
| 141 !ELSEIF "$(ENABLE_OPENSSL_AUTO_LOAD_CONFIG)"=="yes" | |
| 142 !UNDEF ENABLE_OPENSSL_AUTO_LOAD_CONFIG | |
| 143 ENABLE_OPENSSL_AUTO_LOAD_CONFIG = true | |
| 144 !ELSEIF "$(ENABLE_OPENSSL_AUTO_LOAD_CONFIG)"=="no" | |
| 145 !UNDEF ENABLE_OPENSSL_AUTO_LOAD_CONFIG | |
| 146 ENABLE_OPENSSL_AUTO_LOAD_CONFIG = false | |
| 147 !ENDIF | |
| 148 | |
| 149 CONFIG_NAME_LIB = libcurl | |
| 150 | |
| 151 !IF "$(WITH_SSL)"=="dll" | |
| 152 USE_SSL = true | |
| 153 SSL = dll | |
| 154 !ELSEIF "$(WITH_SSL)"=="static" | |
| 155 USE_SSL = true | |
| 156 SSL = static | |
| 157 !ENDIF | |
| 158 | |
| 159 !IF "$(ENABLE_NGHTTP2)"=="yes" | |
| 160 # compatibility bit, WITH_NGHTTP2 is the correct flag | |
| 161 WITH_NGHTTP2 = dll | |
| 162 USE_NGHTTP2 = true | |
| 163 NGHTTP2 = dll | |
| 164 !ELSEIF "$(WITH_NGHTTP2)"=="dll" | |
| 165 USE_NGHTTP2 = true | |
| 166 NGHTTP2 = dll | |
| 167 !ELSEIF "$(WITH_NGHTTP2)"=="static" | |
| 168 USE_NGHTTP2 = true | |
| 169 NGHTTP2 = static | |
| 170 !ENDIF | |
| 171 | |
| 172 !IFNDEF USE_NGHTTP2 | |
| 173 USE_NGHTTP2 = false | |
| 174 !ENDIF | |
| 175 | |
| 176 !IF "$(WITH_MBEDTLS)"=="dll" || "$(WITH_MBEDTLS)"=="static" | |
| 177 USE_MBEDTLS = true | |
| 178 MBEDTLS = $(WITH_MBEDTLS) | |
| 179 !ENDIF | |
| 180 | |
| 181 !IF "$(WITH_CARES)"=="dll" | |
| 182 USE_CARES = true | |
| 183 CARES = dll | |
| 184 !ELSEIF "$(WITH_CARES)"=="static" | |
| 185 USE_CARES = true | |
| 186 CARES = static | |
| 187 !ENDIF | |
| 188 | |
| 189 !IF "$(WITH_ZLIB)"=="dll" | |
| 190 USE_ZLIB = true | |
| 191 ZLIB = dll | |
| 192 !ELSEIF "$(WITH_ZLIB)"=="static" | |
| 193 USE_ZLIB = true | |
| 194 ZLIB = static | |
| 195 !ENDIF | |
| 196 | |
| 197 !IF "$(WITH_SSH2)"=="dll" | |
| 198 USE_SSH2 = true | |
| 199 SSH2 = dll | |
| 200 !ELSEIF "$(WITH_SSH2)"=="static" | |
| 201 USE_SSH2 = true | |
| 202 SSH2 = static | |
| 203 !ENDIF | |
| 204 | |
| 205 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE) | |
| 206 | |
| 207 !IF "$(DEBUG)"=="yes" | |
| 208 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug | |
| 209 !ELSE | |
| 210 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release | |
| 211 !ENDIF | |
| 212 | |
| 213 !IF "$(AS_DLL)"=="true" | |
| 214 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll | |
| 215 !ELSE | |
| 216 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static | |
| 217 !ENDIF | |
| 218 | |
| 219 !IF "$(USE_SSL)"=="true" | |
| 220 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL) | |
| 221 !ENDIF | |
| 222 | |
| 223 !IF "$(USE_MBEDTLS)"=="true" | |
| 224 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-mbedtls-$(MBEDTLS) | |
| 225 !ENDIF | |
| 226 | |
| 227 !IF "$(USE_CARES)"=="true" | |
| 228 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-cares-$(CARES) | |
| 229 !ENDIF | |
| 230 | |
| 231 !IF "$(USE_ZLIB)"=="true" | |
| 232 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB) | |
| 233 !ENDIF | |
| 234 | |
| 235 !IF "$(USE_SSH2)"=="true" | |
| 236 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2) | |
| 237 !ENDIF | |
| 238 | |
| 239 !IF "$(USE_IPV6)"=="true" | |
| 240 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6 | |
| 241 !ENDIF | |
| 242 | |
| 243 !IF "$(USE_SSPI)"=="true" | |
| 244 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi | |
| 245 !ENDIF | |
| 246 | |
| 247 !IF "$(USE_WINSSL)"=="true" | |
| 248 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl | |
| 249 !ENDIF | |
| 250 | |
| 251 !IF "$(USE_NGHTTP2)"=="true" | |
| 252 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-nghttp2-$(NGHTTP2) | |
| 253 !ENDIF | |
| 254 | |
| 255 !MESSAGE configuration name: $(CONFIG_NAME_LIB) | |
| 256 | |
| 257 BUILD_DIR=../builds/$(CONFIG_NAME_LIB) | |
| 258 LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib | |
| 259 CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl | |
| 260 DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\ | |
| 261 | |
| 262 $(MODE): | |
| 263 @SET DIROBJ=$(LIBCURL_DIROBJ) | |
| 264 @SET MACRO_NAME=LIBCURL_OBJS | |
| 265 @SET OUTFILE=LIBCURL_OBJS.inc | |
| 266 @CALL gen_resp_file.bat $(LIBCURL_OBJS) | |
| 267 | |
| 268 @SET DIROBJ=$(CURL_DIROBJ) | |
| 269 @SET MACRO_NAME=CURL_OBJS | |
| 270 @SET OUTFILE=CURL_OBJS.inc | |
| 271 @CALL gen_resp_file.bat $(CURL_OBJS) | |
| 272 | |
| 273 @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB) | |
| 274 @SET MACHINE=$(MACHINE) | |
| 275 @SET USE_NGHTTP2=$(USE_NGHTTP2) | |
| 276 @SET USE_IDN=$(USE_IDN) | |
| 277 @SET USE_IPV6=$(USE_IPV6) | |
| 278 @SET USE_SSPI=$(USE_SSPI) | |
| 279 @SET USE_WINSSL=$(USE_WINSSL) | |
| 280 # compatibility bit | |
| 281 @SET WITH_NGHTTP2=$(WITH_NGHTTP2) | |
| 282 | |
| 283 @$(MAKE) /NOLOGO /F MakefileBuild.vc | |
| 284 | |
| 285 copy_from_lib: | |
| 286 echo copying .c... | |
| 287 FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\ | |
| 288 | |
| 289 clean: | |
| 290 $(MAKE) /NOLOGO /F MakefileBuild.vc $@ |
