name changes to confuse the innocent
[unix-history] / usr / src / usr.bin / pascal / px / Makefile
CommitLineData
6e18ad62 1SCCSID = "@(#)Makefile 1.16 %G%"
1b89c061 2
15834a19 3CFLAGS = -O
63d45e55
KM
4DESTDIR =
5SRCDIR = /usr/ucb
6LIBDIR = /usr/lib
e51ef4f0
KM
7PASCALDIR = /usr/src/ucb/pascal
8LIBPCDIR = /usr/src/usr.lib/libpc
1b89c061 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 24
15834a19 25.c.o:
63d45e55 26 ${CC} ${CFLAGS} -c $*.c
1b89c061
KM
27
28px: Version.c ${PXOBJ}
9a92014d 29 ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lm
15834a19
KM
30Version.c: version.c
31 ${CC} ${CFLAGS} -o version version.c
1b89c061
KM
32 ./version >Version.c
33 ${RM} version
6e18ad62 34interp.o interp.s: interp.c interp.sed
63d45e55 35 ${CC} -S interp.c
1b89c061 36 sed -f interp.sed <interp.s >tmp
c3c85287
KM
37 ${OPT} tmp interp.s
38 /usr/lib/pc2 <interp.s >tmp
1b89c061
KM
39 mv tmp interp.s
40 as -o interp.o interp.s
15834a19
KM
41h02opcs.h: OPnames.h opc.c
42 ${CC} ${CFLAGS} opc.c -o opc
1b89c061
KM
43 ./opc >h02opcs.h
44 ${RM} opc
45
46install: px
63d45e55 47 cp px ${DESTDIR}/usr/ucb/px
1b89c061 48
3bedcebe
PK
49sources: ${PXHDR} ${PXSRC} ${PXUTL}
50${PSHDR}:
51 cp ${PASCALDIR}/$@ $@
52${PCHDR}:
53 cp ${LIBPCDIR}/$@ $@
54
1b89c061 55clean:
8d2782df
KM
56 ${RM} *.o *.s px version opc* pic*
57 ${RM} OPnames.h objfmt.h libpc.h h02opcs.h errs lpr core tmp
1b89c061
KM
58
59prt: interp.s
60 sed -f clean.sed <interp.s
61
df2257b4 62grind: sources ${PSHDR} ${PCHDR}
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
6e18ad62 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
6e18ad62
KM
82 cp Makefile Makefile.bak
83 ed - Makefile < eddep
1b89c061 84 rm eddep makedep
6e18ad62
KM
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
1b89c061
KM
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
df2257b4 93int.o: libpc.h
1b89c061 94int.o: objfmt.h
dc5520f8 95interp.o: whoami.h
15834a19 96interp.o: vars.h
6e18ad62 97interp.o: objfmt.h
1b89c061
KM
98interp.o: h02opcs.h
99interp.o: machdep.h
100interp.o: libpc.h
4411d87f 101opc.o: OPnames.h
dc5520f8 102utilities.o: whoami.h
15834a19 103utilities.o: vars.h
6e18ad62 104utilities.o: objfmt.h
1b89c061
KM
105# DEPENDENCIES MUST END AT END OF FILE
106# IF YOU PUT STUFF HERE IT WILL GO AWAY
107# see make depend above