1
# Makefile for UnZip, UnZipSFX, ZipInfo and fUnZip (5.5 or later)
2
# last modified: 01 Mar 2004
4
# add -g to CC to debug
5
# add -d to BIND to debug
14
# CFLAGS flags for C compile
15
# LFLAGS1 flags after output file spec, before obj file list
16
# LFLAGS2 flags after obj file list (libraries, etc)
19
CBASE = -throwback -wn -DNO_STRNICMP
20
CFLAGS = $(CBASE) -IC:,@.
21
ASMFLAGS = -Throwback -Stamp -NoCache -CloseExec -quit
23
LFLAGS2 = $(LIB) C:o.Stubs
26
OBJS1 = unzip.o crc32.o crctab.o crypt.o envargs.o explode.o
27
OBJS2 = extract.o fileio.o globals.o inflate.o list.o match.o
28
OBJS3 = process.o ttyio.o unreduce.o unshrink.o zipinfo.o
29
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) riscos.o swiven.o acorn.o
30
OBJF = funzip.o crc32.o cryptf.o globalsf.o inflatef.o ttyiof.o \
32
OBJX = unzipsfx.o crc32.o crctab.o crypt_.o extract_.o fileio_.o globals.o \
33
inflate.o match.o process_.o ttyio.o acorn_.o swiven.o riscos_.o
35
UNZIP_H = unzip.h unzpriv.h globals.h acorn/riscos.h acorn/swiven.h
37
all: unzip funzip unzipsfx
40
install: unzip funzip unzipsfx
41
$(SQUEEZE) unzip %.unzip
42
$(SQUEEZE) funzip %.funzip
43
$(SQUEEZE) unzipsfx unzipsfx
44
copy %.unzip %.zipinfo ~CVF
51
$(ASM) $(ASMFLAGS) -from @*.s -to @*.o
53
# rules for unzip and funzip
54
crc32.o: crc32.c $(UNZIP_H) zip.h
55
crctab.o: crctab.c $(UNZIP_H) zip.h
56
crypt.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
57
envargs.o: envargs.c $(UNZIP_H)
58
explode.o: explode.c $(UNZIP_H)
59
extract.o: extract.c $(UNZIP_H) crypt.h
60
fileio.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
61
funzip.o: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
62
globals.o: globals.c $(UNZIP_H)
63
inflate.o: inflate.c inflate.h $(UNZIP_H)
64
list.o: list.c $(UNZIP_H)
65
match.o: match.c $(UNZIP_H)
66
process.o: process.c $(UNZIP_H)
67
ttyio.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
68
unreduce.o: unreduce.c $(UNZIP_H)
69
unshrink.o: unshrink.c $(UNZIP_H)
70
unzip.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
71
zipinfo.o: zipinfo.c $(UNZIP_H)
73
crypt_.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
74
$(CC) $(CFLAGS) -DSFX -c c.crypt -o o.crypt_
75
extract_.o: extract.c $(UNZIP_H) crypt.h
76
$(CC) $(CFLAGS) -DSFX -c c.extract -o o.extract_
77
fileio_.o: fileio.c $(UNZIP_H) crypt.h
78
$(CC) $(CFLAGS) -DSFX -c c.fileio -o o.fileio_
79
globals_.o: globals.c $(UNZIP_H)
80
$(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globals_
81
inflate_.o: inflate.c inflate.h $(UNZIP_H) crypt.h
82
$(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflate_
83
process_.o: process.c $(UNZIP_H)
84
$(CC) $(CFLAGS) -DSFX -c c.process -o o.process_
85
ttyio_.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
86
$(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyio_
88
unzipsfx.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
89
$(CC) $(CFLAGS) -DSFX -c c.unzip -o o.unzipsfx
91
o.cryptf: c.crypt $(UNZIP_H) h.zip h.crypt h.ttyio
92
$(CC) $(CFLAGS) -DFUNZIP -c c.crypt -o o.cryptf
93
o.globalsf: c.globals $(UNZIP_H)
94
$(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globalsf
95
o.inflatef: c.inflate h.inflate $(UNZIP_H) h.crypt
96
$(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflatef
97
o.ttyiof: c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio
98
$(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyiof
100
acorn.o: acorn/acorn.c $(UNZIP_H)
101
$(CC) $(CFLAGS) -c acorn/acorn.c
102
acorn_.o: acorn/acorn.c $(UNZIP_H)
103
$(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o acorn_.o acorn/acorn.c
105
riscos.o: acorn/riscos.c $(UNZIP_H)
106
$(CC) $(CFLAGS) -c acorn/riscos.c
107
riscos_.o: acorn/riscos.c $(UNZIP_H)
108
$(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o riscos_.o acorn/riscos.c
110
swiven.o: acorn/swiven.s
111
$(ASM) $(ASMFLAGS) -from acorn.s.swiven -to o.swiven
114
$(BIND) -o unzip$(E) $(LFLAGS1) $(OBJS) $(LFLAGS2)
116
$(BIND) -o funzip$(E) $(LFLAGS1) $(OBJF) $(LFLAGS2)
118
$(BIND) -o unzipsfx$(E) $(LFLAGS1) $(OBJX) $(LFLAGS2)
120
clean: ;remove unzip; remove funzip;
121
remove zipinfo; remove unzipsfx;