Adjust the C++ preprocessor to include /usr/include/c++ by default for
[dragonfly.git] / contrib / gcc / f / Makefile.in
1 # Makefile for GNU F77 compiler.
2 #   Copyright (C) 1995-1998 Free Software Foundation, Inc.
3
4 #This file is part of GNU Fortran.
5
6 #GNU Fortran is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
9 #any later version.
10
11 #GNU Fortran is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #GNU General Public License for more details.
15
16 #You should have received a copy of the GNU General Public License
17 #along with GNU Fortran; see the file COPYING.  If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 #02111-1307, USA.
20
21 # The makefile built from this file lives in the language subdirectory.
22 # Its purpose is to provide support for:
23 #
24 # 1) recursion where necessary, and only then (building .o's), and
25 # 2) building and debugging f771 from the language subdirectory, and
26 # 3) nothing else.
27 #
28 # The parent makefile handles all other chores, with help from the
29 # language makefile fragment, of course.
30 #
31 # The targets for external use are:
32 # all, TAGS, ???mostlyclean, ???clean.
33
34 # Suppress smart makes who think they know how to automake Yacc files
35 .y.c:
36
37 # Variables that exist for you to override.
38 # See below for how to change them for certain systems.
39
40 ALLOCA =
41
42 # Various ways of specifying flags for compilations:
43 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
44 # BOOT_CFLAGS is the value of CFLAGS to pass
45 # to the stage2 and stage3 compilations
46 # XCFLAGS is used for most compilations but not when using the GCC just built.
47 XCFLAGS =
48 CFLAGS = -g
49 BOOT_CFLAGS = -O $(CFLAGS)
50 # These exists to be overridden by the x-* and t-* files, respectively.
51 X_CFLAGS =
52 T_CFLAGS =
53
54 X_CPPFLAGS =
55 T_CPPFLAGS =
56
57 CC = @CC@
58 BISON = bison
59 BISONFLAGS =
60 LEX = flex
61 LEXFLAGS =
62 AR = ar
63 AR_FLAGS = rc
64 SHELL = /bin/sh
65 MAKEINFO = makeinfo
66 TEXI2DVI = texi2dvi
67
68 # Define this as & to perform parallel make on a Sequent.
69 # Note that this has some bugs, and it seems currently necessary
70 # to compile all the gen* files first by hand to avoid erroneous results.
71 P =
72
73 # This is used in the definition of SUBDIR_USE_ALLOCA.
74 # ??? Perhaps it would be better if it just looked for *gcc*.
75 OLDCC = cc
76
77 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
78 # It omits XCFLAGS, and specifies -B./.
79 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
80 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
81
82 # Tools to use when building a cross-compiler.
83 # These are used because `configure' appends `cross-make'
84 # to the makefile when making a cross-compiler.
85
86 target=@target@
87 xmake_file=@dep_host_xmake_file@
88 tmake_file=@dep_tmake_file@
89
90 # Directory where sources are, from where we are.
91 srcdir = @srcdir@
92 VPATH = @srcdir@
93
94 # Additional system libraries to link with.
95 CLIB=
96
97 # Change this to a null string if obstacks are installed in the
98 # system library.
99 OBSTACK=obstack.o
100
101 # Choose the real default target.
102 ALL=all
103
104 # End of variables for you to override.
105
106 # Definition of `all' is here so that new rules inserted by sed
107 # do not specify the default target.
108 all: all.indirect
109
110 # This tells GNU Make version 3 not to put all variables in the environment.
111 .NOEXPORT:
112
113 # sed inserts variable overrides after the following line.
114 ####target overrides
115 @target_overrides@
116 ####host overrides
117 @host_overrides@
118 ####cross overrides
119 @cross_defines@
120 @cross_overrides@
121 ####build overrides
122 @build_overrides@
123 #\f
124 # Now figure out from those variables how to compile and link.
125
126 all.indirect: Makefile ../f771$(exeext)
127
128 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
129 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
130
131 # This is the variable actually used when we compile.
132 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W -Wall
133
134 # Likewise.
135 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
136
137 # We should be compiling with the built compiler, for which
138 # BOOT_LDFLAGS is appropriate.  (Formerly we had a separate
139 # F771_LDFLAGS, but the ld flags can be taken care of by the target
140 # configuration files in egcs.)
141 LDFLAGS=$(BOOT_LDFLAGS)
142
143 # Even if ALLOCA is set, don't use it if compiling with GCC.
144
145 SUBDIR_OBSTACK = `if [ x$(OBSTACK) != x ]; then echo ../$(OBSTACK); else true; fi`
146 SUBDIR_USE_ALLOCA = `case "${CC}" in "${OLDCC}") if [ x$(ALLOCA) != x ]; then echo ../$(ALLOCA); else true; fi ;; esac`
147 SUBDIR_MALLOC = `if [ x$(MALLOC) != x ]; then echo ../$(MALLOC); else true; fi`
148
149 # How to link with both our special library facilities
150 # and the system's installed libraries.
151 LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB)
152
153 # Specify the directories to be searched for header files.
154 # Both . and srcdir are used, in that order,
155 # so that tm.h and config.h will be found in the compilation
156 # subdirectory rather than in the source directory.
157 INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)/../../include
158
159 # Always use -I$(srcdir)/config when compiling.
160 .c.o:
161         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
162
163 #\f
164 # Lists of files for various purposes.
165
166 # Language-specific object files for g77
167
168 F77_OBJS = \
169  bad.o \
170  bit.o \
171  bld.o \
172  com.o \
173  data.o \
174  equiv.o \
175  expr.o \
176  global.o \
177  implic.o \
178  info.o \
179  intrin.o \
180  lab.o \
181  lex.o \
182  malloc.o \
183  name.o \
184  parse.o \
185  proj.o \
186  src.o \
187  st.o \
188  sta.o \
189  stb.o \
190  stc.o \
191  std.o \
192  ste.o \
193  storag.o \
194  stp.o \
195  str.o \
196  sts.o \
197  stt.o \
198  stu.o \
199  stv.o \
200  stw.o \
201  symbol.o \
202  target.o \
203  top.o \
204  type.o \
205  version.o \
206  where.o
207
208 # Language-independent object files.
209 OBJS = `cat ../stamp-objlist`
210 OBJDEPS = ../stamp-objlist
211
212 compiler: ../f771$(exeext)
213 ../f771$(exeext): $(P) $(F77_OBJS) $(OBJDEPS) $(LIBDEPS)
214         rm -f f771$(exeext)
215         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(F77_OBJS) $(OBJS) $(LIBS)
216
217 Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
218         cd ..; $(SHELL) config.status
219
220 native: config.status ../f771$(exeext)
221 #\f
222 # Compiling object files from source files.
223
224 # Note that dependencies on obstack.h are not written
225 # because that file is not part of GCC.
226
227 # F77 language-specific files.
228
229 # These macros expand to the corresponding g77-source .j files plus
230 # the gcc-source files involved (each file itself, plus whatever
231 # files on which it depends, but without including stuff resulting
232 # from configuration, since we can't guess at that).  The files
233 # that live in a distclean'd gcc source directory have "$(srcdir)/"
234 # prefixes, while the others don't because they'll be created
235 # only in the build directory.
236 ASSERT_H = $(srcdir)/assert.j $(srcdir)/../assert.h
237 CONFIG_H = $(srcdir)/config.j ../config.h
238 CONVERT_H = $(srcdir)/convert.j $(srcdir)/../convert.h
239 FLAGS_H = $(srcdir)/flags.j $(srcdir)/../flags.h
240 GLIMITS_H = $(srcdir)/glimits.j $(srcdir)/../glimits.h
241 HCONFIG_H = $(srcdir)/hconfig.j ../hconfig.h
242 INPUT_H = $(srcdir)/input.j $(srcdir)/../input.h
243 OUTPUT_H = $(srcdir)/output.j $(srcdir)/../output.h
244 RTL_H = $(srcdir)/rtl.j $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
245         $(srcdir)/../machmode.h $(srcdir)/../machmode.def
246 SYSTEM_H = $(srcdir)/system.j $(srcdir)/../system.h
247 TCONFIG_H = $(srcdir)/tconfig.j ../tconfig.h
248 TM_H = $(srcdir)/tm.j ../tm.h
249 TOPLEV_H = $(srcdir)/toplev.j $(srcdir)/../toplev.h
250 TREE_H = $(srcdir)/tree.j $(srcdir)/../tree.h $(srcdir)/../real.h \
251         $(srcdir)/../tree.def $(srcdir)/../machmode.h $(srcdir)/../machmode.def
252
253 #Build the first part of this list with the command line:
254 #    cd gcc/; make deps-kinda -f f/Makefile.in
255 #Note that this command uses the host C compiler;
256 # use HOST_CC="./xgcc -B./" to use GCC in the build directory, for example.
257 #Also note that this particular build file seems to want to use
258 # substitions: $(CONFIG_H) for config.h; $(TREE_H) for tree.h;
259 # $(RTL_H) for rtl.h; etc..  deps-kinda uses a sed script to do those
260 # substitutions, plus others for elegance.
261
262 ansify.o: ansify.c $(HCONFIG_H) $(SYSTEM_H) $(ASSERT_H)
263 bad.o: bad.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bad.h bad.def where.h \
264  $(GLIMITS_H) top.h malloc.h $(FLAGS_H) com.h com-rt.def $(TREE_H) bld.h \
265  bld-op.def bit.h info.h info-b.def info-k.def info-w.def target.h \
266  lex.h type.h intrin.h intrin.def lab.h symbol.h symbol.def equiv.h \
267  storag.h global.h name.h $(TOPLEV_H)
268 bit.o: bit.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H) bit.h \
269  malloc.h
270 bld.o: bld.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bld.h bld-op.def bit.h \
271  malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
272  info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
273  type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
274  intrin.h intrin.def
275 com.o: com.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(FLAGS_H) $(RTL_H) $(TOPLEV_H) \
276  $(TREE_H) $(OUTPUT_H) $(CONVERT_H) com.h com-rt.def bld.h bld-op.def bit.h \
277  malloc.h info.h info-b.def info-k.def info-w.def target.h bad.h \
278  bad.def where.h $(GLIMITS_H) top.h lex.h type.h intrin.h intrin.def \
279  lab.h symbol.h symbol.def equiv.h storag.h global.h name.h expr.h \
280  implic.h src.h st.h
281 data.o: data.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) data.h bld.h \
282  bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
283  info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
284  lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
285  name.h intrin.h intrin.def expr.h st.h
286 equiv.o: equiv.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) equiv.h bld.h \
287  bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
288  info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
289  lex.h type.h lab.h storag.h symbol.h symbol.def global.h name.h \
290  intrin.h intrin.def data.h
291 expr.o: expr.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) expr.h bld.h \
292  bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
293  info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
294  lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
295  name.h intrin.h intrin.def implic.h src.h st.h stamp-str
296 fini.o: fini.c proj.h $(HCONFIG_H) $(SYSTEM_H) $(ASSERT_H) malloc.h
297 global.o: global.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) global.h info.h \
298  info-b.def info-k.def info-w.def target.h $(TREE_H) bad.h bad.def \
299  where.h $(GLIMITS_H) top.h malloc.h lex.h type.h name.h symbol.h \
300  symbol.def bld.h bld-op.def bit.h com.h com-rt.def lab.h storag.h \
301  intrin.h intrin.def equiv.h
302 implic.o: implic.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) implic.h info.h \
303  info-b.def info-k.def info-w.def target.h $(TREE_H) bad.h bad.def \
304  where.h $(GLIMITS_H) top.h malloc.h lex.h type.h symbol.h symbol.def \
305  bld.h bld-op.def bit.h com.h com-rt.def lab.h storag.h intrin.h \
306  intrin.def equiv.h global.h name.h src.h
307 info.o: info.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) info.h info-b.def \
308  info-k.def info-w.def target.h $(TREE_H) bad.h bad.def where.h $(GLIMITS_H) \
309  top.h malloc.h lex.h type.h
310 intdoc.o: intdoc.c $(HCONFIG_H) $(SYSTEM_H) $(ASSERT_H) intrin.h intrin.def \
311  intdoc.h0 intdoc.h0
312 intrin.o: intrin.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) intrin.h \
313  intrin.def bld.h bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) \
314  info.h info-b.def info-k.def info-w.def target.h bad.h bad.def \
315  where.h $(GLIMITS_H) top.h lex.h type.h lab.h storag.h symbol.h \
316  symbol.def equiv.h global.h name.h expr.h src.h
317 lab.o: lab.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) lab.h com.h com-rt.def \
318  $(TREE_H) bld.h bld-op.def bit.h malloc.h info.h info-b.def info-k.def \
319  info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
320  type.h intrin.h intrin.def symbol.h symbol.def equiv.h storag.h \
321  global.h name.h
322 lex.o: lex.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) top.h malloc.h where.h \
323  $(GLIMITS_H) bad.h bad.def com.h com-rt.def $(TREE_H) bld.h bld-op.def \
324  bit.h info.h info-b.def info-k.def info-w.def target.h lex.h type.h \
325  intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
326  global.h name.h src.h $(FLAGS_H) $(INPUT_H) $(TOPLEV_H) $(OUTPUT_H)
327 malloc.o: malloc.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) malloc.h
328 name.o: name.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bad.h bad.def where.h \
329  $(GLIMITS_H) top.h malloc.h name.h global.h info.h info-b.def info-k.def \
330  info-w.def target.h $(TREE_H) lex.h type.h symbol.h symbol.def bld.h \
331  bld-op.def bit.h com.h com-rt.def lab.h storag.h intrin.h intrin.def \
332  equiv.h src.h
333 parse.o: parse.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) top.h malloc.h \
334  where.h $(GLIMITS_H) com.h com-rt.def $(TREE_H) bld.h bld-op.def bit.h \
335  info.h info-b.def info-k.def info-w.def target.h bad.h bad.def lex.h \
336  type.h intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
337  global.h name.h version.h $(FLAGS_H)
338 proj.o: proj.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H)
339 src.o: src.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) src.h bad.h bad.def \
340  where.h $(GLIMITS_H) top.h malloc.h
341 st.o: st.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) st.h bad.h bad.def \
342  where.h $(GLIMITS_H) top.h malloc.h lex.h symbol.h symbol.def bld.h \
343  bld-op.def bit.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
344  info-w.def target.h type.h lab.h storag.h intrin.h intrin.def equiv.h \
345  global.h name.h sta.h stamp-str stb.h expr.h stp.h stt.h stc.h std.h \
346  stv.h stw.h ste.h sts.h stu.h
347 sta.o: sta.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) sta.h bad.h bad.def \
348  where.h $(GLIMITS_H) top.h malloc.h lex.h stamp-str symbol.h symbol.def \
349  bld.h bld-op.def bit.h com.h com-rt.def $(TREE_H) info.h info-b.def \
350  info-k.def info-w.def target.h type.h lab.h storag.h intrin.h \
351  intrin.def equiv.h global.h name.h implic.h stb.h expr.h stp.h stt.h \
352  stc.h std.h stv.h stw.h
353 stb.o: stb.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stb.h bad.h bad.def \
354  where.h $(GLIMITS_H) top.h malloc.h expr.h bld.h bld-op.def bit.h com.h \
355  com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def target.h \
356  lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
357  name.h intrin.h intrin.def stp.h stt.h stamp-str src.h sta.h stc.h
358 stc.o: stc.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stc.h bad.h bad.def \
359  where.h $(GLIMITS_H) top.h malloc.h bld.h bld-op.def bit.h com.h \
360  com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def target.h \
361  lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
362  name.h intrin.h intrin.def expr.h stp.h stt.h stamp-str data.h implic.h \
363  src.h sta.h std.h stv.h stw.h
364 std.o: std.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) std.h bld.h bld-op.def \
365  bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
366  info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
367  type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
368  intrin.h intrin.def stp.h stt.h stamp-str stv.h stw.h sta.h ste.h sts.h
369 ste.o: ste.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(RTL_H) $(TOPLEV_H) ste.h \
370  bld.h bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h \
371  info-b.def info-k.def info-w.def target.h bad.h bad.def where.h \
372  $(GLIMITS_H) top.h lex.h type.h lab.h storag.h symbol.h symbol.def \
373  equiv.h global.h name.h intrin.h intrin.def stp.h stt.h stamp-str sts.h \
374  stv.h stw.h expr.h sta.h
375 storag.o: storag.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) storag.h bld.h \
376  bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
377  info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
378  lex.h type.h lab.h symbol.h symbol.def equiv.h global.h name.h \
379  intrin.h intrin.def data.h
380 stp.o: stp.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stp.h bld.h bld-op.def \
381  bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
382  info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
383  type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
384  intrin.h intrin.def stt.h
385 str.o: str.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) src.h bad.h bad.def \
386  where.h $(GLIMITS_H) top.h malloc.h stamp-str lex.h
387 sts.o: sts.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) sts.h malloc.h com.h \
388  com-rt.def $(TREE_H) bld.h bld-op.def bit.h info.h info-b.def info-k.def \
389  info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
390  type.h intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
391  global.h name.h
392 stt.o: stt.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stt.h top.h malloc.h \
393  where.h $(GLIMITS_H) bld.h bld-op.def bit.h com.h com-rt.def $(TREE_H) \
394  info.h info-b.def info-k.def info-w.def target.h bad.h bad.def lex.h \
395  type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
396  intrin.h intrin.def stp.h expr.h sta.h stamp-str
397 stu.o: stu.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) bld.h bld-op.def bit.h \
398  malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
399  info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
400  type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
401  intrin.h intrin.def implic.h stu.h sta.h stamp-str
402 stv.o: stv.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stv.h lab.h com.h \
403  com-rt.def $(TREE_H) bld.h bld-op.def bit.h malloc.h info.h info-b.def \
404  info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
405  lex.h type.h intrin.h intrin.def symbol.h symbol.def equiv.h storag.h \
406  global.h name.h
407 stw.o: stw.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) stw.h bld.h bld-op.def \
408  bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
409  info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
410  type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
411  intrin.h intrin.def stv.h sta.h stamp-str
412 symbol.o: symbol.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) symbol.h \
413  symbol.def bld.h bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) \
414  info.h info-b.def info-k.def info-w.def target.h bad.h bad.def \
415  where.h $(GLIMITS_H) top.h lex.h type.h lab.h storag.h intrin.h \
416  intrin.def equiv.h global.h name.h src.h st.h
417 target.o: target.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H) \
418  target.h $(TREE_H) bad.h bad.def where.h top.h malloc.h info.h \
419  info-b.def info-k.def info-w.def type.h lex.h
420 top.o: top.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) top.h malloc.h where.h \
421  $(GLIMITS_H) bad.h bad.def bit.h bld.h bld-op.def com.h com-rt.def \
422  $(TREE_H) info.h info-b.def info-k.def info-w.def target.h lex.h type.h \
423  lab.h storag.h symbol.h symbol.def equiv.h global.h name.h intrin.h \
424  intrin.def data.h expr.h implic.h src.h st.h $(FLAGS_H) $(TOPLEV_H)
425 type.o: type.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) type.h malloc.h
426 version.o: version.c
427 where.o: where.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) where.h $(GLIMITS_H) \
428  top.h malloc.h lex.h
429
430 # The rest of this list (Fortran 77 language-specific files) is hand-generated.
431
432 stamp-str: str-1t.h str-1t.j str-2t.h str-2t.j \
433  str-fo.h str-fo.j str-io.h str-io.j str-nq.h  str-nq.j \
434  str-op.h str-op.j str-ot.h str-ot.j
435         touch stamp-str
436
437 str-1t.h str-1t.j: fini str-1t.fin
438         ./fini `echo $(srcdir)/str-1t.fin | sed 's,^\./,,'` str-1t.j str-1t.h
439
440 str-2t.h str-2t.j: fini str-2t.fin
441         ./fini `echo $(srcdir)/str-2t.fin | sed 's,^\./,,'` str-2t.j str-2t.h
442
443 str-fo.h str-fo.j: fini str-fo.fin
444         ./fini `echo $(srcdir)/str-fo.fin | sed 's,^\./,,'` str-fo.j str-fo.h
445
446 str-io.h str-io.j: fini str-io.fin
447         ./fini `echo $(srcdir)/str-io.fin | sed 's,^\./,,'` str-io.j str-io.h
448
449 str-nq.h str-nq.j: fini str-nq.fin
450         ./fini `echo $(srcdir)/str-nq.fin | sed 's,^\./,,'` str-nq.j str-nq.h
451
452 str-op.h str-op.j: fini str-op.fin
453         ./fini `echo $(srcdir)/str-op.fin | sed 's,^\./,,'` str-op.j str-op.h
454
455 str-ot.h str-ot.j: fini str-ot.fin
456         ./fini `echo $(srcdir)/str-ot.fin | sed 's,^\./,,'` str-ot.j str-ot.h
457
458 fini: fini.o proj-h.o
459         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fini fini.o proj-h.o
460
461 fini.o:
462         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
463               `echo $(srcdir)/fini.c | sed 's,^\./,,'` -o $@
464
465 # Like proj.o, but depends on hconfig.h instead of config.h.
466 proj-h.o: proj.c proj.h $(HCONFIG_H) $(SYSTEM_H) $(ASSERT_H) $(GLIMITS_H)
467         $(HOST_CC) -c -DUSE_HCONFIG $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
468               `echo $(srcdir)/proj.c | sed 's,^\./,,'` -o $@
469
470 # Other than str-*.j, the *.j files are dummy #include files
471 # that normally just #include the corresponding back-end *.h
472 # files, but not if MAKING_DEPENDENCIES is #defined.  The str-*.j
473 # files also are not actually included if MAKING_DEPENDENCIES
474 # is #defined.  The point of all this is to come up with a clean
475 # dependencies list whether working in a clean directory, such
476 # that str-*.j and such do not exist, or in a directory full
477 # of already-built files.  Any dependency on a str-*.j file
478 # implies a dependency on str.h, so we key on that to replace
479 # it with stamp-str, and dependencies on the other *.j files
480 # are generally left alone (modulo special macros like RTL_H)
481 # because we might not want to recompile all of g77 just
482 # because a back-end file changes.  MG is usually "-MG" but
483 # should be defined with "make MG= deps-kinda..." if using
484 # a compiler that doesn't support -MG (gcc does as of 2.6) --
485 # it prevents diagnostics when an #include file is missing,
486 # as will be the case with proj.h in a clean directory.
487 MG=-MG
488 deps-kinda:
489         $(HOST_CC) -DMAKING_DEPENDENCIES -MM $(MG) *.c 2>&1 | \
490           sed -e 's: \([.]/\)*assert[.]j: $$(ASSERT_H):g' \
491               -e 's: \([.]/\)*config[.]j: $$(CONFIG_H):g' \
492               -e 's: \([.]/\)*convert[.]j: $$(CONVERT_H):g' \
493               -e 's: \([.]/\)*flags[.]j: $$(FLAGS_H):g' \
494               -e 's: \([.]/\)*glimits[.]j: $$(GLIMITS_H):g' \
495               -e 's: \([.]/\)*hconfig[.]j: $$(HCONFIG_H):g' \
496               -e 's: \([.]/\)*input[.]j: $$(INPUT_H):g' \
497               -e 's: \([.]/\)*output[.]j: $$(OUTPUT_H):g' \
498               -e 's: \([.]/\)*rtl[.]j: $$(RTL_H):g' \
499               -e 's: \([.]/\)*system[.]j: $$(SYSTEM_H):g' \
500               -e 's: \([.]/\)*tconfig[.]j: $$(TCONFIG_H):g' \
501               -e 's: \([.]/\)*tm[.]j: $$(TM_H):g' \
502               -e 's: \([.]/\)*toplev[.]j: $$(TOPLEV_H):g' \
503               -e 's: \([.]/\)*tree[.]j: $$(TREE_H):g' \
504               -e 's: \([.]/\)*str[.]h: stamp-str:g' \
505               -e 's:.*g77spec.*::g' \
506               -e 's%^\(.*\)[ ]*: %\1: %g'
507
508 # This rule is just a handy way to build the g77 derived files without
509 # having the gcc source tree around.
510 g77-only: force
511         if [ -f g77.texi ] ; then \
512           (cd ..; $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt); \
513         else \
514           $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt; \
515         fi
516
517 #\f
518 # These exist for maintenance purposes.
519
520 # Update the tags table.
521 TAGS: force
522         cd $(srcdir)/f ;                        \
523         etags *.c *.h ;                         \
524         echo 'l' | tr 'l' '\f' >> TAGS ;        \
525         etags -a ../*.h ../*.c;
526
527 .PHONY: none all all.indirect f77.rebuilt compiler native deps-kinda g77-only TAGS force
528
529 force: