# -*- makefile -*-
|
# -*- makefile -*-
|
# Top level makefile fragment for GNU gfortran, the GNU Fortran 95 compiler.
|
# Top level makefile fragment for GNU gfortran, the GNU Fortran 95 compiler.
|
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
# Contributed by Paul Brook
|
# Contributed by Paul Brook
|
# and Steven Bosscher
|
# and Steven Bosscher
|
|
|
#This file is part of GCC.
|
#This file is part of GCC.
|
|
|
#GCC is free software; you can redistribute it and/or modify
|
#GCC is free software; you can redistribute it and/or modify
|
#it under the terms of the GNU General Public License as published by
|
#it under the terms of the GNU General Public License as published by
|
#the Free Software Foundation; either version 3, or (at your option)
|
#the Free Software Foundation; either version 3, or (at your option)
|
#any later version.
|
#any later version.
|
|
|
#GCC is distributed in the hope that it will be useful,
|
#GCC is distributed in the hope that it will be useful,
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
#GNU General Public License for more details.
|
#GNU General Public License for more details.
|
|
|
#You should have received a copy of the GNU General Public License
|
#You should have received a copy of the GNU General Public License
|
#along with GCC; see the file COPYING3. If not see
|
#along with GCC; see the file COPYING3. If not see
|
#.
|
#.
|
|
|
# This file provides the language dependent support in the main Makefile.
|
# This file provides the language dependent support in the main Makefile.
|
# Each language makefile fragment must provide the following targets:
|
# Each language makefile fragment must provide the following targets:
|
#
|
#
|
# foo.all.cross, foo.start.encap, foo.rest.encap,
|
# foo.all.cross, foo.start.encap, foo.rest.encap,
|
# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
|
# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
|
# foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
|
# foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
|
# foo.mostlyclean, foo.clean, foo.distclean,
|
# foo.mostlyclean, foo.clean, foo.distclean,
|
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
|
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
|
#
|
#
|
# where `foo' is the name of the language.
|
# where `foo' is the name of the language.
|
#
|
#
|
# It should also provide rules for:
|
# It should also provide rules for:
|
#
|
#
|
# - making any compiler driver (eg: gfortran)
|
# - making any compiler driver (eg: gfortran)
|
# - the compiler proper (eg: f951)
|
# - the compiler proper (eg: f951)
|
# - define the names for selecting the language in LANGUAGES.
|
# - define the names for selecting the language in LANGUAGES.
|
# $(srcdir) must be set to the gcc/ source directory (*not* gcc/fortran/).
|
# $(srcdir) must be set to the gcc/ source directory (*not* gcc/fortran/).
|
|
|
# Actual name to use when installing a native compiler.
|
# Actual name to use when installing a native compiler.
|
GFORTRAN_INSTALL_NAME := $(shell echo gfortran|sed '$(program_transform_name)')
|
GFORTRAN_INSTALL_NAME := $(shell echo gfortran|sed '$(program_transform_name)')
|
GFORTRAN_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gfortran|sed '$(program_transform_name)')
|
GFORTRAN_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gfortran|sed '$(program_transform_name)')
|
|
|
#^L
|
#^L
|
|
|
# Use strict warnings for this front end.
|
# Use strict warnings for this front end.
|
fortran-warn = $(STRICT_WARN)
|
fortran-warn = $(STRICT_WARN)
|
|
|
# These are the groups of object files we have. The F95_PARSER_OBJS are
|
# These are the groups of object files we have. The F95_PARSER_OBJS are
|
# all the front end files, the F95_OBJS are the files for the translation
|
# all the front end files, the F95_OBJS are the files for the translation
|
# from the parse tree to GENERIC
|
# from the parse tree to GENERIC
|
|
|
F95_PARSER_OBJS = fortran/arith.o fortran/array.o fortran/bbt.o \
|
F95_PARSER_OBJS = fortran/arith.o fortran/array.o fortran/bbt.o \
|
fortran/check.o fortran/cpp.o fortran/data.o fortran/decl.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/dump-parse-tree.o fortran/error.o fortran/expr.o \
|
fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.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/match.o fortran/matchexp.o fortran/misc.o fortran/module.o \
|
fortran/openmp.o fortran/options.o fortran/parse.o fortran/primary.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/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o \
|
fortran/symbol.o fortran/target-memory.o
|
fortran/symbol.o fortran/target-memory.o
|
|
|
F95_OBJS = $(F95_PARSER_OBJS) $(FORTRAN_TARGET_OBJS) \
|
F95_OBJS = $(F95_PARSER_OBJS) $(FORTRAN_TARGET_OBJS) \
|
fortran/convert.o fortran/dependency.o fortran/f95-lang.o \
|
fortran/convert.o fortran/dependency.o fortran/f95-lang.o \
|
fortran/trans.o fortran/trans-array.o fortran/trans-common.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-const.o fortran/trans-decl.o fortran/trans-expr.o \
|
fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \
|
fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \
|
fortran/trans-stmt.o fortran/trans-types.o
|
fortran/trans-stmt.o fortran/trans-types.o
|
|
|
fortran_OBJS = $(F95_OBJS) gfortranspec.o
|
fortran_OBJS = $(F95_OBJS) gfortranspec.o
|
|
|
#
|
#
|
# Define the names for selecting gfortran in LANGUAGES.
|
# Define the names for selecting gfortran in LANGUAGES.
|
fortran: f951$(exeext)
|
fortran: f951$(exeext)
|
|
|
# Tell GNU make to ignore files by these names if they exist.
|
# Tell GNU make to ignore files by these names if they exist.
|
.PHONY: fortran
|
.PHONY: fortran
|
|
|
gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \
|
gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \
|
$(CONFIG_H) coretypes.h intl.h
|
$(CONFIG_H) coretypes.h intl.h
|
(SHLIB_LINK='$(SHLIB_LINK)'; \
|
(SHLIB_LINK='$(SHLIB_LINK)'; \
|
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
|
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
|
$(INCLUDES) $(srcdir)/fortran/gfortranspec.c)
|
$(INCLUDES) $(srcdir)/fortran/gfortranspec.c)
|
|
|
# Create the compiler driver gfortran.
|
# Create the compiler driver gfortran.
|
GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o version.o prefix.o intl.o
|
GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o version.o prefix.o intl.o
|
gfortran$(exeext): $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
|
gfortran$(exeext): $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
|
$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
|
$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
|
$(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
|
$(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
|
|
|
# Create a version of the gfortran driver which calls the cross-compiler.
|
# Create a version of the gfortran driver which calls the cross-compiler.
|
gfortran-cross$(exeext): gfortran$(exeext)
|
gfortran-cross$(exeext): gfortran$(exeext)
|
-rm -f gfortran-cross$(exeext)
|
-rm -f gfortran-cross$(exeext)
|
cp gfortran$(exeext) gfortran-cross$(exeext)
|
cp gfortran$(exeext) gfortran-cross$(exeext)
|
|
|
# The compiler itself is called f951.
|
# The compiler itself is called f951.
|
f951$(exeext): $(F95_OBJS) \
|
f951$(exeext): $(F95_OBJS) \
|
$(BACKEND) $(LIBDEPS) attribs.o
|
$(BACKEND) $(LIBDEPS) attribs.o
|
$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
|
$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
|
$(F95_OBJS) $(BACKEND) $(LIBS) attribs.o $(BACKENDLIBS)
|
$(F95_OBJS) $(BACKEND) $(LIBS) attribs.o $(BACKENDLIBS)
|
|
|
gt-fortran-trans.h : s-gtype; @true
|
gt-fortran-trans.h : s-gtype; @true
|
#
|
#
|
# Build hooks:
|
# Build hooks:
|
|
|
fortran.all.cross: gfortran-cross$(exeext)
|
fortran.all.cross: gfortran-cross$(exeext)
|
|
|
fortran.start.encap: gfortran$(exeext)
|
fortran.start.encap: gfortran$(exeext)
|
fortran.rest.encap:
|
fortran.rest.encap:
|
|
|
fortran.srcinfo: doc/gfortran.info
|
fortran.srcinfo: doc/gfortran.info
|
-cp -p $^ $(srcdir)/fortran
|
-cp -p $^ $(srcdir)/fortran
|
|
|
fortran.tags: force
|
fortran.tags: force
|
cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
|
cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
|
etags --include TAGS.sub --include ../TAGS.sub
|
etags --include TAGS.sub --include ../TAGS.sub
|
|
|
fortran.info: doc/gfortran.info doc/gfc-internals.info
|
fortran.info: doc/gfortran.info doc/gfc-internals.info
|
fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi
|
fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi
|
|
|
F95_HTMLFILES = $(build_htmldir)/gfortran
|
F95_HTMLFILES = $(build_htmldir)/gfortran
|
|
|
fortran.html: $(F95_HTMLFILES)/index.html
|
fortran.html: $(F95_HTMLFILES)/index.html
|
|
|
fortran.install-html: $(F95_HTMLFILES)
|
fortran.install-html: $(F95_HTMLFILES)
|
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
|
test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
|
@list='$(F95_HTMLFILES)'; for p in $$list; do \
|
@list='$(F95_HTMLFILES)'; for p in $$list; do \
|
if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
|
if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
|
f=$(html__strip_dir) \
|
f=$(html__strip_dir) \
|
if test -d "$$d$$p"; then \
|
if test -d "$$d$$p"; then \
|
echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
|
echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
|
$(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
|
$(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
|
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
|
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
|
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
|
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
|
else \
|
else \
|
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
|
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
|
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
|
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
|
fi; \
|
fi; \
|
done
|
done
|
|
|
F95_PDFFILES = doc/gfortran.pdf
|
F95_PDFFILES = doc/gfortran.pdf
|
|
|
fortran.pdf: $(F95_PDFFILES) doc/gfc-internals.pdf
|
fortran.pdf: $(F95_PDFFILES) doc/gfc-internals.pdf
|
|
|
fortran.install-pdf: $(F95_PDFFILES)
|
fortran.install-pdf: $(F95_PDFFILES)
|
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
test -z "$(pdfdir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc"
|
test -z "$(pdfdir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc"
|
@list='$(F95_PDFFILES)'; for p in $$list; do \
|
@list='$(F95_PDFFILES)'; for p in $$list; do \
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
f=$(pdf__strip_dir) \
|
f=$(pdf__strip_dir) \
|
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
|
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
|
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
|
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
|
done
|
done
|
|
|
F95_MANFILES = doc/gfortran.1
|
F95_MANFILES = doc/gfortran.1
|
|
|
fortran.man: $(F95_MANFILES)
|
fortran.man: $(F95_MANFILES)
|
|
|
fortran.srcman: $(F95_MANFILES)
|
fortran.srcman: $(F95_MANFILES)
|
-cp -p $^ $(srcdir)/doc
|
-cp -p $^ $(srcdir)/doc
|
|
|
fortran.srcextra:
|
fortran.srcextra:
|
|
|
check-f95 : check-gfortran
|
check-f95 : check-gfortran
|
check-fortran : check-gfortran
|
check-fortran : check-gfortran
|
check-f95-subtargets : check-gfortran-subtargets
|
check-f95-subtargets : check-gfortran-subtargets
|
check-fortran-subtargets : check-gfortran-subtargets
|
check-fortran-subtargets : check-gfortran-subtargets
|
lang_checks += check-gfortran
|
lang_checks += check-gfortran
|
lang_checks_parallelized += check-gfortran
|
lang_checks_parallelized += check-gfortran
|
# For description see comment above check_gcc_parallelize in gcc/Makefile.in.
|
# For description see comment above check_gcc_parallelize in gcc/Makefile.in.
|
check_gfortran_parallelize = dg.exp=gfortran.dg/\[a-cA-C\]* \
|
check_gfortran_parallelize = dg.exp=gfortran.dg/\[a-cA-C\]* \
|
dg.exp=gfortran.dg/\[d-mD-M\]* \
|
dg.exp=gfortran.dg/\[d-mD-M\]* \
|
dg.exp=gfortran.dg/\[n-zN-Z0-9\]*
|
dg.exp=gfortran.dg/\[n-zN-Z0-9\]*
|
|
|
# GFORTRAN documentation.
|
# GFORTRAN documentation.
|
GFORTRAN_TEXI = \
|
GFORTRAN_TEXI = \
|
$(srcdir)/fortran/gfortran.texi \
|
$(srcdir)/fortran/gfortran.texi \
|
$(srcdir)/fortran/intrinsic.texi \
|
$(srcdir)/fortran/intrinsic.texi \
|
$(srcdir)/fortran/invoke.texi \
|
$(srcdir)/fortran/invoke.texi \
|
$(srcdir)/doc/include/fdl.texi \
|
$(srcdir)/doc/include/fdl.texi \
|
$(srcdir)/doc/include/gpl_v3.texi \
|
$(srcdir)/doc/include/gpl_v3.texi \
|
$(srcdir)/doc/include/funding.texi \
|
$(srcdir)/doc/include/funding.texi \
|
$(srcdir)/doc/include/gcc-common.texi \
|
$(srcdir)/doc/include/gcc-common.texi \
|
gcc-vers.texi
|
gcc-vers.texi
|
|
|
doc/gfortran.info: $(GFORTRAN_TEXI)
|
doc/gfortran.info: $(GFORTRAN_TEXI)
|
if [ x$(BUILD_INFO) = xinfo ]; then \
|
if [ x$(BUILD_INFO) = xinfo ]; then \
|
rm -f doc/gfortran.info-*; \
|
rm -f doc/gfortran.info-*; \
|
$(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
|
$(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
|
-o $@ $<; \
|
-o $@ $<; \
|
else true; fi
|
else true; fi
|
|
|
doc/gfortran.dvi: $(GFORTRAN_TEXI)
|
doc/gfortran.dvi: $(GFORTRAN_TEXI)
|
$(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
$(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
|
|
doc/gfortran.pdf: $(GFORTRAN_TEXI)
|
doc/gfortran.pdf: $(GFORTRAN_TEXI)
|
$(TEXI2PDF) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
$(TEXI2PDF) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
|
|
$(build_htmldir)/gfortran/index.html: $(GFORTRAN_TEXI)
|
$(build_htmldir)/gfortran/index.html: $(GFORTRAN_TEXI)
|
$(mkinstalldirs) $(@D)
|
$(mkinstalldirs) $(@D)
|
rm -f $(@D)/*
|
rm -f $(@D)/*
|
$(TEXI2HTML) -I $(gcc_docdir)/include -I $(srcdir)/fortran -o $(@D) $<
|
$(TEXI2HTML) -I $(gcc_docdir)/include -I $(srcdir)/fortran -o $(@D) $<
|
|
|
.INTERMEDIATE: gfortran.pod
|
.INTERMEDIATE: gfortran.pod
|
|
|
gfortran.pod: $(GFORTRAN_TEXI)
|
gfortran.pod: $(GFORTRAN_TEXI)
|
-$(TEXI2POD) -DBUGURL="$(BUGURL_TEXI)" \
|
-$(TEXI2POD) -DBUGURL="$(BUGURL_TEXI)" \
|
< $(srcdir)/fortran/invoke.texi > $@
|
< $(srcdir)/fortran/invoke.texi > $@
|
|
|
# GFORTRAN internals documentation.
|
# GFORTRAN internals documentation.
|
GFC_INTERNALS_TEXI = \
|
GFC_INTERNALS_TEXI = \
|
$(srcdir)/fortran/gfc-internals.texi \
|
$(srcdir)/fortran/gfc-internals.texi \
|
$(srcdir)/doc/include/fdl.texi \
|
$(srcdir)/doc/include/fdl.texi \
|
$(srcdir)/doc/include/gcc-common.texi \
|
$(srcdir)/doc/include/gcc-common.texi \
|
gcc-vers.texi
|
gcc-vers.texi
|
|
|
doc/gfc-internals.info: $(GFC_INTERNALS_TEXI)
|
doc/gfc-internals.info: $(GFC_INTERNALS_TEXI)
|
if [ x$(BUILD_INFO) = xinfo ]; then \
|
if [ x$(BUILD_INFO) = xinfo ]; then \
|
rm -f doc/gfc-internals.info-*; \
|
rm -f doc/gfc-internals.info-*; \
|
$(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
|
$(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
|
-o $@ $<; \
|
-o $@ $<; \
|
else true; fi
|
else true; fi
|
|
|
doc/gfc-internals.dvi: $(GFC_INTERNALS_TEXI)
|
doc/gfc-internals.dvi: $(GFC_INTERNALS_TEXI)
|
$(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
$(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
|
|
doc/gfc-internals.pdf: $(GFC_INTERNALS_TEXI)
|
doc/gfc-internals.pdf: $(GFC_INTERNALS_TEXI)
|
$(TEXI2PDF) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
$(TEXI2PDF) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
|
|
|
# Create or recreate the gfortran private include file directory.
|
# Create or recreate the gfortran private include file directory.
|
install-finclude-dir: installdirs
|
install-finclude-dir: installdirs
|
$(mkinstalldirs) -m 0755 $(DESTDIR)$(libsubdir)/finclude
|
$(mkinstalldirs) -m 0755 $(DESTDIR)$(libsubdir)/finclude
|
#
|
#
|
# Install hooks:
|
# Install hooks:
|
# f951 is installed elsewhere as part of $(COMPILERS).
|
# f951 is installed elsewhere as part of $(COMPILERS).
|
|
|
# Install the driver program as $(target)-gfortran
|
# Install the driver program as $(target)-gfortran
|
# and also as either gfortran (if native) or $(tooldir)/bin/gfortran.
|
# and also as either gfortran (if native) or $(tooldir)/bin/gfortran.
|
fortran.install-common: install-finclude-dir installdirs
|
fortran.install-common: install-finclude-dir installdirs
|
-if [ -f f951$(exeext) ] ; then \
|
-if [ -f f951$(exeext) ] ; then \
|
rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
$(INSTALL_PROGRAM) gfortran$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
$(INSTALL_PROGRAM) gfortran$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
chmod a+x $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
chmod a+x $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
if [ -f gfortran-cross$(exeext) ] ; then \
|
if [ -f gfortran-cross$(exeext) ] ; then \
|
if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
|
if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
|
rm -f $(DESTDIR)$(gcc_tooldir)/bin/gfortran$(exeext); \
|
rm -f $(DESTDIR)$(gcc_tooldir)/bin/gfortran$(exeext); \
|
$(INSTALL_PROGRAM) gfortran-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gfortran$(exeext); \
|
$(INSTALL_PROGRAM) gfortran-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gfortran$(exeext); \
|
else true; fi; \
|
else true; fi; \
|
else \
|
else \
|
rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
|
rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
|
$(LN) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
|
$(LN) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
|
fi ; \
|
fi ; \
|
fi
|
fi
|
|
|
fortran.install-plugin:
|
fortran.install-plugin:
|
|
|
fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info
|
fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info
|
|
|
fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext)
|
fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext)
|
|
|
$(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext): doc/gfortran.1 \
|
$(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext): doc/gfortran.1 \
|
installdirs
|
installdirs
|
-rm -f $@
|
-rm -f $@
|
-$(INSTALL_DATA) $< $@
|
-$(INSTALL_DATA) $< $@
|
-chmod a-x $@
|
-chmod a-x $@
|
|
|
fortran.uninstall:
|
fortran.uninstall:
|
if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
echo " install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info"; \
|
echo " install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info"; \
|
install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info || : ; \
|
install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info || : ; \
|
else : ; fi; \
|
else : ; fi; \
|
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
|
rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \
|
rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \
|
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
|
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
|
rm -rf $(DESTDIR)$(infodir)/gfortran.info*
|
rm -rf $(DESTDIR)$(infodir)/gfortran.info*
|
|
|
#
|
#
|
# Clean hooks:
|
# Clean hooks:
|
# A lot of the ancillary files are deleted by the main makefile.
|
# A lot of the ancillary files are deleted by the main makefile.
|
# We just have to delete files specific to us.
|
# We just have to delete files specific to us.
|
|
|
fortran.mostlyclean:
|
fortran.mostlyclean:
|
-rm -f f951$(exeext)
|
-rm -f f951$(exeext)
|
-rm -f fortran/*.o
|
-rm -f fortran/*.o
|
|
|
fortran.clean:
|
fortran.clean:
|
fortran.distclean:
|
fortran.distclean:
|
-rm -f fortran/config.status fortran/Makefile
|
-rm -f fortran/config.status fortran/Makefile
|
|
|
fortran.extraclean:
|
fortran.extraclean:
|
fortran.maintainer-clean:
|
fortran.maintainer-clean:
|
-rm -f doc/gfortran.info* fortran/gfortran.*aux
|
-rm -f doc/gfortran.info* fortran/gfortran.*aux
|
-rm -f $(docobjdir)/gfortran.1
|
-rm -f $(docobjdir)/gfortran.1
|
|
|
#
|
#
|
# Stage hooks:
|
# Stage hooks:
|
# The toplevel makefile has already created stage?/fortran at this point.
|
# The toplevel makefile has already created stage?/fortran at this point.
|
|
|
fortran.stage1: stage1-start
|
fortran.stage1: stage1-start
|
-mv fortran/*$(objext) stage1/fortran
|
-mv fortran/*$(objext) stage1/fortran
|
fortran.stage2: stage2-start
|
fortran.stage2: stage2-start
|
-mv fortran/*$(objext) stage2/fortran
|
-mv fortran/*$(objext) stage2/fortran
|
fortran.stage3: stage3-start
|
fortran.stage3: stage3-start
|
-mv fortran/*$(objext) stage3/fortran
|
-mv fortran/*$(objext) stage3/fortran
|
fortran.stage4: stage4-start
|
fortran.stage4: stage4-start
|
-mv fortran/*$(objext) stage4/fortran
|
-mv fortran/*$(objext) stage4/fortran
|
fortran.stageprofile: stageprofile-start
|
fortran.stageprofile: stageprofile-start
|
-mv fortran/*$(objext) stageprofile/fortran
|
-mv fortran/*$(objext) stageprofile/fortran
|
fortran.stagefeedback: stageprofile-start
|
fortran.stagefeedback: stageprofile-start
|
-mv fortran/*$(objext) stagefeedback/fortran
|
-mv fortran/*$(objext) stagefeedback/fortran
|
|
|
#
|
#
|
# .o: .h dependencies.
|
# .o: .h dependencies.
|
|
|
# Everything depends on gfortran.h, but only a few files depend on
|
# Everything depends on gfortran.h, but only a few files depend on
|
# the other headers. So at some point we'll have to split out
|
# the other headers. So at some point we'll have to split out
|
# which objects depend on what. FIXME
|
# which objects depend on what. FIXME
|
# TODO: Add dependencies on the backend/tree header files
|
# TODO: Add dependencies on the backend/tree header files
|
|
|
$(F95_PARSER_OBJS): fortran/gfortran.h fortran/libgfortran.h \
|
$(F95_PARSER_OBJS): fortran/gfortran.h fortran/libgfortran.h \
|
fortran/intrinsic.h fortran/match.h \
|
fortran/intrinsic.h fortran/match.h \
|
fortran/parse.h fortran/arith.h fortran/target-memory.h \
|
fortran/parse.h fortran/arith.h fortran/target-memory.h \
|
$(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TM_P_H) coretypes.h \
|
$(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TM_P_H) coretypes.h \
|
$(RTL_H) $(TREE_H) $(TREE_DUMP_H) $(GGC_H) $(EXPR_H) \
|
$(RTL_H) $(TREE_H) $(TREE_DUMP_H) $(GGC_H) $(EXPR_H) \
|
$(FLAGS_H) output.h $(DIAGNOSTIC_H) errors.h $(FUNCTION_H)
|
$(FLAGS_H) output.h $(DIAGNOSTIC_H) errors.h $(FUNCTION_H)
|
fortran/openmp.o: pointer-set.h $(TARGET_H) toplev.h
|
fortran/openmp.o: pointer-set.h $(TARGET_H) toplev.h
|
|
|
GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/libgfortran.h \
|
GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/libgfortran.h \
|
fortran/intrinsic.h fortran/trans-array.h \
|
fortran/intrinsic.h fortran/trans-array.h \
|
fortran/trans-const.h fortran/trans-const.h fortran/trans.h \
|
fortran/trans-const.h fortran/trans-const.h fortran/trans.h \
|
fortran/trans-stmt.h fortran/trans-types.h \
|
fortran/trans-stmt.h fortran/trans-types.h \
|
$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) coretypes.h $(GGC_H)
|
$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) coretypes.h $(GGC_H)
|
|
|
fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \
|
fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \
|
gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \
|
gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \
|
$(BUILTINS_DEF) fortran/types.def \
|
$(BUILTINS_DEF) fortran/types.def \
|
libfuncs.h expr.h except.h
|
libfuncs.h expr.h except.h
|
fortran/scanner.o: toplev.h fortran/cpp.h
|
fortran/scanner.o: toplev.h fortran/cpp.h
|
fortran/convert.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/convert.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/trans.o: $(GFORTRAN_TRANS_DEPS) tree-iterator.h
|
fortran/trans.o: $(GFORTRAN_TRANS_DEPS) tree-iterator.h
|
fortran/trans-decl.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-decl.h \
|
fortran/trans-decl.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-decl.h \
|
$(CGRAPH_H) $(TARGET_H) $(FUNCTION_H) $(FLAGS_H) $(RTL_H) $(GIMPLE_H) \
|
$(CGRAPH_H) $(TARGET_H) $(FUNCTION_H) $(FLAGS_H) $(RTL_H) $(GIMPLE_H) \
|
$(TREE_DUMP_H) debug.h pointer-set.h
|
$(TREE_DUMP_H) debug.h pointer-set.h
|
fortran/trans-types.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-types.h \
|
fortran/trans-types.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-types.h \
|
$(REAL_H) toplev.h $(TARGET_H) $(FLAGS_H) dwarf2out.h
|
$(REAL_H) toplev.h $(TARGET_H) $(FLAGS_H) dwarf2out.h
|
fortran/trans-const.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/trans-const.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/trans-expr.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
fortran/trans-expr.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
fortran/trans-stmt.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
fortran/trans-stmt.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
fortran/trans-openmp.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/trans-openmp.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/trans-io.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-io.h \
|
fortran/trans-io.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-io.h \
|
fortran/ioparm.def
|
fortran/ioparm.def
|
fortran/trans-array.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/trans-array.o: $(GFORTRAN_TRANS_DEPS)
|
fortran/trans-intrinsic.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \
|
fortran/trans-intrinsic.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \
|
gt-fortran-trans-intrinsic.h
|
gt-fortran-trans-intrinsic.h
|
fortran/dependency.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
fortran/dependency.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) $(TARGET_H) $(RTL_H)
|
fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) $(TARGET_H) $(RTL_H)
|
fortran/resolve.o: fortran/dependency.h fortran/data.h fortran/target-memory.h
|
fortran/resolve.o: fortran/dependency.h fortran/data.h fortran/target-memory.h
|
fortran/data.o: fortran/data.h
|
fortran/data.o: fortran/data.h
|
fortran/options.o: $(PARAMS_H) $(TARGET_H) fortran/cpp.h
|
fortran/options.o: $(PARAMS_H) $(TARGET_H) fortran/cpp.h
|
fortran/cpp.o: fortran/cpp.c $(BASEVER) incpath.h incpath.o
|
fortran/cpp.o: fortran/cpp.c $(BASEVER) incpath.h incpath.o
|
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
|
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
|
-DBASEVER=$(BASEVER_s) $< $(OUTPUT_OPTION)
|
-DBASEVER=$(BASEVER_s) $< $(OUTPUT_OPTION)
|
|
|