|
|
1.1 root 1: # Note from hws: the makes for zipnote, zipcloak, and zipsplit
2: # are screwed up. I didn't have time to fix them.
3:
4: # Makefile for Zip, ZipNote, ZipCloak and ZipSplit
5:
6: # what you can make ...
7: all:
8: @echo ''
9: @echo 'Make what? You must say what system to make Zip for--e.g.'
10: @echo '"make bsd". Choices: 3b1, aix, att6300, aux, bsd, bsdold,'
11: @echo 'convex, cray, cray3, dec_osf1, dnix, hpux, isc, linux,'
12: @echo 'minix, next, next10, scodos, sun, sun_gcc, sysv, sysv_386,'
13: @echo 'sysv_old, ultrix, xenix, xos, zilog.'
14: @echo 'See the files install.doc and zip.doc for more information.'
15: @echo ''
16:
17: CRYPTO =
18: CLOAK =
19: CRFLAG =
20: MAKE = make
21: # **********************************************************************
22: # *** For encryption version, remove the # at the front of next line ***
23: MAKE = make CRYPTO="crypt.o" CLOAK="zipcloak" CRFLAG="-DCRYPT"
24:
25: # (to use the Gnu compiler, change cc to gcc in CC and BIND)
26: CC = cc
27: BIND = cc
28: E =
29: CPP = /usr/lib/cpp -Dunix
30:
31: # probably can change this to 'install' if you have it
32: INSTALL = cp
33:
34: # target directories - where to install executables and man pages to
35: BINDIR = /usr/local/bin
36: MANDIR = /usr/man/manl
37:
38: # flags
39: # CFLAGS flags for C compile
40: # LFLAGS1 flags after output file spec, before obj file list
41: # LFLAGS2 flags after obj file list (libraries, etc)
42: CFLAGS = -O
43: LFLAGS1 =
44: LFLAGS2 = -s
45:
46: # object file lists
47: OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o $(CRYPTO)
48:
49: OBJI = deflate.o trees.o bits.o
50: OBJA =
51: OBJU = zipfile_.o zipup_.o fileio_.o util_.o globals.o
52: OBJN = zipnote.o $(OBJU)
53: OBJC = zipcloak.o $(OBJU) crypt.o
54: OBJS = zipsplit.o $(OBJU)
55:
56: # suffix rules
57: .SUFFIXES:
58: .SUFFIXES: _.o .o .c .doc .1
59: .c_.o:
60: rm -f $*_.c; ln $< $*_.c
61: $(CC) $(CFLAGS) -DUTIL $(CRFLAG) -c $*_.c
62: rm -f $*_.c
63: .c.o:
64: $(CC) $(CFLAGS) $(CRFLAG) -c $<
65:
66: .1.doc:
67: nroff -man $< | col -b | uniq > $@
68:
69: # rules for zip, zipnote, zipcloak, zipsplit, and zip.doc.
70: $(OBJZ): zip.h ziperr.h tailor.h
71: $(OBJI): zip.h ziperr.h tailor.h
72: $(OBJN): zip.h ziperr.h tailor.h
73: $(OBJS): zip.h ziperr.h tailor.h
74: $(OBJC): zip.h ziperr.h tailor.h
75:
76: match.o: match.s
77: $(CPP) match.s > _match.s
78: $(CC) -c _match.s
79: mv _match.o match.o
80: rm -f _match.s
81:
82: ZIPS = zip$E zipnote$E zipsplit$E $(CLOAK)$E
83:
84: zip.o zipup.o zipnote.o zipcloak.o zipsplit.o: revision.h
85: zips: $(ZIPS)
86: zipsman: zip zipnote zipsplit $(CLOAK) zip.doc
87:
88: zip$E: $(OBJZ) $(OBJI) $(OBJA)
89: $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
90: zipnote$E: $(OBJN)
91: $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2)
92: zipcloak$E: $(OBJC)
93: $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2)
94: zipsplit$E: $(OBJS)
95: $(BIND) -o zipsplit$E $(LFLAGS1) $(OBJS) $(LFLAGS2)
96:
97: # install
98: install: $(ZIPS)
99: $(INSTALL) $(ZIPS) $(BINDIR)
100: $(INSTALL) zip.1 $(MANDIR)
101:
102:
103: # These symbols, when #defined using -D have these effects on compilation:
104: # ZMEM - includes C language versions of memset(), memcpy(), and
105: # memcmp() (util.c).
106: # DIRENT - use <sys/dirent.h> and getdents() instead of <sys/dir.h>
107: # and opendir(), etc. (fileio.c).
108: # NODIR - used for 3B1, which has neither getdents() nor opendir().
109: # NDIR - use "ndir.h" instead of <sys/dir.h> (fileio.c).
110: # UTIL - select routines for utilities (note, cloak, and split).
111: # PROTO - enable function prototypes.
112: # RMDIR - remove directories using a system("rmdir ...") call.
113: # CONVEX - for Convex make target.
114: # AIX - for AIX make target.
115: # CRYPT - include the encryption code.
116: # LINUX - for linux make target.
117:
118: # BSD 4.3 (also Unisys 7000--AT&T System V with heavy BSD 4.2)
119: bsd:
120: $(MAKE) zips CFLAGS="-O"
121:
122: # BSD, but missing memset(), memcmp().
123: bsdold:
124: $(MAKE) zips CFLAGS="-O -DZMEM"
125:
126: # AT&T System V, Rel 3. Also SCO Unix, OpenDeskTop, ETA-10P*, SGI.
127: sysv_old:
128: $(MAKE) zips CFLAGS="-O -DDIRENT"
129:
130: # AT&T System V, Rel 4. Also any system with readdir() and termio.
131: sysv:
132: $(MAKE) zips CFLAGS="-O -DSYSV -DTERMIO"
133:
134: # AT&T System V, Rel 4 for 386 (uses asm version):
135: sysv_386:
136: $(MAKE) zips CFLAGS="-O -DSYSV -DTERMIO -DASM" OBJA=match.o
137:
138: # SCO Xenix
139: xenix:
140: $(MAKE) zips CFLAGS="-O -DSYSV -DTERMIO" LFLAGS2="-lx -s"
141:
142: # DNIX 5.x: like System V but optimization is messed up.
143: dnix:
144: $(MAKE) zips CFLAGS="-DDIRENT"
145:
146: # Linux 0.96a with GCC 2.12, dies with <= 2.11c. builtin functions are
147: # disabled because '#define const' removes const from normal functions
148: # but not builtin ones. And keeping const causes problems on other systems.
149: linux:
150: $(MAKE) zips CFLAGS="-O -fno-builtin -DSYSV -DTERMIO -DLINUX" \
151: CC=gcc BIND=gcc
152:
153: # Sun OS 4.x: BSD, but use getdents(). If you have gcc, use 'make sun_gcc'
154: # instead since the code produced is better.
155: sun:
156: $(MAKE) zips CFLAGS="-O4 -DDIRENT"
157:
158: # Sun OS 4.x with gcc (bug with -s linker flag). Use -O if your version
159: # of gcc does not like -O2.
160: sun_gcc:
161: $(MAKE) zips CFLAGS="-O2 -DDIRENT" CC=gcc BIND=gcc LFLAGS2=""
162: strip $(ZIPS)
163:
164: # NeXT 1.0: BSD, but use shared library.
165: next10:
166: $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -lsys_s"
167:
168: # NeXT 2.0: BSD, but use MH_OBJECT format for smaller executables.
169: next:
170: $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -object"
171:
172: # HPUX: System V, but use <ndir.h> and opendir(), etc.
173: hpux:
174: $(MAKE) zips CFLAGS="-O -DNDIR"
175:
176: # Cray Unicos 5.1.10 & 6.0.11, Standard C compiler 2.0
177: cray:
178: $(MAKE) zips CFLAGS="-O -DDIRENT" CC="scc"
179:
180: # Cray Unicos 6.1, Standard C compiler 3.0 (all routines except trees.c
181: # may be compiled with vector3; internal compiler bug in 3.0.2.3 and
182: # earlier requires vector2 for trees.c)
183: cray3:
184: $(MAKE) zips CFLAGS="-O -h vector2 -h scalar3 -DDIRENT" CC="scc"
185:
186: # AT&T 3B1: System V, but missing a few things.
187: 3b1:
188: $(MAKE) zips CFLAGS="-O -DNODIR -DRMDIR"
189:
190: # AT&T 6300 PLUS (don't know yet how to allocate 64K bytes):
191: att6300:
192: $(MAKE) zips LFLAGS1="-Ml" \
193: CFLAGS="-O -Ml -DNODIR -DRMDIR -DDYN_ALLOC -DMEDIUM_MEM -DWSIZE=16384"
194:
195: # zilog zeus 3.21
196: zilog:
197: $(MAKE) zips CFLAGS="-O -DZMEM -DNDIR -DRMDIR" CC="scc -i" BIND="scc"
198:
199: # SCO 386 cross compile for MS-DOS
200: # Note: zip.exe should be lzexe'd on DOS to reduce its size
201: scodos:
202: $(MAKE) zips CFLAGS="-O -Mc -dos -DNO_ASM" LFLAGS1="-Mc -dos" \
203: LFLAGS2="-F 1000" E=".exe"
204:
205: # A/UX:
206: aux:
207: $(MAKE) zips CFLAGS="-O -DTERMIO"
208:
209: # Convex C-120, C-210, OS 9.0, cc v. 4.0, no vectorization used.
210: convex:
211: $(MAKE) zips CFLAGS="-O"
212:
213: # AIX Version 3.1 for RISC System/6000
214: aix:
215: $(MAKE) zips CC="c89" BIND="c89" \
216: CFLAGS="-O -D_POSIX_SOURCE -D_ALL_SOURCE -D_BSD -DAIX"
217:
218: # MINIX 1.5.10 with Bruce Evans 386 patches and gcc/GNU make
219: minix:
220: $(MAKE) zips CFLAGS="-O -DDIRENT -DMINIX" CC=gcc BIND=gcc
221: chmem =262144 zip
222:
223: # Interactive Systems Corporation System V/386, Rel 3.2--optimizer problems
224: isc:
225: $(MAKE) zips CFLAGS="-DDIRENT"
226:
227: # DYNIX (R) V3.0.18 (no memset() or memcmp(), rindex() instead of strrchr())
228: dynix:
229: $(MAKE) zips CFLAGS="-O -DZMEM -Dstrrchr=rindex"
230:
231: # Ultrix
232: ultrix:
233: $(MAKE) zips CFLAGS="-O -Olimit 700"
234:
235: # DEC OSF/1
236: dec_osf1:
237: $(MAKE) zips CFLAGS="-O -Olimit 1000 -DOSF -D_BSD"
238:
239: # xos: Olivetti LSX-3005..3045 with X/OS 2.3 or 2.4
240: xos:
241: $(MAKE) zips CFLAGS="-O -DTERMIO"
242:
243: # clean up after making stuff and installing it
244: clean:
245: rm -f *.o
246: rm -f $(ZIPS)
247:
248: # This one's for Mark:
249: it:
250: $(MAKE) zipsman CFLAGS="-O -Wall -DPROTO"\
251: LFLAGS2="-s -object" VPATH="${HOME}/Unix/bin"
252:
253: # and this one for Jean-loup:
254: gcc_d:
255: $(MAKE) zip CFLAGS="-g -DDEBUG -DDIRENT" CC=gcc BIND=gcc LFLAGS2="-g"
256: mv zip zipd
257:
258: # end of Makefile
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.