1
# Makefile for UnZip 5.5 using Manx Aztec C 5.2, last revised 13 Jan 02.
1
# Makefile for UnZip 5.53 using Manx Aztec C 5.2, last revised 25 Dec 06.
2
2
# Define EXTRA=xxx on the Make command line for e.g. -dUSE_UNSHRINK.
6
DEFINES = -d AMIGA $(EXTRA)
7
VERNUMS = -d __VERSION__=5 -d __REVISION__=2
7
VERNUMS = -d __VERSION__=5 -d __REVISION__=2
8
CFLAGS = -ps -sabfmnpu -wcpr0u -d AMIGA $(EXTRA)
9
# -ps means short ints, -sabfmnpu is optimizations, -wcpr0u is type checking
10
# option flags MORE and ASM_* are now set in the Aztec section of amiga/amiga.h;
16
CFLAGS = -ps -wcpr0u -sabfmnpu $(DEFINES)
17
# -ps means short ints, -wcpr0u is type checking, -sabfmnpu is optimizations..
18
# Option flags MORE and ASM_* are now set in the Aztec section of amiga/amiga.h;
11
19
# it's cleaner, and that way any changes forces a recompile.
16
# linker arg -m suppresses warnings about overriding c.lib functions
18
OBJS = unzip.o envargs.o process.o extract.o \
19
explode.o unshrink.o unreduce.o inflate.o match.o zipinfo.o \
20
list.o globals.o crypt.o ttyio.o fileio.o crctab.o timezone.o \
21
amiga/amiga.o amiga/crc_68.o amiga/flate.o
23
XOBJS = unzip.xo process.xo extract.xo inflate.xo match.xo \
24
globals.xo crypt.xo ttyio.xo fileio.xo crctab.xo timezone.xo \
25
amiga/amiga.xo amiga/crc_68.o amiga/flate.xo
27
FOBJS = funzip.o inflate.fo crypt.fo ttyio.fo globals.fo \
28
amiga/filedate.fo amiga/crc_68.o amiga/flate.fo
21
# Linker arg -m suppresses warnings about overriding c.lib functions.
25
CFLAGD = -ps -wcpr0u -bs -s0f0n $(DEFINES)
26
# -bs is include source debugging info, -s0f0n is avoid hard-to-debug optimizations
28
# -g activates source-level debugging (a .dbg file), -w saves assembly-level symbols
30
# the directory for object files:
33
OBJS = $(O)unzip.o $(O)envargs.o $(O)process.o $(O)extract.o \
34
$(O)explode.o $(O)ubz2err.o $(O)unshrink.o $(O)unreduce.o \
35
$(O)inflate.o $(O)match.o $(O)zipinfo.o $(O)list.o $(O)globals.o \
36
$(O)crypt.o $(O)ttyio.o $(O)fileio.o $(O)crc32.o $(O)timezone.o \
37
$(O)amiga.o $(O)crc_68.o $(O)flate.o
39
XOBJS = $(O)unzip.xo $(O)process.xo $(O)extract.xo $(O)ubz2err.xo \
40
$(O)inflate.xo $(O)match.xo $(O)globals.xo $(O)crypt.xo \
41
$(O)ttyio.xo $(O)fileio.xo $(O)crc32.xo $(O)timezone.xo \
42
$(O)amiga.xo $(O)crc_68.o $(O)flate.xo
44
FOBJS = $(O)funzip.o $(O)inflate.fo $(O)crypt.fo $(O)ttyio.fo $(O)globals.fo \
45
$(O)crc32.fo $(O)filedate.fo $(O)crc_68.o $(O)flate.fo
47
DBJS = $(O)unzip.od $(O)envargs.od $(O)process.od \
48
$(O)extract.od $(O)explode.od $(O)unshrink.od $(O)unreduce.od \
49
$(O)inflate.od $(O)match.od $(O)zipinfo.od $(O)list.od $(O)globals.od \
50
$(O)crypt.od $(O)ttyio.od $(O)fileio.od $(O)crc32.od $(O)timezone.od \
51
$(O)amiga.od $(O)crc_68.o $(O)flate.o
53
XDBJS = $(O)unzip.xd $(O)process.xd $(O)extract.xd \
54
$(O)inflate.xd $(O)match.xd $(O)globals.xd $(O)crypt.xd \
55
$(O)ttyio.xd $(O)fileio.xd $(O)crc32.xd $(O)timezone.xd \
56
$(O)amiga.xd $(O)crc_68.o $(O)flate.xo
58
FDBJS = $(O)funzip.od $(O)inflate.fd $(O)crypt.fd $(O)ttyio.fd $(O)globals.fd \
59
$(O)crc32.fd $(O)filedate.fd $(O)crc_68.o $(O)flate.fo
38
69
$(CC) -o $@ -d FUNZIP $(CFLAGS) $*.c
40
all : UnZip UnZipSFX fUnZip MakeSFX
72
$(CC) -o $@ $(CFLAGD) $*.c
75
$(CC) -o $@ -d SFX $(CFLAGD) $*.c
78
$(CC) -o $@ -d FUNZIP $(CFLAGD) $*.c
82
all : Unzip UnzipSFX fUnzip MakeSFX
51
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
53
UnZipSFX : $(XOBJS) MakeSFX
54
$(LD) $(LDFLAGS) -o $@ $(XOBJS) $(LDLIBS)
57
$(LD) $(LDFLAGS) -o $@ $(FOBJS) $(LDLIBS)
92
dall: Unzip.dbg UnzipSFX.dbg fUnzip.dbg MakeSFX.dbg
104
$(LD) $(LDFLAGS) -o Unzip $(OBJS) $(LDLIBS)
107
UnzipSFX : $(XOBJS) MakeSFX
108
$(LD) $(LDFLAGS) -o UnzipSFX $(XOBJS) $(LDLIBS)
109
-@delete UnzipSFX.dbg
112
$(LD) $(LDFLAGS) -o fUnzip $(FOBJS) $(LDLIBS)
59
115
MakeSFX : amiga/makesfx.c
60
116
$(CC) $(CFLAGS) -o t:makesfx.o amiga/makesfx.c
61
117
$(LD) $(LDFLAGS) -o MakeSFX t:makesfx.o $(LDLIBS)
123
$(LD) $(LDFLAGD) -o Unzip $(DBJS) $(LDLIBS)
125
UnzipSFX.dbg : $(XDBJS) MakeSFX.dbg
126
$(LD) $(LDFLAGD) -o UnzipSFX $(XDBJS) $(LDLIBS)
128
fUnzip.dbg : $(FDBJS)
129
$(LD) $(LDFLAGD) -o fUnzip $(FDBJS) $(LDLIBS)
131
MakeSFX.dbg : amiga/makesfx.c
132
$(CC) $(CFLAGD) -o t:makesfx.o amiga/makesfx.c
133
$(LD) $(LDFLAGD) -o MakeSFX t:makesfx.o $(LDLIBS)
68
-delete amiga/G_offs.a amiga/G_offs.fa amiga/gbloffs amiga/Fgbloffs
144
-delete amiga/gbloffs amiga/Fgbloffs amiga/Xgbloffs
71
-delete UnZip fUnZip UnZipSFX MakeSFX
147
-delete UnZip fUnZip UnZipSFX MakeSFX *.dbg
149
# header dependencies:
74
151
$(OBJS) $(XOBJS) $(FOBJS) : unzip.h unzpriv.h globals.h \
75
152
amiga/amiga.h amiga/z-stat.h
77
crypt.o crypt.fo timezone.o ttyio.o ttyio.fo : zip.h
79
inflate.o inflate.fo : inflate.h
85
crypt.o crypt.fo crypt.xo ttyio.o ttyio.fo ttyio.xo : crypt.h
86
unzip.o unzip.xo funzip.o : crypt.h
87
fileio.o fileio.xo extract.o extract.xo : crypt.h
88
inflate.o inflate.fo inflate.xo amiga/filedate.fo : crypt.h
153
$(DBJS) $(XDBJS) $(FDBJS) : unzip.h unzpriv.h globals.h \
154
amiga/amiga.h amiga/z-stat.h
156
$(O)crypt.o $(O)crypt.fo $(O)timezone.o $(O)ttyio.o $(O)ttyio.fo : zip.h
157
$(O)crypt.od $(O)crypt.fd $(O)timezone.od $(O)ttyio.od $(O)ttyio.fd : zip.h
159
$(O)inflate.o $(O)inflate.fo $(O)inflate.od $(O)inflate.fd : inflate.h
161
$(O)fileio.o $(O)fileio.od : ebcdic.h
163
$(O)funzip.o $(O)funzip.od : crc32.h
164
$(O)crc32.o $(O)crc32.fo $(O)crc32.xo : crc32.h
165
$(O)crc32.od $(O)crc32.fd $(O)crc32.xd : crc32.h
166
$(O)crypt.o $(O)crypt.fo $(O)crypt.xo : crc32.h
167
$(O)crypt.od $(O)crypt.fd $(O)crypt.xd : crc32.h
168
$(O)extract.o $(O)extract.xo $(O)extract.od $(O)extract.xd : crc32.h
169
$(O)fileio.o $(O)fileio.xo $(O)fileio.od $(O)fileio.xd : crc32.h
170
$(O)process.o $(O)process.xo $(O)process.od $(O)process.xd : crc32.h
172
$(O)crypt.o $(O)crypt.fo $(O)crypt.xo : crypt.h
173
$(O)crypt.od $(O)crypt.fd $(O)crypt.xd : crypt.h
174
$(O)ttyio.o $(O)ttyio.fo $(O)ttyio.xo : crypt.h
175
$(O)ttyio.od $(O)ttyio.fd $(O)ttyio.xd : crypt.h
176
$(O)unzip.o $(O)unzip.xo $(O)funzip.o : crypt.h
177
$(O)unzip.od $(O)unzip.xd $(O)funzip.od : crypt.h
178
$(O)fileio.o $(O)fileio.xo $(O)extract.o $(O)extract.xo : crypt.h
179
$(O)fileio.od $(O)fileio.xd $(O)extract.od $(O)extract.xd : crypt.h
180
$(O)inflate.o $(O)inflate.fo $(O)inflate.xo $(O)filedate.fo : crypt.h
181
$(O)inflate.od $(O)inflate.fd $(O)inflate.xd $(O)filedate.fd : crypt.h
89
182
amiga/gbloffs amiga/Fgbloffs amiga/Xgbloffs : crypt.h
91
crypt.o crypt.fo crypt.xo ttyio.o ttyio.fo ttyio.xo : ttyio.h
92
funzip.o fileio.o fileio.xo : ttyio.h
94
timezone.o timezone.xo amiga/amiga.o amiga/amiga.xo : timezone.h
96
unzip.o unzip.xo : unzvers.h consts.h
184
$(O)crypt.o $(O)crypt.fo $(O)crypt.xo : ttyio.h
185
$(O)crypt.od $(O)crypt.fd $(O)crypt.xd : ttyio.h
186
$(O)ttyio.o $(O)ttyio.fo $(O)ttyio.xo : ttyio.h
187
$(O)ttyio.od $(O)ttyio.fd $(O)ttyio.xd : ttyio.h
188
$(O)funzip.o $(O)fileio.o $(O)fileio.xo : ttyio.h
189
$(O)funzip.od $(O)fileio.od $(O)fileio.xd : ttyio.h
191
$(O)timezone.o $(O)timezone.xo $(O)amiga.o $(O)amiga.xo : timezone.h
192
$(O)timezone.od $(O)timezone.xd $(O)amiga.od $(O)amiga.xd : timezone.h
194
$(O)unzip.o $(O)unzip.xo $(O)unzip.od $(O)unzip.xd : unzvers.h consts.h
99
197
# Special case object files:
101
amiga/amiga.o : amiga/filedate.c amiga/stat.c amiga/amiga.c unzvers.h
102
rx > env:VersionDate "say '""'translate(date('E'), '.', '/')'""'"
103
$(CC) -o amiga/amiga.o $(CFLAGS) $(VERNUMS) amiga/amiga.c
105
amiga/amiga.xo : amiga/filedate.c amiga/stat.c amiga/amiga.c unzvers.h
106
$(CC) -o amiga/amiga.xo $(CFLAGS) $(VERNUMS) -d SFX amiga/amiga.c
108
amiga/crc_68.o : amiga/crc_68.a
109
as -n -o amiga/crc_68.o amiga/crc_68.a
111
amiga/flate.o : amiga/flate.a amiga/gbloffs
112
amiga/gbloffs > amiga/G_offs.a
113
as -n -o amiga/flate.o -eINT16 amiga/flate.a
115
amiga/flate.fo : amiga/flate.a amiga/Fgbloffs
116
amiga/Fgbloffs > amiga/G_offs.a
117
as -n -o amiga/flate.fo -eINT16 -eAZTEC amiga/flate.a
119
amiga/flate.xo : amiga/flate.a amiga/Xgbloffs
120
amiga/Xgbloffs > amiga/G_offs.a
121
as -n -o amiga/flate.xo -eINT16 amiga/flate.a
199
$(O)amiga.o : amiga/filedate.c amiga/stat.c amiga/amiga.c unzvers.h
200
rx > env:VersionDate "say '""'translate(date('E'), '.', '/')'""'"
201
$(CC) -o $(O)amiga.o $(CFLAGS) $(VERNUMS) amiga/amiga.c
203
$(O)amiga.xo : amiga/filedate.c amiga/stat.c amiga/amiga.c unzvers.h
204
$(CC) -o $(O)amiga.xo $(CFLAGS) $(VERNUMS) -d SFX amiga/amiga.c
206
$(O)amiga.od : amiga/filedate.c amiga/stat.c amiga/amiga.c unzvers.h
207
rx > env:VersionDate "say '""'translate(date('E'), '.', '/')'""'"
208
$(CC) -o $(O)amiga.od $(CFLAGD) $(VERNUMS) amiga/amiga.c
210
$(O)amiga.xd : amiga/filedate.c amiga/stat.c amiga/amiga.c unzvers.h
211
$(CC) -o $(O)amiga.xd $(CFLAGD) $(VERNUMS) -d SFX amiga/amiga.c
213
$(O)crc_68.o : amiga/crc_68.a
214
as -n -o $(O)crc_68.o amiga/crc_68.a
215
# no debug version of crc_68
217
$(O)filedate.fo : amiga/filedate.c
218
$(CC) -o $(O)filedate.fo -d FUNZIP $(CFLAGS) amiga/filedate.c
220
$(O)filedate.fd : amiga/filedate.c
221
$(CC) -o $(O)filedate.fd -d FUNZIP $(CFLAGD) amiga/filedate.c
223
# The file t:G_offs.a is generated on the fly by programs we compile
224
# and then run, and then it's included into amiga/flate.a to provide
225
# definitions for it. There are no debug versions of flate.o.
227
$(O)flate.o : amiga/flate.a amiga/gbloffs
228
amiga/gbloffs > t:G_offs.a
229
as -n -o $(O)flate.o -eINT16 amiga/flate.a
232
$(O)flate.fo : amiga/flate.a amiga/Fgbloffs
233
amiga/Fgbloffs > t:G_offs.a
234
as -n -o $(O)flate.fo -eINT16 -eFUNZIP -eAZTEC amiga/flate.a
237
$(O)flate.xo : amiga/flate.a amiga/Xgbloffs
238
amiga/Xgbloffs > t:G_offs.a
239
as -n -o $(O)flate.xo -eINT16 -eSFX amiga/flate.a
242
# Here are the programs that generate different versions of G_offs.a:
123
244
amiga/gbloffs : gbloffs.c unzip.h unzpriv.h globals.h amiga/amiga.h crypt.h
124
245
$(CC) -o t:gbloffs.o $(CFLAGS) gbloffs.c