# -*- makefile -*-
# Top level makefile fragment for GNU gfortran, the GNU Fortran 95 compiler.
-# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
+# Foundation, Inc.
# Contributed by Paul Brook <paul@nowt.org
# and Steven Bosscher <s.bosscher@student.tudelft.nl>
#GCC 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)
+#the Free Software Foundation; either version 3, or (at your option)
#any later version.
#GCC is distributed in the hope that it will be useful,
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
-#along with GCC; see the file COPYING. If not, write to
-#the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-#Boston, MA 02110-1301, USA.
+#along with GCC; see the file COPYING3. If not see
+#<http://www.gnu.org/licenses/>.
# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
# from the parse tree to GENERIC
F95_PARSER_OBJS = fortran/arith.o fortran/array.o fortran/bbt.o \
- fortran/check.o fortran/data.o fortran/decl.o fortran/dump-parse-tree.o \
- fortran/error.o fortran/expr.o fortran/interface.o \
- fortran/intrinsic.o fortran/io.o fortran/iresolve.o \
+ fortran/check.o fortran/cpp.o fortran/data.o fortran/decl.o \
+ fortran/dump-parse-tree.o fortran/error.o fortran/expr.o \
+ fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.o \
fortran/match.o fortran/matchexp.o fortran/misc.o fortran/module.o \
fortran/openmp.o fortran/options.o fortran/parse.o fortran/primary.o \
fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o \
fortran/symbol.o fortran/target-memory.o
-F95_OBJS = $(F95_PARSER_OBJS) \
+F95_OBJS = $(F95_PARSER_OBJS) $(FORTRAN_TARGET_OBJS) \
fortran/convert.o fortran/dependency.o fortran/f95-lang.o \
fortran/trans.o fortran/trans-array.o fortran/trans-common.o \
fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o \
fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \
fortran/trans-stmt.o fortran/trans-types.o
+fortran_OBJS = $(F95_OBJS) gfortranspec.o
+
#\f
# Define the names for selecting gfortran in LANGUAGES.
fortran: f951$(exeext)
# Tell GNU make to ignore files by these names if they exist.
.PHONY: fortran
-gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) $(CONFIG_H)
- (SHLIB_LINK='$(SHLIB_LINK)' \
- SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
+gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \
+ $(CONFIG_H) coretypes.h intl.h
+ (SHLIB_LINK='$(SHLIB_LINK)'; \
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/fortran/gfortranspec.c)
f951$(exeext): $(F95_OBJS) \
$(BACKEND) $(LIBDEPS) attribs.o
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
- $(F95_OBJS) $(BACKEND) $(LIBS) attribs.o
+ $(F95_OBJS) $(BACKEND) $(LIBS) attribs.o $(GMPLIBS)
gt-fortran-trans.h : s-gtype; @true
#\f
$(srcdir)/fortran/intrinsic.texi \
$(srcdir)/fortran/invoke.texi \
$(srcdir)/doc/include/fdl.texi \
- $(srcdir)/doc/include/gpl.texi \
+ $(srcdir)/doc/include/gpl_v3.texi \
$(srcdir)/doc/include/funding.texi \
$(srcdir)/doc/include/gcc-common.texi \
gcc-vers.texi
.INTERMEDIATE: gfortran.pod
gfortran.pod: $(GFORTRAN_TEXI)
- -$(TEXI2POD) < $(srcdir)/fortran/invoke.texi > $@
+ -$(TEXI2POD) -DBUGURL="$(BUGURL_TEXI)" \
+ < $(srcdir)/fortran/invoke.texi > $@
# GFORTRAN internals documentation.
GFC_INTERNALS_TEXI = \
# which objects depend on what. FIXME
# TODO: Add dependencies on the backend/tree header files
-$(F95_PARSER_OBJS): fortran/gfortran.h fortran/intrinsic.h fortran/match.h \
+$(F95_PARSER_OBJS): fortran/gfortran.h fortran/libgfortran.h \
+ fortran/intrinsic.h fortran/match.h \
fortran/parse.h fortran/arith.h fortran/target-memory.h \
$(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TM_P_H) coretypes.h \
$(RTL_H) $(TREE_H) $(TREE_DUMP_H) $(GGC_H) $(EXPR_H) \
$(FLAGS_H) output.h $(DIAGNOSTIC_H) errors.h $(FUNCTION_H)
fortran/openmp.o: pointer-set.h $(TARGET_H) toplev.h
-GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/intrinsic.h fortran/trans-array.h \
+GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/libgfortran.h \
+ fortran/intrinsic.h fortran/trans-array.h \
fortran/trans-const.h fortran/trans-const.h fortran/trans.h \
fortran/trans-stmt.h fortran/trans-types.h \
$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) coretypes.h $(GGC_H)
fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \
- gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) \
+ gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \
$(BUILTINS_DEF) fortran/types.def
-fortran/scanner.o: toplev.h
+fortran/scanner.o: toplev.h fortran/cpp.h
fortran/convert.o: $(GFORTRAN_TRANS_DEPS)
fortran/trans.o: $(GFORTRAN_TRANS_DEPS)
fortran/trans-decl.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-decl.h \
$(CGRAPH_H) $(TARGET_H) $(FUNCTION_H) $(FLAGS_H) $(RTL_H) $(TREE_GIMPLE_H) \
$(TREE_DUMP_H)
fortran/trans-types.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-types.h \
- $(REAL_H) toplev.h $(TARGET_H)
+ $(REAL_H) toplev.h $(TARGET_H) $(FLAGS_H) dwarf2out.h
fortran/trans-const.o: $(GFORTRAN_TRANS_DEPS)
fortran/trans-expr.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
fortran/trans-stmt.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
gt-fortran-trans-intrinsic.h
fortran/dependency.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) $(TARGET_H) $(RTL_H)
-fortran/resolve.o: fortran/dependency.h
-fortran/options.o: $(PARAMS_H) $(TARGET_H)
+fortran/resolve.o: fortran/dependency.h fortran/data.h fortran/target-memory.h
+fortran/data.o: fortran/data.h
+fortran/options.o: $(PARAMS_H) $(TARGET_H) fortran/cpp.h
+fortran/cpp.o: fortran/cpp.c $(BASEVER) incpath.h incpath.o
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \
+ $< $(OUTPUT_OPTION)