1# @(#)Makefile 8.2 (Berkeley) 04/19/94 2 3PROG= pi 4SRCDIR= ${.CURDIR}/../src 5CFLAGS= -I. -I${.CURDIR} -I${SRCDIR} 6.PATH: ${SRCDIR} 7 8EYACC= ${.CURDIR}/../eyacc/obj/eyacc 9 10SRCS= ato.c call.c case.c clas.c const.c conv.c cset.c error.c fdec.c \ 11 fend.c fhdr.c flvalue.c forop.c func.c gen.c hash.c lab.c lookup.c \ 12 lval.c stklval.c main.c nl.c proc.c put.c rec.c rval.c stkrval.c \ 13 savenl.c stat.c string.c subr.c tmps.c tree.c type.c var.c TRdata.c \ 14 treen.c yycopy.c yycosts.c yyerror.c yyget.c yyid.c yylex.c yymain.c \ 15 yyoptions.c yypanic.c yyparse.c yyprint.c yyput.c yyrecover.c \ 16 yyseman.c yytree.c p2put.c stab.c pcproc.c pcfunc.c pccaseop.c \ 17 pclval.c sconv.c 18OBJS+= config.c y.tab.o 19CLEANFILES+=opc y.tab.h y.tab.c y.tab.out ${WHOAMI}*strings config.c \ 20 opcode.h picture opc pic *.list ${ERRORSTRINGS} config.o 21 22WHOAMI= pi 23.include "${SRCDIR}/config.include" 24 25.c.o: 26 rm -f ${.IMPSRC:T} 27 ln -s ${.IMPSRC} . 28 mkstr - ${ERRORSTRINGS} x ${.IMPSRC:T} 29 ${CC} ${CFLAGS} -c x${.IMPSRC:T} -o ${.TARGET} 30 rm -f x${.IMPSRC:T} ${.IMPSRC:T} 31 32y.tab.o: y.tab.c y.tab.h 33 rm -f x.y.tab.c 34 mkstr - ${ERRORSTRINGS} x. y.tab.c 35 ${CC} ${CFLAGS} -c x.y.tab.c 36 mv x.y.tab.o y.tab.o 37 rm -f x.y.tab.c 38 39y.tab.c: y.tab.h 40 41y.tab.h: ${SRCDIR}/pas.y ${SRCDIR}/gram 42 if [ -f ${EYACC} ]; then \ 43 echo make y.tab.h and y.tab.c; \ 44 rm -f y.tab.h y.tab.c; \ 45 ${EYACC} ${SRCDIR}/pas.y > /dev/null; \ 46 else \ 47 echo copy y.tab.h and y.tab.c; \ 48 cp ${SRCDIR}/y.tab.c ${SRCDIR}/y.tab.h .; \ 49 fi 50 ex - y.tab.c < ${SRCDIR}/gram 51 52picture: pic ${SRCDIR}/OPnames.h 53 ./pic > picture 54 55pic: pic.c 56 ${CC} ${.ALLSRC} -o ${.TARGET} 57 58opcode.h: opc ${SRCDIR}/OPnames.h ${SRCDIR}/opc.c 59 ./opc > ${.TARGET} 60 61opc: opc.c 62 ${CC} ${.ALLSRC} -o ${.TARGET} 63 64beforeinstall: 65 install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${ERRORSTRINGS} \ 66 ${DESTDIR}${LIBDATA}/${ERRORSTRINGS} 67 68.include <bsd.prog.mk> 69 70${OBJS} .depend: opcode.h y.tab.h 71