1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 03:55:03 -05:00
curl/src/Makefile.vc6

300 lines
9.0 KiB
Makefile
Raw Normal View History

#############################################################
2004-11-16 12:15:07 -05: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]
## (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.
##
## 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>
#
#############################################################
PROGRAM_NAME = curl.exe
2004-07-05 21:18:35 -04:00
!IFNDEF ZLIB_PATH
ZLIB_PATH = ../../zlib-1.2.3
2004-07-05 21:18:35 -04:00
!ENDIF
!IFNDEF OPENSSL_PATH
2008-01-23 02:27:40 -05:00
OPENSSL_PATH = ../../openssl-0.9.8g
2004-07-05 21:18:35 -04:00
!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/
2008-02-28 06:34:08 -05:00
# WINDOWS_SSPI = 1
!IFDEF WINDOWS_SSPI
!IFNDEF WINDOWS_SDK_PATH
WINDOWS_SDK_PATH = "C:\Program Files\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
2005-01-02 14:19:32 -05:00
LINKR = link.exe /incremental:no /libpath:"../lib"
RCR = rc.exe /dDEBUGBUILD=0
## Debug
CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /GZ
2005-01-02 14:19:32 -05:00
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= \
hugehelpr.obj \
writeoutr.obj \
urlglobr.obj \
getpassr.obj \
2003-11-23 17:26:40 -05:00
homedirr.obj \
curlutilr.obj \
os-specificr.obj \
nonblockr.obj \
rawstrr.obj \
strtoofftr.obj \
2004-03-04 04:56:39 -05:00
mainr.obj \
curlr.res
DEBUG_OBJS= \
hugehelpd.obj \
writeoutd.obj \
urlglobd.obj \
getpassd.obj \
2003-11-23 17:26:40 -05:00
homedird.obj \
curlutild.obj \
os-specificd.obj \
nonblockd.obj \
rawstrd.obj \
strtoofftd.obj \
2004-03-04 04:56:39 -05:00
maind.obj \
curld.res
#################################################
# 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
!IF "$(CFG)" == "release-zlib"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = libcurl.lib $(ZLIB_LIBS)
LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
#################################################
# release static library with ssl
2002-03-23 10:41:17 -05:00
!IF "$(CFG)" == "release-ssl"
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
#################################################
# release dynamic library with dynamic ssl
!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)
!ENDIF
#################################################
# release static library with ssl and zlib
!IF "$(CFG)" == "release-ssl-zlib"
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)
!ENDIF
#################################################
# release static library with dynamic ssl
!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)
!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
2003-11-23 17:26:40 -05:00
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
mainr.obj: main.c
$(CCR) $(CFLAGS) /Fo"$@" main.c
2004-03-04 04:56:39 -05:00
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
2003-11-23 17:26:40 -05:00
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
2004-12-10 14:16:51 -05:00
$(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
maind.obj: main.c
$(CCD) $(CFLAGS) /Fo"$@" main.c
2004-03-04 04:56:39 -05:00
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