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_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
\r
32 !MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
\r
33 !MESSAGE DEBUG=<yes or no> - Debug builds
\r
34 !MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others)
\r
35 !ERROR please choose a valid mode
\r
39 !INCLUDE "../lib/Makefile.inc"
\r
40 LIBCURL_OBJS=$(CSOURCES:.c=.obj)
\r
42 !INCLUDE "../src/Makefile.inc"
\r
44 # tool_hugehelp has a special rule
\r
45 CURL_OBJS=$(CURL_CFILES:tool_hugehelp.c=)
\r
47 CURL_OBJS=$(CURL_OBJS:.c=.obj)
\r
50 # backwards compatible check for USE_SSPI
\r
52 ENABLE_SSPI = $(USE_SSPI)
\r
57 !IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"
\r
66 !ELSEIF "$(ENABLE_IDN)"=="yes"
\r
68 !ELSEIF "$(ENABLE_IDN)"=="no"
\r
74 !ELSEIF "$(ENABLE_IPV6)"=="yes"
\r
76 !ELSEIF "$(ENABLE_IPV6)"=="no"
\r
82 !ELSEIF "$(ENABLE_SSPI)"=="yes"
\r
84 !ELSEIF "$(ENABLE_SSPI)"=="no"
\r
88 !IFNDEF ENABLE_WINSSL
\r
92 USE_WINSSL = $(USE_SSPI)
\r
94 !ELSEIF "$(ENABLE_WINSSL)"=="yes"
\r
96 !ELSEIF "$(ENABLE_WINSSL)"=="no"
\r
100 CONFIG_NAME_LIB = libcurl
\r
102 !IF "$(WITH_SSL)"=="dll"
\r
105 !ELSEIF "$(WITH_SSL)"=="static"
\r
110 !IF "$(WITH_ZLIB)"=="dll"
\r
113 !ELSEIF "$(WITH_ZLIB)"=="static"
\r
118 !IF "$(WITH_SSH2)"=="dll"
\r
121 !ELSEIF "$(WITH_SSH2)"=="static"
\r
126 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)
\r
128 !IF "$(DEBUG)"=="yes"
\r
129 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
\r
131 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release
\r
134 !IF "$(AS_DLL)"=="true"
\r
135 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll
\r
137 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
\r
140 !IF "$(USE_SSL)"=="true"
\r
141 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
\r
144 !IF "$(USE_ZLIB)"=="true"
\r
145 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
\r
148 !IF "$(USE_SSH2)"=="true"
\r
149 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2)
\r
152 !IF "$(USE_IPV6)"=="true"
\r
153 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
\r
156 !IF "$(USE_SSPI)"=="true"
\r
157 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
\r
160 !IF "$(USE_WINSSL)"=="true"
\r
161 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl
\r
164 !MESSAGE configuration name: $(CONFIG_NAME_LIB)
\r
166 BUILD_DIR=../builds/$(CONFIG_NAME_LIB)
\r
167 LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
\r
168 CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
\r
169 DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
\r
172 @SET DIROBJ=$(LIBCURL_DIROBJ)
\r
173 @SET MACRO_NAME=LIBCURL_OBJS
\r
174 @SET OUTFILE=LIBCURL_OBJS.inc
\r
175 @gen_resp_file.bat $(LIBCURL_OBJS)
\r
177 @SET DIROBJ=$(CURL_DIROBJ)
\r
178 @SET MACRO_NAME=CURL_OBJS
\r
179 @SET OUTFILE=CURL_OBJS.inc
\r
180 @gen_resp_file.bat $(CURL_OBJS)
\r
182 @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
\r
183 @SET MACHINE=$(MACHINE)
\r
184 @SET USE_IDN=$(USE_IDN)
\r
185 @SET USE_IPV6=$(USE_IPV6)
\r
186 @SET USE_SSPI=$(USE_SSPI)
\r
187 @SET USE_WINSSL=$(USE_WINSSL)
\r
188 @$(MAKE) /NOLOGO /F MakefileBuild.vc
\r
192 FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\
\r