Skip to content
Snippets Groups Projects
Makefile.in 1.03 MiB
Newer Older

# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
Jason Merrill's avatar
Jason Merrill committed
#
# Makefile for directory with subdirs to build.
#   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
#   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
Jason Merrill's avatar
Jason Merrill committed
#
# This file 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 of the License, or
# (at your option) any later version.
Jason Merrill's avatar
Jason Merrill committed
# This program 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.
Jason Merrill's avatar
Jason Merrill committed
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#

# -------------------------------
# Standard Autoconf-set variables
# -------------------------------
VPATH=@srcdir@

build_alias=@build_alias@
host_alias=@host_alias@
target_alias=@target_alias@
program_transform_name = @program_transform_name@

prefix = @prefix@
exec_prefix = @exec_prefix@

srcdir = @srcdir@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
includedir = @includedir@
oldincludedir = @oldincludedir@
infodir = @infodir@
mandir = @mandir@
Jason Merrill's avatar
Jason Merrill committed
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
LN = @LN@
LN_S = @LN_S@
Jason Merrill's avatar
Jason Merrill committed

# -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables
# -------------------------------------------------
Jason Merrill's avatar
Jason Merrill committed

# The gcc driver likes to know the arguments it was configured with.
TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@
Jason Merrill's avatar
Jason Merrill committed

tooldir = @tooldir@
build_tooldir = @build_tooldir@
Jason Merrill's avatar
Jason Merrill committed

Jason Merrill's avatar
Jason Merrill committed

# This is the name of the environment variable used for the path to
# the libraries.
RPATH_ENVVAR = @RPATH_ENVVAR@
Jason Merrill's avatar
Jason Merrill committed

# This is the list of directories to be built for the build system.
BUILD_CONFIGDIRS = libiberty
# Build programs are put under this directory.
BUILD_SUBDIR = @build_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the build system.
BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)"

# This is the list of variables to export in the environment when
# configuring any subdirectory.  It must also be exported whenever
# recursing into a build directory in case that directory's Makefile
# re-runs configure.
BASE_EXPORTS = \
	FLEX="$(FLEX)"; export FLEX; \
	LEX="$(LEX)"; export LEX; \
	BISON="$(BISON)"; export BISON; \
	YACC="$(YACC)"; export YACC; \
	M4="$(M4)"; export M4; \
	MAKEINFO="$(MAKEINFO)"; export MAKEINFO;

# This is the list of variables to export in the environment when
# configuring subdirectories for the build system.
	AR="$(AR_FOR_BUILD)"; export AR; \
	AS="$(AS_FOR_BUILD)"; export AS; \
	CC="$(CC_FOR_BUILD)"; export CC; \
	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
	CXX="$(CXX_FOR_BUILD)"; export CXX; \
	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
	GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
	GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
	DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
	LD="$(LD_FOR_BUILD)"; export LD; \
	LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
	NM="$(NM_FOR_BUILD)"; export NM; \
	RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
	WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES;

# This is the list of directories to built for the host system.
SUBDIRS = @configdirs@
# This is set by the configure script to the arguments to use when configuring
# directories built for the host system.
HOST_CONFIGARGS = @host_configargs@
# Host programs are put under this directory, which is . except if building
# with srcdir=..
HOST_SUBDIR = @host_subdir@
# This is the list of variables to export in the environment when
# configuring subdirectories for the host system.
	CC="$(CC)"; export CC; \
	CFLAGS="$(CFLAGS)"; export CFLAGS; \
	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
	CXX="$(CXX)"; export CXX; \
	CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
	AR="$(AR)"; export AR; \
	AS="$(AS)"; export AS; \
	CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
	LD="$(LD)"; export LD; \
	LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
	NM="$(NM)"; export NM; \
	RANLIB="$(RANLIB)"; export RANLIB; \
	WINDRES="$(WINDRES)"; export WINDRES; \
	OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
	OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
	TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
	GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
	GMPINC="$(HOST_GMPINC)"; export GMPINC; \
	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
	$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
	CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
	  -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
	CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \
	  $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
	  -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
	  -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;

# This is set by the configure script to the list of directories which
# should be built using the target tools.
TARGET_CONFIGDIRS = @target_configdirs@
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the target.
TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
# This is the list of variables to export in the environment when
# configuring subdirectories for the host system.
	AR="$(AR_FOR_TARGET)"; export AR; \
	AS="$(AS_FOR_TARGET)"; export AS; \
	CC="$(CC_FOR_TARGET)"; export CC; \
	CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
	CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
	GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
	GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
	DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
	LD="$(LD_FOR_TARGET)"; export LD; \
	LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
	NM="$(NM_FOR_TARGET)"; export NM; \
	RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
	WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);

RAW_CXX_TARGET_EXPORTS = \
	$(BASE_TARGET_EXPORTS) \
	CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
	CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;

NORMAL_TARGET_EXPORTS = \
	$(BASE_TARGET_EXPORTS) \
	CXX="$(CXX_FOR_TARGET)"; export CXX;
# Where to find GMP
HOST_GMPLIBS = @gmplibs@
HOST_GMPINC = @gmpinc@

# ----------------------------------------------
# Programs producing files for the BUILD machine
# ----------------------------------------------

SHELL = @config_shell@

# pwd command to use.  Allow user to override default by setting PWDCMD in
# the environment to account for automounters.  The make variable must not
# be called PWDCMD, otherwise the value set here is passed to make
# subprocesses and overrides the setting from the user's environment.
# Don't use PWD since it is a common shell environment variable and we
# don't want to corrupt it.
PWD_COMMAND = $${PWDCMD-pwd}

# compilers to use to create programs which must be run in the build
# environment.
CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@

CXX_FOR_BUILD = $(CXX)

# Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
# here so that they can be overridden by Makefile fragments.
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
Jason Merrill's avatar
Jason Merrill committed

# Flags to pass to stage2 and later makes.  They are defined
# here so that they can be overridden by Makefile fragments.
BOOT_CFLAGS= -g -O2

CONFIGURED_BISON = @CONFIGURED_BISON@
Paolo Bonzini's avatar
Paolo Bonzini committed
BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
	    echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \
Jason Merrill's avatar
Jason Merrill committed
	 else \
Jason Merrill's avatar
Jason Merrill committed
	 fi`

CONFIGURED_YACC = @CONFIGURED_YACC@
Paolo Bonzini's avatar
Paolo Bonzini committed
YACC = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
	    echo $$r/$(BUILD_SUBDIR)/bison/tests/bison -y ; \
	elif [ -f $$r/$(BUILD_SUBDIR)/byacc/byacc ] ; then \
	    echo $$r/$(BUILD_SUBDIR)/byacc/byacc ; \
Jason Merrill's avatar
Jason Merrill committed
	else \
Jason Merrill's avatar
Jason Merrill committed
	fi`

CONFIGURED_FLEX = @CONFIGURED_FLEX@
Paolo Bonzini's avatar
Paolo Bonzini committed
FLEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
	then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
	else echo ${CONFIGURED_FLEX} ; fi`
Jason Merrill's avatar
Jason Merrill committed

CONFIGURED_LEX = @CONFIGURED_LEX@
Paolo Bonzini's avatar
Paolo Bonzini committed
LEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
	then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
	else echo ${CONFIGURED_LEX} ; fi`

CONFIGURED_M4 = @CONFIGURED_M4@
Paolo Bonzini's avatar
Paolo Bonzini committed
M4 = `if [ -f $$r/$(BUILD_SUBDIR)/m4/m4 ] ; \
	then echo $$r/$(BUILD_SUBDIR)/m4/m4 ; \
	else echo ${CONFIGURED_M4} ; fi`
Jason Merrill's avatar
Jason Merrill committed

# For an installed makeinfo, we require it to be from texinfo 4.2 or
# higher, else we use the "missing" dummy.  We also pass the subdirectory
# makeinfo even if only the Makefile is there, because Texinfo builds its
# manual when made, and it requires its own version.
CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@
Paolo Bonzini's avatar
Paolo Bonzini committed
MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \
	then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
	else if (${CONFIGURED_MAKEINFO} --version \
	  | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
        then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
Jason Merrill's avatar
Jason Merrill committed

# This just becomes part of the MAKEINFO definition passed down to
# sub-makes.  It lets flags be given on the command line while still
# using the makeinfo from the object tree.
# (Default to avoid splitting info files by setting the threshold high.)
MAKEINFOFLAGS = --split-size=5000000
Jason Merrill's avatar
Jason Merrill committed

# FIXME: expect may become a build tool?
EXPECT = `if [ -f $$r/$(HOST_SUBDIR)/expect/expect ] ; \
	then echo $$r/$(HOST_SUBDIR)/expect/expect ; \
Jason Merrill's avatar
Jason Merrill committed
	else echo expect ; fi`

RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
	then echo $$s/dejagnu/runtest ; \
	else echo runtest ; fi`

# ---------------------------------------------
# Programs producing files for the HOST machine
# ---------------------------------------------
Jason Merrill's avatar
Jason Merrill committed

AS = @AS@
Jason Merrill's avatar
Jason Merrill committed

AR = @AR@
AR_FLAGS = rc
Jason Merrill's avatar
Jason Merrill committed

CC = @CC@
CFLAGS = @CFLAGS@
LIBCFLAGS = $(CFLAGS)
Jason Merrill's avatar
Jason Merrill committed

CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
Zack Weinberg's avatar
Zack Weinberg committed

DLLTOOL = @DLLTOOL@
Jason Merrill's avatar
Jason Merrill committed

NM = @NM@
LD = @LD@
RANLIB = @RANLIB@
Jason Merrill's avatar
Jason Merrill committed

WINDRES = @WINDRES@
Jason Merrill's avatar
Jason Merrill committed


# -----------------------------------------------
# Programs producing files for the TARGET machine
# -----------------------------------------------
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
Jason Merrill's avatar
Jason Merrill committed

AR_FOR_TARGET=@AR_FOR_TARGET@
CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
USUAL_AR_FOR_TARGET = ` \
  if [ -f $$r/$(HOST_SUBDIR)/binutils/ar ] ; then \
    echo $$r/$(HOST_SUBDIR)/binutils/ar ; \
  else \
    if [ '$(host)' = '$(target)' ] ; then \
      echo $(AR); \
    else \
    fi; \
  fi`
Jason Merrill's avatar
Jason Merrill committed

AS_FOR_TARGET=@AS_FOR_TARGET@
CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
USUAL_AS_FOR_TARGET = ` \
  if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \
    echo $$r/$(HOST_SUBDIR)/gas/as-new ; \
  elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
Jason Merrill's avatar
Jason Merrill committed
  else \
    if [ '$(host)' = '$(target)' ] ; then \
Jason Merrill's avatar
Jason Merrill committed
      echo $(AS); \
    else \
Jason Merrill's avatar
Jason Merrill committed
    fi; \
  fi`

CC_FOR_TARGET = @CC_FOR_TARGET@
# During gcc bootstrap, if we use some random cc for stage1 then
# CFLAGS will be just -g.  We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a.  We define it here so that it can itself be
# overridden on the command line.
GCC_FOR_TARGET=@GCC_FOR_TARGET@
USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \
  $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)

CXX_FOR_TARGET = @CXX_FOR_TARGET@
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
Jason Merrill's avatar
Jason Merrill committed

DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
USUAL_DLLTOOL_FOR_TARGET = ` \
  if [ -f $$r/$(HOST_SUBDIR)/binutils/dlltool ] ; then \
    echo $$r/$(HOST_SUBDIR)/binutils/dlltool ; \
Jason Merrill's avatar
Jason Merrill committed
  else \
    if [ '$(host)' = '$(target)' ] ; then \
Jason Merrill's avatar
Jason Merrill committed
      echo $(DLLTOOL); \
    else \
Jason Merrill's avatar
Jason Merrill committed
    fi; \
  fi`

GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
GFORTRAN_FOR_TARGET = @GFORTRAN_FOR_TARGET@

LD_FOR_TARGET=@LD_FOR_TARGET@
CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
USUAL_LD_FOR_TARGET = ` \
  if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \
    echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \
  elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
    $(CC_FOR_TARGET) -print-prog-name=ld ; \
Jason Merrill's avatar
Jason Merrill committed
  else \
    if [ '$(host)' = '$(target)' ] ; then \
      echo $(LD); \
Jason Merrill's avatar
Jason Merrill committed
    else \
Jason Merrill's avatar
Jason Merrill committed
    fi; \
  fi`


NM_FOR_TARGET=@NM_FOR_TARGET@
CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
USUAL_NM_FOR_TARGET = ` \
  if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \
    echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \
  elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
    $(CC_FOR_TARGET) -print-prog-name=nm ; \
Jason Merrill's avatar
Jason Merrill committed
  else \
    if [ '$(host)' = '$(target)' ] ; then \
      echo $(NM); \
Jason Merrill's avatar
Jason Merrill committed
    else \
Jason Merrill's avatar
Jason Merrill committed
    fi; \
  fi`

RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
USUAL_RANLIB_FOR_TARGET = ` \
  if [ -f $$r/$(HOST_SUBDIR)/binutils/ranlib ] ; then \
    echo $$r/$(HOST_SUBDIR)/binutils/ranlib ; \
Jason Merrill's avatar
Jason Merrill committed
  else \
    if [ '$(host)' = '$(target)' ] ; then \
         echo $(RANLIB); \
      else \
         echo ranlib; \
      fi; \
Jason Merrill's avatar
Jason Merrill committed
    else \
Jason Merrill's avatar
Jason Merrill committed
    fi; \
  fi`

WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
USUAL_WINDRES_FOR_TARGET = ` \
  if [ -f $$r/$(HOST_SUBDIR)/binutils/windres ] ; then \
    echo $$r/$(HOST_SUBDIR)/binutils/windres ; \
Jason Merrill's avatar
Jason Merrill committed
  else \
    if [ '$(host)' = '$(target)' ] ; then \
      echo $(WINDRES); \
Jason Merrill's avatar
Jason Merrill committed
    else \
Jason Merrill's avatar
Jason Merrill committed
    fi; \
  fi`


# ------------------------------------
# Miscellaneous targets and flag lists
# ------------------------------------

# The first rule in the file had better be this one.  Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.
@default_target@:
Jason Merrill's avatar
Jason Merrill committed
#### host and target specific makefile fragments come in here.
@target_makefile_frag@
@alphaieee_frag@
@ospace_frag@
@host_makefile_frag@
Jason Merrill's avatar
Jason Merrill committed
###

# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(HOST_LIB_PATH_gcc)

@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/.libs:
@endif target-libstdc++-v3

@if target-libmudflap
TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
@endif target-libmudflap

@if target-libssp
TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
@endif target-libssp



# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the host machine work.
HOST_LIB_PATH = $(HOST_LIB_PATH_bfd)$(HOST_LIB_PATH_opcodes)

# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
@if gcc
HOST_LIB_PATH_gcc = $$r/$(HOST_SUBDIR)/gcc:$$r/$(HOST_SUBDIR)/prev-gcc:
@endif gcc


@if bfd
HOST_LIB_PATH_bfd = \
  $$r/$(HOST_SUBDIR)/bfd/.:$$r/$(HOST_SUBDIR)/prev-bfd/.:
@endif bfd

@if opcodes
HOST_LIB_PATH_opcodes = \
  $$r/$(HOST_SUBDIR)/opcodes/.:$$r/$(HOST_SUBDIR)/prev-opcodes/.:
@endif opcodes


Jason Merrill's avatar
Jason Merrill committed
# Flags to pass down to all sub-makes.
BASE_FLAGS_TO_PASS = \
	"RPATH_ENVVAR=$(RPATH_ENVVAR)" \
	"TARGET_SUBDIR=$(TARGET_SUBDIR)" \
	"bindir=$(bindir)" \
	"datadir=$(datadir)" \
	"exec_prefix=$(exec_prefix)" \
	"includedir=$(includedir)" \
	"infodir=$(infodir)" \
	"libdir=$(libdir)" \
	"libexecdir=$(libexecdir)" \
	"oldincludedir=$(oldincludedir)" \
	"prefix=$(prefix)" \
	"sbindir=$(sbindir)" \
	"sharedstatedir=$(sharedstatedir)" \
	"sysconfdir=$(sysconfdir)" \
	"target_alias=$(target_alias)" \
	"BISON=$(BISON)" \
	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
	"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
	"EXPECT=$(EXPECT)" \
	"INSTALL=$(INSTALL)" \
	"INSTALL_DATA=$(INSTALL_DATA)" \
	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
	"LEX=$(LEX)" \
	"M4=$(M4)" \
	"MAKE=$(MAKE)" \
	"RUNTEST=$(RUNTEST)" \
	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
	"SHELL=$(SHELL)" \
	"YACC=$(YACC)" \
	"AR_FLAGS=$(AR_FLAGS)" \
	"CFLAGS=$(CFLAGS)" \
	"CXXFLAGS=$(CXXFLAGS)" \
	"LDFLAGS=$(LDFLAGS)" \
	"LIBCFLAGS=$(LIBCFLAGS)" \
	"LIBCXXFLAGS=$(LIBCXXFLAGS)" \
	"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
	"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
	"CPPFLAGS_FOR_TARGET=$(CPPFLAGS_FOR_TARGET)" \
	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
	"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
	"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
	"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
	"GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
	"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
	"LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
	"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
	"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
	"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
	"CONFIG_SHELL=$(SHELL)" \
	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" 
Jason Merrill's avatar
Jason Merrill committed

# For any flags above that may contain shell code that varies from one
# target library to another.  When doing recursive invocations of the
# top-level Makefile, we don't want the outer make to evaluate them,
# so we pass these variables down unchanged.  They must not contain
# single nor double quotes.
RECURSE_FLAGS = \
	CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
	RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS)

Jason Merrill's avatar
Jason Merrill committed
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
EXTRA_HOST_FLAGS = \
	'AR=$(AR)' \
	'AS=$(AS)' \
	'CC=$(CC)' \
	'CXX=$(CXX)' \
	'DLLTOOL=$(DLLTOOL)' \
	'LD=$(LD)' \
	'NM=$(NM)' \
	'RANLIB=$(RANLIB)' \
Jason Merrill's avatar
Jason Merrill committed
	'WINDRES=$(WINDRES)'

FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)

# Flags that are concerned with the location of the X11 include files
# and library files
#
# NOTE: until the top-level is getting the values via autoconf, it only
# causes problems to have this top-level Makefile overriding the autoconf-set
# values in child directories.  Only variables that don't conflict with
# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
#
X11_FLAGS_TO_PASS = \
	'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
	'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'

# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; the variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
EXTRA_TARGET_FLAGS = \
	'AR=$$(AR_FOR_TARGET)' \
	'AS=$$(AS_FOR_TARGET)' \
	'CC=$$(CC_FOR_TARGET)' \
	'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
	'CXX=$$(CXX_FOR_TARGET)' \
	'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
	'LD=$$(LD_FOR_TARGET)' \
	'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
	'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
	'NM=$$(NM_FOR_TARGET)' \
Jason Merrill's avatar
Jason Merrill committed
	'WINDRES=$$(WINDRES_FOR_TARGET)'

TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)

# Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
# unfortunately needs the native compiler and the target ar and
# ranlib.
# If any variables are added here, they must be added to do-*, below.
# The BUILD_* variables are a special case, which are used for the gcc
Jason Merrill's avatar
Jason Merrill committed
# cross-building scheme.
EXTRA_GCC_FLAGS = \
	'BUILD_PREFIX=$(BUILD_PREFIX)' \
	'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
Jason Merrill's avatar
Jason Merrill committed
	"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
	"`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
	"`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
Jason Merrill's avatar
Jason Merrill committed

GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
Jason Merrill's avatar
Jason Merrill committed

Nathanael Nerode's avatar
Nathanael Nerode committed
.PHONY: configure-host
configure-host:  \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-configure-ash \
    maybe-configure-autoconf \
    maybe-configure-automake \
    maybe-configure-bash \
    maybe-configure-bfd \
    maybe-configure-opcodes \
    maybe-configure-binutils \
    maybe-configure-bison \
    maybe-configure-byacc \
    maybe-configure-bzip2 \
    maybe-configure-dejagnu \
    maybe-configure-diff \
    maybe-configure-dosutils \
    maybe-configure-etc \
    maybe-configure-fastjar \
    maybe-configure-fileutils \
    maybe-configure-findutils \
    maybe-configure-find \
Geoffrey Keating's avatar
Geoffrey Keating committed
    maybe-configure-fixincludes \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-configure-flex \
    maybe-configure-gas \
    maybe-configure-gcc \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-configure-gawk \
    maybe-configure-gettext \
    maybe-configure-gnuserv \
    maybe-configure-gprof \
    maybe-configure-gzip \
    maybe-configure-hello \
    maybe-configure-indent \
    maybe-configure-intl \
    maybe-configure-tcl \
    maybe-configure-itcl \
    maybe-configure-ld \
    maybe-configure-libcpp \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-configure-libgui \
    maybe-configure-libiberty \
    maybe-configure-libtool \
    maybe-configure-m4 \
    maybe-configure-make \
    maybe-configure-mmalloc \
    maybe-configure-patch \
    maybe-configure-perl \
    maybe-configure-prms \
    maybe-configure-rcs \
    maybe-configure-readline \
    maybe-configure-release \
    maybe-configure-recode \
    maybe-configure-sed \
    maybe-configure-send-pr \
    maybe-configure-shellutils \
    maybe-configure-sid \
    maybe-configure-sim \
    maybe-configure-tar \
    maybe-configure-texinfo \
    maybe-configure-textutils \
    maybe-configure-time \
    maybe-configure-uudecode \
    maybe-configure-wdiff \
    maybe-configure-zip \
    maybe-configure-zlib \
    maybe-configure-gdb \
    maybe-configure-expect \
    maybe-configure-guile \
    maybe-configure-tk \
    maybe-configure-libtermcap \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-configure-utils \
    maybe-configure-gnattools
Nathanael Nerode's avatar
Nathanael Nerode committed
.PHONY: configure-target
configure-target:  \
    maybe-configure-target-libstdc++-v3 \
    maybe-configure-target-libmudflap \
    maybe-configure-target-libssp \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-configure-target-newlib \
    maybe-configure-target-libgfortran \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-configure-target-libobjc \
    maybe-configure-target-libtermcap \
    maybe-configure-target-winsup \
    maybe-configure-target-libgloss \
    maybe-configure-target-libiberty \
    maybe-configure-target-gperf \
    maybe-configure-target-examples \
    maybe-configure-target-libffi \
    maybe-configure-target-libjava \
    maybe-configure-target-zlib \
    maybe-configure-target-boehm-gc \
    maybe-configure-target-qthreads \
Arnaud Charlet's avatar
Arnaud Charlet committed
    maybe-configure-target-rda \
    maybe-configure-target-libada
Jason Merrill's avatar
Jason Merrill committed

# The target built for a native non-bootstrap build.
.PHONY: all
Paolo Bonzini's avatar
Paolo Bonzini committed
all: unstage all-host all-target stage

.PHONY: all-build
all-build:  \
    maybe-all-build-libiberty \
    maybe-all-build-bison \
    maybe-all-build-byacc \
    maybe-all-build-flex \
    maybe-all-build-m4 \
    maybe-all-build-texinfo \
    maybe-all-build-fixincludes
Nathanael Nerode's avatar
Nathanael Nerode committed
.PHONY: all-host
all-host:  \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-all-ash \
    maybe-all-autoconf \
    maybe-all-automake \
    maybe-all-bash \
    maybe-all-bfd \
    maybe-all-opcodes \
    maybe-all-binutils \
    maybe-all-bison \
    maybe-all-byacc \
    maybe-all-bzip2 \
    maybe-all-dejagnu \
    maybe-all-diff \
    maybe-all-dosutils \
    maybe-all-etc \
    maybe-all-fastjar \
    maybe-all-fileutils \
    maybe-all-findutils \
    maybe-all-find \
Geoffrey Keating's avatar
Geoffrey Keating committed
    maybe-all-fixincludes \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-all-flex \
    maybe-all-gas \
    maybe-all-gcc \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-all-gawk \
    maybe-all-gettext \
    maybe-all-gnuserv \
    maybe-all-gprof \
    maybe-all-gzip \
    maybe-all-hello \
    maybe-all-indent \
    maybe-all-intl \
    maybe-all-tcl \
    maybe-all-itcl \
    maybe-all-ld \
    maybe-all-libcpp \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-all-libgui \
    maybe-all-libiberty \
    maybe-all-libtool \
    maybe-all-m4 \
    maybe-all-make \
    maybe-all-mmalloc \
    maybe-all-patch \
    maybe-all-perl \
    maybe-all-prms \
    maybe-all-rcs \
    maybe-all-readline \
    maybe-all-release \
    maybe-all-recode \
    maybe-all-sed \
    maybe-all-send-pr \
    maybe-all-shellutils \
    maybe-all-sid \
    maybe-all-sim \
    maybe-all-tar \
    maybe-all-texinfo \
    maybe-all-textutils \
    maybe-all-time \
    maybe-all-uudecode \
    maybe-all-wdiff \
    maybe-all-zip \
    maybe-all-zlib \
    maybe-all-gdb \
    maybe-all-expect \
    maybe-all-guile \
    maybe-all-tk \
    maybe-all-libtermcap \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-all-utils \
    maybe-all-gnattools
Nathanael Nerode's avatar
Nathanael Nerode committed
.PHONY: all-target
all-target:  \
    maybe-all-target-libstdc++-v3 \
    maybe-all-target-libmudflap \
    maybe-all-target-libssp \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-all-target-newlib \
    maybe-all-target-libgfortran \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-all-target-libobjc \
    maybe-all-target-libtermcap \
    maybe-all-target-winsup \
    maybe-all-target-libgloss \
    maybe-all-target-libiberty \
    maybe-all-target-gperf \
    maybe-all-target-examples \
    maybe-all-target-libffi \
    maybe-all-target-libjava \
    maybe-all-target-zlib \
    maybe-all-target-boehm-gc \
    maybe-all-target-qthreads \
Arnaud Charlet's avatar
Arnaud Charlet committed
    maybe-all-target-rda \
    maybe-all-target-libada
Jason Merrill's avatar
Jason Merrill committed

# Do a target for all the subdirectories.  A ``make do-X'' will do a
# ``make X'' in all subdirectories (because, in general, there is a
# dependency (below) of X upon do-X, a ``make X'' will also do this,
# but it may do additional work as well).
do-info: unstage info-host info-target stage
Jason Merrill's avatar
Jason Merrill committed

info-host:  \
    maybe-info-ash \
    maybe-info-autoconf \
    maybe-info-automake \
    maybe-info-bash \
    maybe-info-bfd \
    maybe-info-opcodes \
    maybe-info-binutils \
    maybe-info-bison \
    maybe-info-byacc \
    maybe-info-bzip2 \
    maybe-info-dejagnu \
    maybe-info-diff \
    maybe-info-dosutils \
    maybe-info-etc \
    maybe-info-fastjar \
    maybe-info-fileutils \
    maybe-info-findutils \
    maybe-info-find \
Geoffrey Keating's avatar
Geoffrey Keating committed
    maybe-info-fixincludes \
    maybe-info-gcc \
    maybe-info-gawk \
    maybe-info-gettext \
    maybe-info-gnuserv \
    maybe-info-gprof \
    maybe-info-gzip \
    maybe-info-hello \
    maybe-info-indent \
    maybe-info-intl \
    maybe-info-tcl \
    maybe-info-itcl \
    maybe-info-ld \
    maybe-info-libcpp \
    maybe-info-libgui \
    maybe-info-libiberty \
    maybe-info-libtool \
    maybe-info-m4 \
    maybe-info-make \
    maybe-info-mmalloc \
    maybe-info-patch \
    maybe-info-perl \
    maybe-info-prms \
    maybe-info-rcs \
    maybe-info-readline \
    maybe-info-release \
    maybe-info-recode \
    maybe-info-sed \
    maybe-info-send-pr \
    maybe-info-shellutils \
    maybe-info-sid \
    maybe-info-sim \
    maybe-info-tar \
    maybe-info-texinfo \
    maybe-info-textutils \
    maybe-info-time \
    maybe-info-uudecode \
    maybe-info-wdiff \
    maybe-info-zip \
    maybe-info-zlib \
    maybe-info-gdb \
    maybe-info-expect \
    maybe-info-guile \
    maybe-info-tk \
    maybe-info-libtermcap \
Nathanael Nerode's avatar
Nathanael Nerode committed
    maybe-info-utils \
    maybe-info-gnattools
Jason Merrill's avatar
Jason Merrill committed

.PHONY: info-target
info-target:  \
    maybe-info-target-libstdc++-v3 \
    maybe-info-target-libmudflap \
    maybe-info-target-libssp \
    maybe-info-target-libgfortran \
    maybe-info-target-libobjc \
    maybe-info-target-libtermcap \
    maybe-info-target-winsup \
    maybe-info-target-libgloss \
    maybe-info-target-libiberty \
    maybe-info-target-gperf \
    maybe-info-target-examples \
    maybe-info-target-libffi \
    maybe-info-target-libjava \
    maybe-info-target-zlib \
    maybe-info-target-boehm-gc \
    maybe-info-target-qthreads \
Arnaud Charlet's avatar
Arnaud Charlet committed
    maybe-info-target-rda \
    maybe-info-target-libada
Jason Merrill's avatar
Jason Merrill committed

do-dvi: unstage dvi-host dvi-target stage
dvi-host:  \
    maybe-dvi-ash \
    maybe-dvi-autoconf \
    maybe-dvi-automake \
    maybe-dvi-bash \
    maybe-dvi-bfd \
    maybe-dvi-opcodes \
    maybe-dvi-binutils \
    maybe-dvi-bison \
    maybe-dvi-byacc \
    maybe-dvi-bzip2 \
    maybe-dvi-dejagnu \
    maybe-dvi-diff \
    maybe-dvi-dosutils \
    maybe-dvi-etc \
    maybe-dvi-fastjar \
    maybe-dvi-fileutils \
    maybe-dvi-findutils \
    maybe-dvi-find \
Geoffrey Keating's avatar
Geoffrey Keating committed
    maybe-dvi-fixincludes \
    maybe-dvi-gcc \
    maybe-dvi-gawk \
    maybe-dvi-gettext \
    maybe-dvi-gnuserv \
    maybe-dvi-gprof \
    maybe-dvi-gzip \
    maybe-dvi-hello \
    maybe-dvi-indent \
    maybe-dvi-intl \
    maybe-dvi-tcl \
    maybe-dvi-itcl \
    maybe-dvi-ld \
    maybe-dvi-libcpp \