~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to zip/unzip/win32/Makefile.wat

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# WMAKE makefile for Windows 95 and Windows NT (Intel only)
2
 
# using Watcom C/C++ v11.0+, by Paul Kienitz, last revised 17 Feb 02.
3
 
# Makes UnZip.exe, fUnZip.exe, and UnZipSFX.exe.
4
 
#
5
 
# Invoke from UnZip source dir with "WMAKE -F WIN32\MAKEFILE.WAT [targets]"
6
 
# To build with debug info use "WMAKE DEBUG=1 ..."
7
 
# To build with no assembly modules use "WMAKE NOASM=1 ..."
8
 
# To support unshrinking use "WMAKE LAWSUIT=1 ..."
9
 
# To support unreducing, get the real unreduce.c and go "WMAKE OFFEND_RMS=1 ..."
10
 
# To use Info-Zip's generic timezone functions use "WMAKE USE_IZTIMEZONE=1 ..."
11
 
#
12
 
# Other options to be fed to the compiler can be specified in an environment
13
 
# variable called LOCAL_UNZIP.
14
 
 
15
 
variation = $(%LOCAL_UNZIP)
16
 
 
17
 
# Stifle annoying "Delete this file?" questions when errors occur:
18
 
.ERASE
19
 
 
20
 
.EXTENSIONS:
21
 
.EXTENSIONS: .exe .obj .obx .c .h .asm
22
 
 
23
 
# We maintain multiple sets of object files in different directories so that
24
 
# we can compile msdos, dos/4gw or pmode/w, and win32 versions of UnZip without
25
 
# their object files interacting.  The following var must be a directory name
26
 
# ending with a backslash.  All object file names must include this macro
27
 
# at the beginning, for example "$(O)foo.obj".
28
 
 
29
 
!ifdef DEBUG
30
 
OBDIR = od32w
31
 
!else
32
 
OBDIR = ob32w
33
 
!endif
34
 
O = $(OBDIR)\   # comment here so backslash won't continue the line
35
 
 
36
 
!ifdef LAWSUIT
37
 
cvars = $+$(cvars)$- -DUSE_UNSHRINK
38
 
avars = $+$(avars)$- -DUSE_UNSHRINK
39
 
# "$+$(foo)$-" means expand foo as it has been defined up to now; normally,
40
 
# this Make defers inner expansion until the outer macro is expanded.
41
 
!endif
42
 
!ifdef OFFEND_RMS
43
 
cvars = $+$(cvars)$- -DUSE_SMITH_CODE
44
 
avars = $+$(avars)$- -DUSE_SMITH_CODE
45
 
!endif
46
 
 
47
 
!ifndef USE_IZTIMEZONE
48
 
#default: do not use the IZ timezone replacement
49
 
USE_IZTIMEZONE=0
50
 
!endif
51
 
 
52
 
# The assembly hot-spot code in crc_i386.asm is optional.  This section
53
 
# controls its usage.
54
 
 
55
 
!ifdef NOASM
56
 
crcob = $(O)crc32.obj
57
 
!else   # !NOASM
58
 
cvars = $+$(cvars)$- -DASM_CRC
59
 
crcob = $(O)crc_i386.obj
60
 
!endif
61
 
 
62
 
!if $(USE_IZTIMEZONE) != 0
63
 
cvars = $+$(cvars)$- -DW32_USE_IZ_TIMEZONE
64
 
TIMEZONE_OBJU = $(O)timezone.obj
65
 
TIMEZONE_OBJX = $(O)timezone.obx
66
 
TIMEZONE_OBJD = $(O)timezonl.obj
67
 
TIMEZONE_OBLX = $(O)timezolx.obj
68
 
TIMEZONE_OBJB = $(O)timezonb.obj
69
 
!else
70
 
TIMEZONE_OBJU =
71
 
TIMEZONE_OBJX =
72
 
TIMEZONE_OBJD =
73
 
TIMEZONE_OBLX =
74
 
TIMEZONE_OBJB =
75
 
!endif
76
 
 
77
 
# Our object files.  OBJU is for UnZip, OBJX for UnZipSFX, OBJF for fUnZip:
78
 
 
79
 
OBJU1 = $(O)unzip.obj $(crcob) $(O)crctab.obj $(O)crypt.obj $(O)envargs.obj
80
 
OBJU2 = $(O)explode.obj $(O)extract.obj $(O)fileio.obj $(O)globals.obj
81
 
OBJU3 = $(O)inflate.obj $(O)list.obj $(O)match.obj $(O)process.obj
82
 
OBJU4 = $(O)ttyio.obj $(O)unreduce.obj $(O)unshrink.obj $(O)zipinfo.obj
83
 
OBJUS = $(O)win32.obj $(O)nt.obj $(TIMEZONE_OBJU)
84
 
OBJU  = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJU4) $(OBJUS)
85
 
 
86
 
OBJX1 = $(O)unzip.obx $(crcob) $(O)crctab.obx $(O)crypt.obx $(O)extract.obx
87
 
OBJX2 = $(O)fileio.obx $(O)globals.obx $(O)inflate.obx $(O)match.obx
88
 
OBJX3 = $(O)process.obx $(O)ttyio.obx
89
 
OBJXS = $(O)win32.obx $(O)nt.obx $(TIMEZONE_OBJX)
90
 
OBJX  = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJXS)
91
 
 
92
 
OBJF1 = $(O)funzip.obj $(crcob) $(O)cryptf.obj $(O)globalsf.obj
93
 
OBJF2 = $(O)inflatef.obj $(O)ttyiof.obj
94
 
OBJFS = $(O)win32f.obj
95
 
OBJF  = $(OBJF1) $(OBJF2) $(OBJFS)
96
 
 
97
 
OBJD1 = $(O)api.obj $(crcob) $(O)crctabl.obj $(O)cryptl.obj $(O)explodel.obj
98
 
OBJD2 = $(O)extractl.obj $(O)fileiol.obj $(O)globalsl.obj $(O)inflatel.obj
99
 
OBJD3 = $(O)listl.obj $(O)matchl.obj $(O)processl.obj
100
 
OBJD4 = $(O)unreducl.obj $(O)unshrnkl.obj $(O)zipinfol.obj
101
 
OBJDS = $(O)win32l.obj $(O)ntl.obj $(O)windll.obj $(TIMEZONE_OBJD)
102
 
OBJD  = $(OBJD1) $(OBJD2) $(OBJD3) $(OBJD4) $(OBJDS)
103
 
 
104
 
UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
105
 
WINDLL_H = windll/windll.h windll/decs.h windll/structs.h
106
 
WINDLL_DEF = windll/windll32.def
107
 
WINDLL_IMP_H = windll/decs.h windll/structs.h
108
 
 
109
 
# Now we have to pick out the proper compiler and options for it.
110
 
 
111
 
cc     = wcc386
112
 
link   = wlink
113
 
asm    = wasm
114
 
# Use Pentium Pro timings, register args, static strings in code, high strictness:
115
 
cflags = -bt=NT -6r -zt -zq -wx
116
 
aflags = -bt=NT -mf -3 -zq
117
 
lflags = sys NT
118
 
lflags_dll = sys NT_DLL
119
 
cvars  = $+$(cvars)$- -DWIN32 $(variation)
120
 
avars  = $+$(avars)$- $(variation)
121
 
 
122
 
# Specify optimizations, or a nonoptimized debugging version:
123
 
 
124
 
!ifdef DEBUG
125
 
cdebug = -od -d2
126
 
cdebux = -od -d2
127
 
ldebug = d w all op symf
128
 
!else
129
 
cdebug = -s -obhikl+rt -oe=100 -zp8
130
 
cdebux = -s -obhiklrs
131
 
# -oa helps slightly but might be dangerous.
132
 
ldebug = op el
133
 
!endif
134
 
 
135
 
CFLAGS_FU = $(cdebug) $(cflags) $(cvars) -DFUNZIP
136
 
CFLAGS_DL = $(cdebug) $(cflags) $(cvars) -bd -bm -DWINDLL -DDLL
137
 
 
138
 
# How to compile sources:
139
 
.c.obx:
140
 
        $(cc) $(cdebux) $(cflags) $(cvars) -DSFX $[@ -fo=$@
141
 
 
142
 
.c.obj:
143
 
        $(cc) $(cdebug) $(cflags) $(cvars) $[@ -fo=$@
144
 
 
145
 
# Here we go!  By default, make all targets:
146
 
all: UnZip.exe fUnZip.exe UnZipSFX.exe
147
 
 
148
 
# Convenient shorthand options for single targets:
149
 
u:   UnZip.exe     .SYMBOLIC
150
 
f:   fUnZip.exe    .SYMBOLIC
151
 
x:   UnZipSFX.exe  .SYMBOLIC
152
 
d:   UnZip32.dll   .SYMBOLIC
153
 
 
154
 
UnZip.exe:      $(OBDIR) $(OBJU)
155
 
        $(link) $(lflags) $(ldebug) name $@ file {$(OBJU)}
156
 
 
157
 
UnZipSFX.exe:   $(OBDIR) $(OBJX)
158
 
        $(link) $(lflags) $(ldebug) name $@ file {$(OBJX)}
159
 
 
160
 
fUnZip.exe:     $(OBDIR) $(OBJF)
161
 
        $(link) $(lflags) $(ldebug) name $@ file {$(OBJF)}
162
 
 
163
 
UnZip32.dll:    $(OBDIR) $(OBJD)
164
 
        $(link) $(lflags_dll) $(ldebug) name $@ file {$(OBJD)}
165
 
 
166
 
uzexampl.exe:   $(OBDIR) $(O)uzexampl.obj
167
 
        $(link) $(lflags) $(ldebug) name $@ file {$(O)uzexampl.obj}
168
 
 
169
 
# Source dependencies:
170
 
 
171
 
#       generic (UnZip, fUnZip):
172
 
 
173
 
$(O)crc32.obj:    crc32.c $(UNZIP_H) zip.h
174
 
$(O)crctab.obj:   crctab.c $(UNZIP_H) zip.h
175
 
$(O)crypt.obj:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
176
 
$(O)envargs.obj:  envargs.c $(UNZIP_H)
177
 
$(O)explode.obj:  explode.c $(UNZIP_H)
178
 
$(O)extract.obj:  extract.c $(UNZIP_H) crypt.h
179
 
$(O)fileio.obj:   fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
180
 
$(O)funzip.obj:   funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
181
 
$(O)globals.obj:  globals.c $(UNZIP_H)
182
 
$(O)inflate.obj:  inflate.c inflate.h $(UNZIP_H)
183
 
$(O)list.obj:     list.c $(UNZIP_H)
184
 
$(O)match.obj:    match.c $(UNZIP_H)
185
 
$(O)process.obj:  process.c $(UNZIP_H)
186
 
$(O)timezone.obj: timezone.c $(UNZIP_H) zip.h timezone.h
187
 
$(O)ttyio.obj:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
188
 
$(O)unreduce.obj: unreduce.c $(UNZIP_H)
189
 
$(O)unshrink.obj: unshrink.c $(UNZIP_H)
190
 
$(O)unzip.obj:    unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
191
 
$(O)zipinfo.obj:  zipinfo.c $(UNZIP_H)
192
 
 
193
 
#       UnZipSFX variants:
194
 
 
195
 
$(O)crc32.obx:    crc32.c $(UNZIP_H) zip.h
196
 
$(O)crctab.obx:   crctab.c $(UNZIP_H) zip.h
197
 
$(O)crypt.obx:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
198
 
$(O)extract.obx:  extract.c $(UNZIP_H) crypt.h
199
 
$(O)fileio.obx:   fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
200
 
$(O)globals.obx:  globals.c $(UNZIP_H)
201
 
$(O)inflate.obx:  inflate.c inflate.h $(UNZIP_H)
202
 
$(O)match.obx:    match.c $(UNZIP_H)
203
 
$(O)process.obx:  process.c $(UNZIP_H)
204
 
$(O)timezone.obx: timezone.c $(UNZIP_H) zip.h timezone.h
205
 
$(O)ttyio.obx:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
206
 
$(O)unzip.obx:    unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
207
 
 
208
 
# Special case object files:
209
 
 
210
 
$(O)win32.obj:    win32\win32.c $(UNZIP_H) win32\nt.h
211
 
        $(cc) $(cdebug) $(cflags) $(cvars) win32\win32.c -fo=$@
212
 
 
213
 
$(O)win32.obx:    win32\win32.c $(UNZIP_H) win32\nt.h
214
 
        $(cc) $(cdebux) $(cflags) $(cvars) -DSFX win32\win32.c -fo=$@
215
 
 
216
 
$(O)nt.obj:    win32\nt.c $(UNZIP_H) win32\nt.h
217
 
        $(cc) $(cdebug) $(cflags) $(cvars) win32\nt.c -fo=$@
218
 
 
219
 
$(O)nt.obx:    win32\nt.c $(UNZIP_H) win32\nt.h
220
 
        $(cc) $(cdebux) $(cflags) $(cvars) -DSFX win32\nt.c -fo=$@
221
 
 
222
 
$(O)crc_i386.obj: win32\crc_i386.asm
223
 
        $(asm) $(aflags) $(avars) win32\crc_i386.asm -fo=$@
224
 
 
225
 
# Variant object files for fUnZip:
226
 
 
227
 
$(O)cryptf.obj:   crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
228
 
        $(cc) $(CFLAGS_FU) crypt.c -fo=$@
229
 
 
230
 
$(O)globalsf.obj: globals.c $(UNZIP_H)
231
 
        $(cc) $(CFLAGS_FU) globals.c -fo=$@
232
 
 
233
 
$(O)inflatef.obj: inflate.c inflate.h $(UNZIP_H) crypt.h
234
 
        $(cc) $(CFLAGS_FU) inflate.c -fo=$@
235
 
 
236
 
$(O)ttyiof.obj:   ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
237
 
        $(cc) $(CFLAGS_FU) ttyio.c -fo=$@
238
 
 
239
 
$(O)win32f.obj:   win32\win32.c $(UNZIP_H)
240
 
        $(cc) $(CFLAGS_FU) win32\win32.c -fo=$@
241
 
 
242
 
# DLL compilation section
243
 
$(O)api.obj:      api.c $(UNZIP_H) $(WINDLL_H) unzvers.h
244
 
        $(cc) $(CFLAGS_DL) api.c -fo=$@
245
 
$(O)crc32l.obj:   crc32.c $(UNZIP_H) zip.h
246
 
        $(cc) $(CFLAGS_DL) crc32.c -fo=$@
247
 
$(O)crctabl.obj:  crctab.c $(UNZIP_H) zip.h
248
 
        $(cc) $(CFLAGS_DL) crctab.c -fo=$@
249
 
$(O)cryptl.obj:   crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
250
 
        $(cc) $(CFLAGS_DL) crypt.c -fo=$@
251
 
$(O)explodel.obj: explode.c $(UNZIP_H)
252
 
        $(cc) $(CFLAGS_DL) explode.c -fo=$@
253
 
$(O)extractl.obj: extract.c $(UNZIP_H) $(WINDLL_H) crypt.h
254
 
        $(cc) $(CFLAGS_DL) extract.c -fo=$@
255
 
$(O)fileiol.obj:  fileio.c $(UNZIP_H) $(WINDLL_H) crypt.h ttyio.h ebcdic.h
256
 
        $(cc) $(CFLAGS_DL) fileio.c -fo=$@
257
 
$(O)globalsl.obj: globals.c $(UNZIP_H)
258
 
        $(cc) $(CFLAGS_DL) globals.c -fo=$@
259
 
$(O)inflatel.obj: inflate.c inflate.h $(UNZIP_H)
260
 
        $(cc) $(CFLAGS_DL) inflate.c -fo=$@
261
 
$(O)listl.obj:    list.c $(UNZIP_H) $(WINDLL_H)
262
 
        $(cc) $(CFLAGS_DL) list.c -fo=$@
263
 
$(O)matchl.obj:   match.c $(UNZIP_H)
264
 
        $(cc) $(CFLAGS_DL) match.c -fo=$@
265
 
$(O)processl.obj: process.c $(UNZIP_H) $(WINDLL_H)
266
 
        $(cc) $(CFLAGS_DL) process.c -fo=$@
267
 
$(O)timezonl.obj: timezone.c $(UNZIP_H) zip.h timezone.h
268
 
        $(cc) $(CFLAGS_DL) timezone.c -fo=$@
269
 
$(O)unreducl.obj: unreduce.c $(UNZIP_H)
270
 
        $(cc) $(CFLAGS_DL) unreduce.c -fo=$@
271
 
$(O)unshrnkl.obj: unshrink.c $(UNZIP_H)
272
 
        $(cc) $(CFLAGS_DL) unshrink.c -fo=$@
273
 
$(O)zipinfol.obj: zipinfo.c $(UNZIP_H)
274
 
        $(cc) $(CFLAGS_DL) zipinfo.c -fo=$@
275
 
 
276
 
$(O)win32l.obj:   win32\win32.c $(UNZIP_H) win32\nt.h
277
 
        $(cc) $(CFLAGS_DL) -I. win32\win32.c -fo=$@
278
 
 
279
 
$(O)ntl.obj:      win32\nt.c $(UNZIP_H) win32\nt.h
280
 
        $(cc) $(CFLAGS_DL) -I. win32\nt.c -fo=$@
281
 
 
282
 
$(O)windll.obj:   windll\windll.c $(UNZIP_H) $(WINDLL_H)
283
 
$(O)windll.obj:   crypt.h unzvers.h consts.h
284
 
        $(cc) $(CFLAGS_DL) -I. windll\windll.c -fo=$@
285
 
 
286
 
windll.res:     windll\windll.rc unzvers.h
287
 
        $(rc) /l 0x409 /fo$@ /i windll /d WIN32 windll\windll.rc
288
 
 
289
 
# Windll command line example:
290
 
 
291
 
$(O)uzexampl.obj: windll/uzexampl.c windll/uzexampl.h
292
 
        $(cc) $(cdebug) $(cflags) $(cvars) windll\uzexampl.c -fo=$@
293
 
 
294
 
# Creation of subdirectory for intermediate files
295
 
$(OBDIR):
296
 
        -mkdir $@
297
 
 
298
 
# Unwanted file removal:
299
 
 
300
 
clean:     .SYMBOLIC
301
 
        del $(O)*.ob?
302
 
 
303
 
cleaner:   clean  .SYMBOLIC
304
 
        del UnZip.exe
305
 
        del fUnZip.exe
306
 
        del UnZipSFX.exe
307
 
        del UnZip32.dll