File: makefile

package info (click to toggle)
zoo 2.10-9
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 780 kB
  • ctags: 1,288
  • sloc: ansic: 9,041; asm: 793; makefile: 211
file content (270 lines) | stat: -rw-r--r-- 10,474 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# derived from: @(#) makefile 2.2 88/01/27 19:37:59 
# $Id: makefile,v 1.22 91/07/09 04:10:38 dhesi Exp $
# Make Zoo
#
#The contents of this makefile are hereby released to the public domain.
#                                  -- Rahul Dhesi 1991/07/05
#
# This makefile expects two macro names, `CFLAGS' and `EXTRA', to hold
# all the switches to be supplied to the C compiler.  It also expects
# a macro `LDFLAGS' to hold the switch for the loader when invoked.
# The macro "MODEL" holds switches needed for both compile and link, 
# such as "memory model" for Intel and Z8000 processors. OPTIM is the 
# optimize option and may be set on the make command line to -O2 or 
# whatever your compiler thinks is nice.
#
# To run lint, select an appropriate lint_* target (e.g. "make lint_sysv").


MAKE = make	      # needed for some systems e.g. older BSD

CC = cc
CFLAGS =
MODEL =
EXTRA = -DBIG_MEM -DNDEBUG
LINTFLAGS = -DLINT
OPTIM = -O -Wall
DESTDIR = /usr/local/bin

#List of all object files created for Zoo
ZOOOBJS = addbfcrc.o addfname.o basename.o comment.o crcdefs.o \
		getfile.o lzc.o lzd.o machine.o makelist.o misc.o misc2.o \
		nextfile.o needed.o options.o parse.o portable.o prterror.o \
		version.o zoo.o zooadd.o zooadd2.o zoodel.o zooext.o zoofilt.o \
		zoolist.o zoopack.o io.o lzh.o maketbl.o maketree.o huf.o \
		encode.o decode.o

FIZOBJS = fiz.o addbfcrc.o portable.o crcdefs.o

.c.o :
	$(CC) $(CFLAGS) $(MODEL) $(EXTRA) $*.c

all : 
	@echo 'There is no default.  Please specify an appropriate target from'
	@echo 'the makefile, or type "make help" for more information'

help :
	@echo "Possible targets are as follows.  Please examine the makefile"
	@echo "for more information."
	@echo ' '
	@echo "generic:      generic **IX environment, minimal functionlity"
	@echo "bsd:          4.3BSD or reasonable equivalent"
	@echo "bsdansi:      4.3BSD with ANSI C"
	@echo "ultrix:       ULTRIX 4.1"
	@echo "convex:       Convex C200 series"
	@echo "sysv:         System V Release 2 or 3; or SCO Xenix"
	@echo "linux:        Linux"
	@echo "scodos:       Cross-compiler under SCO Xenix/UNIX for MS-DOS"
	@echo "xenix286:     Older Xenix/286 (not tested)"
	@echo "xenix68k:     Xenix/68000 (not tested)"
	@echo ' '
	@echo "install:      Move zoo to $(DESTDIR)/tzoo (alpha test)"
	@echo "inst_beta:    Move zoo to $(DESTDIR)/bzoo (beta test)"
	@echo "inst_prod:    Move zoo to $(DESTDIR)/zoo  (production)"
	@echo ' '
	@echo "lint_sysv:    Run lint for System V"
	@echo "lint_bsd:     Run lint for 4.3BSD"
	@echo "lint_generic: Run lint for generic **IX"
	@echo "lint_turboc:  Run lint under **IX for checking Turbo C/MSDOS code"

# install alpha zoo as "tzoo"
install:
	mv zoo $(DESTDIR)/tzoo

# install beta zoo as "bzoo"
inst_beta:
	mv zoo $(DESTDIR)/bzoo

# install production zoo as "zoo"
inst_prod:
	mv zoo $(DESTDIR)/zoo

# executable targets
TARGETS = zoo fiz

#######################################################################
# SYSTEM-SPECIFIC TARGETS
#######################################################################

# A generic system -- may have less than full functionality.
# Compile with -g, since debugging will probably be needed.
generic:
	$(MAKE) CFLAGS="-c -g -DGENERIC" $(TARGETS)

# Reasonably generic BSD 4.3
bsd:
	$(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3" $(TARGETS)

# Linux
linux:
	$(MAKE) CC="gcc" CFLAGS="-c $(OPTIM) $(LINTFLAGS) -DLINUX -DANSI_HDRS" $(TARGETS)

# ULTRIX 4.1
ultrix:
	$(MAKE) CFLAGS="-c $(OPTIM) -DULTRIX" $(TARGETS)

# BSD with ANSI C - works on MIPS and Ultrix/RISC compilers
bsdansi:
	$(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS)

# Convex C200 series
convex:
	$(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS)

# SysV.2, V.3, SCO Xenix
sysv:
	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" $(TARGETS)

# DOS version cross compiled from SCO Xenix/UNIX
scodos:
	$(MAKE) CFLAGS="-c $(OPTIM) -DTURBOC -DANSI_HDRS -DBIG_MEM" \
		EXTRA="-dos -Ml" LDFLAGS="-o zoo.exe" $(TARGETS)

# Tested for zoo 2.01 on: Xenix 3.4 on Greg Laskin's Intel 310/286;
# SCO Xenix 2.2 on Robert Cliff's AT.
# `-Ml' for large memory model, `-M2' to generate code for 80286 cpu,
# `-F xxxx' for xxxx (hex) bytes of stack space.
xenix286:
	@echo "Warning: xenix286 is not fully functional"
	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" \
		MODEL="-Ml -M2 -Md" \
		LDFLAGS="-s -n -Md -Mt500 -F 5000" $(TARGETS)

# Radio Shack Model 16 with Xenix/68000 3.01.01. "-DM_VOID" tells not 
# to try to do a typedef of `void'. "-Dvoid=int" because compiler doesn't 
# know about `void'.  `-s -n' strips and makes it shareable.  Used to work
# with zoo 2.01; not tested with 2.1.
xenix68k:
	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V -DM_VOID -Dvoid=int" \
		LDFLAGS="-s -n" $(TARGETS)

#######################################################################
# CLEANUP TARGETS
#######################################################################

# standard clean -- remove all transient files
clean :
	rm -f core a.out $(ZOOOBJS) $(FIZOBJS)

# object clean only -- just remove object files
objclean:
	rm -f *.o

#######################################################################
# BINARY TARGETS
#######################################################################

zoo: $(ZOOOBJS)
	$(CC) -o zoo $(MODEL) $(LDFLAGS) $(ZOOOBJS)

fiz: $(FIZOBJS)
	$(CC) -o fiz $(MODEL) $(LDFLAGS) $(FIZOBJS)

#######################################################################
# SELECTED TARGETS FOR LINT
#######################################################################

# generic system V
lint_sysv:
	echo $(ZOOOBJS) | sed -e 's/\.o/.c/g' | \
	xargs lint -DSYS_V $(EXTRA) $(LINTFLAGS) | \
	grep -v 'possible pointer alignment problem'

# generic BSD
lint_bsd:
	echo $(ZOOOBJS) | sed -e 's/\.o/.c/g' | \
	xargs lint -DBSD4_3 $(EXTRA) $(LINTFLAGS) | \
	grep -v 'possible pointer alignment problem'

# generic **IX
lint_generic:
	echo $(ZOOOBJS) | sed -e 's/\.o/.c/g' | \
	xargs lint -DGENERIC $(EXTRA) $(LINTFLAGS) | \
	grep -v 'possible pointer alignment problem'

# Cross-lint for checking Turbo C code under **IX.  For checking only;
# compilation requires separate makefile called "makefile.tcc"
lint_turboc:
	echo $(ZOOOBJS) turboc.c | sed -e 's/\.o/.c/g' | \
	xargs lint -DTURBOC -DCROSS_LINT $(EXTRA) $(LINTFLAGS)

#######################################################################
# DEPENDENCIES
#######################################################################
# DO NOT DELETE THIS LINE -- it marks the beginning of this dependency list

addbfcrc.o: options.h
addfname.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h
addfname.o: zoomem.h
basename.o: /usr/include/stdio.h assert.h debug.h options.h parse.h various.h
basename.o: zoo.h zoofns.h zooio.h
bsd.o: /usr/include/sys/stat.h /usr/include/sys/time.h
bsd.o: /usr/include/sys/types.h nixmode.i nixtime.i
comment.o: /usr/include/signal.h /usr/include/stdio.h
comment.o: /usr/include/sys/signal.h errors.i options.h portable.h various.h
comment.o: zoo.h zoofns.h zooio.h
crcdefs.o: options.h
decode.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h
encode.o: /usr/include/assert.h /usr/include/stdio.h ar.h errors.i lzh.h
encode.o: options.h zoo.h
fiz.o: /usr/include/stdio.h options.h portable.h various.h zoo.h zoofns.h
fiz.o: zooio.h
generic.o: /usr/include/sys/stat.h /usr/include/sys/types.h
generic.o: /usr/include/time.h nixmode.i nixtime.i
getfile.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h
getfile.o: zoomem.h
huf.o: /usr/include/stdio.h ar.h errors.i lzh.h options.h zoo.h
io.o: /usr/include/stdio.h ar.h errors.i lzh.h options.h portable.h zoo.h
io.o: zooio.h
lzc.o: /usr/include/stdio.h assert.h debug.h lzconst.h options.h various.h
lzc.o: zoo.h zoofns.h zooio.h zoomem.h
lzd.o: /usr/include/stdio.h assert.h debug.h lzconst.h options.h various.h
lzd.o: zoo.h zoofns.h zooio.h zoomem.h
lzh.o: /usr/include/stdio.h ar.h errors.i options.h zoo.h
machine.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h
makelist.o: /usr/include/stdio.h assert.h debug.h errors.i options.h
makelist.o: portable.h various.h zoo.h zoofns.h zooio.h
maketbl.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h
maketree.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h
misc.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
misc.o: errors.i options.h portable.h various.h zoo.h zoofns.h zooio.h
misc2.o: /usr/include/stdio.h errors.i options.h portable.h various.h zoo.h
misc2.o: zoofns.h zooio.h zoomem.h
msdos.o: /usr/include/stdio.h errors.i options.h zoo.h zoofns.h zooio.h
needed.o: /usr/include/stdio.h debug.h options.h portable.h various.h zoo.h
needed.o: zoofns.h zooio.h
nextfile.o: /usr/include/stdio.h options.h various.h zoo.h
options.o: /usr/include/stdio.h errors.i options.h various.h zoo.h zoofns.h
options.o: zooio.h
parse.o: /usr/include/stdio.h assert.h options.h parse.h various.h zoo.h
parse.o: zoofns.h zooio.h
portable.o: /usr/include/stdio.h assert.h debug.h machine.h options.h
portable.o: portable.h various.h zoo.h zoofns.h zooio.h

# I deleted varags.h dependancy from prterror.o since that is a
# dependancy covered by a #ifdef, and in Debian's case #undef'ed

prterror.o: /usr/include/stdio.h options.h various.h
prterror.o: zoofns.h zooio.h
sysv.o: /usr/include/sys/stat.h /usr/include/sys/types.h /usr/include/time.h
sysv.o: nixmode.i nixtime.i
turboc.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
vms.o: /usr/include/time.h
vmstime.o: /usr/include/stdio.h
zoo.o: /usr/include/stdio.h errors.i options.h various.h zoo.h zoofns.h
zoo.o: zooio.h zoomem.h
zooadd.o: /usr/include/stdio.h debug.h errors.i options.h parse.h portable.h
zooadd.o: various.h zoo.h zoofns.h zooio.h zoomem.h
zooadd2.o: /usr/include/stdio.h assert.h debug.h errors.i options.h parse.h
zooadd2.o: various.h zoo.h zoofns.h zooio.h
zoodel.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
zoodel.o: errors.i options.h portable.h various.h zoo.h zoofns.h zooio.h
zooext.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
zooext.o: errors.i machine.h options.h parse.h portable.h various.h zoo.h
zooext.o: zoofns.h zooio.h
zoofilt.o: options.h
zoolist.o: /usr/include/stdio.h errors.i options.h portable.h various.h zoo.h
zoolist.o: zoofns.h zooio.h zoomem.h
zoopack.o: /usr/include/signal.h /usr/include/stdio.h
zoopack.o: /usr/include/sys/signal.h errors.i options.h portable.h various.h
zoopack.o: zoo.h zoofns.h zooio.h