mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
187 lines
5.2 KiB
Makefile
187 lines
5.2 KiB
Makefile
########################################################
|
|
# $Id: Makefile.vc6,v 1.19 2004/11/14 13:48:15 giva Exp $
|
|
#
|
|
## 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.
|
|
##
|
|
## Comments to: Troy Engel <tengel@sonic.net>
|
|
## Updated by: Craig Davison <cd@securityfocus.com>
|
|
## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>
|
|
## winmm.lib added by Miklos Nemeth <mnemeth@kfkisystems.com> to support
|
|
## timeGetTime() in timeval.c
|
|
|
|
PROGRAM_NAME = curl.exe
|
|
|
|
!IFNDEF ZLIB_PATH
|
|
ZLIB_PATH = ../../zlib-1.2.1
|
|
!ENDIF
|
|
|
|
!IFNDEF OPENSSL_PATH
|
|
OPENSSL_PATH = ../../openssl-0.9.7d
|
|
!ENDIF
|
|
|
|
########################################################
|
|
## Nothing more to do below this line!
|
|
CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
|
|
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
|
ZLIBLIBS = zlib.lib
|
|
SSLINC = /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
|
|
CFLAGSSSL = /DUSE_SSLEAY
|
|
LFLAGSSSL = /LIBPATH:"$(OPENSSL_PATH)/out32"
|
|
SSLLIBS = libeay32.lib ssleay32.lib gdi32.lib
|
|
|
|
## Release
|
|
CCR = cl.exe /MD /O2 /DNDEBUG
|
|
LINKR = link.exe /incremental:no /libpath:../lib
|
|
RCR = rc.exe /dCURLDEBUG=0
|
|
|
|
## Debug
|
|
CCD = cl.exe /MDd /Gm /ZI /Od /D_DEBUG /GZ
|
|
LINKD = link.exe /incremental:yes /debug /libpath:../lib
|
|
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
|
|
|
|
|
|
RELEASE_OBJS= \
|
|
hugehelpr.obj \
|
|
writeoutr.obj \
|
|
urlglobr.obj \
|
|
getpassr.obj \
|
|
homedirr.obj \
|
|
timevalr.obj \
|
|
strtoofftr.obj \
|
|
mainr.obj \
|
|
curlr.res
|
|
|
|
DEBUG_OBJS= \
|
|
hugehelpd.obj \
|
|
writeoutd.obj \
|
|
urlglobd.obj \
|
|
getpassd.obj \
|
|
homedird.obj \
|
|
timevald.obj \
|
|
strtoofftd.obj \
|
|
maind.obj \
|
|
curld.res
|
|
|
|
#################################################
|
|
# release-zlib (static libcurl + zlib)
|
|
|
|
!IF "$(CFG)" == "release-zlib"
|
|
CFLAGS = $(CFLAGS) $(CFLAGSZLIB) /DCURL_STATICLIB
|
|
LINKLIBS = libcurl.lib $(ZLIBLIBS)
|
|
LINKLIBS_DEBUG = libcurld.lib $(ZLIBLIBS)
|
|
LFLAGS = $(LFLAGS) $(LFLAGSZLIB)
|
|
!ENDIF
|
|
|
|
#################################################
|
|
# release-ssl (static libcurl + ssl)
|
|
|
|
!IF "$(CFG)" == "release-ssl"
|
|
CFLAGS = $(CFLAGS) $(CFLAGSSSL) /DCURL_STATICLIB
|
|
LINKLIBS = libcurl.lib $(SSLLIBS)
|
|
LINKLIBS_DEBUG = libcurld.lib $(SSLLIBS)
|
|
LFLAGS = $(LFLAGS) $(LFLAGSSSL)
|
|
!ENDIF
|
|
|
|
#################################################
|
|
# release-libcurl-ssl-dll (libcurl.dll + ssl)
|
|
|
|
!IF "$(CFG)" == "release-libcurl-ssl-dll"
|
|
CFLAGS = $(CFLAGS) $(CFLAGSSSL)
|
|
LINKLIBS = libcurl_imp.lib $(SSLLIBS)
|
|
LINKLIBS_DEBUG = libcurld_imp.lib $(SSLLIBS)
|
|
LFLAGS = $(LFLAGS) $(LFLAGSSSL)
|
|
!ENDIF
|
|
|
|
#################################################
|
|
# release-ssl-zlib (static libcurl + ssl + zlib)
|
|
|
|
!IF "$(CFG)" == "release-ssl-zlib"
|
|
CFLAGS = $(CFLAGS) $(CFLAGSSSL) $(CFLAGSZLIB) /DCURL_STATICLIB
|
|
LINKLIBS = libcurl.lib $(SSLLIBS) $(ZLIBLIBS)
|
|
LINKLIBS_DEBUG = libcurld.lib $(SSLLIBS) $(ZLIBLIBS)
|
|
LFLAGS = $(LFLAGS) $(LFLAGSSSL) $(LFLAGSZLIB)
|
|
!ENDIF
|
|
|
|
#################################################
|
|
# If CFG not specified, use static libs
|
|
|
|
!IF "$(CFG)." == "."
|
|
CFLAGS = $(CFLAGS) /DCURL_STATICLIB
|
|
LINKLIBS = libcurl.lib
|
|
LINKLIBS_DEBUG = libcurld.lib
|
|
!ENDIF
|
|
|
|
|
|
LINKLIBS = $(LINKLIBS) wsock32.lib winmm.lib
|
|
LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) wsock32.lib winmm.lib
|
|
|
|
all : release
|
|
|
|
release: $(RELEASE_OBJS)
|
|
$(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
|
|
|
|
debug: $(DEBUG_OBJS)
|
|
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
|
|
|
|
## 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
|
|
timevalr.obj: ../lib/timeval.c
|
|
$(CCR) $(CFLAGS) /Fo"$@" ../lib/timeval.c
|
|
strtoofftr.obj: ../lib/strtoofft.c
|
|
$(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.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
|
|
timevald.obj: ../lib/timeval.c
|
|
$(CCR) $(CFLAGS) /Fo"$@" ../lib/timeval.c
|
|
strtoofftd.obj: ../lib/strtoofft.c
|
|
$(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
|
|
maind.obj: main.c
|
|
$(CCD) $(CFLAGS) /Fo"$@" main.c
|
|
curld.res : curl.rc
|
|
$(RCD) $(RESFLAGS) /Fo"$@" curl.rc
|
|
|
|
clean:
|
|
-@erase $(RELEASE_OBJS)
|
|
-@erase $(DEBUG_OBJS)
|
|
-@erase vc60.idb
|
|
-@erase vc60.pdb
|
|
-@erase vc60.pch
|
|
-@erase vc70.idb
|
|
-@erase vc70.pch
|
|
-@erase curl.ilk
|
|
-@erase curl.pdb
|
|
|
|
distrib: clean
|
|
-@erase $(PROGRAM_NAME)
|