| 1 | # |
| 2 | # Copyright (c) 1987 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.2 (Berkeley) %G% |
| 7 | # |
| 8 | CFLAGS= -O -DHERE=TAHOE -DTARGET=TAHOE -DFAMILY=PCC -DUCBVAXASM \ |
| 9 | -DUCBPASS2 -I$(INCLDIR)/usr/include -I../include |
| 10 | LIBC= /lib/libc.a |
| 11 | SRCS= bb.c conv.c data.c equiv.c error.c exec.c expr.c fmt.c gram.c init.c \ |
| 12 | intr.c io.c lex.c main.c misc.c optcse.c optim.c optloop.c paramset.c \ |
| 13 | proc.c put.c putpcc.c regalloc.c setfmt.c stab.c tahoe.c tahoex.c |
| 14 | OBJS= bb.o conv.o data.o equiv.o error.o exec.o expr.o fmt.o gram.o init.o \ |
| 15 | intr.o io.o lex.o main.o misc.o optcse.o optim.o optloop.o paramset.o \ |
| 16 | proc.o put.o putpcc.o regalloc.o setfmt.o stab.o tahoe.o tahoex.o |
| 17 | |
| 18 | all: f77pass1 |
| 19 | |
| 20 | f77pass1: ${OBJS} ${LIBC} |
| 21 | ${CC} -o $@ ${CFLAGS} ${OBJS} |
| 22 | |
| 23 | gram.c: gram.head gram.dcl gram.expr gram.exec gram.io tokdefs.h |
| 24 | ( sed <tokdefs.h "s/#define/%token/"; \ |
| 25 | cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in |
| 26 | ${YACC} gram.in |
| 27 | mv y.tab.c gram.c |
| 28 | |
| 29 | gram.head: defs.h data.h |
| 30 | |
| 31 | tokdefs.h: tokens |
| 32 | grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs.h |
| 33 | |
| 34 | clean: |
| 35 | rm -f ${OBJS} core f77pass1 gram.c gram.in |
| 36 | |
| 37 | cleandir: clean |
| 38 | rm -f ${MAN} tags .depend |
| 39 | |
| 40 | depend: ${SRCS} |
| 41 | mkdep ${CFLAGS} ${SRCS} |
| 42 | |
| 43 | install: ${MAN} |
| 44 | install -s -o bin -g bin -m 755 f77pass1 ${DESTDIR}/usr/libexec |
| 45 | |
| 46 | lint: ${SRCS} |
| 47 | lint ${CFLAGS} ${SRCS} |
| 48 | |
| 49 | tags: ${SRCS} |
| 50 | ctags ${SRCS} |