file reorg
[unix-history] / usr / src / usr.bin / pascal / px / Makefile
... / ...
CommitLineData
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#
6# @(#)Makefile 5.7 (Berkeley) %G%
7#
8SCCSID = "@(#)Makefile 5.7 %G%"
9
10DESTDIR =
11BINDIR = /usr/bin
12LIBDIR = /usr/lib
13SRCDIR = ../src
14LIBPCDIR = ../../../lib/libpc
15CC = cc
16CFLAGS = -O ${INCLUDES}
17INCLUDES = -I${SRCDIR} -I${LIBPCDIR}
18LINTFLAGS = -hbxc
19RM = rm -f
20
21PSHDR = opc.c pic.c
22
23PXHDR = vars.h machdep.h
24
25PXSRC = int.c interp.c utilities.c
26
27PXOBJ = int.o interp.o utilities.o
28
29PXUTL = version.c
30
31.c.o:
32 ${CC} ${CFLAGS} -c $*.c
33
34all px: Version.c ${PXOBJ}
35 ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lm
36
37lint: Version.c ${PXSRC}
38 lint ${LINTFLAGS} ${INCLUDES} Version.c ${PXSRC} -lpc -lm
39
40Version.c: version.c
41 ${CC} ${CFLAGS} -o version version.c
42 ./version >Version.c
43 ${RM} version
44
45h02opcs.h: ${SRCDIR}/OPnames.h opc.c
46 ${CC} ${CFLAGS} opc.c -o opc
47 ./opc >h02opcs.h
48 ${RM} opc
49
50install: px
51 install -s px ${DESTDIR}/usr/bin/px
52
53sources: ${PXHDR} ${PXSRC} ${PXUTL}
54${PSHDR}:
55 ln -s ${SRCDIR}/$@ $@
56
57cleandir clean:
58 ${RM} *.o *.s px version opc* pic*
59 ${RM} h02opcs.h errs lpr core tmp
60
61grind: sources
62 ${BINDIR}/ctags -v *.h *.c | sort -f >index
63 ${BINDIR}/vgrind -t -x index >lpr
64 ${CC} ${CFLAGS} -o pic pic.c
65 ${BINDIR}/vgrind -t -n READ_ME Makefile lst >>lpr
66 ${BINDIR}/vgrind -t ${PXSRC} >>lpr
67 ./pic >lst
68 ${BINDIR}/vpr lst
69 ${BINDIR}/vpr -t lpr
70 ${RM} index pic lst
71
72depend: sources
73 ls *.c | sed 's;^\(.*\)\.c;\1.o: \1.c;' >.depend
74 grep '^#[ ]*include' *.c | sed \
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;' \
80 -e 's;: OPnames.h;: ${SRCDIR}/OPnames.h;' >>.depend
81