2001-05-21 23:42:38 +02:00
|
|
|
#############################################################
|
2001-08-09 11:10:13 +02:00
|
|
|
#
|
2001-11-05 12:56:26 +01:00
|
|
|
# Makefile for building libcurl with MSVC6
|
|
|
|
#
|
|
|
|
# Usage: see usage message below
|
|
|
|
# Should be invoked from \lib directory
|
|
|
|
# Edit the paths and desired library name
|
2002-01-05 00:47:07 +01:00
|
|
|
# SSL path is only required if you intend compiling
|
2001-11-05 12:56:26 +01:00
|
|
|
# with SSL.
|
|
|
|
#
|
|
|
|
# This make file leaves the result either a .lib or .dll file
|
|
|
|
# in the \lib directory. It should be called from the \lib
|
|
|
|
# directory.
|
|
|
|
#
|
|
|
|
# An option would have been to allow the source directory to
|
|
|
|
# be specified, but I saw no requirement.
|
|
|
|
#
|
|
|
|
# Another option would have been to leave the .lib and .dll
|
|
|
|
# files in the "cfg" directory, but then the make file
|
2002-01-05 00:47:07 +01:00
|
|
|
# in \src would need to be changed.
|
|
|
|
#
|
2004-04-11 22:25:10 +02:00
|
|
|
# $Id: Makefile.vc6,v 1.17 2004/01/13 08:57:01 bagder Exp $
|
2001-11-05 12:56:26 +01:00
|
|
|
##############################################################
|
2001-05-21 23:42:38 +02:00
|
|
|
|
2001-11-05 12:56:26 +01:00
|
|
|
LIB_NAME = libcurl
|
2001-12-02 13:09:00 +01:00
|
|
|
LIB_NAME_DEBUG = libcurld
|
2002-02-06 17:00:55 +01:00
|
|
|
!IFNDEF OPENSSL_PATH
|
2004-07-11 15:49:18 +02:00
|
|
|
OPENSSL_PATH = ../../openssl-0.9.7d
|
2002-02-06 17:00:55 +01:00
|
|
|
!ENDIF
|
2001-05-21 23:42:38 +02:00
|
|
|
|
2004-04-11 22:25:10 +02:00
|
|
|
!IFNDEF ZLIB_PATH
|
2004-07-11 15:49:18 +02:00
|
|
|
ZLIB_PATH = ../../zlib-1.2.1
|
2004-04-11 22:25:10 +02:00
|
|
|
!ENDIF
|
|
|
|
|
2004-06-01 10:09:43 +02:00
|
|
|
# Use the high resolution time by default. Comment this out to use low
|
|
|
|
# resolution time and not require winmm.lib
|
|
|
|
USEMM_LIBS = YES
|
|
|
|
|
2001-11-05 12:56:26 +01:00
|
|
|
#############################################################
|
|
|
|
## Nothing more to do below this line!
|
2001-05-21 23:42:38 +02:00
|
|
|
|
2004-07-11 15:49:18 +02:00
|
|
|
CCNODBG = cl.exe /MD /O2 /D "NDEBUG"
|
|
|
|
CCDEBUG = cl.exe /MDd /Od /Gm /Zi /D "_DEBUG" /GZ
|
|
|
|
CFLAGSSSL = /D "USE_SSLEAY" /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
|
2004-04-11 22:25:10 +02:00
|
|
|
CFLAGSZLIB = /D "HAVE_ZLIB_H" /D "HAVE_ZLIB" /D "HAVE_LIBZ" /I "$(ZLIB_PATH)"
|
2004-07-11 15:49:18 +02:00
|
|
|
CFLAGS = /I "." /I "../include" /nologo /W3 /GX /D "WIN32" /D "VC6" /D "_MBCS" /D "_LIB" /YX /FD /c /D "MSDOS"
|
|
|
|
LNKDLL = link.exe /DLL /def:libcurl.def
|
|
|
|
LNKLIB = link.exe /lib
|
|
|
|
LFLAGS = /nologo
|
|
|
|
SSLLIBS = libeay32.lib ssleay32.lib
|
2004-05-25 15:52:12 +02:00
|
|
|
!IFDEF USEMM_LIBS
|
2004-07-11 15:49:18 +02:00
|
|
|
WINLIBS = wsock32.lib winmm.lib
|
2004-05-25 15:52:12 +02:00
|
|
|
!ELSE
|
2004-07-11 15:49:18 +02:00
|
|
|
WINLIBS = wsock32.lib
|
|
|
|
CFLAGS = $(CFLAGS) /D "WITHOUT_MM_LIB"
|
2004-05-25 15:52:12 +02:00
|
|
|
!ENDIF
|
2003-04-25 17:08:46 +02:00
|
|
|
# RSAglue.lib was formerly needed in the SSLLIBS
|
2004-07-11 15:49:18 +02:00
|
|
|
CFGSET = FALSE
|
2001-11-05 12:56:26 +01:00
|
|
|
|
|
|
|
######################
|
|
|
|
# release
|
|
|
|
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "release"
|
2001-11-05 12:56:26 +01:00
|
|
|
TARGET =$(LIB_NAME).lib
|
|
|
|
DIROBJ =.\$(CFG)
|
|
|
|
LNK = $(LNKLIB) /out:$(TARGET)
|
|
|
|
CC = $(CCNODBG)
|
|
|
|
CFGSET = TRUE
|
|
|
|
!ENDIF
|
|
|
|
|
2004-05-26 13:49:28 +02:00
|
|
|
######################
|
|
|
|
# release-zlib
|
|
|
|
|
|
|
|
!IF "$(CFG)" == "release-zlib"
|
|
|
|
TARGET =$(LIB_NAME).lib
|
|
|
|
DIROBJ =.\$(CFG)
|
|
|
|
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
|
|
|
LNK = $(LNKLIB) $(LFLAGSZLIB) /out:$(TARGET)
|
|
|
|
CC = $(CCNODBG) $(CFLAGSZLIB)
|
|
|
|
CFGSET = TRUE
|
|
|
|
!ENDIF
|
|
|
|
|
2001-11-05 12:56:26 +01:00
|
|
|
######################
|
|
|
|
# release-dll
|
|
|
|
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "release-dll"
|
2001-11-05 12:56:26 +01:00
|
|
|
TARGET =$(LIB_NAME).dll
|
|
|
|
DIROBJ =.\$(CFG)
|
2004-08-15 00:03:40 +02:00
|
|
|
LNK = $(LNKDLL) $(WINLIBS) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
|
2001-11-05 12:56:26 +01:00
|
|
|
CC = $(CCNODBG)
|
|
|
|
CFGSET = TRUE
|
2003-11-06 16:09:30 +01:00
|
|
|
RESOURCE = $(DIROBJ)\libcurl.res
|
2001-11-05 12:56:26 +01:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
######################
|
|
|
|
# release-ssl
|
2001-11-22 01:12:48 +01:00
|
|
|
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "release-ssl"
|
2001-11-22 01:12:48 +01:00
|
|
|
TARGET =$(LIB_NAME).lib
|
2001-11-05 12:56:26 +01:00
|
|
|
DIROBJ =.\$(CFG)
|
2002-03-23 16:41:17 +01:00
|
|
|
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32"
|
2001-11-05 12:56:26 +01:00
|
|
|
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(TARGET)
|
|
|
|
CC = $(CCNODBG) $(CFLAGSSSL)
|
2002-01-05 00:47:07 +01:00
|
|
|
CFGSET = TRUE
|
2001-11-05 12:56:26 +01:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
######################
|
|
|
|
# release-ssl-dll
|
|
|
|
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "release-ssl-dll"
|
2001-11-05 12:56:26 +01:00
|
|
|
TARGET =$(LIB_NAME).dll
|
|
|
|
DIROBJ =.\$(CFG)
|
2002-03-23 16:41:17 +01:00
|
|
|
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
2004-08-15 00:03:40 +02:00
|
|
|
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(WINLIBS) $(LFLAGSSSL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
|
2001-11-05 12:56:26 +01:00
|
|
|
CC = $(CCNODBG) $(CFLAGSSSL)
|
2002-01-05 00:47:07 +01:00
|
|
|
CFGSET = TRUE
|
2003-11-06 16:09:30 +01:00
|
|
|
RESOURCE = $(DIROBJ)\libcurl.res
|
2001-11-05 12:56:26 +01:00
|
|
|
!ENDIF
|
|
|
|
|
2004-04-11 22:25:10 +02:00
|
|
|
######################
|
|
|
|
# release-ssl-zlib
|
|
|
|
!IF "$(CFG)" == "release-ssl-zlib"
|
|
|
|
TARGET =$(LIB_NAME).lib
|
|
|
|
DIROBJ =.\$(CFG)
|
|
|
|
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32"
|
|
|
|
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
|
|
|
LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(TARGET)
|
|
|
|
CC = $(CCNODBG) $(CFLAGSSSL) $(CFLAGSZLIB)
|
|
|
|
CFGSET = TRUE
|
|
|
|
!ENDIF
|
|
|
|
|
2003-10-22 13:26:41 +02:00
|
|
|
######################
|
|
|
|
# release-libcurl-ssl-dll
|
|
|
|
!IF "$(CFG)" == "release-libcurl-ssl-dll"
|
|
|
|
TARGET =$(LIB_NAME).lib
|
|
|
|
DIROBJ =.\$(CFG)
|
|
|
|
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
2004-05-25 15:52:12 +02:00
|
|
|
LNK = $(LNKLIB) $(SSLLIBS) $(LFLAGSSSL) /out:$(TARGET)
|
2003-10-22 13:26:41 +02:00
|
|
|
CC = $(CCNODBG) $(CFLAGSSSL)
|
|
|
|
CFGSET = TRUE
|
2003-11-06 16:09:30 +01:00
|
|
|
RESOURCE = $(DIROBJ)\libcurl.res
|
2003-10-22 13:26:41 +02:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
|
2001-11-05 12:56:26 +01:00
|
|
|
######################
|
|
|
|
# debug
|
|
|
|
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "debug"
|
2001-11-05 12:56:26 +01:00
|
|
|
TARGET =$(LIB_NAME_DEBUG).lib
|
|
|
|
DIROBJ =.\$(CFG)
|
|
|
|
LNK = $(LNKLIB) /out:$(TARGET)
|
|
|
|
CC = $(CCDEBUG)
|
|
|
|
CFGSET = TRUE
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
######################
|
|
|
|
# debug-dll
|
|
|
|
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "debug-dll"
|
2001-11-05 12:56:26 +01:00
|
|
|
TARGET =$(LIB_NAME_DEBUG).dll
|
|
|
|
DIROBJ =.\$(CFG)
|
2004-08-15 00:03:40 +02:00
|
|
|
LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(TARGET) /IMPLIB:"$(LIB_NAME_DEBUG).lib" /PDB:"$(LIB_NAME_DEBUG).pdb"
|
2001-11-05 12:56:26 +01:00
|
|
|
CC = $(CCDEBUG)
|
|
|
|
CFGSET = TRUE
|
2003-11-06 16:09:30 +01:00
|
|
|
RESOURCE = $(DIROBJ)\libcurl.res
|
2001-11-05 12:56:26 +01:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
######################
|
|
|
|
# debug-ssl
|
|
|
|
#todo
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "debug-ssl"
|
2001-11-05 12:56:26 +01:00
|
|
|
TARGET = $(LIB_NAME_DEBUG).lib
|
|
|
|
DIROBJ =.\$(CFG)
|
|
|
|
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(TARGET)
|
|
|
|
CC = $(CCDEBUG) $(CFLAGSSSL)
|
|
|
|
CFGSET = TRUE
|
|
|
|
!ENDIF
|
|
|
|
|
2004-05-26 13:49:28 +02:00
|
|
|
######################
|
|
|
|
# debug-zlib
|
|
|
|
!IF "$(CFG)" == "debug-zlib"
|
|
|
|
TARGET = $(LIB_NAME_DEBUG).lib
|
|
|
|
DIROBJ =.\$(CFG)
|
|
|
|
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
|
|
|
LNK = $(LNKLIB) $(LFLAGSZLIB) /out:$(TARGET)
|
|
|
|
CC = $(CCDEBUG) $(CFLAGSZLIB)
|
|
|
|
CFGSET = TRUE
|
|
|
|
!ENDIF
|
|
|
|
|
2001-11-05 12:56:26 +01:00
|
|
|
######################
|
|
|
|
# debug-ssl-dll
|
|
|
|
|
2002-01-05 00:47:07 +01:00
|
|
|
!IF "$(CFG)" == "debug-ssl-dll"
|
2001-11-05 12:56:26 +01:00
|
|
|
TARGET =$(LIB_NAME_DEBUG).dll
|
|
|
|
DIROBJ =.\$(CFG)
|
2003-01-07 10:31:45 +01:00
|
|
|
LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)/out32dll
|
2004-08-15 00:03:40 +02:00
|
|
|
LNK = $(LNKDLL) $(WINLIBS) $(LFLAGSSSL) /DEBUG /out:$(TARGET) /IMPLIB:"$(LIB_NAME_DEBUG).lib" /PDB:"$(LIB_NAME_DEBUG).pdb"
|
2001-11-05 12:56:26 +01:00
|
|
|
CC = $(CCDEBUG) $(CFLAGSSSL)
|
|
|
|
CFGSET = TRUE
|
2003-11-06 16:09:30 +01:00
|
|
|
RESOURCE = $(DIROBJ)\libcurl.res
|
2001-11-05 12:56:26 +01:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
#######################
|
|
|
|
# Usage
|
|
|
|
#
|
|
|
|
!IF "$(CFGSET)" == "FALSE"
|
2004-02-26 17:23:28 +01:00
|
|
|
!MESSAGE Usage: nmake /f makefile.vc6 CFG=<config> <target>
|
2001-11-05 12:56:26 +01:00
|
|
|
!MESSAGE where <config> is one of:
|
|
|
|
!MESSAGE release - release static library
|
|
|
|
!MESSAGE release-dll - release dll
|
2004-05-26 13:49:28 +02:00
|
|
|
!MESSAGE release-zlib - release static library with zlib
|
2001-11-05 12:56:26 +01:00
|
|
|
!MESSAGE release-ssl - release static library with ssl
|
2004-04-11 22:25:10 +02:00
|
|
|
!MESSAGE release-ssl-zlib - release static library with ssl and zlib
|
2001-11-05 12:56:26 +01:00
|
|
|
!MESSAGE release-ssl-dll - release dll library with ssl
|
2003-10-22 13:26:41 +02:00
|
|
|
!MESSAGE release-libcurl-ssl-dll - static libcurl with shared ssl
|
2001-11-05 12:56:26 +01:00
|
|
|
!MESSAGE debug - debug static library
|
|
|
|
!MESSAGE debug-dll - debug dll
|
2004-05-26 13:49:28 +02:00
|
|
|
!MESSAGE debug-zlib - debug static library with zlib
|
2001-11-05 12:56:26 +01:00
|
|
|
!MESSAGE debug-ssl - debug static library with ssl
|
|
|
|
!MESSAGE debug-ssl-dll - debug dll library with ssl
|
|
|
|
!MESSAGE <target> can be left blank in which case all is assumed
|
|
|
|
!ERROR please choose a valid configuration "$(CFG)"
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
#######################
|
|
|
|
#
|
|
|
|
X_OBJS= \
|
|
|
|
$(DIROBJ)\base64.obj \
|
|
|
|
$(DIROBJ)\cookie.obj \
|
|
|
|
$(DIROBJ)\transfer.obj \
|
|
|
|
$(DIROBJ)\escape.obj \
|
|
|
|
$(DIROBJ)\formdata.obj \
|
|
|
|
$(DIROBJ)\ftp.obj \
|
|
|
|
$(DIROBJ)\http.obj \
|
|
|
|
$(DIROBJ)\http_chunks.obj \
|
|
|
|
$(DIROBJ)\ldap.obj \
|
|
|
|
$(DIROBJ)\dict.obj \
|
|
|
|
$(DIROBJ)\telnet.obj \
|
2004-09-15 10:05:53 +02:00
|
|
|
$(DIROBJ)\parsedate.obj \
|
2001-11-05 12:56:26 +01:00
|
|
|
$(DIROBJ)\getenv.obj \
|
2003-11-04 07:59:25 +01:00
|
|
|
$(DIROBJ)\inet_pton.obj \
|
2001-11-05 12:56:26 +01:00
|
|
|
$(DIROBJ)\hostip.obj \
|
2004-04-26 14:33:14 +02:00
|
|
|
$(DIROBJ)\hostasyn.obj \
|
|
|
|
$(DIROBJ)\hostsyn.obj \
|
|
|
|
$(DIROBJ)\hostares.obj \
|
|
|
|
$(DIROBJ)\hostthre.obj \
|
|
|
|
$(DIROBJ)\hostip4.obj \
|
|
|
|
$(DIROBJ)\hostip6.obj \
|
2004-04-26 22:41:33 +02:00
|
|
|
$(DIROBJ)\inet_ntop.obj \
|
2001-11-05 12:56:26 +01:00
|
|
|
$(DIROBJ)\if2ip.obj \
|
|
|
|
$(DIROBJ)\mprintf.obj \
|
|
|
|
$(DIROBJ)\netrc.obj \
|
|
|
|
$(DIROBJ)\progress.obj \
|
|
|
|
$(DIROBJ)\sendf.obj \
|
|
|
|
$(DIROBJ)\speedcheck.obj \
|
|
|
|
$(DIROBJ)\ssluse.obj \
|
|
|
|
$(DIROBJ)\timeval.obj \
|
|
|
|
$(DIROBJ)\url.obj \
|
|
|
|
$(DIROBJ)\file.obj \
|
|
|
|
$(DIROBJ)\getinfo.obj \
|
|
|
|
$(DIROBJ)\version.obj \
|
|
|
|
$(DIROBJ)\easy.obj \
|
|
|
|
$(DIROBJ)\strequal.obj \
|
2001-11-22 00:10:55 +01:00
|
|
|
$(DIROBJ)\strtok.obj \
|
2004-01-05 23:29:29 +01:00
|
|
|
$(DIROBJ)\strtoofft.obj \
|
2002-01-05 00:47:07 +01:00
|
|
|
$(DIROBJ)\connect.obj \
|
|
|
|
$(DIROBJ)\hash.obj \
|
2002-06-11 13:11:06 +02:00
|
|
|
$(DIROBJ)\llist.obj \
|
2003-03-03 23:39:34 +01:00
|
|
|
$(DIROBJ)\share.obj \
|
2003-07-23 10:21:21 +02:00
|
|
|
$(DIROBJ)\multi.obj \
|
|
|
|
$(DIROBJ)\http_digest.obj \
|
2003-07-30 16:19:44 +02:00
|
|
|
$(DIROBJ)\http_negotiate.obj \
|
|
|
|
$(DIROBJ)\http_ntlm.obj \
|
2003-11-06 16:09:30 +01:00
|
|
|
$(DIROBJ)\md5.obj \
|
2004-03-25 14:40:57 +01:00
|
|
|
$(DIROBJ)\strerror.obj \
|
2004-04-11 22:25:10 +02:00
|
|
|
$(DIROBJ)\content_encoding.obj \
|
2003-11-06 16:09:30 +01:00
|
|
|
$(RESOURCE)
|
2001-11-05 12:56:26 +01:00
|
|
|
|
|
|
|
all : $(TARGET)
|
|
|
|
|
|
|
|
|
|
|
|
$(TARGET): $(X_OBJS)
|
2004-03-03 14:32:56 +01:00
|
|
|
$(LNK) $(LFLAGS) $(X_OBJS)
|
2001-11-05 12:56:26 +01:00
|
|
|
|
|
|
|
$(X_OBJS): $(DIROBJ)
|
|
|
|
|
|
|
|
$(DIROBJ):
|
|
|
|
@if not exist "$(DIROBJ)" mkdir $(DIROBJ)
|
|
|
|
|
2003-11-06 16:09:30 +01:00
|
|
|
.SUFFIXES: .c .obj .res
|
2001-11-05 12:56:26 +01:00
|
|
|
|
|
|
|
{.\}.c{$(DIROBJ)\}.obj:
|
|
|
|
$(CC) $(CFLAGS) /Fo"$@" $<
|
2001-05-21 23:42:38 +02:00
|
|
|
|
2003-11-06 16:09:30 +01:00
|
|
|
debug-dll\libcurl.res \
|
|
|
|
debug-ssl-dll\libcurl.res \
|
|
|
|
release-libcurl-ssl-dll\libcurl.res: libcurl.rc
|
2003-11-06 17:04:19 +01:00
|
|
|
rc /dCURLDEBUG=1 /Fo $@ libcurl.rc
|
2003-11-06 16:09:30 +01:00
|
|
|
|
|
|
|
release-dll\libcurl.res \
|
|
|
|
release-ssl-dll\libcurl.res \
|
|
|
|
release-libcurl-ssl-dll\libcurl.res: libcurl.rc
|
2003-11-06 17:04:19 +01:00
|
|
|
rc /dCURLDEBUG=0 /Fo $@ libcurl.rc
|
2003-11-06 16:09:30 +01:00
|
|
|
|
2001-05-21 23:42:38 +02:00
|
|
|
clean:
|
2001-11-05 12:56:26 +01:00
|
|
|
-@erase $(DIROBJ)\*.obj
|
2003-11-06 16:09:30 +01:00
|
|
|
-@erase $(DIROBJ)\*.res
|
2001-05-21 23:42:38 +02:00
|
|
|
-@erase vc60.idb
|
2001-11-22 01:12:48 +01:00
|
|
|
-@erase vc60.pch
|