aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.vc6
blob: 34f6f62b259abcf7096b2fc7aa6231d6bb639f5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
########################################################
## 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.1.4
!ENDIF

!IFNDEF OPENSSL_PATH
OPENSSL_PATH = ../../openssl-0.9.9d
!ENDIF

########################################################
## Nothing more to do below this line!
CFLAGSZLIB = /D "HAVE_ZLIB_H" /D "HAVE_ZLIB" /D "HAVE_LIBZ" /I "$(ZLIB_PATH)"
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
ZLIBLIBS   = zlib.lib
SSLINC     = /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
CFLAGSSSL  = /D "USE_SSLEAY"
LFLAGSSSL  = /LIBPATH:"$(OPENSSL_PATH)/out32"
SSLLIBS    = libeay32.lib ssleay32.lib gdi32.lib 

## Release
CCR = cl.exe /MD /O2 /D "NDEBUG"
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 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:I386
RESFLAGS = /i "../include"
LINKLIBS = wsock32.lib libcurl.lib winmm.lib
LINKLIBS_DEBUG = wsock32.lib libcurld.lib winmm.lib

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

!IF "$(CFG)" == "release-zlib"
CFLAGS = $(CFLAGS) $(CFLAGSZLIB)
LINKLIBS = $(LINKLIBS) $(ZLIBLIBS)
LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(ZLIBLIBS)
LFLAGS = $(LFLAGS) $(LFLAGSZLIB)
!ENDIF

######################
# release-ssl
 
!IF "$(CFG)" == "release-ssl"
CFLAGS = $(CFLAGS) $(CFLAGSSSL)
LINKLIBS  = $(LINKLIBS) $(SSLLIBS)
LINKLIBS_DEBUG  = $(LINKLIBS_DEBUG) $(SSLLIBS)
LFLAGS = $(LFLAGS) $(LFLAGSSSL)
!ENDIF

######################
# release-libcurl-ssl-dll

!IF "$(CFG)" == "release-libcurl-ssl-dll"
CFLAGS = $(CFLAGS) $(CFLAGSSSL)
LINKLIBS  = $(LINKLIBS) $(SSLLIBS)
LINKLIBS_DEBUG  = $(LINKLIBS_DEBUG) $(SSLLIBS)
LFLAGS = $(LFLAGS) $(LFLAGSSSL)
!ENDIF

######################
# release-ssl-zlib
 
!IF "$(CFG)" == "release-ssl-zlib"
CFLAGS = $(CFLAGS) $(CFLAGSSSL) $(CFLAGSZLIB)
LINKLIBS  = $(LINKLIBS) $(SSLLIBS) $(ZLIBLIBS)
LINKLIBS_DEBUG  = $(LINKLIBS_DEBUG) $(SSLLIBS) $(ZLIBLIBS)
LFLAGS = $(LFLAGS) $(LFLAGSSSL) $(LFLAGSZLIB)
!ENDIF


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: timeval.c
	$(CCR) $(CFLAGS) /Fo"$@" 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)