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