1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1999 - 2010, 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 http://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.
#
#***************************************************************************
#############################################################
#
## Makefile for building curl.exe with MSVC6
## Use: nmake -f makefile.vc6 [release | debug] [CFG=release-ssl]
## (default is release)
## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL
## into curl.exe producing a standalone SSL-enabled executable.
##
#
#############################################################
PROGRAM_NAME = curl.exe
# -------------------------------------------
# Verify that current subdir is curl's 'src'
# -------------------------------------------
!IF ! EXIST(.\main.c)
! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory.
! MESSAGE Change to curl's 'src' subdirectory, and try again.
! ERROR See previous message.
!ENDIF
# ------------------------------------------------
# Makefile.msvc.names provides libcurl file names
# ------------------------------------------------
!INCLUDE ..\Makefile.msvc.names
!IFNDEF OPENSSL_PATH
OPENSSL_PATH = ../../openssl-0.9.8q
!ENDIF
!IFNDEF ZLIB_PATH
ZLIB_PATH = ../../zlib-1.2.5
!ENDIF
!IFNDEF MACHINE
MACHINE = X86
!ENDIF
# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
# without an openssl installation and offers the ability to authenticate
# using the "current logged in user". Since at least with MSVC6 the sspi.h
# header is broken it is either required to install the Windows SDK,
# or to fix sspi.h with adding this define at the beginning of sspi.h:
# #define FreeCredentialHandle FreeCredentialsHandle
#
# If, for some reason the Windows SDK is installed but not installed
# in the default location, you can specify WINDOWS_SDK_PATH.
# It can be downloaded from:
# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
# WINDOWS_SSPI = 1
!IFDEF WINDOWS_SSPI
!IFNDEF WINDOWS_SDK_PATH
WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"
!ENDIF
!ENDIF
########################################################
## Nothing more to do below this line!
ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)"
ZLIB_LIBS = zlib.lib
ZLIB_IMP_LIBS = zdll.lib
SSL_CFLAGS = /DUSE_SSLEAY
SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32"
SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"
SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib
# Runtime library configuration
RTLIB = /MD
RTLIBD = /MDd
!IF "$(RTLIBCFG)" == "static"
RTLIB = /MT
RTLIBD = /MTd
!ENDIF
## Release
CCR = cl.exe $(RTLIB) /O2 /DNDEBUG
LINKR = link.exe /incremental:no /libpath:"../lib"
RCR = rc.exe /dDEBUGBUILD=0
## Debug
CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /GZ
LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
RCD = rc.exe /dDEBUGBUILD=1
CFLAGS = /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c
LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
RESFLAGS = /i../include
# This manifest thing is for VC8, enabled by the maketgz script that
# builds the VC8 version of this makefile. Left commented out in the VC6
# version!
#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1
!IFDEF WINDOWS_SSPI
CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
!ENDIF
RELEASE_OBJS= \
curlutilr.obj \
getpassr.obj \
homedirr.obj \
hugehelpr.obj \
mainr.obj \
nonblockr.obj \
os-specificr.obj \
rawstrr.obj \
strtoofftr.obj \
urlglobr.obj \
writeoutr.obj \
xattrr.obj \
curlr.res
DEBUG_OBJS= \
curlutild.obj \
getpassd.obj \
homedird.obj \
hugehelpd.obj \
maind.obj \
nonblockd.obj \
os-specificd.obj \
rawstrd.obj \
strtoofftd.obj \
urlglobd.obj \
writeoutd.obj \
xattrd.obj \
curld.res
#################################################
# If CFG not specified, use static libs
CFLAGS = $(CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG)
#################################################
# release dynamic library
!IF "$(CFG)" == "release-dll"
LINKLIBS = $(LIBCURL_IMP_LIB_REL)
LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG)
!ENDIF
#################################################
# release static library with zlib
!IF "$(CFG)" == "release-zlib"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
#################################################
# release static library with ssl
!IF "$(CFG)" == "release-ssl"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
!ENDIF
#################################################
# release dynamic library with dynamic ssl
!IF "$(CFG)" == "release-dll-ssl-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
!ENDIF
#################################################
# release static library with ssl and zlib
!IF "$(CFG)" == "release-ssl-zlib"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
#################################################
# release static library with dynamic ssl
!IF "$(CFG)" == "release-ssl-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
!ENDIF
#################################################
# release static library with dynamic zlib
!IF "$(CFG)" == "release-zlib-dll"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
#################################################
# release dynamic library with dynamic zlib
!IF "$(CFG)" == "release-dll-zlib-dll"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
#################################################
# release static library with dynamic ssl and dynamic zlib
!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
#################################################
# release dynamic library with dynamic ssl and dynamic zlib
!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)
LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
LINKLIBS = $(LINKLIBS) ws2_32.lib wldap32.lib
LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib
all : release
release: $(RELEASE_OBJS)
$(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
$(MANIFESTTOOL)
debug: $(DEBUG_OBJS)
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
$(MANIFESTTOOL)
## Release
hugehelpr.obj: hugehelp.c
$(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
writeoutr.obj: writeout.c
$(CCR) $(CFLAGS) /Fo"$@" writeout.c
urlglobr.obj: urlglob.c
$(CCR) $(CFLAGS) /Fo"$@" urlglob.c
getpassr.obj: getpass.c
$(CCR) $(CFLAGS) /Fo"$@" getpass.c
homedirr.obj: homedir.c
$(CCR) $(CFLAGS) /Fo"$@" homedir.c
curlutilr.obj: curlutil.c
$(CCR) $(CFLAGS) /Fo"$@" curlutil.c
os-specificr.obj: os-specific.c
$(CCR) $(CFLAGS) /Fo"$@" os-specific.c
nonblockr.obj: ../lib/nonblock.c
$(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
rawstrr.obj: ../lib/rawstr.c
$(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
strtoofftr.obj: ../lib/strtoofft.c
$(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
xattrr.obj: xattr.c
$(CCR) $(CFLAGS) /Fo"$@" xattr.c
mainr.obj: main.c
$(CCR) $(CFLAGS) /Fo"$@" main.c
curlr.res : curl.rc
$(RCR) $(RESFLAGS) /Fo"$@" curl.rc
## Debug
hugehelpd.obj: hugehelp.c
$(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
writeoutd.obj: writeout.c
$(CCD) $(CFLAGS) /Fo"$@" writeout.c
urlglobd.obj: urlglob.c
$(CCD) $(CFLAGS) /Fo"$@" urlglob.c
getpassd.obj: getpass.c
$(CCD) $(CFLAGS) /Fo"$@" getpass.c
homedird.obj: homedir.c
$(CCD) $(CFLAGS) /Fo"$@" homedir.c
curlutild.obj: curlutil.c
$(CCD) $(CFLAGS) /Fo"$@" curlutil.c
os-specificd.obj: os-specific.c
$(CCD) $(CFLAGS) /Fo"$@" os-specific.c
nonblockd.obj: ../lib/nonblock.c
$(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
rawstrd.obj: ../lib/rawstr.c
$(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
strtoofftd.obj: ../lib/strtoofft.c
$(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
xattrd.obj: xattr.c
$(CCD) $(CFLAGS) /Fo"$@" xattr.c
maind.obj: main.c
$(CCD) $(CFLAGS) /Fo"$@" main.c
curld.res : curl.rc
$(RCD) $(RESFLAGS) /Fo"$@" curl.rc
clean:
@-erase $(PROGRAM_NAME) 2> NUL
@-erase $(RELEASE_OBJS) 2> NUL
@-erase $(DEBUG_OBJS) 2> NUL
@-erase *.idb 2> NUL
@-erase *.pdb 2> NUL
@-erase *.pch 2> NUL
@-erase *.ilk 2> NUL
|