add DEC11 mode
[unix-history] / usr / src / usr.bin / pascal / px / Makefile
CommitLineData
c3c85287 1SCCSID = "@(#)Makefile 1.5 %G%"
1b89c061 2
15834a19 3CFLAGS = -O
dd94e49f 4DEFS = -DVAX -DOBJ
1b89c061
KM
5DESTDIR =/usr/ucb
6LIBDIR =/usr/lib
7PASCALDIR = /usr/src/cmd/pascal
8LIBPCDIR = /usr/src/lib/libpc
9CC = cc
dd94e49f 10OPT = /lib/c2
1b89c061
KM
11AS = as
12RM = rm -f
13
15834a19
KM
14PSHDR = OPnames.h objfmt.h opc.c pic.c
15PCHDR = libpc.h h01errs.h
16
17PXHDR = vars.h machdep.h
1b89c061
KM
18
19PXSRC = int.c interp.c except.c utilities.c
20
21PXOBJ = int.o interp.o except.o utilities.o
22
15834a19 23PXUTL = make.ed1 panics interp.sed clean.sed version.c
1b89c061
KM
24
25sources: ${PXHDR} ${PXSRC} ${PXUTL}
15834a19
KM
26${PSHDR}:
27 cp ${PASCALDIR}/$@ $@
28${PCHDR}:
29 cp ${LIBPCDIR}/$@ $@
30
31.c.o:
32 ${CC} ${CFLAGS} ${DEFS} -c $*.c
1b89c061
KM
33
34px: Version.c ${PXOBJ}
4411d87f 35 ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lnm
15834a19
KM
36Version.c: version.c
37 ${CC} ${CFLAGS} -o version version.c
1b89c061
KM
38 ./version >Version.c
39 ${RM} version
40interp.o interp.s: interp.c
15834a19 41 ${CC} ${DEFS} -S interp.c
1b89c061 42 sed -f interp.sed <interp.s >tmp
c3c85287
KM
43 ${OPT} tmp interp.s
44 /usr/lib/pc2 <interp.s >tmp
1b89c061
KM
45 mv tmp interp.s
46 as -o interp.o interp.s
47panics.h: panics make.ed1
48 ex - <make.ed1
15834a19
KM
49h02opcs.h: OPnames.h opc.c
50 ${CC} ${CFLAGS} opc.c -o opc
1b89c061
KM
51 ./opc >h02opcs.h
52 ${RM} opc
53
54install: px
55 cp px ${DESTDIR}/px
56
57clean:
4411d87f
KM
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
1b89c061
KM
60
61prt: interp.s
62 sed -f clean.sed <interp.s
63
64grind: sources
65 @vpr READ_ME makefile
15834a19 66 @${CC} ${CFLAGS} -o pic pic.c
1b89c061 67 @./pic | vpr
15834a19 68 @/usr/ucb/vgrind vars.h objfmt.h machdep.h
1b89c061
KM
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
15834a19
KM
90except.o: vars.h
91int.o: vars.h
1b89c061 92int.o: objfmt.h
15834a19 93interp.o: vars.h
1b89c061
KM
94interp.o: panics.h
95interp.o: h02opcs.h
96interp.o: machdep.h
15834a19 97interp.o: h01errs.h
1b89c061 98interp.o: libpc.h
4411d87f 99opc.o: OPnames.h
c3c85287 100pic.o: OPnames.h
15834a19 101utilities.o: vars.h
1b89c061
KM
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