curl/lib/Makefile.vc6

224 lines
5.7 KiB
Makefile
Raw Normal View History

#############################################################
#
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.
#
2001-11-05 12:56:26 +01:00
##############################################################
2002-01-05 00:47:07 +01:00
# CHANGE LOG
2001-11-05 12:56:26 +01:00
# ------------------------------------------------------------
# 05.11.2001 John Lask Initial Release
2002-02-06 17:00:55 +01:00
# 02.05.2002 Miklos Nemeth OPENSSL_PATH environment; no need
# for OpenSSL libraries when creating a
# static libcurl.lib
2002-01-05 00:47:07 +01:00
#
2001-11-05 12:56:26 +01: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
2001-11-05 12:56:26 +01:00
OPENSSL_PATH = ../../openssl-0.9.6
2002-02-06 17:00:55 +01:00
!ENDIF
2001-11-05 12:56:26 +01:00
#############################################################
## Nothing more to do below this line!
2001-11-05 12:56:26 +01: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"
CFLAGS = /I "../include" /nologo /W3 /GX /D "WIN32" /D "VC6" /D "_MBCS" /D "_LIB" /YX /FD /c /D "MSDOS"
2001-11-05 12:56:26 +01:00
LNKDLL = link.exe /DLL /def:libcurl.def
LNKLIB = link.exe -lib
LFLAGS = /nologo
LINKLIBS = ws2_32.lib
SSLLIBS = libeay32.lib ssleay32.lib RSAglue.lib
CFGSET = FALSE
######################
# 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
######################
# 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)
LNK = $(LNKDLL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
CC = $(CCNODBG)
CFGSET = TRUE
!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)
2002-03-23 16:41:17 +01:00
LINKLIBS = $(LINKLIBS)
2001-11-05 12:56:26 +01:00
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"
2002-01-05 00:47:07 +01:00
LNK = $(LNKDLL) $(LFLAGSSSL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
2001-11-05 12:56:26 +01:00
LINKLIBS = $(LINKLIBS) $(SSLLIBS)
CC = $(CCNODBG) $(CFLAGSSSL)
2002-01-05 00:47:07 +01:00
CFGSET = TRUE
2001-11-05 12:56:26 +01:00
!ENDIF
######################
# 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)
LNK = $(LNKDLL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME_DEBUG).lib"
CC = $(CCDEBUG)
CFGSET = TRUE
!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)
2002-03-23 16:41:17 +01:00
LINKLIBS = $(LINKLIBS)
2001-11-05 12:56:26 +01:00
CC = $(CCDEBUG) $(CFLAGSSSL)
CFGSET = TRUE
!ENDIF
######################
# 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)
2002-01-05 00:47:07 +01:00
LNK = $(LNKDLL) $(LFLAGSSSL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME_DEBUG).lib"
2001-11-05 12:56:26 +01:00
LINKLIBS = $(LINKLIBS) $(SSLLIBS)
CC = $(CCDEBUG) $(CFLAGSSSL)
CFGSET = TRUE
!ENDIF
#######################
# Usage
#
!IF "$(CFGSET)" == "FALSE"
!MESSAGE Usage: nmake -f makefile.vc6 CFG=<config> <target>
!MESSAGE where <config> is one of:
!MESSAGE release - release static library
!MESSAGE release-dll - release dll
!MESSAGE release-ssl - release static library with ssl
!MESSAGE release-ssl-dll - release dll library with ssl
!MESSAGE debug - debug static library
!MESSAGE debug-dll - debug dll
!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 \
$(DIROBJ)\getdate.obj \
$(DIROBJ)\getenv.obj \
$(DIROBJ)\getpass.obj \
$(DIROBJ)\hostip.obj \
$(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 \
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 \
$(DIROBJ)\multi.obj
2001-11-05 12:56:26 +01:00
all : $(TARGET)
$(TARGET): $(X_OBJS)
$(LNK) $(LFLAGS) $(LINKLIBS) $(X_OBJS)
$(X_OBJS): $(DIROBJ)
$(DIROBJ):
@if not exist "$(DIROBJ)" mkdir $(DIROBJ)
.SUFFIXES: .c .obj
{.\}.c{$(DIROBJ)\}.obj:
$(CC) $(CFLAGS) /Fo"$@" $<
clean:
2001-11-05 12:56:26 +01:00
-@erase $(DIROBJ)\*.obj
-@erase vc60.idb
2001-11-22 01:12:48 +01:00
-@erase vc60.pch