1 !IF "$(MODE)"=="static"
\r
2 TARGET = $(LIB_NAME_STATIC)
\r
5 !ELSEIF "$(MODE)"=="dll"
\r
6 TARGET = $(LIB_NAME_DLL)
\r
10 !MESSAGE Invalid mode: $(MODE)
\r
12 #######################
\r
16 !MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>
\r
17 !MESSAGE where <options> is one or many of:
\r
18 !MESSAGE VC=<6,7,8,9,10,11,12> - VC versions
\r
19 !MESSAGE WITH_DEVEL=<path> - Paths for the development files (SSL, zlib, etc.)
\r
20 !MESSAGE Defaults to sibbling directory deps: ../deps
\r
21 !MESSAGE Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
\r
22 !MESSAGE Uncompress them into the deps folder.
\r
23 !MESSAGE WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
\r
24 !MESSAGE WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
\r
25 !MESSAGE WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static
\r
26 !MESSAGE ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to yes
\r
27 !MESSAGE Requires Windows Vista or later, or installation from:
\r
28 !MESSAGE http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815
\r
29 !MESSAGE ENABLE_IPV6=<yes or no> - Enable IPv6, defaults to yes
\r
30 !MESSAGE ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to yes
\r
31 !MESSAGE ENABLE_SPNEGO=<yes or no> - Enable Simple and Protected GSSAPI Negotiation Mechanism, defaults to yes
\r
32 !MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
\r
33 !MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
\r
34 !MESSAGE DEBUG=<yes or no> - Debug builds
\r
35 !MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others)
\r
36 !ERROR please choose a valid mode
\r
40 !INCLUDE "../lib/Makefile.inc"
\r
41 LIBCURL_OBJS=$(CSOURCES:.c=.obj)
\r
43 !INCLUDE "../src/Makefile.inc"
\r
45 # tool_hugehelp has a special rule
\r
46 CURL_OBJS=$(CURL_CFILES:tool_hugehelp.c=)
\r
48 CURL_OBJS=$(CURL_OBJS:.c=.obj)
\r
51 # backwards compatible check for USE_SSPI
\r
53 ENABLE_SSPI = $(USE_SSPI)
\r
58 !IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"
\r
67 !ELSEIF "$(ENABLE_IDN)"=="yes"
\r
69 !ELSEIF "$(ENABLE_IDN)"=="no"
\r
75 !ELSEIF "$(ENABLE_IPV6)"=="yes"
\r
77 !ELSEIF "$(ENABLE_IPV6)"=="no"
\r
83 !ELSEIF "$(ENABLE_SSPI)"=="yes"
\r
85 !ELSEIF "$(ENABLE_SSPI)"=="no"
\r
89 !IFNDEF ENABLE_SPNEGO
\r
91 !ELSEIF "$(ENABLE_SPNEGO)"=="yes"
\r
93 !ELSEIF "$(ENABLE_SPNEGO)"=="no"
\r
97 !IFNDEF ENABLE_WINSSL
\r
101 USE_WINSSL = $(USE_SSPI)
\r
103 !ELSEIF "$(ENABLE_WINSSL)"=="yes"
\r
105 !ELSEIF "$(ENABLE_WINSSL)"=="no"
\r
109 CONFIG_NAME_LIB = libcurl
\r
111 !IF "$(WITH_SSL)"=="dll"
\r
114 !ELSEIF "$(WITH_SSL)"=="static"
\r
119 !IF "$(WITH_ZLIB)"=="dll"
\r
122 !ELSEIF "$(WITH_ZLIB)"=="static"
\r
127 !IF "$(WITH_SSH2)"=="dll"
\r
130 !ELSEIF "$(WITH_SSH2)"=="static"
\r
135 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)
\r
137 !IF "$(DEBUG)"=="yes"
\r
138 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
\r
140 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release
\r
143 !IF "$(AS_DLL)"=="true"
\r
144 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll
\r
146 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
\r
149 !IF "$(USE_SSL)"=="true"
\r
150 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
\r
153 !IF "$(USE_ZLIB)"=="true"
\r
154 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
\r
157 !IF "$(USE_SSH2)"=="true"
\r
158 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2)
\r
161 !IF "$(USE_IPV6)"=="true"
\r
162 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
\r
165 !IF "$(USE_SSPI)"=="true"
\r
166 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
\r
169 !IF "$(USE_SPNEGO)"=="true"
\r
170 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-spnego
\r
173 !IF "$(USE_WINSSL)"=="true"
\r
174 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl
\r
177 !MESSAGE configuration name: $(CONFIG_NAME_LIB)
\r
179 BUILD_DIR=../builds/$(CONFIG_NAME_LIB)
\r
180 LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
\r
181 CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
\r
182 DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
\r
185 @SET DIROBJ=$(LIBCURL_DIROBJ)
\r
186 @SET MACRO_NAME=LIBCURL_OBJS
\r
187 @SET OUTFILE=LIBCURL_OBJS.inc
\r
188 @gen_resp_file.bat $(LIBCURL_OBJS)
\r
190 @SET DIROBJ=$(CURL_DIROBJ)
\r
191 @SET MACRO_NAME=CURL_OBJS
\r
192 @SET OUTFILE=CURL_OBJS.inc
\r
193 @gen_resp_file.bat $(CURL_OBJS)
\r
195 @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
\r
196 @SET MACHINE=$(MACHINE)
\r
197 @SET USE_IDN=$(USE_IDN)
\r
198 @SET USE_IPV6=$(USE_IPV6)
\r
199 @SET USE_SSPI=$(USE_SSPI)
\r
200 @SET USE_SPNEGO=$(USE_SPNEGO)
\r
201 @SET USE_WINSSL=$(USE_WINSSL)
\r
202 @$(MAKE) /NOLOGO /F MakefileBuild.vc
\r
206 FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\
\r