1
#==============================================================================
2
# Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only)
3
# Version: 5.5 13 February 2001
4
#==============================================================================
7
# INSTRUCTIONS (such as they are):
9
# "make vax" -- makes UnZip on a generic Unix VAX in the current directory
10
# "make list" -- lists all supported systems (targets)
11
# "make help" -- provides pointers on what targets to try if problems occur
12
# "make wombat" -- chokes and dies if you haven't added the specifics for your
13
# Wombat 68000 (or whatever) to the systems list
15
# CF are flags for the C compiler. LF are flags for the loader. LF2 are more
16
# flags for the loader, if they need to be at the end of the line instead of at
17
# the beginning (for example, some libraries). FL and FL2 are the corre-
18
# sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can
19
# be used to add default C flags to your compile without editing the Makefile
20
# (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C).
22
# Some versions of make do not define the macro "$(MAKE)"; this is rare, but
23
# if things don't work, try using "make" instead of "$(MAKE)" in your system's
24
# makerule. Or try adding the following line to your .login file:
26
# (That never works--makes which are too stupid to define MAKE are also too
27
# stupid to look in the environment--but try it anyway for kicks. :-) )
29
# Memcpy and memset are provided for those systems that don't have them; they
30
# are in file_io.c and will be used if -DZMEM is included in CF. These days
31
# almost all systems have them.
33
# Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila-
34
# tion does not always imply a working program.
41
# Defaults most systems use (use LOCAL_UNZIP in environment to add flags,
48
CF = -c -Zi -W2 -DCRYPT -DOLD_THEOS_EXTRA $(LOCAL_UNZIP)
52
# defaults for crc32 stuff and system dependent headers
56
# general-purpose stuff
65
OBJS1 = unzip.o $(CRC32).o crctab.o crypt.o envargs.o explode.o
66
OBJS2 = extract.o fileio.o globals.o inflate.o list.o match.o
67
OBJS3 = process.o ttyio.o unreduce.o unshrink.o zipinfo.o
68
OBJS4 = _sprintf.o _fprintf.o _isatty.o _stat.o _setargv.o
69
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) theos.o
71
LOBJS = $(OBJS1) $(OBJS2) $(OBJS3) theos.o
72
OBJX = unzipsfx.o $(CRC32).o crctab_.o crypt_.o extract_.o fileio_.o \
73
globals_.o inflate_.o match_.o process_.o ttyio_.o theos_.o
75
OBJF = funzip.o $(CRC32).o cryptf.o globalsf.o inflatef.o ttyiof.o _sprintf.o \
77
UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H)
79
UNZIPS = unzip.command funzip.command unzipsfx.command zipinfo.command
84
crc32.o: crc32.c $(UNZIP_H) zip.h
85
crctab.o: crctab.c $(UNZIP_H) zip.h
86
crypt.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
87
envargs.o: envargs.c $(UNZIP_H)
88
explode.o: explode.c $(UNZIP_H)
89
extract.o: extract.c $(UNZIP_H) crypt.h
90
fileio.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
91
funzip.o: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
92
globals.o: globals.c $(UNZIP_H)
93
inflate.o: inflate.c inflate.h $(UNZIP_H)
94
list.o: list.c $(UNZIP_H)
95
match.o: match.c $(UNZIP_H)
96
process.o: process.c $(UNZIP_H)
97
ttyio.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
98
unreduce.o: unreduce.c $(UNZIP_H)
99
unshrink.o: unshrink.c $(UNZIP_H)
100
unzip.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
101
zipinfo.o: zipinfo.c $(UNZIP_H)
103
crctab_.o: crctab.c $(UNZIP_H) zip.h # unzipsfx only
104
$(CC) $(CF) -DSFX -Fo$@ crctab.c
106
crypt_.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only
107
$(CC) $(CF) -DSFX -Fo$@ crypt.c
109
extract_.o: extract.c $(UNZIP_H) crypt.h # unzipsfx only
110
$(CC) $(CF) -DSFX -Fo$@ extract.c
112
fileio_.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only
113
$(CC) $(CF) -DSFX -Fo$@ fileio.c
115
globals_.o: globals.c $(UNZIP_H) # unzipsfx only
116
$(CC) $(CF) -DSFX -Fo$@ globals.c
118
inflate_.o: inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only
119
$(CC) $(CF) -DSFX -Fo$@ inflate.c
121
match_.o: match.c $(UNZIP_H) # unzipsfx only
122
$(CC) $(CF) -DSFX -Fo$@ match.c
124
process_.o: process.c $(UNZIP_H) # unzipsfx only
125
$(CC) $(CF) -DSFX -Fo$@ process.c
127
ttyio_.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only
128
$(CC) $(CF) -DSFX -Fo$@ ttyio.c
130
unzipsfx.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h # unzipsfx only
131
$(CC) $(CF) -DSFX -Fo$@ unzip.c
133
cryptf.o: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only
134
$(CC) $(CF) -DFUNZIP -Fo$@ crypt.c
136
globalsf.o: globals.c $(UNZIP_H) # funzip only
137
$(CC) $(CF) -DFUNZIP -Fo$@ globals.c
139
inflatef.o: inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only
140
$(CC) $(CF) -DFUNZIP -Fo$@ inflate.c
142
ttyiof.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only
143
$(CC) $(CF) -DFUNZIP -Fo$@ ttyio.c
145
theos.o: theos/theos.c $(UNZIP_H) unzvers.h # THEOS only
146
$(CC) $(CF) theos/theos.c
148
theos_.o: theos/theos.c $(UNZIP_H) # THEOS unzipsfx
149
$(CC) $(CF) -DSFX -Fo$@ theos/theos.c
151
_sprintf.o: theos/_sprintf.c $(UNZIP_H) # THEOS only
152
$(CC) $(CF) theos/_sprintf.c
154
_fprintf.o: theos/_fprintf.c $(UNZIP_H) # THEOS only
155
$(CC) $(CF) theos/_fprintf.c
157
_isatty.o: theos/_isatty.c $(UNZIP_H) # THEOS only
158
$(CC) $(CF) theos/_isatty.c
160
_stat.o: theos/_stat.c $(UNZIP_H) # THEOS only
161
$(CC) $(CF) theos/_stat.c
163
_setargv.o: theos/_setargv.c $(UNZIP_H) # THEOS only
164
$(CC) $(CF) theos/_setargv.c
166
unzip.command: $(OBJS)
167
$(LD) $(LF) $@ $(LOBJS) $(LF2)
169
unzipsfx.command: $(OBJX)
170
$(LD) $(LF) $@ $(LOBJX) $(LF2)
172
funzip.command: $(OBJF)
173
$(LD) $(LF) $@ $(OBJF) $(LF2)
175
zipinfo.command: unzip.command
176
$(LN) $? $@ ( rep not
179
copy *.command /system.cmd32.=(rep noq
183
erase *.command(noq not