# makefile generated by hand (Michael Holzapfel Sept. 1995)
# modified Dez.1998
# Makefile for GNU F77 compiler.
#   Copyright (C) 1995 Free Software Foundation, Inc.

#This file is part of GNU Fortran.

#GNU Fortran is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.

#GNU Fortran is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with GNU Fortran; see the file COPYING.  If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.

# The makefile built from this file lives in the language subdirectory.
# Its purpose is to provide support for:
#
# 1) recursion where necessary, and only then (building .o's), and
# 2) building and debugging f771 from the language subdirectory, and
# 3) nothing else.
#
# The parent makefile handles all other chores, with help from the
# language makefile fragment, of course.
#
# The targets for external use are:
# all, TAGS, ???mostlyclean, ???clean.

# Suppress smart makes who think they know how to automake Yacc files
.y.c:

# Variables that exist for you to override.
# See below for how to change them for certain systems.

ALLOCA =

# Various ways of specifying flags for compilations:
# CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
# BOOT_CFLAGS is the value of CFLAGS to pass
# to the stage2 and stage3 compilations
# XCFLAGS is used for most compilations but not when using the GCC just built.
XCFLAGS =
CFLAGS = -g
BOOT_CFLAGS = -O $(CFLAGS)
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
T_CFLAGS =

X_CPPFLAGS =
T_CPPFLAGS =

CC = gcc
exeext = .exe
HOST_CC = $(CC)
BISON = bison
BISONFLAGS =
LEX = flex
LEXFLAGS =
AR = ar
AR_FLAGS = rc
#SHELL = /bin/sh
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi

exec_prefix = /emx/dummy
version=0.5.23-2.8.1
mainversion=2.8

# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
# to compile all the gen* files first by hand to avoid erroneous results.
P =

# This is used in the definition of SUBDIR_USE_ALLOCA.
# ??? Perhaps it would be better if it just looked for *gcc*.
OLDCC = cc

# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
# It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)

# Tools to use when building a cross-compiler.
# These are used because `configure' appends `cross-make'
# to the makefile when making a cross-compiler.

target= 
xmake_file= 
tmake_file= 
#version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
#mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`

# Directory where sources are, from where we are.
# Note that this should be overridden when building f771, which happens
# at the top level, not in f.  Likewise for VPATH (if added).
srcdir = ..
# The following overriding of the VPATH inserted by configure (as well as
# the change to the standard srcdir above) is due to not building in the f
# directory as standard.
#VPATH = $(srcdir)../

# Additional system libraries to link with.
CLIB=

# Change this to a null string if obstacks are installed in the
# system library.
OBSTACK=obstack.o

# Choose the real default target.
ALL=all

# End of variables for you to override.

# Definition of `all' is here so that new rules inserted by sed
# do not specify the default target.
all: all.indirect

# This tells GNU Make version 3 not to put all variables in the environment.
.NOEXPORT:

# sed inserts variable overrides after the following line.
####target overrides
####host overrides
####cross overrides
####build overrides

# Now figure out from those variables how to compile and link.

#all.indirect: f/Makefile f771
all.indirect: f771 g77

# IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
INTERNAL_CFLAGS = $(CROSS) -DIN_GCC -DUSE_HOST_LIMITS

# This is the variable actually used when we compile.
#ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W -Wall
ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)

# Likewise.
ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)

# f771 is so big, need to tell linker on m68k-next-nextstep* to make enough
# room for it.
#F771_LDFLAGS = ` case "${target}" in m68k-next-nextstep*) echo -segaddr __DATA 6000000 ;; esac `
F771_LDFLAGS = 

# Even if ALLOCA is set, don't use it if compiling with GCC.

SUBDIR_OBSTACK = ../$(OBSTACK)
SUBDIR_USE_ALLOCA = 
SUBDIR_MALLOC = 

# How to link with both our special library facilities
# and the system's installed libraries.
LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB)

# Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
INCLUDES = -If -I. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/config  -I$(srcdir)/config/i386

#(Old way of doing things, new way being better for -g:)
#INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config

# Flags_to_pass to recursive makes.
# Note that we don't need to distinguish the `_FOR_TARGET' cross tools
# as AR and RANLIB are set appropriately by configure iff cross compiling.
FLAGS_TO_PASS = \
	"CROSS=$(CROSS)" \
	"AR_FLAGS=$(AR_FLAGS)" \
	"AR=$(AR)" \
	"BISON=$(BISON)" \
	"BISONFLAGS=$(BISONFLAGS)" \
	"CC=$(CC)" \
	"CFLAGS=$(CFLAGS)" \
	"GCCFLAGS=$(GCCFLAGS)" \
	"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
	"LDFLAGS=$(LDFLAGS)" \
	"LEX=$(LEX)" \
	"LEXFLAGS=$(LEXFLAGS)" \
	"MAKEINFO=$(MAKEINFO)" \
	"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
	"RANLIB=$(RANLIB)" \
	"RANLIB_TEST=$(RANLIB_TEST)" \
	"SHELL=$(SHELL)" \
	"exec_prefix=$(exec_prefix)" \
	"prefix=$(prefix)" \
	"tooldir=$(tooldir)" \
	"bindir=$(bindir)" \
	"libsubdir=$(libsubdir)"

# Always use -I$(srcdir)/config when compiling.
.c.o:
	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< -o $@

# Lists of files for various purposes.

# Language-specific object files for g77

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


OBJDEPS = ../dwarf2ou.o \
          ../bitmap.o \
          ../f-calls.o \
          ../except.o \
          ../profile.o \
          ../toplev.o \
          ../version.o \
          ../tree.o \
          ../print-tr.o \
          ../stor-lay.o \
          ../fold-con.o \
          ../function.o \
          ../stmt.o \
          ../expr.o  \
          ../expmed.o \
          ../explow.o \
          ../optabs.o  \
          ../varasm.o  \
          ../rtl.o  \
          ../print-rt.o  \
          ../rtlanal.o  \
          ../emit-rtl.o  \
          ../real.o   \
          ../dbxout.o  \
          ../sdbout.o  \
          ../dwarfout.o  \
          ../xcoffout.o   \
          ../integrat.o  \
          ../jump.o  \
          ../cse.o  \
          ../loop.o  \
          ../unroll.o  \
          ../flow.o  \
          ../stupid.o  \
          ../combine.o   \
          ../regclass.o  \
          ../local-al.o  \
          ../global.o  \
          ../reload.o  \
          ../reload1.o  \
          ../caller-s.o   \
          ../insn-pee.o  \
          ../reorg.o  \
          ../sched.o  \
          ../final.o  \
          ../recog.o  \
          ../reg-stac.o   \
          ../insn-opi.o  \
          ../insn-rec.o  \
          ../insn-ext.o  \
          ../insn-out.o  \
          ../insn-emi.o   \
          ../insn-att.o  \
          ../emx.o  \
          ../getpwd.o  \
          ../convert.o   \
          ../bc-emit.o  \
          ../bc-optab.o 



	OBJS = $(OBJDEPS)

compiler: f771 g77

#g77.o: $(CONFIG_H) multilib.h config.status $(lang_specs_files) g77.c

DRIVER_DEFINES = \
  -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"

g77.o: $(CONFIG_H) ../gcc.c
	 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(DRIVER_DEFINES) \
	   -DLANG_SPECIFIC_DRIVER -c ../gcc.c -o $@

g77version.o: version.c
	 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -o g77version.o version.c

g77: g77.o g77spec.o g77version.o ../version.o ../choose-t.o ../pexecute.o ../prefix.o \
  $(LIBDEPS) $(EXTRA_GCC_OBJS) $(CLH_G77)
	$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(F771_LDFLAGS) -o $@ \
	g77.o g77spec.o g77version.o ../version.o ../choose-t.o ../pexecute.o ../prefix.o ../obstack.o 
# This is now meant to be built in the top level directory, not `f':
f771: $(P) $(F77_OBJS) $(OBJDEPS) $(LIBDEPS)
	rm -f ../f771$(exeext)
	$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(F771_LDFLAGS) -o $@ \
	      $(F77_OBJS) $(OBJS) $(LIBS)

# Check in case anyone expects to build in this directory:
#f/Makefile:
#	@if test ! -f f/Makefile ; \
#	then echo "Build f771 only at the top level." 2>&1; exit 1; \
#	else true; fi

#Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure

native: f771

# Compiling object files from source files.

# Note that dependencies on obstack.h are not written
# because that file is not part of GCC.

# F77 language-specific files.

# These macros expand to the corresponding g77-source .j files plus
# the gcc-source files involved (each file itself, plus whatever
# files on which it depends, but without including stuff resulting
# from configuration, since we can't guess at that).  The files
# that live in a distclean'd gcc source directory have "$(srcdir)/../"
# prefixes, while the others don't because they'll be created
# only in the build directory.
CONFIG_H = config.j $(srcdir)/config.h
CONVERT_H = convert.j $(srcdir)/convert.h
FLAGS_H = flags.j $(srcdir)/flags.h
##GLIMITS_H = $(srcdir)/glimits.j $(srcdir)/../glimits.h
GLIMITS_H = glimits.j 
HCONFIG_H = hconfig.j hconfig.h
INPUT_H = input.j $(srcdir)/input.h
RTL_H = rtl.j $(srcdir)/rtl.h $(srcdir)/rtl.def \
	$(srcdir)/machmode.h $(srcdir)/machmode.def
TCONFIG_H = tconfig.j tconfig.h
TM_H = tm.j tm.h
TREE_H = tree.j $(srcdir)/tree.h $(srcdir)/real.h \
	$(srcdir)/tree.def $(srcdir)/machmode.h $(srcdir)/machmode.def

#Build the first part of this list with the command line:
#    cd gcc/; make deps-kinda -f f/Makefile.in
#Note that this command uses the host C compiler;
# use HOST_CC="./xgcc -B./" to use GCC in the build directory, for example.
#Also note that this particular build file seems to want to use
# substitions: $(CONFIG_H) for config.h; $(TREE_H) for tree.h; and
# $(RTL_H) for rtl.h.  deps-kinda uses a sed script to do those
# substitutions, plus others for elegance.
ansify.o: ansify.c $(HCONFIG_H) $(SYSTEM_H) $(ASSERT_H)
bad.o: bad.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bad.h bad.def where.h \
 $(GLIMITS_H) top.h malloc.h $(FLAGS_H) com.h com-rt.def $(TREE_H) bld.h \
 bld-op.def bit.h info.h info-b.def info-k.def info-w.def target.h \
 lex.h type.h intrin.h intrin.def lab.h symbol.h symbol.def equiv.h \
 storag.h global.h name.h $(TOPLEV_H)
bit.o: bit.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H) bit.h \
 malloc.h
bld.o: bld.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bld.h bld-op.def bit.h \
 malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
 info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
 type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
 intrin.h intrin.def
com.o: com.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(FLAGS_H) $(RTL_H) $(TOPLEV_H) \
 $(TREE_H) $(OUTPUT_H) $(CONVERT_H) com.h com-rt.def bld.h bld-op.def bit.h \
 malloc.h info.h info-b.def info-k.def info-w.def target.h bad.h \
 bad.def where.h $(GLIMITS_H) top.h lex.h type.h intrin.h intrin.def \
 lab.h symbol.h symbol.def equiv.h storag.h global.h name.h expr.h \
 implic.h src.h st.h
data.o: data.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) data.h bld.h \
 bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
 info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
 lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
 name.h intrin.h intrin.def expr.h st.h
equiv.o: equiv.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) equiv.h bld.h \
 bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
 info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
 lex.h type.h lab.h storag.h symbol.h symbol.def global.h name.h \
 intrin.h intrin.def data.h
expr.o: expr.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) expr.h bld.h \
 bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
 info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
 lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
 name.h intrin.h intrin.def implic.h src.h st.h stamp-str
fini.o: fini.c proj.h malloc.h
global.o: global.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) global.h info.h \
 info-b.def info-k.def info-w.def target.h $(TREE_H) bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h lex.h type.h name.h symbol.h \
 symbol.def bld.h bld-op.def bit.h com.h com-rt.def lab.h storag.h \
 intrin.h intrin.def equiv.h
implic.o: implic.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) implic.h info.h \
 info-b.def info-k.def info-w.def target.h $(TREE_H) bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h lex.h type.h symbol.h symbol.def \
 bld.h bld-op.def bit.h com.h com-rt.def lab.h storag.h intrin.h \
 intrin.def equiv.h global.h name.h src.h
info.o: info.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) info.h info-b.def \
 info-k.def info-w.def target.h $(TREE_H) bad.h bad.def where.h $(GLIMITS_H) \
 top.h malloc.h lex.h type.h
intdoc.o: intdoc.c $(HCONFIG_H) $(SYSTEM_H) $(ASSERT_H) intrin.h intrin.def \
 intdoc.h0 intdoc.h0
intrin.o: intrin.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) intrin.h \
 intrin.def bld.h bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) \
 info.h info-b.def info-k.def info-w.def target.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h lex.h type.h lab.h storag.h symbol.h \
 symbol.def equiv.h global.h name.h expr.h src.h
lab.o: lab.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) lab.h com.h com-rt.def \
 $(TREE_H) bld.h bld-op.def bit.h malloc.h info.h info-b.def info-k.def \
 info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
 type.h intrin.h intrin.def symbol.h symbol.def equiv.h storag.h \
 global.h name.h
lex.o: lex.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) top.h malloc.h where.h \
 $(GLIMITS_H) bad.h bad.def com.h com-rt.def $(TREE_H) bld.h bld-op.def \
 bit.h info.h info-b.def info-k.def info-w.def target.h lex.h type.h \
 intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
 global.h name.h src.h $(FLAGS_H) $(INPUT_H) $(TOPLEV_H) $(OUTPUT_H)
malloc.o: malloc.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) malloc.h
name.o: name.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bad.h bad.def where.h \
 $(GLIMITS_H) top.h malloc.h name.h global.h info.h info-b.def info-k.def \
 info-w.def target.h $(TREE_H) lex.h type.h symbol.h symbol.def bld.h \
 bld-op.def bit.h com.h com-rt.def lab.h storag.h intrin.h intrin.def \
 equiv.h src.h
parse.o: parse.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) top.h malloc.h \
 where.h $(GLIMITS_H) com.h com-rt.def $(TREE_H) bld.h bld-op.def bit.h \
 info.h info-b.def info-k.def info-w.def target.h bad.h bad.def lex.h \
 type.h intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
 global.h name.h version.h $(FLAGS_H)
proj.o: proj.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H)
src.o: src.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) src.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h
st.o: st.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) st.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h lex.h symbol.h symbol.def bld.h \
 bld-op.def bit.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
 info-w.def target.h type.h lab.h storag.h intrin.h intrin.def equiv.h \
 global.h name.h sta.h stamp-str stb.h expr.h stp.h stt.h stc.h std.h \
 stv.h stw.h ste.h sts.h stu.h
sta.o: sta.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) sta.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h lex.h stamp-str symbol.h symbol.def \
 bld.h bld-op.def bit.h com.h com-rt.def $(TREE_H) info.h info-b.def \
 info-k.def info-w.def target.h type.h lab.h storag.h intrin.h \
 intrin.def equiv.h global.h name.h implic.h stb.h expr.h stp.h stt.h \
 stc.h std.h stv.h stw.h
stb.o: stb.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stb.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h expr.h bld.h bld-op.def bit.h com.h \
 com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def target.h \
 lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
 name.h intrin.h intrin.def stp.h stt.h stamp-str src.h sta.h stc.h
stc.o: stc.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stc.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h bld.h bld-op.def bit.h com.h \
 com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def target.h \
 lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
 name.h intrin.h intrin.def expr.h stp.h stt.h stamp-str data.h implic.h \
 src.h sta.h std.h stv.h stw.h
std.o: std.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) std.h bld.h bld-op.def \
 bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
 info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
 type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
 intrin.h intrin.def stp.h stt.h stamp-str stv.h stw.h sta.h ste.h sts.h
ste.o: ste.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(RTL_H) $(TOPLEV_H) ste.h \
 bld.h bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h \
 info-b.def info-k.def info-w.def target.h bad.h bad.def where.h \
 $(GLIMITS_H) top.h lex.h type.h lab.h storag.h symbol.h symbol.def \
 equiv.h global.h name.h intrin.h intrin.def stp.h stt.h stamp-str sts.h \
 stv.h stw.h expr.h sta.h
storag.o: storag.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) storag.h bld.h \
 bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
 info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
 lex.h type.h lab.h symbol.h symbol.def equiv.h global.h name.h \
 intrin.h intrin.def data.h
stp.o: stp.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stp.h bld.h bld-op.def \
 bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
 info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
 type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
 intrin.h intrin.def stt.h
str.o: str.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) src.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h malloc.h stamp-str lex.h
sts.o: sts.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) sts.h malloc.h com.h \
 com-rt.def $(TREE_H) bld.h bld-op.def bit.h info.h info-b.def info-k.def \
 info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
 type.h intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
 global.h name.h
stt.o: stt.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stt.h top.h malloc.h \
 where.h $(GLIMITS_H) bld.h bld-op.def bit.h com.h com-rt.def $(TREE_H) \
 info.h info-b.def info-k.def info-w.def target.h bad.h bad.def lex.h \
 type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
 intrin.h intrin.def stp.h expr.h sta.h stamp-str
stu.o: stu.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bld.h bld-op.def bit.h \
 malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
 info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
 type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
 intrin.h intrin.def implic.h stu.h sta.h stamp-str
stv.o: stv.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stv.h lab.h com.h \
 com-rt.def $(TREE_H) bld.h bld-op.def bit.h malloc.h info.h info-b.def \
 info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
 lex.h type.h intrin.h intrin.def symbol.h symbol.def equiv.h storag.h \
 global.h name.h
stw.o: stw.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stw.h bld.h bld-op.def \
 bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
 info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
 type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
 intrin.h intrin.def stv.h sta.h stamp-str
symbol.o: symbol.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) symbol.h \
 symbol.def bld.h bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) \
 info.h info-b.def info-k.def info-w.def target.h bad.h bad.def \
 where.h $(GLIMITS_H) top.h lex.h type.h lab.h storag.h intrin.h \
 intrin.def equiv.h global.h name.h src.h st.h
target.o: target.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H) \
 target.h $(TREE_H) bad.h bad.def where.h top.h malloc.h info.h \
 info-b.def info-k.def info-w.def type.h lex.h
top.o: top.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) top.h malloc.h where.h \
 $(GLIMITS_H) bad.h bad.def bit.h bld.h bld-op.def com.h com-rt.def \
 $(TREE_H) info.h info-b.def info-k.def info-w.def target.h lex.h type.h \
 lab.h storag.h symbol.h symbol.def equiv.h global.h name.h intrin.h \
 intrin.def data.h expr.h implic.h src.h st.h $(FLAGS_H) $(TOPLEV_H)
type.o: type.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) type.h malloc.h
version.o: version.c
where.o: where.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) where.h $(GLIMITS_H) \
 top.h malloc.h lex.h

# The rest of this list (Fortran 77 language-specific files) is hand-generated.

stamp-str: 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

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

fini: fini.o proj.o
	$(HOST_CC) $(HOST_CFLAGS) -Zexe -W -Wall $(HOST_LDFLAGS) -o fini fini.o proj.o

# Other than str-*.j, the *.j files are dummy #include files
# that normally just #include the corresponding back-end *.h
# files, but not if MAKING_DEPENDENCIES is #defined.  The str-*.j
# files also are not actually included if MAKING_DEPENDENCIES
# is #defined.  The point of all this is to come up with a clean
# dependencies list whether working in a clean directory, such
# that str-*.j and such do not exist, or in a directory full
# of already-built files.  Any dependency on a str-*.j file
# implies a dependency on str.h, so we key on that to replace
# it with stamp-str, and dependencies on the other *.j files
# are generally left alone (modulo special macros like RTL_H)
# because we might not want to recompile all of g77 just
# because a back-end file changes.  MG is usually "-MG" but
# should be defined with "make MG= deps-kinda..." if using
# a compiler that doesn't support -MG (gcc does as of 2.6) --
# it prevents diagnostics when an #include file is missing,
# as will be the case with proj.h in a clean directory.
MG=-MG
deps-kinda:
	$(HOST_CC) -DMAKING_DEPENDENCIES -MM $(MG) -I -If *.c | \
	  sed -e 's: \([.]/\)*assert[.]j: $$(ASSERT_H):g' \
	      -e 's: \([.]/\)*config[.]j: $$(CONFIG_H):g' \
	      -e 's: \([.]/\)*convert[.]j: $$(CONVERT_H):g' \
	      -e 's: \([.]/\)*flags[.]j: $$(FLAGS_H):g' \
	      -e 's: \([.]/\)*glimits[.]j: $$(GLIMITS_H):g' \
	      -e 's: \([.]/\)*hconfig[.]j: $$(HCONFIG_H):g' \
	      -e 's: \([.]/\)*input[.]j: $$(INPUT_H):g' \
	      -e 's: \([.]/\)*rtl[.]j: $$(RTL_H):g' \
	      -e 's: \([.]/\)*tconfig[.]j: $$(TCONFIG_H):g' \
	      -e 's: \([.]/\)*tm[.]j: $$(TM_H):g' \
	      -e 's: \([.]/\)*tree[.]j: $$(TREE_H):g' \
	      -e 's: proj[.]h: proj.h:g' \
	      -e 's: \([.]/\)*str[.]h: stamp-str:g' \
	      -e 's%^\(.*\)[ ]*: %f/\1: %g'


# These exist for maintenance purposes.

# Update the tags table.
TAGS: force
	cd $(srcdir) ;				\
	etags *.c *.h ;				\
	echo 'l' | tr 'l' '\f' >> TAGS ;	\
	echo 'parse.y,0' >> TAGS ; 		\
	etags -a ../*.h ../*.c;

.PHONY: all all.indirect compiler native deps-kinda TAGS

force:
