file reorg
[unix-history] / usr / src / usr.bin / pascal / px / Makefile
CommitLineData
1259848a
DF
1#
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
d71bb9cb 6# @(#)Makefile 5.7 (Berkeley) %G%
1259848a 7#
d71bb9cb 8SCCSID = "@(#)Makefile 5.7 %G%"
1b89c061 9
63d45e55 10DESTDIR =
d71bb9cb 11BINDIR = /usr/bin
63d45e55 12LIBDIR = /usr/lib
5b098c3a 13SRCDIR = ../src
d71bb9cb 14LIBPCDIR = ../../../lib/libpc
1b89c061 15CC = cc
24ba2374
KM
16CFLAGS = -O ${INCLUDES}
17INCLUDES = -I${SRCDIR} -I${LIBPCDIR}
18LINTFLAGS = -hbxc
1b89c061
KM
19RM = rm -f
20
5b098c3a 21PSHDR = opc.c pic.c
15834a19
KM
22
23PXHDR = vars.h machdep.h
1b89c061 24
8fe8ed0d 25PXSRC = int.c interp.c utilities.c
1b89c061 26
8fe8ed0d 27PXOBJ = int.o interp.o utilities.o
1b89c061 28
24ba2374 29PXUTL = version.c
1b89c061 30
15834a19 31.c.o:
63d45e55 32 ${CC} ${CFLAGS} -c $*.c
1b89c061 33
d71bb9cb 34all px: Version.c ${PXOBJ}
9a92014d 35 ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lm
24ba2374
KM
36
37lint: Version.c ${PXSRC}
38 lint ${LINTFLAGS} ${INCLUDES} Version.c ${PXSRC} -lpc -lm
39
15834a19
KM
40Version.c: version.c
41 ${CC} ${CFLAGS} -o version version.c
1b89c061
KM
42 ./version >Version.c
43 ${RM} version
24ba2374 44
5b098c3a 45h02opcs.h: ${SRCDIR}/OPnames.h opc.c
15834a19 46 ${CC} ${CFLAGS} opc.c -o opc
1b89c061
KM
47 ./opc >h02opcs.h
48 ${RM} opc
49
50install: px
d71bb9cb 51 install -s px ${DESTDIR}/usr/bin/px
1b89c061 52
3bedcebe
PK
53sources: ${PXHDR} ${PXSRC} ${PXUTL}
54${PSHDR}:
5b098c3a 55 ln -s ${SRCDIR}/$@ $@
3bedcebe 56
d71bb9cb 57cleandir clean:
8d2782df 58 ${RM} *.o *.s px version opc* pic*
5b098c3a 59 ${RM} h02opcs.h errs lpr core tmp
1b89c061 60
5b098c3a 61grind: sources
24ba2374 62 ${BINDIR}/ctags -v *.h *.c | sort -f >index
5b098c3a 63 ${BINDIR}/vgrind -t -x index >lpr
dc5520f8 64 ${CC} ${CFLAGS} -o pic pic.c
5b098c3a
KM
65 ${BINDIR}/vgrind -t -n READ_ME Makefile lst >>lpr
66 ${BINDIR}/vgrind -t ${PXSRC} >>lpr
dc5520f8 67 ./pic >lst
5b098c3a
KM
68 ${BINDIR}/vpr lst
69 ${BINDIR}/vpr -t lpr
dc5520f8 70 ${RM} index pic lst
1b89c061
KM
71
72depend: sources
d71bb9cb 73 ls *.c | sed 's;^\(.*\)\.c;\1.o: \1.c;' >.depend
a0a718c9 74 grep '^#[ ]*include' *.c | sed \
5b098c3a
KM
75 -e '/<.*>/d' \
76 -e 's;:[^"]*"\([^"]*\)".*;: \1;' \
77 -e 's/\.c/\.o/' \
78 -e 's;: libpc.h;: ${LIBPCDIR}/libpc.h;' \
79 -e 's;: objfmt.h;: ${SRCDIR}/objfmt.h;' \
d71bb9cb
KB
80 -e 's;: OPnames.h;: ${SRCDIR}/OPnames.h;' >>.depend
81