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.4 (Berkeley) 05/09/89 7# 8SCCSID = "@(#)Makefile 5.4 (Berkeley) 05/09/89" 9DESTDIR= 10ED= -ex 11AS= -as 12RM= rm -f 13EYACC= ../eyacc/eyacc 14CFLAGS= -O -I. -I${SRCDIR} -w -DRMOTHERS 15SRCDIR= ../src 16BINDIR= ../pxp 17# 18# Files which are specific to PXP 19# 20LOCOBJ= Version.o call.o case.o const.o cset.o error.o fdec.o func.o \ 21 lab.o lval.o main.o pmon.o pp.o proc.o rec.o rval.o stat.o \ 22 type.o var.o y.tab.o yycomm.o yyerror.o \ 23 yymain.o yyput.o rmothers.o 24# 25# Files which are shared with pi and pc0 26# 27SRCOBJ= TRdata.o hash.o nl.o string.o subr.o tree.o treen.o yycopy.o \ 28 yycosts.o yyget.o yyid.o yylex.o yypanic.o yyparse.o yyprint.o \ 29 yyrecover.o yyseman.o yytree.o 30SRCSRC= TRdata.c hash.c nl.c string.c subr.c tree.c treen.c yycopy.c \ 31 yycosts.c yyget.c yyid.c yylex.c yypanic.c yyparse.c yyprint.c \ 32 yyrecover.c yyseman.c yytree.c 33 34all: a.out 35 36a.out: ${LOCOBJ} ${SRCOBJ} 37 ${CC} ${CFLAGS} ${LOCOBJ} ${SRCOBJ} 38 39${SRCOBJ}: 40 -ln ${SRCDIR}/$*.c $*.c 41 ${CC} ${CFLAGS} -c $*.c 42 ${RM} $*.c 43 44y.tab.h y.tab.c: ${SRCDIR}/pas.y 45 ${EYACC} ${SRCDIR}/pas.y >/dev/null 46 ${ED} - y.tab.c < ${SRCDIR}/gram 47 48newversion: version 49 version > Version.c 50 51version: version.c Version.o 52 cc -o version version.c Version.o 53 54opcode.h: ${SRCDIR}/OPnames.h ${SRCDIR}/opc.c 55 ${RM} opcode.h 56 cc ${SRCDIR}/opc.c -o opc 57 ./opc >opcode.h 58 ${RM} opc 59 60cleandir clean: 61 -rm -f a.out core errs version *.bak 62 -rm -f *.o x* y.tab.c y.tab.h opcode.h 63 64install: a.out 65 install -s a.out ${DESTDIR}/usr/bin/pxp 66# cp a.outNOID /usr/bin/pxp34 67 68print: 69 @pr Makefile READ_ME 70 @ls -ls | pr 71 @size a.out *.o | pr 72# @cxref *.c | pr 73 @pr 0.h main.c ${SRCDIR}/pas.y 74 @pr yy.h yy*.c 75 @pr [a-ln-x]*.c 76# @pr putn.s treen.s yycopy.s 77 78depend: 79 ls *.c | sed 's;^\([a-zA-Z0-9.]*\)\.c;\1.o: &;' > .depend 80 cd ${SRCDIR}; ls ${SRCSRC} | sed \ 81 -e 's;^\([a-zA-Z0-9.]*\)\.c;\1.o: ${SRCDIR}/&;' \ 82 >>${BINDIR}/.depend 83 grep '^#[ ]*include' *.h ${SRCDIR}/*.h | sed \ 84 -e '/<.*>/d' \ 85 -e 's;\(.*\):[^"]*"\([^"]*\)".*;\1: \2;' >>.depend 86 cd ${SRCDIR}; grep '^#[ ]*include' ${SRCSRC} | sed \ 87 -e '/<.*>/d' \ 88 -e 's;:[^"]*"\([^"]*\)".*;: ${SRCDIR}/\1;' \ 89 -e 's;^\([a-zA-Z0-9.]*\)\.c;\1.o;' \ 90 -e 's;: ${SRCDIR}/0.h;: 0.h;' \ 91 -e 's;: ${SRCDIR}/whoami.h;: whoami.h;' \ 92 -e 's;: ${SRCDIR}/opcode.h;: opcode.h;' >>${BINDIR}/.depend 93 grep '^#[ ]*include' *.c | sed \ 94 -e '/<.*>/d' \ 95 -e 's;:[^"]*"\([^"]*\)".*;: ${SRCDIR}/\1;' \ 96 -e 's;^\([a-zA-Z0-9.]*\)\.c;\1.o;' \ 97 -e 's;: ${SRCDIR}/0.h;: 0.h;' \ 98 -e 's;: ${SRCDIR}/whoami.h;: whoami.h;' \ 99 -e 's;: ${SRCDIR}/opcode.h;: opcode.h;' >>.depend 100