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