xref: /original-bsd/usr.bin/pascal/pi/Makefile (revision 252dbbf1)
1#
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved.  The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
6#	@(#)pimakefile	5.2 (Berkeley) 9/7/85
7#
8SCCSID = "@(#)pimakefile 5.2 9/7/85"
9
10INSTALLDIR = ${DESTDIR}/usr/ucb
11INSTALLNAME = ${INSTALLDIR}/pi
12BINDIR = ../pi
13SRCDIR = ../src
14VPATH = ../src
15WHOAMI = pi
16VERSION = 3.1
17DATE = 9/7/85
18
19MKSTR = /usr/ucb/mkstr
20EYACC = ../eyacc/eyacc
21RM = -rm -f
22TOUCH = touch -f
23
24CFLAGS = -O
25LDFLAGS = -z
26
27LIBDIR = ${DESTDIR}/usr/lib
28TMPDIR = tmp
29
30ERRORSTRINGS = ${WHOAMI}${VERSION}strings
31OLDSTRINGS = ${WHOAMI}[0-9]*.[0-9]*strings
32HOWFILE = how_${WHOAMI}
33
34SRCS =	ato.c \
35	call.c case.c clas.c const.c conv.c cset.c \
36	error.c fdec.c fend.c fhdr.c flvalue.c forop.c func.c gen.c hash.c \
37	lab.c lookup.c lval.c stklval.c \
38	main.c nl.c proc.c put.c \
39	rec.c rval.c stkrval.c\
40	savenl.c \
41	stat.c string.c subr.c \
42	tmps.c tree.c type.c var.c \
43	TRdata.c \
44	treen.c yycopy.c \
45	yycosts.c yyerror.c yyget.c yyid.c yylex.c yymain.c yyoptions.c \
46	yypanic.c yyparse.c yyprint.c yyput.c yyrecover.c yyseman.c yytree.c \
47	p2put.c stab.c pcproc.c pcfunc.c pccaseop.c pclval.c sconv.c
48
49HDRS =	0.h OPnames.h align.h iorec.h objfmt.h pstab.h pc.h \
50	send.h tree.h whoami.h yy.h config.h
51
52OTHERS = pas.y opc.c CONFIG.c gram pic.c
53
54OBJS =	ato.o \
55	call.o case.o clas.o const.o conv.o cset.o \
56	error.o fdec.o fend.o fhdr.o flvalue.o forop.o func.o gen.o hash.o \
57	lab.o lookup.o lval.o stklval.o \
58	main.o nl.o proc.o put.o \
59	rec.o rval.o stkrval.o\
60	savenl.o \
61	stat.o string.o subr.o \
62	tmps.o tree.o type.o var.o \
63	TRdata.o \
64	treen.o yycopy.o \
65	yycosts.o yyerror.o yyget.o yyid.o yylex.o yymain.o yyoptions.o \
66	yypanic.o yyparse.o yyprint.o yyput.o yyrecover.o yyseman.o yytree.o \
67	p2put.o stab.o pcproc.o pcfunc.o pccaseop.o pclval.o sconv.o
68
69a.out: ${OBJS} y.tab.o config.c
70	${CC} ${CFLAGS} ${LDFLAGS} ${OBJS} y.tab.o config.c
71
72${OBJS}:
73	${RM} `basename $@ .o`.c
74	cd ${SRCDIR}; \
75	    ${MKSTR} - ${BINDIR}/${ERRORSTRINGS} ${BINDIR}/ `basename $@ .o`.c
76	${CC} ${CFLAGS} -I. -I${SRCDIR} -c `basename $@ .o`.c
77	${RM} `basename $@ .o`.c
78
79lint:
80	cd ${SRCDIR}; lint -I. -I${BINDIR} ${SRCS} ${BINDIR}/*.c
81
82y.tab.h y.tab.c: ${SRCDIR}/pas.y ${SRCDIR}/gram
83	${RM} y.tab.h y.tab.c
84	${EYACC} ${SRCDIR}/pas.y > /dev/null
85	ex - y.tab.c <${SRCDIR}/gram
86	@echo that makes y.tab.h and y.tab.c
87y.tab.o: y.tab.c y.tab.h
88	${RM} x.y.tab.c
89	${MKSTR} - ${ERRORSTRINGS} x. y.tab.c
90	${CC} ${CFLAGS} -I${SRCDIR} -I. -c x.y.tab.c
91	mv x.y.tab.o y.tab.o
92	${RM} x.y.tab.c
93
94picture: ${SRCDIR}/OPnames.h ${SRCDIR}/pic.c
95	${RM} picture
96	cc ${SRCDIR}/pic.c -o pic
97	pic >picture
98	${RM} pic
99
100opcode.h: ${SRCDIR}/OPnames.h ${SRCDIR}/opc.c
101	${RM} opcode.h
102	cc ${SRCDIR}/opc.c -o opc
103	opc >opcode.h
104	${RM} opc
105
106${SRCDIR}/0.h:
107	${TOUCH} ${SRCDIR}/0.h
108
109config.c: ${SRCDIR}/CONFIG.c
110	sed -e "s?VERSION?${VERSION}?g" \
111	    -e "s?DATE?${DATE}?g" \
112	    -e "s?INSTALLDIR?${INSTALLDIR}?g" \
113	    -e "s?LIBDIR?${LIBDIR}?g" \
114	    -e "s?ERRORSTRINGS?${ERRORSTRINGS}?g" \
115	    -e "s?HOWFILE?${HOWFILE}?g" \
116	    < ${SRCDIR}/CONFIG.c >config.c
117
118clean:
119	${RM} *.o *.c
120	${RM} y.tab.h y.tab.c y.tab.out
121	${RM} ${WHOAMI}*strings
122	${RM} config.c opcode.h picture
123	${RM} a.out core *.list *.bak errs
124	${RM} opc pic tags
125
126install: a.out
127	${RM} ${LIBDIR}/${OLDSTRINGS}
128	install -c -m 664 ${ERRORSTRINGS} ${LIBDIR}/${ERRORSTRINGS}
129	install -s -m 775 a.out ${INSTALLNAME}
130
131# Make depend must make clean first, since otherwise VPATH screws up
132# which sources we 'make depend' from, if there are any .c's lying around.
133depend: clean ${SRCS} opcode.h y.tab.h
134	mkdep ${CFLAGS} -I. ${SRCS}
135
136# DO NOT DELETE THIS LINE -- mkdep uses it.
137# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
138
139ato.o: ../src/ato.c whoami.h ../src/0.h /usr/include/stdio.h
140ato.o: /usr/include/sys/types.h
141call.o: ../src/call.c whoami.h ../src/0.h /usr/include/stdio.h
142call.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
143call.o: ../src/align.h ../src/tmps.h ../src/tree_ty.h
144case.o: ../src/case.c whoami.h ../src/0.h /usr/include/stdio.h
145case.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/tree_ty.h
146clas.o: ../src/clas.c whoami.h ../src/0.h /usr/include/stdio.h
147clas.o: /usr/include/sys/types.h ../src/tree.h ../src/tree_ty.h
148const.o: ../src/const.c whoami.h ../src/0.h /usr/include/stdio.h
149const.o: /usr/include/sys/types.h ../src/tree.h ../src/tree_ty.h
150conv.o: ../src/conv.c whoami.h ../src/0.h /usr/include/stdio.h
151conv.o: /usr/include/sys/types.h opcode.h ../src/tree_ty.h
152cset.o: ../src/cset.c whoami.h ../src/0.h /usr/include/stdio.h
153cset.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
154cset.o: ../src/tree_ty.h
155error.o: ../src/error.c whoami.h ../src/0.h /usr/include/stdio.h
156error.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
157fdec.o: ../src/fdec.c whoami.h ../src/0.h /usr/include/stdio.h
158fdec.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
159fdec.o: ../src/align.h ../src/tmps.h
160fend.o: ../src/fend.c whoami.h ../src/0.h /usr/include/stdio.h
161fend.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
162fend.o: ../src/align.h ../src/tmps.h ../src/tree_ty.h
163fhdr.o: ../src/fhdr.c whoami.h ../src/0.h /usr/include/stdio.h
164fhdr.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
165fhdr.o: ../src/align.h ../src/tree_ty.h
166flvalue.o: ../src/flvalue.c whoami.h ../src/0.h /usr/include/stdio.h
167flvalue.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
168flvalue.o: ../src/tree_ty.h ../src/tmps.h
169forop.o: ../src/forop.c whoami.h ../src/0.h /usr/include/stdio.h
170forop.o: /usr/include/sys/types.h opcode.h ../src/tree.h ../src/objfmt.h
171forop.o: ../src/tmps.h ../src/tree_ty.h
172func.o: ../src/func.c whoami.h ../src/0.h /usr/include/stdio.h
173func.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/tree_ty.h
174gen.o: ../src/gen.c whoami.h ../src/0.h /usr/include/stdio.h
175gen.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
176hash.o: ../src/hash.c whoami.h ../src/0.h /usr/include/stdio.h
177hash.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
178lab.o: ../src/lab.c whoami.h ../src/0.h /usr/include/stdio.h
179lab.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
180lab.o: ../src/tree_ty.h
181lookup.o: ../src/lookup.c whoami.h ../src/0.h /usr/include/stdio.h
182lookup.o: /usr/include/sys/types.h
183lval.o: ../src/lval.c whoami.h ../src/0.h /usr/include/stdio.h
184lval.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
185lval.o: ../src/tree_ty.h
186stklval.o: ../src/stklval.c whoami.h ../src/0.h /usr/include/stdio.h
187stklval.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
188stklval.o: ../src/tree_ty.h
189main.o: ../src/main.c whoami.h ../src/0.h /usr/include/stdio.h
190main.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
191main.o: /usr/include/signal.h /usr/include/machine/trap.h ../src/objfmt.h
192main.o: ../src/config.h
193nl.o: ../src/nl.c whoami.h ../src/0.h /usr/include/stdio.h
194nl.o: /usr/include/sys/types.h opcode.h ../src/objfmt.h
195proc.o: ../src/proc.c whoami.h ../src/0.h /usr/include/stdio.h
196proc.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
197proc.o: ../src/tmps.h ../src/tree_ty.h
198put.o: ../src/put.c whoami.h opcode.h ../src/0.h /usr/include/stdio.h
199put.o: /usr/include/sys/types.h ../src/objfmt.h ../src/OPnames.h
200rec.o: ../src/rec.c whoami.h ../src/0.h /usr/include/stdio.h
201rec.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/align.h
202rec.o: ../src/tree_ty.h
203rval.o: ../src/rval.c whoami.h ../src/0.h /usr/include/stdio.h
204rval.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
205rval.o: ../src/tmps.h ../src/tree_ty.h
206stkrval.o: ../src/stkrval.c whoami.h ../src/0.h /usr/include/stdio.h
207stkrval.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
208stkrval.o: ../src/align.h ../src/tree_ty.h
209savenl.o: ../src/savenl.c whoami.h ../src/0.h /usr/include/stdio.h
210savenl.o: /usr/include/sys/types.h ../src/objfmt.h ../src/../pdx/defs.h
211savenl.o: /usr/include/stdio.h ../src/../pdx/object.h
212savenl.o: ../src/../pdx/object/objsym.rep ../src/../pdx/mappings.h
213savenl.o: ../src/../pdx/mappings/filetab.h
214stat.o: ../src/stat.c whoami.h ../src/0.h /usr/include/stdio.h
215stat.o: /usr/include/sys/types.h ../src/tree.h ../src/objfmt.h ../src/tmps.h
216stat.o: opcode.h ../src/tree_ty.h
217string.o: ../src/string.c whoami.h ../src/align.h ../src/0.h
218string.o: /usr/include/stdio.h /usr/include/sys/types.h
219subr.o: ../src/subr.c whoami.h ../src/0.h /usr/include/stdio.h
220subr.o: /usr/include/sys/types.h /usr/include/sys/stat.h
221tmps.o: ../src/tmps.c whoami.h ../src/0.h /usr/include/stdio.h
222tmps.o: /usr/include/sys/types.h ../src/objfmt.h ../src/align.h ../src/tmps.h
223tree.o: ../src/tree.c whoami.h ../src/0.h /usr/include/stdio.h
224tree.o: /usr/include/sys/types.h
225type.o: ../src/type.c whoami.h ../src/0.h /usr/include/stdio.h
226type.o: /usr/include/sys/types.h ../src/tree.h ../src/objfmt.h ../src/tree_ty.h
227var.o: ../src/var.c whoami.h ../src/0.h /usr/include/stdio.h
228var.o: /usr/include/sys/types.h ../src/objfmt.h ../src/align.h ../src/iorec.h
229var.o: /usr/include/stdio.h ../src/tmps.h ../src/tree_ty.h
230TRdata.o: ../src/TRdata.c whoami.h ../src/0.h /usr/include/stdio.h
231TRdata.o: /usr/include/sys/types.h
232treen.o: ../src/treen.c ../src/0.h /usr/include/stdio.h
233treen.o: /usr/include/sys/types.h ../src/tree_ty.h
234yycopy.o: ../src/yycopy.c whoami.h ../src/0.h /usr/include/stdio.h
235yycopy.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
236yycosts.o: ../src/yycosts.c whoami.h ../src/0.h /usr/include/stdio.h
237yycosts.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
238yyerror.o: ../src/yyerror.c whoami.h ../src/0.h /usr/include/stdio.h
239yyerror.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
240yyget.o: ../src/yyget.c whoami.h ../src/0.h /usr/include/stdio.h
241yyget.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
242yyid.o: ../src/yyid.c whoami.h ../src/0.h /usr/include/stdio.h
243yyid.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
244yylex.o: ../src/yylex.c whoami.h ../src/0.h /usr/include/stdio.h
245yylex.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
246yymain.o: ../src/yymain.c whoami.h ../src/0.h /usr/include/stdio.h
247yymain.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
248yymain.o: /usr/include/a.out.h /usr/include/sys/exec.h ../src/objfmt.h
249yymain.o: /usr/include/signal.h /usr/include/machine/trap.h ../src/config.h
250yyoptions.o: ../src/yyoptions.c whoami.h ../src/0.h /usr/include/stdio.h
251yyoptions.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
252yypanic.o: ../src/yypanic.c whoami.h ../src/0.h /usr/include/stdio.h
253yypanic.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
254yyparse.o: ../src/yyparse.c whoami.h ../src/0.h /usr/include/stdio.h
255yyparse.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
256yyprint.o: ../src/yyprint.c whoami.h ../src/0.h /usr/include/stdio.h
257yyprint.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
258yyput.o: ../src/yyput.c whoami.h ../src/0.h /usr/include/stdio.h
259yyput.o: /usr/include/sys/types.h ../src/tree.h ../src/tree_ty.h ../src/yy.h
260yyput.o: y.tab.h
261yyrecover.o: ../src/yyrecover.c whoami.h ../src/0.h /usr/include/stdio.h
262yyrecover.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
263yyseman.o: ../src/yyseman.c whoami.h ../src/0.h /usr/include/stdio.h
264yyseman.o: /usr/include/sys/types.h ../src/tree_ty.h ../src/yy.h y.tab.h
265yytree.o: ../src/yytree.c whoami.h ../src/0.h /usr/include/stdio.h
266yytree.o: /usr/include/sys/types.h ../src/tree.h ../src/tree_ty.h
267p2put.o: ../src/p2put.c whoami.h
268stab.o: ../src/stab.c whoami.h
269pcproc.o: ../src/pcproc.c whoami.h
270pcfunc.o: ../src/pcfunc.c whoami.h
271pccaseop.o: ../src/pccaseop.c whoami.h
272pclval.o: ../src/pclval.c whoami.h ../src/0.h /usr/include/stdio.h
273pclval.o: /usr/include/sys/types.h ../src/tree.h opcode.h ../src/objfmt.h
274pclval.o: ../src/tree_ty.h
275sconv.o: ../src/sconv.c whoami.h
276
277# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
278