Debian Codegraph @

atari/Makefile

raw
1 # Makefile for Zip, ZipNote, ZipCloak and ZipSplit
2
3 MAKE = make
4 SHELL = /bin/sh
5
6 # (to use the Gnu compiler, change cc to gcc in CC and BIND)
7 CC = cc
8 BIND = $(CC)
9 AS = $(CC) -c
10 E =
11 CPP = /lib/cpp
12
13 # probably can change this to 'install' if you have it
14 INSTALL = cp
15
16 # target directories - where to install executables and man pages to
17 BINDIR = /usr/local/bin
18 manext=1
19 MANDIR = /usr/local/man/man$(manext)
20
21 # flags
22 # CFLAGS flags for C compile
23 # LFLAGS1 flags after output file spec, before obj file list
24 # LFLAGS2 flags after obj file list (libraries, etc)
25 CFLAGS = -O
26 LFLAGS1 =
27 LFLAGS2 = -s
28
29 # object file lists
30 OBJZ = zip.o zipfile.o zipup.o fileio.o util.o crc32.o globals.o \
31 crypt.o ttyio.o atari.o
32
33 OBJI = deflate.o trees.o
34 OBJA =
35 OBJU = zipfile_.o fileio_.o util_.o globals.o atari_.o
36 OBJN = zipnote.o $(OBJU)
37 OBJC = zipcloak.o $(OBJU) crc32_.o crypt_.o ttyio.o
38 OBJS = zipsplit.o $(OBJU)
39
40 ZIP_H = zip.h ziperr.h tailor.h atari/osdep.h
41
42 # suffix rules
43 .SUFFIXES:
44 .SUFFIXES: _.o .o .c .doc .1
45 .c_.o:
46 rm -f $*_.c; ln $< $*_.c
47 $(CC) $(CFLAGS) -DUTIL -c $*_.c
48 rm -f $*_.c
49 .c.o:
50 $(CC) $(CFLAGS) -c $<
51
52 .1.doc:
53 nroff -man $< | col -b | uniq > $@
54
55 # rules for zip, zipnote, zipcloak, zipsplit, and the Zip MANUAL.
56 $(OBJZ): $(ZIP_H)
57 $(OBJI): $(ZIP_H)
58 $(OBJN): $(ZIP_H)
59 $(OBJS): $(ZIP_H)
60 $(OBJC): $(ZIP_H)
61 zip.o crc32.o crypt.o fileio.o zipfile.o zipup.o: crc32.h
62 zipcloak.o crc32_.o crypt_.o fileio_.o zipfile_.o: crc32.h
63 zip.o zipup.o crypt.o ttyio.o zipcloak.o crypt_.o: crypt.h
64 zip.o zipup.o zipnote.o zipcloak.o zipsplit.o: revision.h
65 zip.o crypt.o ttyio.o zipcloak.o crypt_.o: ttyio.h
66 zipup.o: atari/zipup.h
67
68 match.o: match.s
69 $(CPP) match.s > _match.s
70 $(AS) _match.s
71 mv _match.o match.o
72 rm -f _match.s
73
74 ZIPS = zip$E zipnote$E zipsplit$E zipcloak$E
75
76 zips: $(ZIPS)
77 zipsman: $(ZIPS) $(ZIPMANUAL)
78
79 zip$E: $(OBJZ) $(OBJI) $(OBJA)
80 $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
81 zipnote$E: $(OBJN)
82 $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2)
83 zipcloak$E: $(OBJC)
84 $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2)
85 zipsplit$E: $(OBJS)
86 $(BIND) -o zipsplit$E $(LFLAGS1) $(OBJS) $(LFLAGS2)
87
88 $(ZIPMANUAL): man/zip.1
89 nroff -man man/zip.1 | col -b | uniq > $(ZIPMANUAL)
90
91 # install
92 install: $(ZIPS)
93 $(INSTALL) $(ZIPS) $(BINDIR)
94 $(INSTALL) man/zip.1 $(MANDIR)/zip.$(manext)
95
96 uninstall:
97 -cd $(BINDIR); rm -f $(ZIPS)
98 -cd $(MANDIR); rm -f zip.$(manext)
99
100 dist: $(ZIPMANUAL)
101 zip -u9T zip`sed -e '/VERSION/!d' -e 's/.*"\(.*\)".*/\1/' \
102 -e s/[.]//g -e q revision.h` \
103 `awk '/^Makefile/,/vms_zip.rnh/ {print $$1}' < contents`
104
105 # ATARI version (gcc 2.5.8 and Mintlibs PL46)
106 atari:
107 $(MAKE) zips CFLAGS="-O -DATARI" OBJA=atari/atari.o CC=gcc E=.ttp
108
109 # clean up after making stuff and installing it
110 clean:
111 rm -f *.o $(ZIPS) flags