add DEC11 mode
[unix-history] / usr / src / usr.bin / pascal / px / Makefile
... / ...
CommitLineData
1SCCSID = "@(#)Makefile 1.5 %G%"
2
3CFLAGS = -O
4DEFS = -DVAX -DOBJ
5DESTDIR =/usr/ucb
6LIBDIR =/usr/lib
7PASCALDIR = /usr/src/cmd/pascal
8LIBPCDIR = /usr/src/lib/libpc
9CC = cc
10OPT = /lib/c2
11AS = as
12RM = rm -f
13
14PSHDR = OPnames.h objfmt.h opc.c pic.c
15PCHDR = libpc.h h01errs.h
16
17PXHDR = vars.h machdep.h
18
19PXSRC = int.c interp.c except.c utilities.c
20
21PXOBJ = int.o interp.o except.o utilities.o
22
23PXUTL = make.ed1 panics interp.sed clean.sed version.c
24
25sources: ${PXHDR} ${PXSRC} ${PXUTL}
26${PSHDR}:
27 cp ${PASCALDIR}/$@ $@
28${PCHDR}:
29 cp ${LIBPCDIR}/$@ $@
30
31.c.o:
32 ${CC} ${CFLAGS} ${DEFS} -c $*.c
33
34px: Version.c ${PXOBJ}
35 ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lnm
36Version.c: version.c
37 ${CC} ${CFLAGS} -o version version.c
38 ./version >Version.c
39 ${RM} version
40interp.o interp.s: interp.c
41 ${CC} ${DEFS} -S interp.c
42 sed -f interp.sed <interp.s >tmp
43 ${OPT} tmp interp.s
44 /usr/lib/pc2 <interp.s >tmp
45 mv tmp interp.s
46 as -o interp.o interp.s
47panics.h: panics make.ed1
48 ex - <make.ed1
49h02opcs.h: OPnames.h opc.c
50 ${CC} ${CFLAGS} opc.c -o opc
51 ./opc >h02opcs.h
52 ${RM} opc
53
54install: px
55 cp px ${DESTDIR}/px
56
57clean:
58 ${RM} *.o *.s px version opc* pic* OPnames.h objfmt.h libpc.h\
59 panics.h h01errs.h h02opcs.h errs lpr core tmp
60
61prt: interp.s
62 sed -f clean.sed <interp.s
63
64grind: sources
65 @vpr READ_ME makefile
66 @${CC} ${CFLAGS} -o pic pic.c
67 @./pic | vpr
68 @/usr/ucb/vgrind vars.h objfmt.h machdep.h
69 @/usr/ucb/vgrind ${PXSRC}
70 @${RM} pic*
71
72depend: sources
73 /bin/grep '^#[ ]*include' *.c \
74 | sed '/<.*>/d' \
75 | sed 's/:[^"]*"\([^"]*\)".*/: \1/' \
76 | sed 's/\.c/.o/' >makedep
77 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
78 echo '$$r makedep' >>eddep
79 echo 'w' >>eddep
80 cp makefile makefile.bak
81 ed - makefile < eddep
82 rm eddep makedep
83 echo '# DEPENDENCIES MUST END AT END OF FILE' >> makefile
84 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> makefile
85 echo '# see make depend above' >> makefile
86
87# DO NOT DELETE THIS LINE -- make depend uses it
88# DEPENDENCIES MUST END AT END OF FILE
89except.o: panics.h
90except.o: vars.h
91int.o: vars.h
92int.o: objfmt.h
93interp.o: vars.h
94interp.o: panics.h
95interp.o: h02opcs.h
96interp.o: machdep.h
97interp.o: h01errs.h
98interp.o: libpc.h
99opc.o: OPnames.h
100pic.o: OPnames.h
101utilities.o: vars.h
102utilities.o: panics.h
103utilities.o: h02opcs.h
104# DEPENDENCIES MUST END AT END OF FILE
105# IF YOU PUT STUFF HERE IT WILL GO AWAY
106# see make depend above