Commit | Line | Data |
---|---|---|
cbee5529 WH |
1 | # Makefile for f2c, a Fortran 77 to C converter |
2 | ||
3 | PROG= f2c | |
4 | ||
5 | g = -O -g | |
6 | CFLAGS = $g -DANSI_Libraries | |
7 | SHELL = /bin/sh | |
8 | ||
9 | SRCSd = main.c init.c gram.c lex.c proc.c equiv.c data.c format.c \ | |
10 | expr.c exec.c intr.c io.c misc.c error.c mem.c names.c \ | |
11 | output.c p1output.c pread.c put.c putpcc.c vax.c formatdata.c \ | |
12 | parse_args.c niceprintf.c cds.c sysdep.c version.c | |
13 | SRCS = $(SRCSd) malloc.c | |
14 | ||
15 | gram.c: gram.head gram.dcl gram.expr gram.exec gram.io defs.h tokdefs.h | |
16 | ( sed <tokdefs.h "s/#define/%token/" ;\ | |
17 | cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in | |
18 | $(YACC) $(YFLAGS) gram.in | |
19 | echo "(expect 4 shift/reduce)" | |
20 | sed 's/^# line.*/\/* & *\//' y.tab.c >gram.c | |
21 | rm -f gram.in y.tab.c | |
22 | ||
23 | tokdefs.h: tokens | |
24 | grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs.h | |
25 | ||
26 | CLEANFILES+=\ | |
27 | gram.c tokdefs.h | |
28 | ||
29 | .include <bsd.prog.mk> |