2001-05-21 17:42:38 -04:00
|
|
|
########################################################
|
2004-11-16 12:15:07 -05:00
|
|
|
# $Id: Makefile.vc6,v 1.19 2004/11/14 13:48:15 giva Exp $
|
|
|
|
#
|
2001-05-21 17:42:38 -04:00
|
|
|
## Makefile for building curl.exe with MSVC6
|
2002-02-06 11:03:28 -05:00
|
|
|
## Use: nmake -f makefile.vc6 [release | debug] [CFG=release-ssl]
|
2001-05-21 17:42:38 -04:00
|
|
|
## (default is release)
|
2002-02-06 11:03:28 -05:00
|
|
|
## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL
|
|
|
|
## into curl.exe producing a standalone SSL-enabled executable.
|
2001-05-21 17:42:38 -04:00
|
|
|
##
|
|
|
|
## Comments to: Troy Engel <tengel@sonic.net>
|
|
|
|
## Updated by: Craig Davison <cd@securityfocus.com>
|
2002-02-06 11:03:28 -05:00
|
|
|
## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>
|
2002-06-13 18:11:28 -04:00
|
|
|
## winmm.lib added by Miklos Nemeth <mnemeth@kfkisystems.com> to support
|
|
|
|
## timeGetTime() in timeval.c
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
PROGRAM_NAME = curl.exe
|
|
|
|
|
2004-07-05 21:18:35 -04:00
|
|
|
!IFNDEF ZLIB_PATH
|
2004-11-12 06:48:02 -05:00
|
|
|
ZLIB_PATH = ../../zlib-1.2.1
|
2004-07-05 21:18:35 -04:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
!IFNDEF OPENSSL_PATH
|
2005-01-02 14:19:32 -05:00
|
|
|
OPENSSL_PATH = ../../openssl-0.9.7e
|
2004-07-05 21:18:35 -04:00
|
|
|
!ENDIF
|
|
|
|
|
2005-03-10 18:15:29 -05:00
|
|
|
# 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". It does however require that the
|
|
|
|
# Windows SDK be installed.
|
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
|
|
|
|
# USE_WINDOWS_SSPI = 1
|
|
|
|
|
|
|
|
!IFDEF WINDOWS_SSPI
|
|
|
|
!IFNDEF WINDOWS_SDK_PATH
|
|
|
|
WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
|
|
|
|
!ENDIF
|
|
|
|
!ENDIF
|
|
|
|
|
2001-05-21 17:42:38 -04:00
|
|
|
########################################################
|
|
|
|
## Nothing more to do below this line!
|
2005-01-18 05:17:34 -05:00
|
|
|
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
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
## Release
|
2004-11-13 09:17:24 -05:00
|
|
|
CCR = cl.exe /MD /O2 /DNDEBUG
|
2005-01-02 14:19:32 -05:00
|
|
|
LINKR = link.exe /incremental:no /libpath:"../lib"
|
2004-11-13 09:17:24 -05:00
|
|
|
RCR = rc.exe /dCURLDEBUG=0
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
## Debug
|
2004-11-13 09:17:24 -05:00
|
|
|
CCD = cl.exe /MDd /Gm /ZI /Od /D_DEBUG /GZ
|
2005-01-02 14:19:32 -05:00
|
|
|
LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
|
2004-11-13 09:17:24 -05:00
|
|
|
RCD = rc.exe /dCURLDEBUG=1
|
|
|
|
|
|
|
|
CFLAGS = /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c
|
|
|
|
LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:I386
|
|
|
|
RESFLAGS = /i../include
|
2001-05-21 17:42:38 -04:00
|
|
|
|
2005-03-10 18:15:29 -05:00
|
|
|
!IFDEF WINDOWS_SSPI
|
|
|
|
CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
|
|
|
|
!ENDIF
|
|
|
|
|
2001-05-21 17:42:38 -04:00
|
|
|
RELEASE_OBJS= \
|
|
|
|
hugehelpr.obj \
|
|
|
|
writeoutr.obj \
|
|
|
|
urlglobr.obj \
|
2003-11-04 01:59:25 -05:00
|
|
|
getpassr.obj \
|
2003-11-23 17:26:40 -05:00
|
|
|
homedirr.obj \
|
2004-05-25 09:52:12 -04:00
|
|
|
timevalr.obj \
|
|
|
|
strtoofftr.obj \
|
2004-03-04 04:56:39 -05:00
|
|
|
mainr.obj \
|
|
|
|
curlr.res
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
DEBUG_OBJS= \
|
|
|
|
hugehelpd.obj \
|
|
|
|
writeoutd.obj \
|
|
|
|
urlglobd.obj \
|
2003-11-04 01:59:25 -05:00
|
|
|
getpassd.obj \
|
2003-11-23 17:26:40 -05:00
|
|
|
homedird.obj \
|
2004-05-25 09:52:12 -04:00
|
|
|
timevald.obj \
|
|
|
|
strtoofftd.obj \
|
2004-03-04 04:56:39 -05:00
|
|
|
maind.obj \
|
|
|
|
curld.res
|
2004-07-11 08:28:07 -04:00
|
|
|
|
2004-11-13 09:17:24 -05:00
|
|
|
#################################################
|
2005-01-18 05:17:34 -05:00
|
|
|
# If CFG not specified, use static libs
|
|
|
|
|
|
|
|
CFLAGS = $(CFLAGS) /DCURL_STATICLIB
|
|
|
|
LINKLIBS = libcurl.lib
|
|
|
|
LINKLIBS_DEBUG = libcurld.lib
|
|
|
|
|
|
|
|
#################################################
|
|
|
|
# release dynamic library
|
|
|
|
|
|
|
|
!IF "$(CFG)" == "release-dll"
|
|
|
|
LINKLIBS = libcurl_imp.lib
|
|
|
|
LINKLIBS_DEBUG = libcurld_imp.lib
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
#################################################
|
|
|
|
# release static library with zlib
|
2004-07-11 08:28:07 -04:00
|
|
|
|
|
|
|
!IF "$(CFG)" == "release-zlib"
|
2005-01-18 05:17:34 -05:00
|
|
|
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
|
|
|
|
LINKLIBS = libcurl.lib $(ZLIB_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)
|
|
|
|
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
|
2004-07-11 08:28:07 -04:00
|
|
|
!ENDIF
|
|
|
|
|
2004-11-13 09:17:24 -05:00
|
|
|
#################################################
|
2005-01-18 05:17:34 -05:00
|
|
|
# release static library with ssl
|
2004-11-12 06:48:02 -05:00
|
|
|
|
2002-03-23 10:41:17 -05:00
|
|
|
!IF "$(CFG)" == "release-ssl"
|
2005-01-18 05:17:34 -05:00
|
|
|
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
|
|
|
|
LINKLIBS = libcurl.lib $(SSL_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
|
|
|
|
LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
|
2002-03-23 10:41:17 -05:00
|
|
|
!ENDIF
|
2004-03-04 04:56:39 -05:00
|
|
|
|
2004-11-13 09:17:24 -05:00
|
|
|
#################################################
|
2005-01-18 05:17:34 -05:00
|
|
|
# release dynamic library with dynamic ssl
|
2004-05-25 09:52:12 -04:00
|
|
|
|
2005-01-18 05:17:34 -05:00
|
|
|
!IF "$(CFG)" == "release-dll-ssl-dll"
|
|
|
|
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
|
|
|
|
LINKLIBS = libcurl_imp.lib $(SSL_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)
|
|
|
|
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
|
2004-05-25 09:52:12 -04:00
|
|
|
!ENDIF
|
|
|
|
|
2004-11-13 09:17:24 -05:00
|
|
|
#################################################
|
2005-01-18 05:17:34 -05:00
|
|
|
# release static library with ssl and zlib
|
2004-11-12 06:48:02 -05:00
|
|
|
|
2004-07-11 08:28:07 -04:00
|
|
|
!IF "$(CFG)" == "release-ssl-zlib"
|
2005-01-18 05:17:34 -05:00
|
|
|
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
|
|
|
|
LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)
|
|
|
|
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)
|
2004-07-11 08:28:07 -04:00
|
|
|
!ENDIF
|
|
|
|
|
2004-11-13 09:17:24 -05:00
|
|
|
#################################################
|
2005-01-18 05:17:34 -05:00
|
|
|
# release static library with dynamic ssl
|
2004-11-13 09:17:24 -05:00
|
|
|
|
2005-01-18 05:17:34 -05:00
|
|
|
!IF "$(CFG)" == "release-ssl-dll"
|
|
|
|
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
|
|
|
|
LINKLIBS = libcurl.lib $(SSL_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld.lib $(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.lib $(ZLIB_IMP_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld.lib $(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 $(ZLIB_IMP_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld_imp.lib $(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.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld.lib $(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 $(SSL_LIBS) $(ZLIB_IMP_LIBS)
|
|
|
|
LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
|
|
|
|
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
|
2004-11-13 09:17:24 -05:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
|
|
|
|
LINKLIBS = $(LINKLIBS) wsock32.lib winmm.lib
|
|
|
|
LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) wsock32.lib winmm.lib
|
2004-05-25 09:52:12 -04:00
|
|
|
|
2001-05-21 17:42:38 -04:00
|
|
|
all : release
|
|
|
|
|
|
|
|
release: $(RELEASE_OBJS)
|
2004-02-26 11:23:28 -05:00
|
|
|
$(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
debug: $(DEBUG_OBJS)
|
2004-02-26 11:23:28 -05:00
|
|
|
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
## Release
|
|
|
|
hugehelpr.obj: hugehelp.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
|
2001-05-21 17:42:38 -04:00
|
|
|
writeoutr.obj: writeout.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCR) $(CFLAGS) /Fo"$@" writeout.c
|
2001-05-21 17:42:38 -04:00
|
|
|
urlglobr.obj: urlglob.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCR) $(CFLAGS) /Fo"$@" urlglob.c
|
2003-11-04 01:59:25 -05:00
|
|
|
getpassr.obj: getpass.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCR) $(CFLAGS) /Fo"$@" getpass.c
|
2003-11-23 17:26:40 -05:00
|
|
|
homedirr.obj: homedir.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCR) $(CFLAGS) /Fo"$@" homedir.c
|
2004-05-25 09:52:12 -04:00
|
|
|
timevalr.obj: ../lib/timeval.c
|
|
|
|
$(CCR) $(CFLAGS) /Fo"$@" ../lib/timeval.c
|
|
|
|
strtoofftr.obj: ../lib/strtoofft.c
|
|
|
|
$(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
|
2001-05-21 17:42:38 -04:00
|
|
|
mainr.obj: main.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCR) $(CFLAGS) /Fo"$@" main.c
|
2004-03-04 04:56:39 -05:00
|
|
|
curlr.res : curl.rc
|
|
|
|
$(RCR) $(RESFLAGS) /Fo"$@" curl.rc
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
## Debug
|
|
|
|
hugehelpd.obj: hugehelp.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
|
2001-05-21 17:42:38 -04:00
|
|
|
writeoutd.obj: writeout.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCD) $(CFLAGS) /Fo"$@" writeout.c
|
2001-05-21 17:42:38 -04:00
|
|
|
urlglobd.obj: urlglob.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCD) $(CFLAGS) /Fo"$@" urlglob.c
|
2003-11-04 01:59:25 -05:00
|
|
|
getpassd.obj: getpass.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCD) $(CFLAGS) /Fo"$@" getpass.c
|
2003-11-23 17:26:40 -05:00
|
|
|
homedird.obj: homedir.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCD) $(CFLAGS) /Fo"$@" homedir.c
|
2004-11-13 11:55:53 -05:00
|
|
|
timevald.obj: ../lib/timeval.c
|
2004-12-10 14:16:51 -05:00
|
|
|
$(CCD) $(CFLAGS) /Fo"$@" ../lib/timeval.c
|
2004-05-25 09:52:12 -04:00
|
|
|
strtoofftd.obj: ../lib/strtoofft.c
|
2004-12-10 14:16:51 -05:00
|
|
|
$(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
|
2001-05-21 17:42:38 -04:00
|
|
|
maind.obj: main.c
|
2004-02-26 11:23:28 -05:00
|
|
|
$(CCD) $(CFLAGS) /Fo"$@" main.c
|
2004-03-04 04:56:39 -05:00
|
|
|
curld.res : curl.rc
|
|
|
|
$(RCD) $(RESFLAGS) /Fo"$@" curl.rc
|
2001-05-21 17:42:38 -04:00
|
|
|
|
|
|
|
clean:
|
2005-01-18 05:17:34 -05:00
|
|
|
@-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
|