1994-01-05 03:24:01 +00:00
|
|
|
# Makefile for f2c, a Fortran 77 to C converter
|
|
|
|
|
|
|
|
PROG= f2c
|
|
|
|
|
1995-09-28 20:43:33 +00:00
|
|
|
CFLAGS += -DANSI_Libraries -I${.CURDIR} -I.
|
1994-01-05 03:24:01 +00:00
|
|
|
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
|
1998-03-06 13:51:18 +00:00
|
|
|
SRCS = $(SRCSd) tokdefs.h # malloc.c
|
1994-01-05 03:24:01 +00:00
|
|
|
|
1994-01-29 00:48:19 +00:00
|
|
|
GRAMFILES = ${.CURDIR}/gram.head ${.CURDIR}/gram.dcl ${.CURDIR}/gram.expr\
|
|
|
|
${.CURDIR}/gram.exec ${.CURDIR}/gram.io
|
|
|
|
|
|
|
|
gram.c: ${GRAMFILES} ${.CURDIR}/defs.h tokdefs.h
|
|
|
|
(sed < tokdefs.h "s/#define/%token/" ; \
|
|
|
|
cat ${GRAMFILES}) > gram.in
|
1994-01-05 03:24:01 +00:00
|
|
|
$(YACC) $(YFLAGS) gram.in
|
1996-10-25 15:50:17 +00:00
|
|
|
echo "# expect 4 shift/reduce conflicts"
|
1994-01-05 03:24:01 +00:00
|
|
|
sed 's/^# line.*/\/* & *\//' y.tab.c >gram.c
|
|
|
|
rm -f gram.in y.tab.c
|
|
|
|
|
1994-01-29 00:48:19 +00:00
|
|
|
tokdefs.h: ${.CURDIR}/tokens
|
|
|
|
grep -n . <${.CURDIR}/tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs.h
|
1994-01-05 03:24:01 +00:00
|
|
|
|
|
|
|
CLEANFILES+=\
|
1994-02-06 01:12:15 +00:00
|
|
|
gram.c tokdefs.h y.tab.h
|
1994-01-05 03:24:01 +00:00
|
|
|
|
1997-04-24 17:04:04 +00:00
|
|
|
beforeinstall:
|
|
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/f2c.h \
|
|
|
|
${DESTDIR}/usr/include
|
|
|
|
|
1994-01-05 03:24:01 +00:00
|
|
|
.include <bsd.prog.mk>
|