get rid of panics, so that all signals and errors pass through ERROR()
[unix-history] / usr / src / usr.bin / pascal / px / Makefile
CommitLineData
8fe8ed0d 1SCCSID = "@(#)Makefile 1.10 %G%"
1b89c061 2
15834a19 3CFLAGS = -O
63d45e55
KM
4DESTDIR =
5SRCDIR = /usr/ucb
6LIBDIR = /usr/lib
1b89c061
KM
7PASCALDIR = /usr/src/cmd/pascal
8LIBPCDIR = /usr/src/lib/libpc
9CC = cc
dd94e49f 10OPT = /lib/c2
1b89c061
KM
11AS = as
12RM = rm -f
13
9a92014d 14PSHDR = OPnames.h whoami.h objfmt.h opc.c pic.c
65e56240 15PCHDR = libpc.h
15834a19
KM
16
17PXHDR = vars.h machdep.h
1b89c061 18
8fe8ed0d 19PXSRC = int.c interp.c utilities.c
1b89c061 20
8fe8ed0d 21PXOBJ = int.o interp.o utilities.o
1b89c061 22
8fe8ed0d 23PXUTL = 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:
63d45e55 32 ${CC} ${CFLAGS} -c $*.c
1b89c061
KM
33
34px: Version.c ${PXOBJ}
9a92014d 35 ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lm
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
63d45e55 41 ${CC} -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
15834a19
KM
47h02opcs.h: OPnames.h opc.c
48 ${CC} ${CFLAGS} opc.c -o opc
1b89c061
KM
49 ./opc >h02opcs.h
50 ${RM} opc
51
52install: px
63d45e55 53 cp px ${DESTDIR}/usr/ucb/px
1b89c061
KM
54
55clean:
4411d87f 56 ${RM} *.o *.s px version opc* pic* OPnames.h objfmt.h libpc.h\
8fe8ed0d 57 h02opcs.h errs lpr core tmp
1b89c061
KM
58
59prt: interp.s
60 sed -f clean.sed <interp.s
61
62grind: sources
dc5520f8
KM
63 ${SRCDIR}/ctags -v *.h *.c *.s | sort -f >index
64 ${SRCDIR}/vgrind -t -x index >lpr
65 ${CC} ${CFLAGS} -o pic pic.c
66 ${SRCDIR}/vgrind -t -n READ_ME makefile lst >>lpr
8fe8ed0d 67 ${SRCDIR}/vgrind -t ${PCHDR} ${PXHDR} objfmt.h whoami.h >>lpr
dc5520f8
KM
68 ${SRCDIR}/vgrind -t ${PXSRC} >>lpr
69 ./pic >lst
70 ${SRCDIR}/vpr lst
71 ${SRCDIR}/vpr -t lpr
72 ${RM} index pic lst
1b89c061
KM
73
74depend: sources
75 /bin/grep '^#[ ]*include' *.c \
76 | sed '/<.*>/d' \
77 | sed 's/:[^"]*"\([^"]*\)".*/: \1/' \
78 | sed 's/\.c/.o/' >makedep
79 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
80 echo '$$r makedep' >>eddep
81 echo 'w' >>eddep
82 cp makefile makefile.bak
83 ed - makefile < eddep
84 rm eddep makedep
85 echo '# DEPENDENCIES MUST END AT END OF FILE' >> makefile
86 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> makefile
87 echo '# see make depend above' >> makefile
88
89# DO NOT DELETE THIS LINE -- make depend uses it
90# DEPENDENCIES MUST END AT END OF FILE
dc5520f8 91int.o: whoami.h
15834a19 92int.o: vars.h
1b89c061 93int.o: objfmt.h
dc5520f8
KM
94interp.o: whoami.h
95interp.o: objfmt.h
15834a19 96interp.o: vars.h
1b89c061
KM
97interp.o: h02opcs.h
98interp.o: machdep.h
99interp.o: libpc.h
4411d87f 100opc.o: OPnames.h
c3c85287 101pic.o: OPnames.h
dc5520f8 102utilities.o: whoami.h
15834a19 103utilities.o: vars.h
1b89c061
KM
104utilities.o: h02opcs.h
105# DEPENDENCIES MUST END AT END OF FILE
106# IF YOU PUT STUFF HERE IT WILL GO AWAY
107# see make depend above