# Makefile for GNU F77 compiler.

PROG=		f771
BINDIR=		${PREFIX}/libexec
MANDIR=		${PREFIX}/man/man
MAN1=		g77.1
CFLAGS+= 	-I. -I../g77-2.6.3-0.5.14 -I${COMPILERSOURCE}/include -DIN_GCC
# Hack, since ../Makefile.inc overwrites this to ../cc_int/libcc_int.a
_LIBCC_INT=	../g77-2.6.3-0.5.14/libcc_int.a
DPADD+=		${_LIBCC_INT} ${LIBGNUMALLOC}
LDADD+=		${_LIBCC_INT} -lgnumalloc

# XXXX delete me
#.c.o:
#	$(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@

# Language-specific object files for g77

SRCS = bad.c bit.c bld.c com.c data.c equiv.c expr.c global.c \
 implic.c info.c intrin.c lab.c lex.c malloc.c name.c parse.c \
 proj.c src.c st.c sta.c stb.c stc.c std.c ste.c storag.c stp.c \
 str.c sts.c stt.c stu.c stv.c stw.c symbol.c target.c top.c type.c \
 where.c zzz.c

bad.o: stamp-str 
fini.o proj.o: proj.h

stamp-str: fini str-1t.h str-1t.j str-2t.h str-2t.j \
 str-fo.h str-fo.j str-io.h str-io.j str-nq.h  str-nq.j \
 str-op.h str-op.j str-ot.h str-ot.j
	touch stamp-str

fini: fini.o proj.o
	$(CC) $(CFLAGS) -o fini fini.o proj.o

str-1t.h str-1t.j: fini str-1t.fin
	./fini str-1t.fin str-1t.j str-1t.h

str-2t.h str-2t.j: fini str-2t.fin
	./fini str-2t.fin str-2t.j str-2t.h

str-fo.h str-fo.j: fini str-fo.fin
	./fini str-fo.fin str-fo.j str-fo.h

str-io.h str-io.j: fini str-io.fin
	./fini str-io.fin str-io.j str-io.h

str-nq.h str-nq.j: fini str-nq.fin
	./fini str-nq.fin str-nq.j str-nq.h

str-op.h str-op.j: fini str-op.fin
	./fini str-op.fin str-op.j str-op.h

str-ot.h str-ot.j: fini str-ot.fin
	./fini str-ot.fin str-ot.j str-ot.h

.include <bsd.prog.mk>
