Makefile.in revision 102789
118334Speter# Makefile for GNU C compiler. 290081Sobrien# Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 390081Sobrien# 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 418334Speter 590081Sobrien#This file is part of GCC. 618334Speter 790081Sobrien#GCC is free software; you can redistribute it and/or modify 818334Speter#it under the terms of the GNU General Public License as published by 918334Speter#the Free Software Foundation; either version 2, or (at your option) 1018334Speter#any later version. 1118334Speter 1290081Sobrien#GCC is distributed in the hope that it will be useful, 1318334Speter#but WITHOUT ANY WARRANTY; without even the implied warranty of 1418334Speter#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1518334Speter#GNU General Public License for more details. 1618334Speter 1718334Speter#You should have received a copy of the GNU General Public License 1890081Sobrien#along with GCC; see the file COPYING. If not, write to 1918334Speter#the Free Software Foundation, 59 Temple Place - Suite 330, 2018334Speter#Boston MA 02111-1307, USA. 2118334Speter 2252298Sobrien# $FreeBSD: head/contrib/gcc/Makefile.in 102789 2002-09-01 20:49:59Z kan $ 2352298Sobrien 2418334Speter# The targets for external use include: 2518334Speter# all, doc, proto, install, install-cross, install-cross-rest, 2618334Speter# uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean, 2718334Speter# stage1, stage2, stage3, stage4. 2818334Speter 2990081Sobrien# This is the default target. 3090081Sobrienall: 3190081Sobrien 3218334Speter# Suppress smart makes who think they know how to automake Yacc files 3318334Speter.y.c: 3418334Speter 3550448Sobrien# Directory where sources are, from where we are. 3650448Sobriensrcdir = @srcdir@ 3750448SobrienVPATH = @srcdir@ 3850448Sobrien 3990081Sobrien# Pointer to the GCC Project website 4090081Sobrienwebsite=http://gcc.gnu.org 4190081Sobrien 4218334Speter# Variables that exist for you to override. 4318334Speter# See below for how to change them for certain systems. 4418334Speter 4518334Speter# List of language subdirectories. 4618334Speter# This is overridden by configure. 4750448SobrienSUBDIRS =@subdirs@ 4818334Speter 4918334Speter# Selection of languages to be made. 5018334Speter# This is overridden by configure. 5152298SobrienCONFIG_LANGUAGES = @all_languages@ 5290081SobrienLANGUAGES = c gcov$(exeext) $(CONFIG_LANGUAGES) 5318334Speter 5450448Sobrien# Selection of languages to be made during stage1 build. 5550448Sobrien# This is overridden by configure. 5650448SobrienBOOT_LANGUAGES = c @all_boot_languages@ 5750448Sobrien 5890081Sobrien# Various ways of specifying flags for compilations: 5990081Sobrien# CFLAGS is for the user to override to, e.g., do a cross build with -O2. 6090081Sobrien# For recursive bootstrap builds CFLAGS is used to pass in STAGE1_CFLAGS 6190081Sobrien# or BOOT_CFLAGS 6290081Sobrien# STAGE1_CFLAGS is set by configure on some targets or passed from toplevel 6390081Sobrien# and sets the CFLAGS passed to stage1 of a bootstrap compilation. 6490081Sobrien# BOOT_CFLAGS is the value of CFLAGS to pass to the stage2, stage3 and stage4 6590081Sobrien# bootstrap compilations. 6618334Speter# XCFLAGS is used for most compilations but not when using the GCC just built. 6750448Sobrien# TCFLAGS is used for compilations with the GCC just built. 6818334SpeterXCFLAGS = 6950448SobrienTCFLAGS = 7018334SpeterCFLAGS = -g 7190081SobrienSTAGE1_CFLAGS = -g @stage1_cflags@ 7290081SobrienBOOT_CFLAGS = -g -O2 7390081Sobrien 7490081Sobrien# The warning flags are separate from BOOT_CFLAGS because people tend to 7590081Sobrien# override optimization flags and we'd like them to still have warnings 7690081Sobrien# turned on. These flags are also used to pass other stage dependent 7790081Sobrien# flags from configure. The user is free to explicitly turn these flags 7890081Sobrien# off if they wish. 7990081Sobrien# LOOSE_WARN are the warning flags to use when compiling something 8090081Sobrien# which is only compiled with gcc, such as libgcc and the frontends 8190081Sobrien# other than C. 8290081Sobrien# STRICT_WARN and STRICT2_WARN are the additional warning flags to 8390081Sobrien# apply to the back end and the C front end, which may be compiled 8490081Sobrien# with other compilers. This is partially controlled by configure in 8590081Sobrien# stage1, as not all versions of gcc understand -Wno-long-long. 8690081SobrienLOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 8790081SobrienSTRICT_WARN = -Wtraditional @strict1_warn@ 8890081SobrienSTRICT2_WARN = -Wtraditional -pedantic -Wno-long-long 8990081Sobrien 9090081Sobrien# This is how we control whether or not the additional warnings are applied. 9190081Sobrien.-warn = $(STRICT_WARN) 9290081SobrienGCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) 9390081Sobrien 9490081Sobrien# All warnings have to be shut off in stage1 if the compiler used then 9590081Sobrien# isn't gcc; configure determines that. WARN_CFLAGS will be either 9690081Sobrien# $(GCC_WARN_CFLAGS), or nothing. 9790081SobrienWARN_CFLAGS = @warn_cflags@ 9890081Sobrien 9918334Speter# These exists to be overridden by the x-* and t-* files, respectively. 10018334SpeterX_CFLAGS = 10118334SpeterT_CFLAGS = 10218334Speter 10318334SpeterX_CPPFLAGS = 10418334SpeterT_CPPFLAGS = 10518334Speter 10652298SobrienAWK = @AWK@ 10750448SobrienCC = @CC@ 10890081SobrienBISON = @BISON@ 10918334SpeterBISONFLAGS = 11090081SobrienFLEX = @FLEX@ 11190081SobrienFLEXFLAGS = 11218334SpeterAR = ar 11318334SpeterAR_FLAGS = rc 11450448SobrienDLLTOOL = dlltool 11590081SobrienRANLIB = @RANLIB@ 11618334SpeterSHELL = /bin/sh 11718334Speter# on sysV, define this as cp. 11850448SobrienINSTALL = @INSTALL@ 11950448Sobrien# Some systems may be missing symbolic links, regular links, or both. 12050448Sobrien# Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate. 12150448SobrienLN=@LN@ 12250448SobrienLN_S=@LN_S@ 12318334Speter# These permit overriding just for certain files. 12450448SobrienINSTALL_PROGRAM = @INSTALL_PROGRAM@ 12550448SobrienINSTALL_DATA = @INSTALL_DATA@ 12690081SobrienINSTALL_SCRIPT = @INSTALL@ 12790081SobrienMAKEINFO = @MAKEINFO@ 12850448SobrienMAKEINFOFLAGS = 12918334SpeterTEXI2DVI = texi2dvi 13090081SobrienTEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl 13190081SobrienPOD2MAN = pod2man --center="GNU" --release="gcc-$(version)" 13218334Speter# For GNUmake: let us decide what gets passed to recursive makes. 13318334SpeterMAKEOVERRIDES = 13450448Sobrien@SET_MAKE@ 13590081Sobrien# Some compilers can't handle cc -c blah.c -o foo/blah.o. 13690081Sobrien# In stage2 and beyond, we force this to "-o $@" since we know we're using gcc. 13790081SobrienOUTPUT_OPTION = @OUTPUT_OPTION@ 13818334Speter 13990081Sobrien# Some versions of `touch' (such as the version on Solaris 2.8) 14090081Sobrien# do not correctly set the timestamp due to buggy versions of `utime' 14190081Sobrien# in the kernel. So, we use `echo' instead. 14290081SobrienSTAMP = echo timestamp > 14318334Speter 14490081Sobrien# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is 14590081Sobrien# -I../zlib, unless we were configured with --with-system-zlib, in which 14690081Sobrien# case both are empty. 14790081SobrienZLIB = @zlibdir@ -lz 14890081SobrienZLIBINC = @zlibinc@ 14918334Speter 15090081Sobrien# Substitution type for target's getgroups 2nd arg. 15190081SobrienTARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@ 15218334Speter 15318334Speter# Target to use when installing include directory. Either 15490081Sobrien# install-headers-tar, install-headers-cpio or install-headers-cp. 15550448SobrienINSTALL_HEADERS_DIR = @build_install_headers_dir@ 15618334Speter 15718334Speter# Header files that are made available under the same name 15818334Speter# to programs compiled with GCC. 15918334SpeterUSER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \ 16090081Sobrien $(srcdir)/ginclude/varargs.h \ 16190081Sobrien $(srcdir)/ginclude/stdbool.h $(srcdir)/ginclude/iso646.h \ 16290081Sobrien $(EXTRA_HEADERS) 16318334Speter 16490081Sobrien# The GCC to use for compiling libgcc.a, enquire, and crt*.o. 16518334Speter# Usually the one we just built. 16618334Speter# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). 16790081SobrienGCC_FOR_TARGET = ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include 16818334Speter 16918334Speter# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. 17018334Speter# It omits XCFLAGS, and specifies -B./. 17190081Sobrien# It also specifies -isystem ./include to find, e.g., stddef.h. 17290081SobrienGCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -isystem ./include $(TCFLAGS) 17318334Speter 17418334Speter# Sed command to transform gcc to installed name. Overwritten by configure. 17550448Sobrienprogram_transform_name = @program_transform_name@ 17650448Sobrienprogram_transform_cross_name = s,^,$(target_alias)-, 17718334Speter 17850448Sobrienbuild_canonical = @build_canonical@ 17950448Sobrienhost_canonical = @host_canonical@ 18050448Sobrien 18118334Speter# Tools to use when building a cross-compiler. 18218334Speter# These are used because `configure' appends `cross-make' 18318334Speter# to the makefile when making a cross-compiler. 18418334Speter 18550448Sobrien# Use the tools from the build tree, if they are available. 18650448Sobrien 18750448Sobrien# objdir is set by configure. 18850448Sobrienobjdir = @objdir@ 18950448Sobrien 19050448SobrienAR_FOR_TARGET = ` \ 19150448Sobrien if [ -f $(objdir)/../binutils/ar ] ; then \ 19250448Sobrien echo $(objdir)/../binutils/ar ; \ 19350448Sobrien else \ 19450448Sobrien if [ "$(host_canonical)" = "$(target)" ] ; then \ 19550448Sobrien echo ar; \ 19650448Sobrien else \ 19790081Sobrien t='$(program_transform_cross_name)'; echo ar | sed -e $$t ; \ 19850448Sobrien fi; \ 19950448Sobrien fi` 20090081SobrienAR_FLAGS_FOR_TARGET = 20190081SobrienAR_CREATE_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) rc 20290081SobrienAR_EXTRACT_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) x 20350448SobrienRANLIB_FOR_TARGET = ` \ 20450448Sobrien if [ -f $(objdir)/../binutils/ranlib ] ; then \ 20550448Sobrien echo $(objdir)/../binutils/ranlib ; \ 20650448Sobrien else \ 20750448Sobrien if [ "$(host_canonical)" = "$(target)" ] ; then \ 20850448Sobrien echo ranlib; \ 20950448Sobrien else \ 21090081Sobrien t='$(program_transform_cross_name)'; echo ranlib | sed -e $$t ; \ 21150448Sobrien fi; \ 21250448Sobrien fi` 21350448SobrienRANLIB_TEST_FOR_TARGET = \ 21450448Sobrien [ -f $(RANLIB_FOR_TARGET) ] \ 21550448Sobrien || ( [ "$(host_canonical)" = "$(target)" ] \ 21650448Sobrien && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ) 21790081SobrienNM_FOR_TARGET = ` \ 21890081Sobrien if [ -f ./nm ] ; then \ 21990081Sobrien echo ./nm ; \ 22090081Sobrien elif [ -f $(objdir)/../binutils/nm-new ] ; then \ 22190081Sobrien echo $(objdir)/../binutils/nm-new ; \ 22290081Sobrien else \ 22390081Sobrien if [ "$(host_canonical)" = "$(target)" ] ; then \ 22490081Sobrien echo nm; \ 22590081Sobrien else \ 22690081Sobrien t='$(program_transform_cross_name)'; echo nm | sed -e $$t ; \ 22790081Sobrien fi; \ 22890081Sobrien fi` 22918334Speter 23090081Sobrien# Where to find some libiberty headers. 23190081SobrienHASHTAB_H = $(srcdir)/../include/hashtab.h 23290081SobrienOBSTACK_H = $(srcdir)/../include/obstack.h 23390081SobrienSPLAY_TREE_H= $(srcdir)/../include/splay-tree.h 23490081SobrienFIBHEAP_H = $(srcdir)/../include/fibheap.h 23518334Speter 23690081Sobrien# Default native SYSTEM_HEADER_DIR, to be overridden by targets. 23790081SobrienNATIVE_SYSTEM_HEADER_DIR = /usr/include 23890081Sobrien# Default cross SYSTEM_HEADER_DIR, to be overridden by targets. 23990081SobrienCROSS_SYSTEM_HEADER_DIR = $(build_tooldir)/sys-include 24018334Speter 24190081Sobrien# autoconf sets SYSTEM_HEADER_DIR to one of the above. 24290081SobrienSYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@ 24390081Sobrien 24490081Sobrien# Control whether to run fixproto and fixincludes. 24590081SobrienSTMP_FIXPROTO = @STMP_FIXPROTO@ 24690081SobrienSTMP_FIXINC = @STMP_FIXINC@ 24790081Sobrien 24818334Speter# Test to see whether <limits.h> exists in the system header files. 24918334SpeterLIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ] 25018334Speter 25150448Sobrientarget=@target@ 25250448Sobrientarget_alias=@target_alias@ 25350448Sobrienxmake_file=@dep_host_xmake_file@ 25450448Sobrientmake_file=@dep_tmake_file@ 25550448Sobrienout_file=$(srcdir)/config/@out_file@ 25650448Sobrienout_object_file=@out_object_file@ 25750448Sobrienmd_file=$(srcdir)/config/@md_file@ 25890081Sobrientm_p_file_list=@tm_p_file_list@ 25990081Sobrientm_p_file=@tm_p_file@ 26090081Sobrienbuild_xm_file_list=@build_xm_file_list@ 26190081Sobrienbuild_xm_file=@build_xm_file@ 26290081Sobrienbuild_xm_defines=@build_xm_defines@ 26390081Sobrienhost_xm_file_list=@host_xm_file_list@ 26490081Sobrienhost_xm_file=@host_xm_file@ 26590081Sobrienhost_xm_defines=@host_xm_defines@ 26690081Sobrienxm_file=@xm_file@ 26790081Sobrienxm_defines=@xm_defines@ 26850448Sobrienlang_specs_files=@lang_specs_files@ 26950448Sobrienlang_options_files=@lang_options_files@ 27052298Sobrienlang_tree_files=@lang_tree_files@ 27190081Sobrientarget_cpu_default=@target_cpu_default@ 27250448SobrienGCC_THREAD_FILE=@thread_file@ 27352298SobrienOBJC_BOEHM_GC=@objc_boehm_gc@ 27450448SobrienGTHREAD_FLAGS=@gthread_flags@ 27550448Sobrien# Be prepared for gcc2 merges. 27650448Sobriengcc_version=@gcc_version@ 27750448Sobriengcc_version_trigger=@gcc_version_trigger@ 27850448Sobrienversion=$(gcc_version) 27990081Sobrienmainversion=`grep version_string $(srcdir)/version.c | sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/'` 28018334Speter 28118334Speter# Common prefix for installation directories. 28218334Speter# NOTE: This directory must exist when you start installation. 28350448Sobrienprefix = @prefix@ 28418334Speter# Directory in which to put localized header files. On the systems with 28518334Speter# gcc as the native cc, `local_prefix' may not be `prefix' which is 28618334Speter# `/usr'. 28718334Speter# NOTE: local_prefix *should not* default from prefix. 28850448Sobrienlocal_prefix = @local_prefix@ 28918334Speter# Directory in which to put host dependent programs and libraries 29050448Sobrienexec_prefix = @exec_prefix@ 29118334Speter# Directory in which to put the executable for the command `gcc' 29250448Sobrienbindir = @bindir@ 29318334Speter# Directory in which to put the directories used by the compiler. 29450448Sobrienlibdir = @libdir@ 29518334Speter# Directory in which the compiler finds executables, libraries, etc. 29650448Sobrienlibsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version) 29752298Sobrien# Used to produce a relative $(gcc_tooldir) in gcc.o 29852298Sobrienunlibsubdir = ../../.. 29952298Sobrien# Directory in which to find other cross-compilation tools and headers. 30052298Sobriendollar = @dollar@ 30152298Sobrien# Used in install-cross. 30252298Sobriengcc_tooldir = @gcc_tooldir@ 30390081Sobrien# Used to install the shared libgcc. 30490081Sobrienslibdir = @slibdir@ 30590081Sobrien# Since gcc_tooldir does not exist at build-time, use -B$(build_tooldir)/bin/ 30652298Sobrienbuild_tooldir = $(exec_prefix)/$(target_alias) 30790081Sobrien# Directory in which the compiler finds target-independent g++ includes. 30890081Sobriengcc_gxx_include_dir = @gcc_gxx_include_dir@ 30918334Speter# Directory to search for site-specific includes. 31090081Sobrienlocal_includedir = $(local_prefix)/include 31190081Sobrienincludedir = $(prefix)/include 31218334Speter# where the info files go 31350448Sobrieninfodir = @infodir@ 31450448Sobrien# Where cpp should go besides $prefix/bin if necessary 31550448Sobriencpp_install_dir = @cpp_install_dir@ 31652298Sobrien# where the locale files go 31790081Sobriendatadir = @datadir@ 31852298Sobrienlocaledir = $(datadir)/locale 31918334Speter# Extension (if any) to put in installed man-page filename. 32090081Sobrienman1ext = .1 32190081Sobrienman7ext = .7 32218334Speterobjext = .o 32350448Sobrienexeext = @host_exeext@ 32450448Sobrienbuild_exeext = @build_exeext@ 32518334Speter 32618334Speter# Directory in which to put man pages. 32752298Sobrienmandir = @mandir@ 32852298Sobrienman1dir = $(mandir)/man1 32990081Sobrienman7dir = $(mandir)/man7 33018334Speter# Dir for temp files. 33118334Spetertmpdir = /tmp 33218334Speter 33352298Sobrien# Top build directory, relative to here. 33452298Sobrientop_builddir = . 33552298Sobrien 33652298Sobrien# Whether we were configured with NLS. 33752298SobrienUSE_NLS = @USE_NLS@ 33852298Sobrien 33952298Sobrien# Internationalization library. 34052298SobrienINTLLIBS = @INTLLIBS@ 34190081SobrienINTLDEPS = @INTLDEPS@ 34252298Sobrien 34390081Sobrien# Character encoding conversion library. 34490081SobrienLIBICONV = @LIBICONV@ 34590081Sobrien 34652298Sobrien# List of internationalization subdirectories. 34790081SobrienINTL_SUBDIRS = intl 34852298Sobrien 34990081Sobrien# The GC method to be used on this system. 35090081SobrienGGC=@GGC@.o 35118334Speter 35290081Sobrien# If a supplementary library is being used for the GC. 35390081SobrienGGC_LIB= 35418334Speter 35590081Sobrien# libgcc.a may be built directly or via stmp-multilib, 35690081Sobrien# and installed likewise. Overridden by t-fragment. 35718334SpeterLIBGCC = libgcc.a 35818334SpeterINSTALL_LIBGCC = install-libgcc 35918334Speter 36018334Speter# Options to use when compiling libgcc2.a. 36150448Sobrien# 36296273SobrienLIBGCC2_DEBUG_CFLAGS = -g 36390081SobrienLIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@ 36418334Speter 36518334Speter# Additional options to use when compiling libgcc2.a. 36690081Sobrien# Some targets override this to -isystem include 36718334SpeterLIBGCC2_INCLUDES = 36818334Speter 36918334Speter# Additional target-dependent options for compiling libgcc2.a. 37090081SobrienTARGET_LIBGCC2_CFLAGS = 37118334Speter 37290081Sobrien# Options to use when compiling crtbegin/end. 37390081SobrienCRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ 37490081Sobrien -finhibit-size-directive -fno-inline-functions -fno-exceptions 37518334Speter 37690081Sobrien# Additional sources to handle exceptions; overridden on ia64. 37790081SobrienLIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ 37890081Sobrien $(srcdir)/unwind-sjlj.c 37990081SobrienLIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h 38018334Speter 38190081Sobrien# nm flags to list global symbols in libgcc object files. 38290081SobrienSHLIB_NM_FLAGS = -pg 38390081Sobrien 38418334Speter# List of extra executables that should be compiled for this target machine 38518334Speter# that are used for compiling from source code to object code. 38618334Speter# The rules for compiling them should be in the t-* file for the machine. 38750448SobrienEXTRA_PASSES =@extra_passes@ 38818334Speter 38918334Speter# Like EXTRA_PASSES, but these are used when linking. 39050448SobrienEXTRA_PROGRAMS = @extra_programs@ 39118334Speter 39218334Speter# List of extra object files that should be compiled for this target machine. 39318334Speter# The rules for compiling them should be in the t-* file for the machine. 39450448SobrienEXTRA_PARTS = @extra_parts@ 39518334Speter 39618334Speter# List of extra object files that should be compiled and linked with 39718334Speter# compiler proper (cc1, cc1obj, cc1plus). 39850448SobrienEXTRA_OBJS = @extra_objs@ 39918334Speter 40018334Speter# List of extra object files that should be compiled and linked with 40118334Speter# the gcc driver. 40250448SobrienEXTRA_GCC_OBJS =@host_extra_gcc_objs@ 40318334Speter 40418334Speter# List of additional header files to install. 40518334Speter# Often this is edited directly by `configure'. 40650448SobrienEXTRA_HEADERS =@extra_headers_list@ 40718334Speter 40818334Speter# It is convenient for configure to add the assignment at the beginning, 40918334Speter# so don't override it here. 41050448SobrienUSE_COLLECT2 = collect2$(exeext) 41118334Speter 41290081Sobrien# List of extra C and assembler files to add to static and shared libgcc2. 41318334Speter# Assembler files should have names ending in `.asm'. 41490081SobrienLIB2FUNCS_EXTRA = 41518334Speter 41690081Sobrien# List of extra C and assembler files to add to static libgcc2. 41718334Speter# Assembler files should have names ending in `.asm'. 41890081SobrienLIB2FUNCS_STATIC_EXTRA = 41918334Speter 42050448Sobrien# Handle cpp installation. 42150448SobrienINSTALL_CPP= 42250448SobrienUNINSTALL_CPP= 42350448Sobrien 42450448Sobrien# We do not try to build float.h anymore. Let configure select the 42550448Sobrien# appropriate pre-built float.h file for the target. 42652298SobrienFLOAT_H=@float_h_file@ 42750448Sobrien 42818334Speter# Program to convert libraries. 42990081SobrienLIBCONVERT = 43018334Speter 43118334Speter# Control whether header files are installed. 43218334SpeterINSTALL_HEADERS=install-headers 43318334Speter 43490081Sobrien# Control whether Info documentation is built and installed. 43590081SobrienBUILD_INFO = @BUILD_INFO@ 43618334Speter 43790081Sobrien# Control whether manpages generated by texi2pod.pl can be rebuilt. 43890081SobrienGENERATED_MANPAGES = @GENERATED_MANPAGES@ 43990081Sobrien 44018334Speter# Additional directories of header files to run fixincludes on. 44118334Speter# These should be directories searched automatically by default 44218334Speter# just as /usr/include is. 44390081Sobrien# *Do not* use this for directories that happen to contain 44418334Speter# header files, but are not searched automatically by default. 44518334Speter# On most systems, this is empty. 44618334SpeterOTHER_FIXINCLUDES_DIRS= 44718334Speter 44850448Sobrien# A list of all the language-specific executables. 44950448Sobrien# This is overridden by configure. 45050448SobrienCOMPILERS = cc1$(exeext) @all_compilers@ 45150448Sobrien 45218334Speter# List of things which should already be built whenever we try to use xgcc 45318334Speter# to compile anything (without linking). 45490081SobrienGCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp0$(exeext) specs $(EXTRA_PASSES) 45518334Speter 45618334Speter# List of things which should already be built whenever we try to use xgcc 45718334Speter# to link anything. 45818334SpeterGCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS) 45918334Speter 46018334Speter# Directory to link to, when using the target `maketest'. 46118334SpeterDIR = ../gcc 46218334Speter 46318334Speter# Flags to use when cross-building GCC. 46418334Speter# Prefix to apply to names of object files when using them 46518334Speter# to run on the machine we are compiling on. 46690081SobrienHOST_PREFIX = @HOST_PREFIX@ 46718334Speter# Prefix to apply to names of object files when compiling them 46818334Speter# to run on the machine we are compiling on. 46990081Sobrien# The default for this variable is chosen to keep these rules 47018334Speter# out of the way of the other rules for compiling the same source files. 47190081SobrienHOST_PREFIX_1 = @HOST_PREFIX_1@ 47290081Sobrien# Native compiler for the build machine and its switches. 47390081SobrienHOST_CC = @HOST_CC@ 47490081SobrienHOST_CFLAGS= @HOST_CFLAGS@ -DGENERATOR_FILE 47590081Sobrien 47690081Sobrien# Native linker and preprocessor flags. For x-fragment overrides. 47718334SpeterHOST_LDFLAGS=$(LDFLAGS) 47818334SpeterHOST_CPPFLAGS=$(ALL_CPPFLAGS) 47918334Speter 48018334Speter# Actual name to use when installing a native compiler. 48190081SobrienGCC_INSTALL_NAME = `echo gcc|sed '$(program_transform_name)'` 48290081SobrienGCC_TARGET_INSTALL_NAME = $(target_alias)-`echo gcc|sed '$(program_transform_name)'` 48390081SobrienCPP_INSTALL_NAME = `echo cpp|sed '$(program_transform_name)'` 48490081SobrienPROTOIZE_INSTALL_NAME = `echo protoize|sed '$(program_transform_name)'` 48590081SobrienUNPROTOIZE_INSTALL_NAME = `echo unprotoize|sed '$(program_transform_name)'` 48690081SobrienGCOV_INSTALL_NAME = `echo gcov|sed '$(program_transform_name)'` 48790081SobrienGCCBUG_INSTALL_NAME = `echo gccbug|sed '$(program_transform_name)'` 48818334Speter 48918334Speter# Actual name to use when installing a cross-compiler. 49090081SobrienGCC_CROSS_NAME = `echo gcc|sed '$(program_transform_cross_name)'` 49190081SobrienCPP_CROSS_NAME = `echo cpp|sed '$(program_transform_cross_name)'` 49290081SobrienPROTOIZE_CROSS_NAME = `echo protoize|sed '$(program_transform_cross_name)'` 49390081SobrienUNPROTOIZE_CROSS_NAME = `echo unprotoize|sed '$(program_transform_cross_name)'` 49418334Speter 49590081Sobrien# Set by autoconf to "all.internal" for a native build, or 49690081Sobrien# "all.cross" to build a cross compiler. 49790081SobrienALL = @ALL@ 49818334Speter 49950448Sobrien# Setup the testing framework, if you have one 50050448SobrienEXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \ 50150448Sobrien echo $${rootme}/../expect/expect ; \ 50250448Sobrien else echo expect ; fi` 50318334Speter 50450448SobrienRUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \ 50550448Sobrien echo $${srcdir}/../dejagnu/runtest ; \ 50650448Sobrien else echo runtest; fi` 50750448SobrienRUNTESTFLAGS = 50850448Sobrien 50918334Speter# Extra symbols for fixproto to define when parsing headers. 51090081SobrienFIXPROTO_DEFINES = 51118334Speter 51218334Speter# Extra flags to use when compiling crt{begin,end}.o. 51390081SobrienCRTSTUFF_T_CFLAGS = 51418334Speter 51550448Sobrien# Extra flags to use when compiling [m]crt0.o. 51690081SobrienCRT0STUFF_T_CFLAGS = 51750448Sobrien 51850448Sobrien# "t" or nothing, for building multilibbed versions of, say, crtbegin.o. 51950448SobrienT = 52050448Sobrien 52190081Sobrien# Should T contain a `=', libgcc.mk will make T_TARGET, setting 52290081Sobrien# $(T_TARGET) to the name of the actual target filename. 52390081SobrienT_TARGET = 52490081SobrienT_TARGET : $(T_TARGET) 52590081Sobrien 52618334Speter# End of variables for you to override. 52718334Speter 52818334Speter# Definition of `all' is here so that new rules inserted by sed 52918334Speter# do not specify the default target. 53018334Speter# The real definition is under `all.internal' (for native compilers) 53118334Speter# or `all.cross' (for cross compilers). 53218334Speterall: all.indirect 53318334Speter 53418334Speter# This tells GNU Make version 3 not to put all variables in the environment. 53518334Speter.NOEXPORT: 53618334Speter 53790081Sobrien# GCONFIG_H lists the config files that the generator files depend on, while 53890081Sobrien# CONFIG_H lists the the ones ordinary gcc files depend on, which includes 53990081Sobrien# several files generated by those generators. 54090081SobrienGCONFIG_H = config.h $(host_xm_file_list) 54190081SobrienHCONFIG_H = hconfig.h $(build_xm_file_list) 54290081SobrienCONFIG_H = $(GCONFIG_H) insn-constants.h insn-flags.h 54390081SobrienTCONFIG_H = tconfig.h $(xm_file_list) 54490081SobrienTARGET_H = target.h 54596273SobrienHOOKS_H = hooks.h 546102789SkanLANGHOOKS_DEF_H = langhooks.h $(HOOKS_H) 54796273SobrienTARGET_DEF_H = target-def.h $(HOOKS_H) 54890081SobrienTM_P_H = tm_p.h $(tm_p_file_list) tm-preds.h 54990081Sobrien 55090081SobrienMACHMODE_H = machmode.h machmode.def 55190081SobrienRTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) 55290081SobrienRTL_H = $(RTL_BASE_H) genrtl.h 55390081SobrienPARAMS_H = params.h params.def 55490081SobrienTREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def 55590081SobrienBASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h 55690081SobrienDEMANGLE_H = $(srcdir)/../include/demangle.h 55790081SobrienRECOG_H = recog.h 55890081SobrienEXPR_H = expr.h 55990081SobrienOPTABS_H = optabs.h insn-codes.h 56090081SobrienREGS_H = regs.h varray.h $(MACHMODE_H) 56190081SobrienINTEGRATE_H = integrate.h varray.h 56290081SobrienLOOP_H = loop.h varray.h bitmap.h 56390081SobrienGCC_H = gcc.h version.h 56490081SobrienGGC_H = ggc.h varray.h 56590081SobrienTIMEVAR_H = timevar.h timevar.def 56690081SobrienINSN_ATTR_H = insn-attr.h $(srcdir)/insn-addr.h $(srcdir)/varray.h 56790081SobrienC_COMMON_H = c-common.h $(SPLAY_TREE_H) 56890081SobrienC_TREE_H = c-tree.h $(C_COMMON_H) 56990081SobrienSYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h 57090081SobrienPREDICT_H = predict.h predict.def 57190081SobrienCPPLIB_H = cpplib.h line-map.h 57290081Sobrien 57318334Speter# sed inserts variable overrides after the following line. 57418334Speter####target overrides 57550448Sobrien@target_overrides@ 57650448Sobrien 57718334Speter####host overrides 57850448Sobrien@host_overrides@ 57950448Sobrien# 58018334Speter# Now figure out from those variables how to compile and link. 58118334Speter 58218334Speterall.indirect: $(ALL) 58318334Speter 58490081Sobrien# IN_GCC distinguishes between code compiled into GCC itself and other 58590081Sobrien# programs built during a bootstrap. 58690081Sobrien# autoconf inserts -DCROSS_COMPILE if we are building a cross compiler. 58790081SobrienINTERNAL_CFLAGS = -DIN_GCC @CROSS@ 58818334Speter 58918334Speter# This is the variable actually used when we compile. 59052298Sobrien# If you change this line, you probably also need to change the definition 59152298Sobrien# of HOST_CFLAGS in build-make to match. 59290081SobrienALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) \ 59390081Sobrien $(CFLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@ 59418334Speter 59518334Speter# Likewise. 59618334SpeterALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) 59718334Speter 59890081Sobrien# Build and host support libraries. FORBUILD is either 59990081Sobrien# .. or ../$(build_alias) depending on whether host != build. 60090081SobrienLIBIBERTY = ../libiberty/libiberty.a 60190081SobrienBUILD_LIBIBERTY = @FORBUILD@/libiberty/libiberty.a 60218334Speter 60390081Sobrien# Dependencies on the intl and portability libraries. 60490081SobrienLIBDEPS= $(INTLDEPS) $(LIBIBERTY) 60518334Speter 60618334Speter# Likewise, for use in the tools that must run on this machine 60718334Speter# even if we are cross-building GCC. 60890081SobrienHOST_LIBDEPS= $(BUILD_LIBIBERTY) 60918334Speter 61018334Speter# How to link with both our special library facilities 61118334Speter# and the system's installed libraries. 61290081SobrienLIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY) 61318334Speter 61418334Speter# Likewise, for use in the tools that must run on this machine 61518334Speter# even if we are cross-building GCC. 61690081SobrienHOST_LIBS = $(BUILD_LIBIBERTY) 61718334Speter 61890081SobrienHOST_RTL = $(HOST_PREFIX)rtl.o read-rtl.o $(HOST_PREFIX)bitmap.o \ 61990081Sobrien $(HOST_PREFIX)ggc-none.o gensupport.o 62090081Sobrien 62118334SpeterHOST_PRINT = $(HOST_PREFIX)print-rtl.o 62290081SobrienHOST_ERRORS = $(HOST_PREFIX)errors.o 62318334Speter 62418334Speter# Specify the directories to be searched for header files. 62518334Speter# Both . and srcdir are used, in that order, 62690081Sobrien# so that *config.h will be found in the compilation 62718334Speter# subdirectory rather than in the source directory. 62890081Sobrien# -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file 62990081Sobrien# currently being compiled, in both source trees, to be examined as well. 63090081SobrienINCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ 63190081Sobrien -I$(srcdir)/config -I$(srcdir)/../include 63218334Speter 63318334Speter# Always use -I$(srcdir)/config when compiling. 63418334Speter.c.o: 63590081Sobrien $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) 63618334Speter 63718334Speter# This tells GNU make version 3 not to export all the variables 63818334Speter# defined in this file into the environment. 63918334Speter.NOEXPORT: 64050448Sobrien# 64118334Speter# Support for additional languages (other than c and objc). 64218334Speter# ??? objc can be supported this way too (leave for later). 64318334Speter 64418334Speter# These next lines are overridden by configure. 64550448SobrienLANG_MAKEFILES = @all_lang_makefiles@ 64650448SobrienLANG_STAGESTUFF = @all_stagestuff@ 64718334Speter 64818334Speter# Flags to pass to recursive makes. 64918334Speter# CC is set by configure. Hosts without symlinks need special handling 65018334Speter# because we need CC="stage1/xgcc -Bstage1/" to work in the language 65118334Speter# subdirectories. 65218334Speter# ??? The choices here will need some experimenting with. 65352298SobrienORDINARY_FLAGS_TO_PASS = \ 65452298Sobrien "AR_FLAGS_FOR_TARGET=$(AR_FLAGS_FOR_TARGET)" \ 65590081Sobrien "AR_CREATE_FOR_TARGET=$(AR_CREATE_FOR_TARGET)" \ 65690081Sobrien "AR_EXTRACT_FOR_TARGET=$(AR_EXTRACT_FOR_TARGET)" \ 65718334Speter "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ 65818334Speter "BISON=$(BISON)" \ 65918334Speter "BISONFLAGS=$(BISONFLAGS)" \ 66090081Sobrien "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ 66118334Speter "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ 66218334Speter "LDFLAGS=$(LDFLAGS)" \ 66390081Sobrien "FLEX=$(FLEX)" \ 66490081Sobrien "FLEXFLAGS=$(FLEXFLAGS)" \ 66550448Sobrien "LN=$(LN)" \ 66650448Sobrien "LN_S=$(LN_S)" \ 66718334Speter "MAKEINFO=$(MAKEINFO)" \ 66818334Speter "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ 66990081Sobrien "MAKEOVERRIDES=" \ 67018334Speter "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ 67118334Speter "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \ 67218334Speter "SHELL=$(SHELL)" \ 67318334Speter "exeext=$(exeext)" \ 67450448Sobrien "build_exeext=$(build_exeext)" \ 67518334Speter "objext=$(objext)" \ 67618334Speter "exec_prefix=$(exec_prefix)" \ 67718334Speter "prefix=$(prefix)" \ 67850448Sobrien "local_prefix=$(local_prefix)" \ 67952298Sobrien "gxx_include_dir=$(gcc_gxx_include_dir)" \ 68090081Sobrien "build_tooldir=$(build_tooldir)" \ 68152298Sobrien "gcc_tooldir=$(gcc_tooldir)" \ 68218334Speter "bindir=$(bindir)" \ 68352298Sobrien "libsubdir=$(libsubdir)" \ 68452298Sobrien "datadir=$(datadir)" \ 68552298Sobrien "localedir=$(localedir)" 68690081SobrienFLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) "CC=@cc_set_by_configure@" \ 68790081Sobrien "STAGE_PREFIX=@stage_prefix_set_by_configure@" 68852298SobrienPREPEND_DOTDOT_TO_RELATIVE_PATHS = sed \ 68952298Sobrien -e 's|^ *[^ /][^ /]*/|%&|' \ 69052298Sobrien -e 's| -B| -B%|g' \ 69152298Sobrien -e 's|% *[^- /]|%&|g' \ 69252298Sobrien -e 's|%% *|../|g' \ 69352298Sobrien -e 's|%||g' 69452298SobrienSUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \ 69590081Sobrien "CC=`echo @quoted_cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`" \ 69690081Sobrien "STAGE_PREFIX=`echo @quoted_stage_prefix_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`" 69750448Sobrien# 69818334Speter# Lists of files for various purposes. 69918334Speter 70090081Sobrien# Target specific, C specific object file 70190081SobrienC_TARGET_OBJS=@c_target_objs@ 70290081Sobrien 70390081Sobrien# Target specific, C++ specific object file 70490081SobrienCXX_TARGET_OBJS=@cxx_target_objs@ 70590081Sobrien 70650448Sobrien# Language-specific object files for C and Objective C. 70790081SobrienC_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ 70890081Sobrien c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o \ 70990081Sobrien c-objc-common.o libcpp.a $(C_TARGET_OBJS) 71018334Speter 71118334Speter# Language-specific object files for C. 71250448SobrienC_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS) 71318334Speter 71418334Speter# Language-independent object files. 71518334Speter 71690081SobrienOBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \ 71790081Sobrien cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o cfgrtl.o \ 71890081Sobrien combine.o conflict.o convert.o cse.o cselib.o dbxout.o debug.o dependence.o \ 71990081Sobrien df.o diagnostic.o doloop.o dominance.o dwarf2asm.o dwarf2out.o dwarfout.o \ 72090081Sobrien emit-rtl.o except.o explow.o expmed.o expr.o final.o flow.o \ 72190081Sobrien fold-const.o function.o gcse.o genrtl.o ggc-common.o global.o graph.o \ 72296273Sobrien haifa-sched.o hash.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o \ 72390081Sobrien insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \ 72490081Sobrien integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \ 72590081Sobrien loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o \ 72690081Sobrien profile.o real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \ 72790081Sobrien reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \ 72890081Sobrien sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \ 72990081Sobrien sibcall.o simplify-rtx.o ssa.o ssa-ccp.o ssa-dce.o stmt.o \ 73090081Sobrien stor-layout.o stringpool.o timevar.o toplev.o tree.o tree-dump.o \ 73190081Sobrien tree-inline.o unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o \ 73290081Sobrien $(GGC) $(out_object_file) $(EXTRA_OBJS) 73390081Sobrien 73490081SobrienBACKEND = main.o libbackend.a 73590081Sobrien 73618334Speter# GEN files are listed separately, so they can be built before doing parallel 73718334Speter# makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load 73818334Speter# them before rtl.o is compiled. 73990081SobrienGEN= genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \ 74090081Sobrien genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \ 74190081Sobrien genconfig$(build_exeext) genpeep$(build_exeext) gengenrtl$(build_exeext) \ 74290081Sobrien gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) 74318334Speter 74418334Speter# Files to be copied away after each stage in building. 74518334SpeterSTAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ 74618334Speter insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ 74790081Sobrien insn-attr.h insn-attrtab.c insn-opinit.c insn-constants.h tm-preds.h \ 74890081Sobrien tree-check.h \ 74990081Sobrien s-flags s-config s-codes s-mlib s-under s-genrtl \ 75050448Sobrien s-output s-recog s-emit s-extract s-peep s-check \ 75190081Sobrien s-attr s-attrtab s-opinit s-preds s-constants s-crt0 \ 75250448Sobrien genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \ 75350448Sobrien genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \ 75450448Sobrien genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \ 75550448Sobrien genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \ 75690081Sobrien gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) \ 75790081Sobrien genrtl.c genrtl.h \ 75870638Sobrien xgcc$(exeext) cpp$(exeext) cc1$(exeext) cpp0$(exeext) $(EXTRA_PASSES) \ 75990081Sobrien $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) cc1obj$(exeext) \ 76090081Sobrien enquire$(exeext) protoize$(exeext) unprotoize$(exeext) \ 76190081Sobrien specs collect2$(exeext) $(USE_COLLECT2) underscore.c tradcpp0$(exeext) \ 76290081Sobrien gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc.mk \ 76318334Speter $(LANG_STAGESTUFF) 76418334Speter 76518334Speter# Library members defined in libgcc2.c. 76690081Sobrien# Variable length limited to 255 charactes when passed to a shell script. 76790081SobrienLIB2FUNCS_1 = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \ 76890081Sobrien _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \ 76990081Sobrien _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi 77018334Speter 77190081SobrienLIB2FUNCS_2 = _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf \ 77290081Sobrien _clear_cache _trampoline __main _exit _absvsi2 _absvdi2 _addvsi3 \ 77390081Sobrien _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors 77450448Sobrien 77590081Sobrien# Defined in libgcc2.c, included only in the static library. 77690081SobrienLIB2FUNCS_ST = _eprintf _bb __gcc_bcmp 77790081Sobrien 77850448SobrienFPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ 77950448Sobrien _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ 78090081Sobrien _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \ 78190081Sobrien _sf_to_df _thenan_sf _sf_to_usi _usi_to_sf 78250448Sobrien 78350448SobrienDPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \ 78450448Sobrien _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \ 78590081Sobrien _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \ 78690081Sobrien _df_to_sf _thenan_df _df_to_usi _usi_to_df 78750448Sobrien 78890081Sobrien# These might cause a divide overflow trap and so are compiled with 78990081Sobrien# unwinder info. 79090081SobrienLIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 79190081Sobrien 79250448Sobrien# 79318334Speter# Language makefile fragments. 79418334Speter 79518334Speter# The following targets define the interface between us and the languages. 79618334Speter# 79790081Sobrien# all.cross, start.encap, rest.encap, 79818334Speter# info, dvi, 79918334Speter# install-normal, install-common, install-info, install-man, 80090081Sobrien# uninstall, 80118334Speter# mostlyclean, clean, distclean, extraclean, maintainer-clean, 80218334Speter# stage1, stage2, stage3, stage4 80318334Speter# 80418334Speter# Each language is linked in with a series of hooks (since we can't use `::' 80518334Speter# targets). The name of each hooked is "lang.${target_name}" (eg: lang.info). 80618334Speter# Configure computes and adds these here. 80718334Speter 80818334Speter####language hooks 80950448Sobrien@language_hooks@ 81018334Speter 81118334Speter# sed inserts language fragments after the following line. 81218334Speter####language fragments 81350448Sobrien@language_fragments@ 81418334Speter 81518334Speter# End of language makefile fragments. 81650448Sobrien# 81750448Sobrien# The only suffixes we want for implicit rules are .c and .o, so clear 81850448Sobrien# the list and add them. This speeds up GNU Make, and allows -r to work. 81990081Sobrien# For i18n support, we also need .gmo, .po, .pox. 82050448Sobrien.SUFFIXES: 82190081Sobrien.SUFFIXES: .c .o .po .pox .gmo 82218334Speter 82350448SobrienMakefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \ 82450448Sobrien $(xmake_file) $(tmake_file) $(LANG_MAKEFILES) 82550448Sobrien $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \ 82650448Sobrien "$(xmake_file)" "$(tmake_file)" 82718334Speter cp config.status config.run 82852298Sobrien LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.run 82918334Speter rm -f config.run 83018334Speter 83190081Sobrienconfig.h: cs-config.h ; @true 83290081Sobrienhconfig.h: cs-hconfig.h ; @true 83390081Sobrientconfig.h: cs-tconfig.h ; @true 83490081Sobrientm_p.h: cs-tm_p.h ; @true 83550448Sobrien 83690081Sobriencs-config.h: Makefile 83790081Sobrien HEADERS="$(host_xm_file)" DEFINES="$(host_xm_defines)" \ 83890081Sobrien TARGET_CPU_DEFAULT="$(target_cpu_default)" \ 83990081Sobrien $(SHELL) $(srcdir)/mkconfig.sh config.h 84090081Sobrien 84190081Sobriencs-hconfig.h: Makefile 84290081Sobrien HEADERS="$(build_xm_file)" DEFINES="$(build_xm_defines)" \ 84390081Sobrien TARGET_CPU_DEFAULT="$(target_cpu_default)" \ 84490081Sobrien $(SHELL) $(srcdir)/mkconfig.sh hconfig.h 84590081Sobrien 84690081Sobriencs-tconfig.h: Makefile 84790081Sobrien HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \ 84890081Sobrien TARGET_CPU_DEFAULT="" \ 84990081Sobrien $(SHELL) $(srcdir)/mkconfig.sh tconfig.h 85090081Sobrien 85190081Sobriencs-tm_p.h: Makefile 85290081Sobrien HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \ 85390081Sobrien $(SHELL) $(srcdir)/mkconfig.sh tm_p.h 85490081Sobrien 85590081Sobrien# Don't automatically run autoconf, since configure.in might be accidentally 85690081Sobrien# newer than configure. Also, this writes into the source directory which 85790081Sobrien# might be on a read-only file system. If configured for maintainer mode 85890081Sobrien# then do allow autoconf to be run. 85990081Sobrien 86090081Sobrien$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in 86190081Sobrien (cd $(srcdir) && autoconf) 86290081Sobrien 86390081Sobriengccbug: $(srcdir)/gccbug.in 86490081Sobrien CONFIG_FILES=gccbug CONFIG_HEADERS= ./config.status 86590081Sobrien 86690081Sobrienmklibgcc: $(srcdir)/mklibgcc.in 86790081Sobrien CONFIG_FILES=mklibgcc CONFIG_HEADERS= ./config.status 86890081Sobrien 86950448Sobrien# cstamp-h.in controls rebuilding of config.in. 87050448Sobrien# It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't 87150448Sobrien# delete it. A stamp file is needed as autoheader won't update the file if 87250448Sobrien# nothing has changed. 87350448Sobrien# It remains in the source directory and is part of the distribution. 87450448Sobrien# This follows what is done in shellutils, fileutils, etc. 87550448Sobrien# "echo timestamp" is used instead of touch to be consistent with other 87650448Sobrien# packages that use autoconf (??? perhaps also to avoid problems with patch?). 87750448Sobrien# ??? Newer versions have a maintainer mode that may be useful here. 87890081Sobrien 87990081Sobrien# Don't run autoheader automatically either. 88090081Sobrien# Only run it if maintainer mode is enabled. 88190081Sobrien@MAINT@ $(srcdir)/config.in: $(srcdir)/cstamp-h.in 88290081Sobrien@MAINT@ $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h 88390081Sobrien@MAINT@ (cd $(srcdir) && autoheader) 88490081Sobrien@MAINT@ @rm -f $(srcdir)/cstamp-h.in 88590081Sobrien@MAINT@ echo timestamp > $(srcdir)/cstamp-h.in 88650448Sobrienauto-host.h: cstamp-h ; @true 88750448Sobriencstamp-h: config.in config.status 88852298Sobrien CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status 88950448Sobrien 89050448Sobrien# Really, really stupid make features, such as SUN's KEEP_STATE, may force 89150448Sobrien# a target to build even if it is up-to-date. So we must verify that 89250448Sobrien# config.status does not exist before failing. 89390081Sobrienconfig.status: $(srcdir)/configure $(srcdir)/config.gcc version.c 89450448Sobrien @if [ ! -f config.status ] ; then \ 89590081Sobrien echo You must configure gcc. Look at http://gcc.gnu.org/install/ for details.; \ 89650448Sobrien false; \ 89750448Sobrien else \ 89852298Sobrien LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status --recheck; \ 89950448Sobrien fi 90050448Sobrien 90152298Sobrienall.internal: start.encap rest.encap doc 90218334Speter# This is what to compile if making a cross-compiler. 90318334Speter# Note that we can compile enquire using the cross-compiler just built, 90418334Speter# although we can't run it on this machine. 90590081Sobrienall.cross: native gcc-cross cpp$(exeext) specs \ 90690081Sobrien $(LIBGCC) $(EXTRA_PARTS) lang.all.cross doc 90718334Speter# This is what must be made before installing GCC and converting libraries. 90890081Sobrienstart.encap: native xgcc$(exeext) cpp$(exeext) specs \ 90952298Sobrien xlimits.h lang.start.encap 91018334Speter# These can't be made until after GCC can run. 91190081Sobrienrest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap 91218334Speter# This is what is made with the host's compiler 91318334Speter# whether making a cross compiler or not. 91490081Sobriennative: config.status auto-host.h intl.all build-@POSUB@ $(LANGUAGES) \ 91550448Sobrien $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) 91618334Speter 91718334Speter# Define the names for selecting languages in LANGUAGES. 91890081SobrienC c: cc1$(exeext) tradcpp0$(exeext) 91918334SpeterPROTO: proto 92018334Speter 92118334Speter# Tell GNU make these are phony targets. 92250448Sobrien.PHONY: C c PROTO proto 92318334Speter 92418334Speter# On the target machine, finish building a cross compiler. 92518334Speter# This does the things that can't be done on the host machine. 92652298Sobrienrest.cross: $(LIBGCC) specs 92718334Speter 92818334Speter# Recompile all the language-independent object files. 92918334Speter# This is used only if the user explicitly asks for it. 93090081Sobriencompilations: $(BACKEND) 93118334Speter 93290081Sobrien# Like libcpp.a, this archive is strictly for the host. 93390081Sobrienlibbackend.a: $(OBJS) 93490081Sobrien -rm -rf libbackend.a 93590081Sobrien $(AR) $(AR_FLAGS) libbackend.a $(OBJS) 93690081Sobrien -$(RANLIB) libbackend.a 93718334Speter 93818334Speter# We call this executable `xgcc' rather than `gcc' 93918334Speter# to avoid confusion if the current directory is in the path 94018334Speter# and CC is `gcc'. It is renamed to `gcc' when it is installed. 94152298Sobrienxgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \ 94252298Sobrien version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) 94352298Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \ 94452298Sobrien prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) 94518334Speter 94690081Sobrien# cpp is to cpp0 as gcc is to cc1. 94752298Sobrien# The only difference from xgcc is that it's linked with cppspec.o 94852298Sobrien# instead of gccspec.o. 94970638Sobriencpp$(exeext): gcc.o cppspec.o version.o intl.o prefix.o \ 95052298Sobrien version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) 95152298Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o cppspec.o intl.o \ 95252298Sobrien prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) 95352298Sobrien 95418334Speter# Dump a specs file to make -B./ read these specs over installed ones. 95550448Sobrienspecs: xgcc$(exeext) 95618334Speter $(GCC_FOR_TARGET) -dumpspecs > tmp-specs 95718334Speter mv tmp-specs specs 95818334Speter 95918334Speter# We do want to create an executable named `xgcc', so we can use it to 96018334Speter# compile libgcc2.a. 96118334Speter# Also create gcc-cross, so that install-common will install properly. 96250448Sobriengcc-cross: xgcc$(exeext) 96318334Speter cp xgcc$(exeext) gcc-cross$(exeext) 96418334Speter 96590081Sobriencc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS) 96690081Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \ 96790081Sobrien $(C_OBJS) $(BACKEND) $(LIBS) 96818334Speter 96918334Speter# Build the version of limits.h that we will install. 97018334Speterxlimits.h: glimits.h limitx.h limity.h 97118334Speter if $(LIMITS_H_TEST) ; then \ 97218334Speter cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \ 97318334Speter else \ 97418334Speter cat $(srcdir)/glimits.h > tmp-xlimits.h; \ 97518334Speter fi 97618334Speter mv tmp-xlimits.h xlimits.h 97750448Sobrien# 97818334Speter# Build libgcc.a. 97918334Speter 98090081SobrienLIB2ADD = $(LIB2FUNCS_EXTRA) 98190081SobrienLIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) 98218334Speter 98390081Sobrienlibgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext) 98490081Sobrien objext='$(objext)' \ 98590081Sobrien LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \ 98690081Sobrien LIB2FUNCS_1='$(LIB2FUNCS_1)' \ 98790081Sobrien LIB2FUNCS_2='$(LIB2FUNCS_2)' \ 98890081Sobrien LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \ 98990081Sobrien LIB2ADD='$(LIB2ADD)' \ 99090081Sobrien LIB2ADD_ST='$(LIB2ADD_ST)' \ 99190081Sobrien LIB2ADDEH='$(LIB2ADDEH)' \ 99290081Sobrien LIB2ADDEHDEP='$(LIB2ADDEHDEP)' \ 99390081Sobrien FPBIT='$(FPBIT)' \ 99490081Sobrien FPBIT_FUNCS='$(FPBIT_FUNCS)' \ 99590081Sobrien LIB2_DIVMOD_FUNCS='$(LIB2_DIVMOD_FUNCS)' \ 99690081Sobrien DPBIT='$(DPBIT)' \ 99790081Sobrien DPBIT_FUNCS='$(DPBIT_FUNCS)' \ 99890081Sobrien MULTILIBS=`$(GCC_FOR_TARGET) --print-multi-lib` \ 99990081Sobrien EXTRA_MULTILIB_PARTS='$(EXTRA_MULTILIB_PARTS)' \ 100090081Sobrien SHLIB_LINK='$(SHLIB_LINK)' \ 100190081Sobrien SHLIB_INSTALL='$(SHLIB_INSTALL)' \ 100290081Sobrien SHLIB_EXT='$(SHLIB_EXT)' \ 100390081Sobrien SHLIB_MULTILIB='$(SHLIB_MULTILIB)' \ 100490081Sobrien SHLIB_MKMAP='$(SHLIB_MKMAP)' \ 100596273Sobrien SHLIB_MKMAP_OPTS='$(SHLIB_MKMAP_OPTS)' \ 100690081Sobrien SHLIB_MAPFILES='$(SHLIB_MAPFILES)' \ 100790081Sobrien SHLIB_NM_FLAGS='$(SHLIB_NM_FLAGS)' \ 100896273Sobrien SHLIB_SLIBDIR_SUFFIXES='$(SHLIB_SLIBDIR_SUFFIXES)' \ 100990081Sobrien mkinstalldirs='$(SHELL) $(srcdir)/mkinstalldirs' \ 101090081Sobrien $(SHELL) mklibgcc > tmp-libgcc.mk 101190081Sobrien mv tmp-libgcc.mk libgcc.mk 101218334Speter 101390081Sobrien# All the things that might cause us to want to recompile bits of libgcc. 101490081SobrienLIBGCC_DEPS = $(GCC_PASSES) $(LANGUAGES) stmp-int-hdrs $(STMP_FIXPROTO) \ 101590081Sobrien libgcc.mk $(srcdir)/libgcc2.c $(TCONFIG_H) \ 101690081Sobrien $(MACHMODE_H) longlong.h gbl-ctors.h config.status stmp-int-hdrs \ 101790081Sobrien tsystem.h $(FPBIT) $(DPBIT) $(LIB2ADD) $(LIB2ADD_ST) $(LIB2ADDEH) \ 101890081Sobrien $(LIB2ADDEHDEP) $(EXTRA_PARTS) $(srcdir)/config/$(LIB1ASMSRC) 101918334Speter 102090081Sobrienlibgcc.a: $(LIBGCC_DEPS) 102190081Sobrien $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ 102290081Sobrien HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ 102390081Sobrien AR_FOR_TARGET="$(AR_FOR_TARGET)" \ 102490081Sobrien AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ 102590081Sobrien AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ 102690081Sobrien CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ 102790081Sobrien RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \ 102890081Sobrien RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \ 102990081Sobrien NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \ 103090081Sobrien LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \ 103190081Sobrien INCLUDES="$(INCLUDES)" \ 103290081Sobrien CONFIG_H="$(TCONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \ 103390081Sobrien LIB1ASMSRC='$(LIB1ASMSRC)' \ 103490081Sobrien MAKEOVERRIDES= \ 103590081Sobrien -f libgcc.mk all 103618334Speter 103718334Speter# Use the genmultilib shell script to generate the information the gcc 103818334Speter# driver program needs to select the library directory based on the 103918334Speter# switches. 104050448Sobrienmultilib.h: s-mlib; @true 104150448Sobriens-mlib: $(srcdir)/genmultilib Makefile 104296273Sobrien if test @enable_multilib@ = yes; then \ 104396273Sobrien $(SHELL) $(srcdir)/genmultilib \ 104496273Sobrien "$(MULTILIB_OPTIONS)" \ 104596273Sobrien "$(MULTILIB_DIRNAMES)" \ 104696273Sobrien "$(MULTILIB_MATCHES)" \ 104796273Sobrien "$(MULTILIB_EXCEPTIONS)" \ 104896273Sobrien "$(MULTILIB_EXTRA_OPTS)" \ 104996273Sobrien "$(MULTILIB_EXCLUSIONS)" \ 105096273Sobrien > tmp-mlib.h; \ 105196273Sobrien else \ 105296273Sobrien $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' > tmp-mlib.h; \ 105396273Sobrien fi 105490081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-mlib.h multilib.h 105590081Sobrien $(STAMP) s-mlib 105618334Speter 105718334Speter# Build multiple copies of libgcc.a, one for each target switch. 105890081Sobrienstmp-multilib: $(LIBGCC_DEPS) 105918334Speter $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ 106090081Sobrien HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ 106152298Sobrien AR_FOR_TARGET="$(AR_FOR_TARGET)" \ 106290081Sobrien AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ 106352298Sobrien AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ 106490081Sobrien CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ 106590081Sobrien RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \ 106690081Sobrien RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \ 106790081Sobrien NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \ 106890081Sobrien LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \ 106990081Sobrien INCLUDES="$(INCLUDES)" \ 107090081Sobrien CONFIG_H="$(CONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \ 107190081Sobrien LIB1ASMSRC='$(LIB1ASMSRC)' \ 107290081Sobrien MAKEOVERRIDES= \ 107390081Sobrien -f libgcc.mk all 107490081Sobrien $(STAMP) stmp-multilib 107518334Speter 107618334Speter# Compile two additional files that are linked with every program 107718334Speter# linked using GCC on systems using COFF or ELF, for the sake of C++ 107818334Speter# constructors. 107990081Sobrien$(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ 108090081Sobrien gbl-ctors.h stmp-int-hdrs tsystem.h 108190081Sobrien $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ 108290081Sobrien @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_BEGIN \ 108390081Sobrien -o $(T)crtbegin$(objext) 108418334Speter 108590081Sobrien$(T)crtend.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ 108690081Sobrien gbl-ctors.h stmp-int-hdrs tsystem.h 108790081Sobrien $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ 108890081Sobrien @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_END \ 108990081Sobrien -o $(T)crtend$(objext) 109018334Speter 109190081Sobrien# These are versions of crtbegin and crtend for shared libraries. 109290081Sobrien$(T)crtbeginS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ 109390081Sobrien gbl-ctors.h stmp-int-hdrs tsystem.h 109490081Sobrien $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ 109590081Sobrien @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \ 109690081Sobrien -o $(T)crtbeginS$(objext) 109718334Speter 109890081Sobrien$(T)crtendS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ 109990081Sobrien gbl-ctors.h stmp-int-hdrs tsystem.h 110090081Sobrien $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ 110190081Sobrien @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_END -DCRTSTUFFS_O \ 110290081Sobrien -o $(T)crtendS$(objext) 110350448Sobrien 110490081Sobrien# This is a version of crtbegin for -static links. 110590081Sobrien$(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ 110690081Sobrien gbl-ctors.h stmp-int-hdrs tsystem.h 110790081Sobrien $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ 110890081Sobrien @inhibit_libc@ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ 110990081Sobrien -o $(T)crtbeginT$(objext) 111090081Sobrien 111190081Sobrien# Compile the start modules crt0.o and mcrt0.o that are linked with 111290081Sobrien# every program 111350448Sobriencrt0.o: s-crt0 ; @true 111450448Sobrienmcrt0.o: s-crt0; @true 111550448Sobrien 111650448Sobriens-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H) 111750448Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \ 111850448Sobrien -o crt0.o -c $(CRT0_S) 111950448Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \ 112050448Sobrien -o mcrt0.o -c $(MCRT0_S) 112190081Sobrien $(STAMP) s-crt0 112250448Sobrien# 112318334Speter# Compiling object files from source files. 112418334Speter 112518334Speter# Note that dependencies on obstack.h are not written 112618334Speter# because that file is not part of GCC. 112718334Speter 112818334Speter# C language specific files. 112918334Speter 113090081Sobrienc-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) flags.h \ 113190081Sobrien diagnostic.h $(TM_P_H) 113290081Sobrienc-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h $(GGC_H) intl.h \ 113390081Sobrien $(C_TREE_H) input.h flags.h $(SYSTEM_H) toplev.h output.h $(CPPLIB_H) 113490081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 113590081Sobrien -c $(srcdir)/c-parse.c $(OUTPUT_OPTION) 113690081Sobrien 113718334Speter$(srcdir)/c-parse.c: $(srcdir)/c-parse.y 113890081Sobrien cd $(srcdir) && \ 113990081Sobrien if $(BISON) $(BISONFLAGS) -o c-p$$$$.c c-parse.y; then \ 114090081Sobrien test -f c-p$$$$.output && mv -f c-p$$$$.output c-parse.output ; \ 114190081Sobrien mv -f c-p$$$$.c c-parse.c ; \ 114290081Sobrien else \ 114390081Sobrien rm -f c-p$$$$.* ; \ 114490081Sobrien false ; \ 114590081Sobrien fi 114690081Sobrien 114718334Speter$(srcdir)/c-parse.y: c-parse.in 114850448Sobrien echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y 114918334Speter sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ 115018334Speter -e "/^ifc$$/d" -e "/^end ifc$$/d" \ 115150448Sobrien $(srcdir)/c-parse.in >>tmp-c-parse.y 115290081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y 115318334Speter 115490081Sobrienc-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) \ 115590081Sobrien $(GGC_H) $(TARGET_H) c-lex.h flags.h function.h output.h $(EXPR_H) \ 115696273Sobrien debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h 115790081Sobrienc-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ 115890081Sobrien $(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H) 115990081Sobrienc-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ 116090081Sobrien langhooks.h langhooks-def.h 116190081Sobrienc-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) c-lex.h \ 116290081Sobrien debug.h $(C_TREE_H) \ 116390081Sobrien c-pragma.h input.h intl.h flags.h toplev.h output.h \ 116490081Sobrien mbchar.h $(CPPLIB_H) $(EXPR_H) $(TM_P_H) 116590081Sobrienc-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ 116690081Sobrien $(C_TREE_H) $(RTL_H) insn-config.h integrate.h $(EXPR_H) $(C_TREE_H) \ 116790081Sobrien flags.h toplev.h tree-inline.h diagnostic.h integrate.h $(VARRAY_H) \ 116890081Sobrien $(GGC_H) 116990081Sobrienc-aux-info.o : c-aux-info.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ 117090081Sobrien flags.h toplev.h 117190081Sobrienc-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h toplev.h 117290081Sobrienc-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) function.h \ 117396273Sobrien c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H) 117490081Sobrienmbchar.o: mbchar.c $(CONFIG_H) $(SYSTEM_H) mbchar.h 117590081Sobriengraph.o: graph.c $(CONFIG_H) $(SYSTEM_H) toplev.h flags.h output.h $(RTL_H) \ 117690081Sobrien function.h hard-reg-set.h $(BASIC_BLOCK_H) graph.h 117790081Sobriensbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \ 117890081Sobrien $(BASIC_BLOCK_H) 117918334Speter 118090081SobrienCOLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o 118190081SobrienCOLLECT2_LIBS = @COLLECT2_LIBS@ 118252298Sobriencollect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS) 118318334Speter# Don't try modifying collect2 (aka ld) in place--it might be linking this. 118490081Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o T$@ \ 118590081Sobrien $(COLLECT2_OBJS) $(LIBS) $(COLLECT2_LIBS) 118690081Sobrien mv -f T$@ $@ 118718334Speter 118890081Sobriencollect2.o : collect2.c $(CONFIG_H) $(SYSTEM_H) gstab.h intl.h \ 118990081Sobrien $(OBSTACK_H) $(DEMANGLE_H) collect2.h version.h 119018334Speter $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 119190081Sobrien -DTARGET_MACHINE=\"$(target_alias)\" \ 119290081Sobrien -c $(srcdir)/collect2.c $(OUTPUT_OPTION) 119318334Speter 119490081Sobrientlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) $(SYSTEM_H) collect2.h intl.h 119590081Sobrienhash.o: hash.c hash.h $(SYSTEM_H) toplev.h $(GCONFIG_H) 119690081Sobrien $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) 119718334Speter 119850448Sobrienunderscore.c: s-under ; @true 119918334Speter 120050448Sobriens-under: $(GCC_PASSES) 120118334Speter echo "int xxy_us_dummy;" >tmp-dum.c 120218334Speter $(GCC_FOR_TARGET) -S tmp-dum.c 120318334Speter echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c 120418334Speter if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ 120518334Speter echo "int prepends_underscore = 1;" >>tmp-under.c; \ 120618334Speter else \ 120718334Speter echo "int prepends_underscore = 0;" >>tmp-under.c; \ 120818334Speter fi 120990081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-under.c underscore.c 121018334Speter -rm -f tmp-dum.c tmp-dum.s 121190081Sobrien $(STAMP) s-under 121218334Speter 121318334Speter# A file used by all variants of C. 121418334Speter 121590081Sobrienc-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \ 121690081Sobrien $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ 121790081Sobrien $(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \ 1218102789Skan diagnostic.h tree-inline.h $(LANGHOOKS_DEF_H) 121918334Speter 122090081Sobrien# A file used by all variants of C and some other languages. 122190081Sobrien 122290081Sobrienattribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) flags.h \ 122390081Sobrien toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) $(EXPR_H) $(TM_P_H) \ 122490081Sobrien builtin-types.def $(TARGET_H) 122590081Sobrien 122690081Sobrienc-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ 122790081Sobrien $(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h 122890081Sobrien 122990081Sobrienc-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ 123090081Sobrien c-lex.h flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ 123190081Sobrien $(EXPR_H) 123290081Sobrien 123318334Speter# Language-independent files. 123418334Speter 123550448SobrienDRIVER_DEFINES = \ 123690081Sobrien -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ 123718334Speter -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \ 123818334Speter -DDEFAULT_TARGET_VERSION=\"$(version)\" \ 123950448Sobrien -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \ 124090081Sobrien -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ 124190081Sobrien -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\" \ 124290081Sobrien `test "X$${SHLIB_LINK}" = "X" || test "@enable_shared@" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` \ 124390081Sobrien `test "X$${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` 124490081Sobrien 124590081Sobriengcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) intl.h multilib.h \ 124690081Sobrien Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) 124790081Sobrien (SHLIB_LINK='$(SHLIB_LINK)' \ 124890081Sobrien SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ 124950448Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 125050448Sobrien $(DRIVER_DEFINES) \ 125190081Sobrien -c $(srcdir)/gcc.c $(OUTPUT_OPTION)) 125218334Speter 125390081Sobriengccspec.o: gccspec.c $(CONFIG_H) $(SYSTEM_H) $(GCC_H) 125490081Sobrien (SHLIB_LINK='$(SHLIB_LINK)' \ 125590081Sobrien SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ 125690081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 125790081Sobrien $(DRIVER_DEFINES) \ 125890081Sobrien -c $(srcdir)/gccspec.c $(OUTPUT_OPTION)) 125952298Sobrien 126090081Sobriencppspec.o: cppspec.c $(CONFIG_H) $(SYSTEM_H) $(GCC_H) 126190081Sobrien 126250448Sobrientree-check.h: s-check ; @true 126390081Sobriens-check : gencheck$(build_exeext) $(srcdir)/move-if-change 126490081Sobrien ./gencheck$(build_exeext) > tmp-check.h 126590081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-check.h tree-check.h 126690081Sobrien $(STAMP) s-check 126750448Sobrien 126890081Sobriengencheck$(build_exeext) : gencheck.o $(HOST_LIBDEPS) 126950448Sobrien $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 127050448Sobrien gencheck.o $(HOST_LIBS) 127150448Sobrien 127290081Sobriengencheck.o : gencheck.c gencheck.h tree.def $(HCONFIG_H) $(SYSTEM_H) \ 127390081Sobrien $(lang_tree_files) 127452298Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ 127590081Sobrien $(srcdir)/gencheck.c $(OUTPUT_OPTION) 127650448Sobrien 127790081Sobriengencheck.h : s-gencheck ; @true 127890081Sobriens-gencheck : Makefile 127990081Sobrien ltf="$(lang_tree_files)"; for f in $$ltf; do \ 128090081Sobrien echo "#include \"$$f\""; \ 128190081Sobrien done | sed 's|$(srcdir)/||' > tmp-gencheck.h 128290081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-gencheck.h gencheck.h 128390081Sobrien $(STAMP) s-gencheck 128490081Sobrien 128590081Sobrienoptions.h : s-options ; @true 128690081Sobriens-options : Makefile 128790081Sobrien lof="$(lang_options_files)"; for f in $$lof; do \ 128890081Sobrien echo "#include \"$$f\""; \ 128990081Sobrien done | sed 's|$(srcdir)/||' > tmp-options.h 129090081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-options.h options.h 129190081Sobrien $(STAMP) s-options 129290081Sobrien 129390081Sobrienspecs.h : s-specs ; @true 129490081Sobriens-specs : Makefile 129590081Sobrien lsf="$(lang_specs_files)"; for f in $$lsf; do \ 129690081Sobrien echo "#include \"$$f\""; \ 129790081Sobrien done | sed 's|$(srcdir)/||' > tmp-specs.h 129890081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-specs.h specs.h 129990081Sobrien $(STAMP) s-specs 130090081Sobrien 130118334Speterdumpvers: dumpvers.c 130218334Speter 130390081Sobrienversion.o: version.c version.h 130452298Sobrien 130590081Sobrienggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ 130690081Sobrien flags.h $(GGC_H) varray.h hash.h $(HASHTAB_H) $(TM_P_H) 130790081Sobrien 130890081Sobrienggc-simple.o: ggc-simple.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 130990081Sobrien $(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H) 131090081Sobrien 131190081Sobrienggc-page.o: ggc-page.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 131290081Sobrien toplev.h $(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H) 131390081Sobrien 131490081Sobrienstringpool.o: stringpool.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \ 131590081Sobrien flags.h toplev.h 131690081Sobrien 131790081Sobrienhashtable.o: hashtable.c hashtable.h $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H) 131890081Sobrien 131990081Sobrienline-map.o: line-map.c line-map.h intl.h $(CONFIG_H) $(SYSTEM_H) 132090081Sobrien 132190081Sobrienggc-none.o: ggc-none.c $(GCONFIG_H) $(SYSTEM_H) $(GGC_H) 132290081Sobrien $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) 132390081Sobrien 132490081Sobrienprefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) Makefile prefix.h 132550448Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 132650448Sobrien -DPREFIX=\"$(prefix)\" \ 132790081Sobrien -c $(srcdir)/prefix.c $(OUTPUT_OPTION) 132818334Speter 132990081Sobrienconvert.o: convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h convert.h toplev.h 133018334Speter 133190081Sobrienlanghooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \ 133296273Sobrien tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h \ 1333102789Skan $(LANGHOOKS_DEF_H) flags.h 133490081Sobrientree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \ 133590081Sobrien $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h 133690081Sobrientree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ 133790081Sobrien flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ 133890081Sobrien $(EXPR_H) $(SPLAY_TREE_H) tree-dump.h 133990081Sobrientree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \ 134090081Sobrien expr.h flags.h params.h input.h insn-config.h $(INTEGRATE_H) \ 134190081Sobrien $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h langhooks.h \ 134290081Sobrien $(C_COMMON_H) tree-inline.h 134390081Sobrienprint-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H) \ 134490081Sobrien langhooks.h 134590081Sobrienstor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \ 134696273Sobrien function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H) $(TARGET_H) 134790081Sobrienfold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \ 134890081Sobrien toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) $(TM_P_H) 134990081Sobriendiagnostic.o : diagnostic.c diagnostic.h real.h diagnostic.def \ 135090081Sobrien $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) flags.h $(GGC_H) \ 135190081Sobrien input.h toplev.h intl.h 135290081Sobrientoplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) function.h \ 135390081Sobrien flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h diagnostic.h \ 135490081Sobrien debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \ 135590081Sobrien dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \ 135690081Sobrien graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) $(lang_options_files) \ 135790081Sobrien ssa.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) halfpic.h \ 135890081Sobrien langhooks.h insn-flags.h options.h 135990081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 136050448Sobrien -DTARGET_NAME=\"$(target_alias)\" \ 136190081Sobrien -c $(srcdir)/toplev.c $(OUTPUT_OPTION) 136290081Sobrienmain.o : main.c $(CONFIG_H) $(SYSTEM_H) toplev.h 136318334Speter 136490081Sobrienrtl-error.o: rtl-error.c system.h $(RTL_H) $(INSN_ATTR_H) insn-config.h \ 136590081Sobrien input.h toplev.h intl.h diagnostic.h $(CONFIG_H) 136618334Speter 136790081Sobrienrtl.o : rtl.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) real.h $(GGC_H) errors.h 136890081Sobrien $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) 136918334Speter 137090081Sobrienprint-rtl.o : print-rtl.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ 137190081Sobrien hard-reg-set.h $(BASIC_BLOCK_H) 137290081Sobrien $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) 137318334Speter 137490081Sobrienrtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) toplev.h $(RTL_H) hard-reg-set.h $(TM_P_H) 137590081Sobrienerrors.o : errors.c $(GCONFIG_H) $(SYSTEM_H) errors.h 137690081Sobrien $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) 137718334Speter 137890081Sobrienvarasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ 137990081Sobrien function.h $(EXPR_H) hard-reg-set.h $(REGS_H) $(OBSTACK_H) \ 138090081Sobrien output.h c-pragma.h toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \ 138190081Sobrien $(HASHTAB_H) $(TARGET_H) langhooks.h 138290081Sobrienfunction.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 138390081Sobrien function.h $(EXPR_H) libfuncs.h $(REGS_H) hard-reg-set.h \ 138490081Sobrien insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) $(TM_P_H) 138590081Sobrienstmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \ 138690081Sobrien insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \ 138790081Sobrien $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) 138890081Sobrienexcept.o : except.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 138990081Sobrien except.h function.h $(EXPR_H) libfuncs.h integrate.h \ 139090081Sobrien insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \ 139190081Sobrien dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H) 139290081Sobrienexpr.o : expr.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \ 139390081Sobrien $(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h insn-attr.h insn-config.h \ 139490081Sobrien $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \ 139590081Sobrien except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) 139690081Sobrienbuiltins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 139790081Sobrien $(TARGET_H) function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) insn-config.h \ 139890081Sobrien $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \ 139990081Sobrien except.h $(TM_P_H) $(PREDICT_H) libfuncs.h 140090081Sobriencalls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h $(EXPR_H) \ 140190081Sobrien libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H) 140290081Sobrienexpmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 140390081Sobrien insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) real.h \ 140490081Sobrien toplev.h $(TM_P_H) 140590081Sobrienexplow.o : explow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 140690081Sobrien hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \ 140790081Sobrien toplev.h function.h ggc.h $(TM_P_H) 140890081Sobrienoptabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 140990081Sobrien insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \ 141090081Sobrien toplev.h $(GGC_H) real.h $(TM_P_H) except.h 141190081Sobriendbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ 141290081Sobrien $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) function.h langhooks.h \ 141390081Sobrien insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h toplev.h 141490081Sobriendebug.o : debug.c $(CONFIG_H) $(SYSTEM_H) 141590081Sobriensdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ 141690081Sobrien function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) real.h \ 141790081Sobrien insn-config.h $(OBSTACK_H) xcoffout.h c-pragma.h ggc.h \ 141890081Sobrien sdbout.h toplev.h $(TM_P_H) except.h debug.h 141990081Sobriendwarfout.o : dwarfout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf.h \ 142090081Sobrien flags.h insn-config.h reload.h output.h toplev.h $(TM_P_H) \ 142190081Sobrien debug.h langhooks.h 142290081Sobriendwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf2.h \ 142390081Sobrien debug.h flags.h insn-config.h reload.h output.h diagnostic.h \ 142490081Sobrien hard-reg-set.h $(REGS_H) $(EXPR_H) libfuncs.h toplev.h dwarf2out.h varray.h \ 142590081Sobrien $(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h 142690081Sobriendwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \ 142790081Sobrien output.h dwarf2asm.h $(TM_P_H) 142890081Sobrienvmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ 142990081Sobrien output.h vmsdbg.h debug.h langhooks.h 143090081Sobrienxcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) xcoffout.h \ 143190081Sobrien flags.h toplev.h output.h dbxout.h $(GGC_H) 143290081Sobrienemit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 143390081Sobrien function.h $(REGS_H) insn-config.h $(RECOG_H) real.h $(GGC_H) \ 143490081Sobrien $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h \ 143590081Sobrien $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h 143690081Sobrienreal.o : real.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h $(TM_P_H) 143790081Sobrienintegrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 143890081Sobrien debug.h $(INTEGRATE_H) insn-config.h $(EXPR_H) real.h $(REGS_H) \ 143990081Sobrien intl.h function.h output.h $(RECOG_H) except.h toplev.h $(LOOP_H) \ 144090081Sobrien $(PARAMS_H) $(TM_P_H) $(TARGET_H) 144190081Sobrienjump.o : jump.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \ 144290081Sobrien insn-config.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \ 144390081Sobrien toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) 144418334Speter 144590081Sobriensimplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \ 144690081Sobrien hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \ 144790081Sobrien output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H) 144890081Sobriencselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \ 144990081Sobrien hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \ 145090081Sobrien output.h function.h cselib.h $(GGC_H) $(OBSTACK_H) $(TM_P_H) 145190081Sobriencse.o : cse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ 145290081Sobrien real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h function.h \ 145390081Sobrien $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) 145490081Sobriengcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h \ 145590081Sobrien flags.h real.h insn-config.h ggc.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \ 145696273Sobrien function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h 145790081Sobriensibcall.o : sibcall.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) function.h \ 145890081Sobrien hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) 145990081Sobrienresource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \ 146090081Sobrien $(BASIC_BLOCK_H) $(REGS_H) flags.h output.h resource.h function.h toplev.h \ 146190081Sobrien $(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H) 146290081Sobrienlcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ 146390081Sobrien real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \ 146490081Sobrien $(TM_P_H) df.h 146590081Sobrienssa.o : ssa.c $(CONFIG_H) $(SYSTEM_H) $(REGS_H) varray.h $(EXPR_H) \ 146690081Sobrien hard-reg-set.h flags.h function.h real.h insn-config.h $(RECOG_H) \ 146790081Sobrien $(BASIC_BLOCK_H) output.h ssa.h 146890081Sobrienssa-dce.o : ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h \ 146990081Sobrien $(BASIC_BLOCK_H) ssa.h insn-config.h $(RECOG_H) output.h 147090081Sobrienssa-ccp.o : ssa-ccp.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h \ 147190081Sobrien $(BASIC_BLOCK_H) ssa.h insn-config.h $(RECOG_H) output.h \ 147290081Sobrien errors.h $(GGC_H) df.h function.h 147390081Sobriendf.o : df.c $(CONFIG_H) system.h $(RTL_H) insn-config.h $(RECOG_H) \ 147490081Sobrien function.h $(REGS_H) $(OBSTACK_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h \ 147590081Sobrien $(FIBHEAP_H) 147690081Sobrienconflict.o : conflict.c $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H) $(HASHTAB_H) \ 147790081Sobrien $(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H) 147890081Sobrienprofile.o : profile.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 147990081Sobrien insn-config.h output.h $(REGS_H) $(EXPR_H) function.h \ 148090081Sobrien gcov-io.h toplev.h $(GGC_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TARGET_H) 148190081Sobrienloop.o : loop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \ 148290081Sobrien insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \ 148390081Sobrien real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h \ 148490081Sobrien toplev.h varray.h except.h cselib.h $(OPTABS_H) $(TM_P_H) 148590081Sobriendoloop.o : doloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \ 148690081Sobrien $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h 148790081Sobrienunroll.o : unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h function.h \ 148890081Sobrien $(INTEGRATE_H) $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) $(LOOP_H) toplev.h \ 148990081Sobrien hard-reg-set.h varray.h $(BASIC_BLOCK_H) $(TM_P_H) $(PREDICT_H) 149090081Sobrienflow.o : flow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h insn-config.h \ 149190081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ 149290081Sobrien function.h except.h $(EXPR_H) ssa.h $(GGC_H) $(TM_P_H) 149390081Sobriencfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \ 149490081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ 149590081Sobrien function.h except.h $(GGC_H) $(TM_P_H) 149690081Sobriencfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \ 149790081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ 149890081Sobrien function.h except.h $(GGC_H) $(TM_P_H) 149996273Sobriencfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \ 150096273Sobrien hard-reg-set.h insn-config.h $(RECOG_H) $(GGC_H) $(TM_P_H) 150190081Sobriencfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \ 150290081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ 150390081Sobrien function.h except.h $(GGC_H) 150490081Sobriencfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TIMEVAR_H)\ 150590081Sobrien $(BASIC_BLOCK_H) hard-reg-set.h output.h flags.h $(RECOG_H) toplev.h \ 150696273Sobrien $(GGC_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) 150790081Sobriencfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ 150890081Sobrien $(BASIC_BLOCK_H) hard-reg-set.h 150990081Sobriendominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h \ 151090081Sobrien $(BASIC_BLOCK_H) 151190081Sobriencombine.o : combine.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h function.h \ 151290081Sobrien insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \ 151390081Sobrien $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H) 151490081Sobrienregclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h flags.h \ 151590081Sobrien $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h real.h \ 151690081Sobrien toplev.h function.h output.h $(GGC_H) $(TM_P_H) $(EXPR_H) 151790081Sobrienlocal-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \ 151890081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \ 151990081Sobrien output.h function.h $(INSN_ATTR_H) toplev.h except.h $(TM_P_H) 152090081Sobrienbitmap.o : bitmap.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \ 152150448Sobrien $(REGS_H) 152290081Sobrien $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) 152390081Sobrienglobal.o : global.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h reload.h function.h \ 152490081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h output.h toplev.h \ 152590081Sobrien $(TM_P_H) 152690081Sobrienvarray.o : varray.c $(CONFIG_H) $(SYSTEM_H) varray.h $(RTL_H) $(TREE_H) bitmap.h \ 152790081Sobrien errors.h 152890081Sobrienreload.o : reload.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h output.h \ 152990081Sobrien $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) hard-reg-set.h insn-config.h \ 153090081Sobrien $(REGS_H) function.h real.h toplev.h $(TM_P_H) 153190081Sobrienreload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) real.h flags.h \ 153290081Sobrien $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \ 153390081Sobrien $(BASIC_BLOCK_H) $(RECOG_H) output.h function.h toplev.h cselib.h $(TM_P_H) \ 153496273Sobrien except.h $(TREE_H) 153590081Sobriencaller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \ 153690081Sobrien $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) function.h \ 153790081Sobrien $(RECOG_H) reload.h $(EXPR_H) toplev.h $(TM_P_H) 153890081Sobrienreorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) conditions.h hard-reg-set.h \ 153990081Sobrien $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(INSN_ATTR_H) except.h \ 154090081Sobrien $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h $(PARAMS_H) $(TM_P_H) 154190081Sobrienalias.o : alias.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \ 154290081Sobrien $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h $(EXPR_H) \ 154390081Sobrien $(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h 154490081Sobrienregmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \ 154590081Sobrien $(RECOG_H) output.h $(REGS_H) hard-reg-set.h flags.h function.h \ 154690081Sobrien $(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(TM_P_H) except.h reload.h 154790081Sobrienhaifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ 154890081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \ 154990081Sobrien $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H) 155090081Sobriensched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ 155190081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \ 155290081Sobrien $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h $(PARAMS_H) $(TM_P_H) 155390081Sobriensched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ 155490081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \ 155590081Sobrien $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) 155690081Sobriensched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ 155790081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \ 155890081Sobrien $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) 155990081Sobriensched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ 156090081Sobrien hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) 156190081Sobrienfinal.o : final.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h intl.h \ 156290081Sobrien $(REGS_H) $(RECOG_H) conditions.h insn-config.h $(INSN_ATTR_H) function.h \ 156390081Sobrien real.h output.h hard-reg-set.h except.h debug.h xcoffout.h \ 156490081Sobrien toplev.h reload.h dwarf2out.h $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) 156590081Sobrienrecog.o : recog.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) function.h $(BASIC_BLOCK_H) \ 156690081Sobrien $(REGS_H) $(RECOG_H) $(EXPR_H) hard-reg-set.h flags.h insn-config.h \ 156790081Sobrien $(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H) 156890081Sobrienreg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(RECOG_H) \ 156990081Sobrien $(REGS_H) hard-reg-set.h flags.h insn-config.h toplev.h reload.h \ 157090081Sobrien varray.h function.h $(TM_P_H) 157190081Sobrienpredict.o: predict.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ 157290081Sobrien insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \ 157390081Sobrien $(RECOG_H) function.h except.h $(EXPR_H) $(TM_P_H) $(PREDICT_H) 157490081Sobrienlists.o: lists.c $(CONFIG_H) $(SYSTEM_H) toplev.h $(RTL_H) $(GGC_H) 157596273Sobrienbb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ 157696273Sobrien flags.h $(BASIC_BLOCK_H) hard-reg-set.h output.h cfglayout.h $(TARGET_H) 157790081Sobriencfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ 157890081Sobrien insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h function.h \ 157990081Sobrien cfglayout.h 158090081Sobrientimevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) $(TIMEVAR_H) flags.h intl.h 158190081Sobrienregrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \ 158290081Sobrien $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(RECOG_H) function.h \ 158390081Sobrien resource.h $(OBSTACK_H) flags.h $(TM_P_H) 158490081Sobrienifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) toplev.h \ 158590081Sobrien flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \ 158696273Sobrien output.h except.h $(TM_P_H) 158790081Sobriendependence.o : dependence.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ 158890081Sobrien $(C_COMMON_H) flags.h varray.h $(EXPR_H) 158990081Sobrienparams.o : params.c $(CONFIG_H) $(SYSTEM_H) $(PARAMS_H) toplev.h 159096273Sobrienhooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) $(HOOKS_H) 159118334Speter 159290081Sobrien$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) $(GGC_H) \ 159350448Sobrien $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \ 159490081Sobrien output.h $(INSN_ATTR_H) $(SYSTEM_H) toplev.h $(TARGET_H) libfuncs.h \ 159590081Sobrien $(TARGET_DEF_H) function.h sched-int.h $(TM_P_H) $(EXPR_H) $(OPTABS_H) \ 159690081Sobrien langhooks.h 159790081Sobrien $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 159890081Sobrien $(out_file) $(OUTPUT_OPTION) 159918334Speter 160018334Speter# Build auxiliary files that support ecoff format. 160118334Spetermips-tfile: mips-tfile.o version.o $(LIBDEPS) 160218334Speter $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS) 160318334Speter 160490081Sobrienmips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) version.h 160518334Speter 160618334Spetermips-tdump: mips-tdump.o version.o $(LIBDEPS) 160718334Speter $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS) 160818334Speter 160990081Sobrienmips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) 161018334Speter 161118334Speter# Build file to support OSF/rose half-pic format. 161290081Sobrienhalfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) $(SYSTEM_H) halfpic.h 161318334Speter 161450448Sobrien# 161590081Sobrien# Generate header and source files from the machine description, 161618334Speter# and compile them. 161718334Speter 161890081Sobrien.PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \ 161918334Speter insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \ 162018334Speter insn-attr.h insn-attrtab.c 162118334Speter 162218334Speter# The following pair of rules has this effect: 162318334Speter# genconfig is run only if the md has changed since genconfig was last run; 162418334Speter# but the file insn-config.h is touched only when its contents actually change. 162518334Speter 162618334Speter# Each of the other insn-* files is handled by a similar pair of rules. 162718334Speter 162818334Speter# This causes an anomaly in the results of make -n 162950448Sobrien# because insn-* is older than s-* 163018334Speter# and thus make -n thinks that insn-* will be updated 163118334Speter# and force recompilation of things that depend on it. 163218334Speter# We use move-if-change precisely to avoid such recompilation. 163318334Speter# But there is no way to teach make -n that it will be avoided. 163418334Speter 163518334Speter# Each of the insn-*.[ch] rules has a semicolon at the end, 163618334Speter# for otherwise the system Make on SunOS 4.1 never tries 163718334Speter# to recompile insn-*.o. To avoid problems and extra noise from 163818334Speter# versions of make which don't like empty commands (nothing after the 163918334Speter# trailing `;'), we call true for each. 164018334Speter 164150448Sobrieninsn-config.h: s-config ; @true 164290081Sobriens-config : $(md_file) genconfig$(build_exeext) $(srcdir)/move-if-change 164390081Sobrien ./genconfig$(build_exeext) $(md_file) > tmp-config.h 164490081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-config.h insn-config.h 164590081Sobrien $(STAMP) s-config 164618334Speter 164750448Sobrieninsn-flags.h: s-flags ; @true 164890081Sobriens-flags : $(md_file) genflags$(build_exeext) $(srcdir)/move-if-change 164990081Sobrien ./genflags$(build_exeext) $(md_file) > tmp-flags.h 165090081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-flags.h insn-flags.h 165190081Sobrien $(STAMP) s-flags 165218334Speter 165350448Sobrieninsn-codes.h: s-codes ; @true 165490081Sobriens-codes : $(md_file) gencodes$(build_exeext) $(srcdir)/move-if-change 165590081Sobrien ./gencodes$(build_exeext) $(md_file) > tmp-codes.h 165690081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-codes.h insn-codes.h 165790081Sobrien $(STAMP) s-codes 165818334Speter 165990081Sobrieninsn-constants.h: s-constants ; @true 166090081Sobriens-constants : $(md_file) genconstants$(build_exeext) $(srcdir)/move-if-change 166190081Sobrien ./genconstants$(build_exeext) $(md_file) > tmp-constants.h 166290081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-constants.h insn-constants.h 166390081Sobrien $(STAMP) s-constants 166490081Sobrien 166550448Sobrieninsn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \ 166690081Sobrien insn-config.h $(OPTABS_H) $(SYSTEM_H) reload.h $(RECOG_H) toplev.h \ 166790081Sobrien function.h flags.h hard-reg-set.h resource.h $(TM_P_H) 166890081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c \ 166990081Sobrien $(OUTPUT_OPTION) 167018334Speter 167150448Sobrieninsn-emit.c: s-emit ; @true 167290081Sobriens-emit : $(md_file) genemit$(build_exeext) $(srcdir)/move-if-change 167390081Sobrien ./genemit$(build_exeext) $(md_file) > tmp-emit.c 167490081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-emit.c insn-emit.c 167590081Sobrien $(STAMP) s-emit 167618334Speter 167750448Sobrieninsn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \ 167890081Sobrien real.h output.h flags.h $(SYSTEM_H) function.h hard-reg-set.h resource.h \ 167990081Sobrien $(TM_P_H) toplev.h reload.h 168090081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c \ 168190081Sobrien $(OUTPUT_OPTION) 168218334Speter 168350448Sobrieninsn-recog.c: s-recog ; @true 168490081Sobriens-recog : $(md_file) genrecog$(build_exeext) $(srcdir)/move-if-change 168590081Sobrien ./genrecog$(build_exeext) $(md_file) > tmp-recog.c 168690081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-recog.c insn-recog.c 168790081Sobrien $(STAMP) s-recog 168818334Speter 168990081Sobrieninsn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) \ 169090081Sobrien insn-config.h flags.h $(RECOG_H) $(EXPR_H) $(OPTABS_H) reload.h $(SYSTEM_H) 169190081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c \ 169290081Sobrien $(OUTPUT_OPTION) 169318334Speter 169450448Sobrieninsn-opinit.c: s-opinit ; @true 169590081Sobriens-opinit : $(md_file) genopinit$(build_exeext) $(srcdir)/move-if-change 169690081Sobrien ./genopinit$(build_exeext) $(md_file) > tmp-opinit.c 169790081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c 169890081Sobrien $(STAMP) s-opinit 169918334Speter 170090081Sobrieninsn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) toplev.h \ 170190081Sobrien insn-config.h $(RECOG_H) 170290081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c \ 170390081Sobrien $(OUTPUT_OPTION) 170418334Speter 170550448Sobrieninsn-extract.c: s-extract ; @true 170690081Sobriens-extract : $(md_file) genextract$(build_exeext) $(srcdir)/move-if-change 170790081Sobrien ./genextract$(build_exeext) $(md_file) > tmp-extract.c 170890081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-extract.c insn-extract.c 170990081Sobrien $(STAMP) s-extract 171018334Speter 171152298Sobrieninsn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \ 171290081Sobrien $(SYSTEM_H) insn-config.h $(RECOG_H) except.h function.h $(TM_P_H) 171390081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c \ 171490081Sobrien $(OUTPUT_OPTION) 171518334Speter 171650448Sobrieninsn-peep.c: s-peep ; @true 171790081Sobriens-peep : $(md_file) genpeep$(build_exeext) $(srcdir)/move-if-change 171890081Sobrien ./genpeep$(build_exeext) $(md_file) > tmp-peep.c 171990081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-peep.c insn-peep.c 172090081Sobrien $(STAMP) s-peep 172118334Speter 172252298Sobrieninsn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \ 172390081Sobrien output.h $(INSN_ATTR_H) insn-config.h $(SYSTEM_H) toplev.h $(RECOG_H) \ 172490081Sobrien $(TM_P_H) flags.h 172590081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c \ 172690081Sobrien $(OUTPUT_OPTION) 172718334Speter 172850448Sobrieninsn-attr.h: s-attr ; @true 172990081Sobriens-attr : $(md_file) genattr$(build_exeext) $(srcdir)/move-if-change 173090081Sobrien ./genattr$(build_exeext) $(md_file) > tmp-attr.h 173190081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-attr.h insn-attr.h 173290081Sobrien $(STAMP) s-attr 173318334Speter 173450448Sobrieninsn-attrtab.c: s-attrtab ; @true 173590081Sobriens-attrtab : $(md_file) genattrtab$(build_exeext) $(srcdir)/move-if-change 173690081Sobrien ./genattrtab$(build_exeext) $(md_file) > tmp-attrtab.c 173790081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c 173890081Sobrien $(STAMP) s-attrtab 173918334Speter 174090081Sobrieninsn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) $(GGC_H) $(REGS_H) real.h \ 174190081Sobrien conditions.h hard-reg-set.h insn-config.h $(INSN_ATTR_H) $(EXPR_H) \ 174290081Sobrien output.h $(RECOG_H) function.h $(SYSTEM_H) toplev.h flags.h \ 174390081Sobrien insn-codes.h $(TM_P_H) 174490081Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c \ 174590081Sobrien $(OUTPUT_OPTION) 174618334Speter 174750448Sobrieninsn-output.c: s-output ; @true 174890081Sobriens-output : $(md_file) genoutput$(build_exeext) $(srcdir)/move-if-change 174990081Sobrien ./genoutput$(build_exeext) $(md_file) > tmp-output.c 175090081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-output.c insn-output.c 175190081Sobrien $(STAMP) s-output 175250448Sobrien 175390081Sobriengenrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) $(GGC_H) 175450448Sobriengenrtl.c genrtl.h : s-genrtl 175550448Sobrien @true # force gnu make to recheck modification times. 175650448Sobrien 175790081Sobriens-genrtl: gengenrtl$(build_exeext) $(srcdir)/move-if-change $(RTL_BASE_H) 175890081Sobrien ./gengenrtl$(build_exeext) -h > tmp-genrtl.h 175990081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-genrtl.h genrtl.h 176090081Sobrien ./gengenrtl$(build_exeext) > tmp-genrtl.c 176190081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-genrtl.c genrtl.c 176290081Sobrien $(STAMP) s-genrtl 176350448Sobrien 176490081Sobrientm-preds.h: s-preds; @true 176590081Sobrien 176690081Sobriens-preds: genpreds$(build_exeext) $(srcdir)/move-if-change 176790081Sobrien ./genpreds$(build_exeext) > tmp-preds.h 176890081Sobrien $(SHELL) $(srcdir)/move-if-change tmp-preds.h tm-preds.h 176990081Sobrien $(STAMP) s-preds 177090081Sobrien 177150448Sobrien# 177218334Speter# Compile the programs that generate insn-* from the machine description. 177318334Speter# They are compiled with $(HOST_CC), and associated libraries, 177418334Speter# since they need to run on this machine 177518334Speter# even if GCC is being compiled to run on some other machine. 177618334Speter 177718334Speter# $(CONFIG_H) is omitted from the deps of the gen*.o 177890081Sobrien# because these programs don't really depend on anything 177918334Speter# about the target machine. They do depend on config.h itself, 178018334Speter# since that describes the host machine. 178118334Speter 178290081Sobrienread-rtl.o: read-rtl.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \ 178390081Sobrien $(OBSTACK_H) $(HASHTAB_H) 178490081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/read-rtl.c $(OUTPUT_OPTION) 178518334Speter 178690081Sobriengensupport.o: gensupport.c $(RTL_H) $(OBSTACK_H) $(SYSTEM_H) errors.h gensupport.h 178790081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gensupport.c $(OUTPUT_OPTION) 178890081Sobrien 178990081Sobriengenconfig$(build_exeext) : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 179018334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 179190081Sobrien genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 179218334Speter 179390081Sobriengenconfig.o : genconfig.c $(RTL_H) $(HCONFIG_H) \ 179490081Sobrien $(SYSTEM_H) errors.h gensupport.h 179590081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c $(OUTPUT_OPTION) 179618334Speter 179790081Sobriengenflags$(build_exeext) : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 179818334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 179990081Sobrien genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 180018334Speter 180190081Sobriengenflags.o : genflags.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \ 180290081Sobrien $(SYSTEM_H) errors.h gensupport.h 180390081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c $(OUTPUT_OPTION) 180418334Speter 180590081Sobriengencodes$(build_exeext) : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 180618334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 180790081Sobrien gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 180818334Speter 180990081Sobriengencodes.o : gencodes.c $(RTL_H) $(HCONFIG_H) \ 181090081Sobrien $(SYSTEM_H) errors.h gensupport.h 181190081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c $(OUTPUT_OPTION) 181218334Speter 181390081Sobriengenconstants$(build_exeext) : genconstants.o $(HOST_RTL) $(HOST_ERRORS) $(HOST_LIBDEPS) 181418334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 181590081Sobrien genconstants.o $(HOST_RTL) $(HOST_ERRORS) $(HOST_LIBS) 181618334Speter 181790081Sobriengenconstants.o : genconstants.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h 181890081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconstants.c $(OUTPUT_OPTION) 181918334Speter 182090081Sobriengenemit$(build_exeext) : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 182118334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 182290081Sobrien genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 182318334Speter 182490081Sobriengenemit.o : genemit.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h 182590081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c $(OUTPUT_OPTION) 182618334Speter 182790081Sobriengenopinit$(build_exeext) : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 182818334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 182990081Sobrien genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 183018334Speter 183190081Sobriengenopinit.o : genopinit.c $(RTL_H) $(HCONFIG_H) \ 183290081Sobrien $(SYSTEM_H) errors.h gensupport.h 183390081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c $(OUTPUT_OPTION) 183418334Speter 183590081Sobriengenrecog$(build_exeext) : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 183618334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 183790081Sobrien genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 183818334Speter 183990081Sobriengenrecog.o : genrecog.c $(RTL_H) $(HCONFIG_H) \ 184090081Sobrien $(SYSTEM_H) errors.h gensupport.h 184190081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c $(OUTPUT_OPTION) 184218334Speter 184390081Sobriengenextract$(build_exeext) : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 184418334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 184590081Sobrien genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 184618334Speter 184790081Sobriengenextract.o : genextract.c $(RTL_H) $(HCONFIG_H) \ 184890081Sobrien $(SYSTEM_H) insn-config.h errors.h gensupport.h 184990081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c $(OUTPUT_OPTION) 185018334Speter 185190081Sobriengenpeep$(build_exeext) : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 185218334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 185390081Sobrien genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 185418334Speter 185590081Sobriengenpeep.o : genpeep.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h 185690081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c $(OUTPUT_OPTION) 185718334Speter 185890081Sobriengenattr$(build_exeext) : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 185918334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 186090081Sobrien genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 186118334Speter 186290081Sobriengenattr.o : genattr.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h 186390081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c $(OUTPUT_OPTION) 186418334Speter 186590081Sobriengenattrtab$(build_exeext) : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 186618334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 186790081Sobrien genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 186818334Speter 186990081Sobriengenattrtab.o : genattrtab.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \ 187090081Sobrien $(SYSTEM_H) errors.h $(GGC_H) gensupport.h 187190081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c $(OUTPUT_OPTION) 187250448Sobrien 187390081Sobriengenoutput$(build_exeext) : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) 187450448Sobrien $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 187590081Sobrien genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) 187690081Sobrien 187790081Sobriengenoutput.o : genoutput.c $(RTL_H) $(HCONFIG_H) \ 187890081Sobrien $(SYSTEM_H) errors.h gensupport.h 187990081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c $(OUTPUT_OPTION) 188090081Sobrien 188190081Sobriengengenrtl$(build_exeext) : gengenrtl.o $(HOST_LIBDEPS) 188290081Sobrien $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 188350448Sobrien gengenrtl.o $(HOST_LIBS) 188450448Sobrien 188590081Sobriengengenrtl.o : gengenrtl.c $(RTL_BASE_H) $(HCONFIG_H) $(SYSTEM_H) real.h 188690081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gengenrtl.c $(OUTPUT_OPTION) 188750448Sobrien 188890081Sobriengenpreds$(build_exeext) : genpreds.o $(HOST_LIBDEPS) 188990081Sobrien $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 189090081Sobrien genpreds.o $(HOST_LIBS) 189190081Sobrien 189290081Sobriengenpreds.o : genpreds.c $(RTL_BASE_H) $(HCONFIG_H) $(SYSTEM_H) 189390081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpreds.c $(OUTPUT_OPTION) 189490081Sobrien 189550448Sobrien# 189618334Speter# Compile the libraries to be used by gen*. 189718334Speter# If we are not cross-building, gen* use the same .o's that cc1 will use, 189890081Sobrien# and HOST_PREFIX_1 is `loser-', just to ensure these rules don't conflict 189990081Sobrien# with the rules for rtl.o, etc. 190090081Sobrien$(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \ 190190081Sobrien real.h $(GGC_H) errors.h 190218334Speter rm -f $(HOST_PREFIX)rtl.c 190318334Speter sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c 190490081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c $(OUTPUT_OPTION) 190518334Speter 190690081Sobrien$(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(HCONFIG_H) \ 190790081Sobrien $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) 190818334Speter rm -f $(HOST_PREFIX)print-rtl.c 190918334Speter sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c 191090081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c $(OUTPUT_OPTION) 191118334Speter 191290081Sobrien$(HOST_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \ 191350448Sobrien flags.h $(BASIC_BLOCK_H) $(REGS_H) 191450448Sobrien rm -f $(HOST_PREFIX)bitmap.c 191550448Sobrien sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(HOST_PREFIX)bitmap.c 191690081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)bitmap.c $(OUTPUT_OPTION) 191750448Sobrien 191890081Sobrien$(HOST_PREFIX_1)errors.o: errors.c $(HCONFIG_H) $(SYSTEM_H) errors.h 191990081Sobrien rm -f $(HOST_PREFIX)errors.c 192090081Sobrien sed -e 's/config[.]h/hconfig.h/' $(srcdir)/errors.c > $(HOST_PREFIX)errors.c 192190081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)errors.c $(OUTPUT_OPTION) 192218334Speter 192390081Sobrien$(HOST_PREFIX_1)ggc-none.o: ggc-none.c $(HCONFIG_H) $(SYSTEM_H) $(GCC_H) 192490081Sobrien rm -f $(HOST_PREFIX)ggc-none.c 192590081Sobrien sed -e 's/config[.]h/hconfig.h/' $(srcdir)/ggc-none.c > $(HOST_PREFIX)ggc-none.c 192690081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)ggc-none.c $(OUTPUT_OPTION) 192718334Speter 192850448Sobrien# 192952298Sobrien# Remake internationalization support. 193090081Sobrienintl.o: intl.c $(CONFIG_H) system.h intl.h Makefile 193152298Sobrien $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 193252298Sobrien -DLOCALEDIR=\"$(localedir)\" \ 193390081Sobrien -c $(srcdir)/intl.c $(OUTPUT_OPTION) 193452298Sobrien 193590081Sobrien$(top_builddir)/intl/libintl.a: intl.all 193652298Sobrien 193790081Sobrienintl.all intl.install intl.uninstall \ 193852298Sobrien intl.mostlyclean intl.clean intl.distclean intl.maintainer-clean: 193952298Sobrien @for d in $(INTL_SUBDIRS); do \ 194052298Sobrien target=`expr $@ : 'intl.\(.*\)'` && \ 194152298Sobrien echo "(cd $$d && $(MAKE) $$target)" && \ 194252298Sobrien (cd $$d && AWK='$(AWK)' $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $$target); \ 194390081Sobrien if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \ 194452298Sobrien done 194552298Sobrien 194690081Sobrien# intl.all and intl.install need config.h to exist, and the files it includes. 194790081Sobrien# (FIXME: intl/*.c shouldn't need to see insn-foo.h!) 194890081Sobrienintl.all intl.install: config.h insn-flags.h insn-constants.h 194990081Sobrien 195090081Sobrien# Make-lang.in should add dependencies of po-generated on any generated 195190081Sobrien# files which need to be scanned by gettext (usually Yacc-generated parsers). 195290081Sobrienpo-generated: c-parse.c tradcif.c 195390081Sobrien 195452298Sobrien# 195518334Speter# Remake cpp and protoize. 195618334Speter 195790081SobrienPREPROCESSOR_DEFINES = \ 195890081Sobrien -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ 195990081Sobrien -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ 196090081Sobrien -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_alias)\" \ 196190081Sobrien -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \ 196290081Sobrien -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ 196390081Sobrien -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ 196490081Sobrien -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" 196518334Speter 196690081SobrienLIBCPP_OBJS = cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o \ 196790081Sobrien cpphash.o cpperror.o cppinit.o cppdefault.o \ 196890081Sobrien hashtable.o line-map.o mkdeps.o prefix.o version.o mbchar.o 196918334Speter 197090081SobrienLIBCPP_DEPS = $(CPPLIB_H) cpphash.h line-map.h hashtable.h intl.h \ 197190081Sobrien $(OBSTACK_H) $(SYSTEM_H) 197218334Speter 197390081Sobrien# Most of the other archives built/used by this makefile are for 197490081Sobrien# targets. This one is strictly for the host. 197552298Sobrienlibcpp.a: $(LIBCPP_OBJS) 197690081Sobrien -rm -rf libcpp.a 197752298Sobrien $(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS) 197890081Sobrien -$(RANLIB) libcpp.a 197950448Sobrien 198090081Sobriencpp0$(exeext): cppmain.o intl.o libcpp.a $(LIBDEPS) 198190081Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cpp0$(exeext) cppmain.o \ 198252298Sobrien intl.o libcpp.a $(LIBS) 198352298Sobrien 198490081Sobriencppmain.o: cppmain.c $(CONFIG_H) $(CPPLIB_H) intl.h $(SYSTEM_H) 198552298Sobrien 198690081Sobriencpperror.o: cpperror.c $(CONFIG_H) $(LIBCPP_DEPS) 198790081Sobriencppexp.o: cppexp.c $(CONFIG_H) $(LIBCPP_DEPS) 198890081Sobriencpplex.o: cpplex.c $(CONFIG_H) $(LIBCPP_DEPS) mbchar.h 198990081Sobriencppmacro.o: cppmacro.c $(CONFIG_H) $(LIBCPP_DEPS) 199090081Sobriencpplib.o: cpplib.c $(CONFIG_H) $(LIBCPP_DEPS) 199190081Sobriencpphash.o: cpphash.c $(CONFIG_H) $(LIBCPP_DEPS) 199290081Sobriencppfiles.o: cppfiles.c $(CONFIG_H) $(LIBCPP_DEPS) $(SPLAY_TREE_H) mkdeps.h 199390081Sobriencppinit.o: cppinit.c $(CONFIG_H) $(LIBCPP_DEPS) cppdefault.h \ 199490081Sobrien mkdeps.h prefix.h version.h except.h 199552298Sobrien 199690081Sobriencppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) cppdefault.h Makefile 199718334Speter $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 199890081Sobrien $(PREPROCESSOR_DEFINES) \ 199990081Sobrien -c $(srcdir)/cppdefault.c $(OUTPUT_OPTION) 200018334Speter 200190081Sobrienmkdeps.o: mkdeps.c $(CONFIG_H) $(SYSTEM_H) mkdeps.h 200290081Sobrien 200390081Sobrien# The traditional mode preprocessor, a separate program for ease of 200490081Sobrien# maintenance. Some code is shared with the ISO-C cpp. 200590081Sobrientradcpp0$(exeext): tradcpp.o tradcif.o cppdefault.o version.o intl.o \ 200690081Sobrien mkdeps.o $(LIBDEPS) 200790081Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o tradcpp0$(exeext) \ 200890081Sobrien tradcpp.o tradcif.o mkdeps.o cppdefault.o version.o intl.o $(LIBS) 200990081Sobrien 201090081Sobrientradcpp.o: tradcpp.c $(CONFIG_H) $(SYSTEM_H) version.h cppdefault.h tradcpp.h 201190081Sobrientradcif.o: $(srcdir)/tradcif.c $(CONFIG_H) $(SYSTEM_H) tradcpp.h 201290081Sobrien 201390081Sobrien$(srcdir)/tradcif.c: $(srcdir)/tradcif.y 201490081Sobrien (cd $(srcdir) && $(BISON) $(BISONFLAGS) -o tr$$$$.c tradcif.y && \ 201590081Sobrien mv -f tr$$$$.c tradcif.c) 201690081Sobrien 201718334Speter# Note for the stamp targets, we run the program `true' instead of 201818334Speter# having an empty command (nothing following the semicolon). 201918334Speter 202050448Sobrienproto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X 202118334Speter 202296273SobrienPROTO_OBJS = intl.o version.o cppdefault.o 202318334Speter 202452298Sobrienprotoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS) 202552298Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS) 202618334Speter 202752298Sobrienunprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS) 202852298Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS) 202952298Sobrien 203090081Sobrienprotoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) $(SYSTEM_H) \ 203190081Sobrien Makefile version.h 203290081Sobrien (SHLIB_LINK='$(SHLIB_LINK)' \ 203390081Sobrien SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ 203418334Speter $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 203596273Sobrien $(DRIVER_DEFINES) \ 203690081Sobrien $(srcdir)/protoize.c $(OUTPUT_OPTION)) 203750448Sobrien 203896273Sobrienunprotoize.o: protoize.c $(srcdir)/../include/getopt.h \ 203990081Sobrien $(CONFIG_H) $(SYSTEM_H) Makefile version.h 204090081Sobrien (SHLIB_LINK='$(SHLIB_LINK)' \ 204190081Sobrien SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ 204296273Sobrien $(CC) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 204396273Sobrien $(DRIVER_DEFINES) \ 204496273Sobrien $(srcdir)/protoize.c $(OUTPUT_OPTION)) 204518334Speter 204618334Speter# This info describes the target machine, so compile with GCC just built. 204718334SpeterSYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \ 204818334Speter stmp-int-hdrs 204918334Speter -rm -f SYSCALLS.c tmp-SYSCALLS.s 205090081Sobrien sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \ 205190081Sobrien $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c 205218334Speter $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 205318334Speter -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c 205418334Speter -rm -f SYSCALLS.c tmp-SYSCALLS.s 205518334Speter 205618334Speter 205718334Spetertest-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES) 205818334Speter -rm -f tmp-proto.[cso] 205918334Speter cp $(srcdir)/protoize.c tmp-proto.c 206018334Speter chmod u+w tmp-proto.c 206118334Speter ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \ 206290081Sobrien $(GCC_CFLAGS) $(INCLUDES) \ 206318334Speter -DGCC_INCLUDE_DIR=0 \ 206418334Speter -DGPLUSPLUS_INCLUDE_DIR=0 \ 206518334Speter -DCROSS_INCLUDE_DIR=0 \ 206618334Speter -DTOOL_INCLUDE_DIR=0 \ 206790081Sobrien -DSTANDARD_EXEC_PREFIX=0 \ 206890081Sobrien -DDEFAULT_TARGET_MACHINE=0 \ 206990081Sobrien -DDEFAULT_TARGET_VERSION=0" tmp-proto.c 207018334Speter @echo '**********' Expect 400 lines of differences. 207118334Speter -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff 207218334Speter -wc -l tmp-proto.diff 207318334Speter ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \ 207490081Sobrien $(GCC_CFLAGS) $(INCLUDES) \ 207518334Speter -DGCC_INCLUDE_DIR=0 \ 207618334Speter -DGPLUSPLUS_INCLUDE_DIR=0 \ 207718334Speter -DCROSS_INCLUDE_DIR=0 \ 207818334Speter -DTOOL_INCLUDE_DIR=0 \ 207990081Sobrien -DSTANDARD_EXEC_PREFIX=0 \ 208090081Sobrien -DDEFAULT_TARGET_MACHINE=0 \ 208190081Sobrien -DDEFAULT_TARGET_VERSION=0" tmp-proto.c 208218334Speter @echo Expect zero differences. 208318334Speter diff $(srcdir)/protoize.c tmp-proto.c | cat 208418334Speter -rm -f tmp-proto.[cs] tmp-proto$(objext) 208550448Sobrien 208690081Sobriengcov.o: gcov.c gcov-io.h intl.h $(SYSTEM_H) $(CONFIG_H) 208750448Sobrien 208850448Sobrien# Only one of 'gcov' or 'gcov.exe' is actually built, depending 208950448Sobrien# upon whether $(exeext) is empty or not. 209090081SobrienGCOV_OBJS = gcov.o intl.o version.o 209152298Sobriengcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) 209252298Sobrien $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@ 209350448Sobrien# 209418334Speter# Build the include directory. The stamp files are stmp-* rather than 209550448Sobrien# s-* so that mostlyclean does not force the include directory to 209618334Speter# be rebuilt. 209718334Speter 209850448Sobrien# Build the include directory including float.h (which no longer depends upon 209918334Speter# enquire). 210090081Sobrienstmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h 210118334Speter# Copy in the headers provided with gcc. 210218334Speter# The sed command gets just the last file name component; 210318334Speter# this is necessary because VPATH could add a dirname. 210418334Speter# Using basename would be simpler, but some systems don't have it. 210550448Sobrien# The touch command is here to workaround an AIX/Linux NFS bug. 210690081Sobrien -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi 210718334Speter for file in .. $(USER_H); do \ 210818334Speter if [ X$$file != X.. ]; then \ 210918334Speter realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ 211090081Sobrien $(STAMP) include/$$realfile; \ 211150448Sobrien rm -f include/$$realfile; \ 211250448Sobrien cp $$file include; \ 211350448Sobrien chmod a+r include/$$realfile; \ 211418334Speter fi; \ 211518334Speter done 211618334Speter rm -f include/limits.h 211718334Speter cp xlimits.h include/limits.h 211818334Speter chmod a+r include/limits.h 211950448Sobrien rm -f include/float.h 212052298Sobrien if [ x$(FLOAT_H) != xMakefile.in ]; then \ 212152298Sobrien cp $(srcdir)/config/$(FLOAT_H) include/float.h && \ 212250448Sobrien chmod a+r include/float.h; \ 212350448Sobrien else :; fi 212418334Speter# Install the README 212518334Speter rm -f include/README 212618334Speter cp $(srcdir)/README-fixinc include/README 212718334Speter chmod a+r include/README 212890081Sobrien $(STAMP) $@ 212918334Speter 213090081Sobrien# fixinc.sh depends on this, not on specs directly. 213190081Sobrien# The idea is to make sure specs gets built, but not rerun fixinc.sh 213290081Sobrien# after each stage just because specs' mtime has changed. 213390081Sobrienspecs.ready: specs 213490081Sobrien -if [ -f specs.ready ] ; then \ 213590081Sobrien true; \ 213690081Sobrien else \ 213790081Sobrien $(STAMP) specs.ready; \ 213890081Sobrien fi 213918334Speter 214052298SobrienFIXINCSRCDIR=$(srcdir)/fixinc 214152298Sobrienfixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \ 214252298Sobrien $(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/gnu-regex.c \ 214352298Sobrien $(FIXINCSRCDIR)/server.c $(FIXINCSRCDIR)/gnu-regex.h \ 214490081Sobrien $(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready 214590081Sobrien (MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc && pwd` ; \ 214690081Sobrien CC="$(HOST_CC)"; CFLAGS="$(HOST_CFLAGS)"; LDFLAGS="$(HOST_LDFLAGS)"; \ 214790081Sobrien WARN_CFLAGS="$(WARN_CFLAGS)"; \ 214890081Sobrien export MAKE srcdir CC CFLAGS LDFLAGS WARN_CFLAGS; cd ./fixinc && \ 214990081Sobrien $(SHELL) $${srcdir}/mkfixinc.sh $(build_canonical) $(target)) 215050448Sobrien 215118334Speter# Build fixed copies of system files. 215252298Sobrienstmp-fixinc: fixinc.sh gsyslimits.h 215352298Sobrien rm -rf include; mkdir include 215490081Sobrien -chmod a+rx include 215590081Sobrien (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); pwd`; \ 215690081Sobrien SHELL='$(SHELL)' ;\ 215790081Sobrien export TARGET_MACHINE srcdir SHELL ; \ 215890081Sobrien $(SHELL) ./fixinc.sh `pwd`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \ 215990081Sobrien rm -f include/syslimits.h; \ 216018334Speter if [ -f include/limits.h ]; then \ 216118334Speter mv include/limits.h include/syslimits.h; \ 216218334Speter else \ 216318334Speter cp $(srcdir)/gsyslimits.h include/syslimits.h; \ 216490081Sobrien fi; \ 216590081Sobrien chmod a+r include/syslimits.h) 216690081Sobrien# If $(SYSTEM_HEADER_DIR) is $(build_tooldir)/sys-include, and 216752298Sobrien# that directory exists, then make sure that $(libsubdir) exists. 216890081Sobrien# This is because cpp is compiled to find $(gcc_tooldir)/include via 216952298Sobrien# $(libsubdir)/$(unlibsubdir), which will only work if $(libsubdir) 217052298Sobrien# exists. 217190081Sobrien# ??? Better would be to use -isystem $(build_tooldir)/sys-include, 217290081Sobrien# but fixincludes does not take such arguments. 217390081Sobrien if [ "$(SYSTEM_HEADER_DIR)" = "$(build_tooldir)/sys-include" ] \ 217490081Sobrien && [ -d $(build_tooldir)/sys-include ]; then \ 217552298Sobrien if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \ 217652298Sobrien if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \ 217752298Sobrien if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \ 217852298Sobrien if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \ 217952298Sobrien else true; fi 218090081Sobrien $(STAMP) stmp-fixinc 218152298Sobrien 218218334Speter# Files related to the fixproto script. 218390081Sobrien# gen-protos and fix-header are compiled with HOST_CC, but they are only 218490081Sobrien# used in native and host-x-target builds, so it's safe to link them with 218590081Sobrien# libiberty.a. 218618334Speter 218718334Speterdeduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs 218850448Sobrien if [ -d $(SYSTEM_HEADER_DIR) ]; \ 218950448Sobrien then \ 219090081Sobrien CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \ 219118334Speter export CC; \ 219250448Sobrien $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \ 219350448Sobrien mv tmp-deduced.h deduced.h; \ 219450448Sobrien else \ 219590081Sobrien $(STAMP) deduced.h; \ 219650448Sobrien fi 219718334Speter 219890081SobrienGEN_PROTOS_OBJS = gen-protos.o scan.o 219990081Sobriengen-protos$(build_exeext): $(GEN_PROTOS_OBJS) 220090081Sobrien ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ 220152298Sobrien $(GEN_PROTOS_OBJS) $(HOST_LIBS) 220218334Speter 220390081Sobriengen-protos.o: gen-protos.c scan.h $(HCONFIG_H) $(SYSTEM_H) 220490081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c $(OUTPUT_OPTION) 220518334Speter 220690081Sobrienscan.o: scan.c scan.h $(HCONFIG_H) $(SYSTEM_H) 220790081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c $(OUTPUT_OPTION) 220818334Speter 220990081Sobrienxsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos$(build_exeext) Makefile 221090081Sobrien sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \ 221190081Sobrien deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c 221218334Speter mv tmp-fixtmp.c fixtmp.c 221318334Speter $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \ 221418334Speter | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \ 221518334Speter | ./gen-protos >xsys-protos.hT 221618334Speter mv xsys-protos.hT xsys-protos.h 221718334Speter rm -rf fixtmp.c 221818334Speter 221990081Sobrien# This is nominally a 'build' program, but it's run only when host==build, 222090081Sobrien# so we can (indeed, must) use $(LIBDEPS) and $(LIBS). 222190081Sobrienfix-header$(build_exeext): fix-header.o scan-decls.o scan.o xsys-protos.h \ 222290081Sobrien $(LIBDEPS) libcpp.a 222318334Speter $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \ 222490081Sobrien scan-decls.o scan.o libcpp.a $(LIBS) 222518334Speter 222690081Sobrienfix-header.o: fix-header.c $(OBSTACK_H) scan.h \ 222790081Sobrien xsys-protos.h $(HCONFIG_H) $(SYSTEM_H) $(CPPLIB_H) 222890081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c $(OUTPUT_OPTION) 222918334Speter 223090081Sobrienscan-decls.o: scan-decls.c scan.h $(CPPLIB_H) $(HCONFIG_H) $(SYSTEM_H) 223190081Sobrien $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c $(OUTPUT_OPTION) 223218334Speter 223318334Speter# stmp-fixproto depends on this, not on fix-header directly. 223418334Speter# The idea is to make sure fix-header gets built, 223518334Speter# but not rerun fixproto after each stage 223618334Speter# just because fix-header's mtime has changed. 223790081Sobrienfixhdr.ready: fix-header$(build_exeext) 223818334Speter -if [ -f fixhdr.ready ] ; then \ 223918334Speter true; \ 224018334Speter else \ 224190081Sobrien $(STAMP) fixhdr.ready; \ 224218334Speter fi 224318334Speter 224490081Sobrien# stmp-int-headers is to make sure fixincludes has already finished. 224518334Speter# The if statement is so that we don't run fixproto a second time 224618334Speter# if it has already been run on the files in `include'. 224790081Sobrienstmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs 224890081Sobrien if [ -f include/fixed ] ; then true; \ 224918334Speter else \ 225018334Speter : This line works around a 'make' bug in BSDI 1.1.; \ 225118334Speter FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ 225252298Sobrien mkinstalldirs="$(SHELL) $(srcdir)/mkinstalldirs"; \ 225352298Sobrien export mkinstalldirs; \ 225450448Sobrien if [ -d $(SYSTEM_HEADER_DIR) ] ; then \ 225550448Sobrien $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \ 225690081Sobrien if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \ 225750448Sobrien else true; fi; \ 225890081Sobrien $(STAMP) include/fixed; \ 225918334Speter fi 226090081Sobrien $(STAMP) stmp-fixproto 226150448Sobrien# 226218334Speter# Remake the info files. 226318334Speter 226490081Sobriendocdir = $(srcdir)/doc 226518334Speter 226690081Sobriendoc: $(BUILD_INFO) $(GENERATED_MANPAGES) gccbug 226790081Sobrieninfo: $(docdir)/cpp.info $(docdir)/gcc.info $(docdir)/gccint.info lang.info $(docdir)/cppinternals.info 226818334Speter 226996273Sobrien$(docdir)/cpp.info: $(docdir)/cpp.texi $(docdir)/include/fdl.texi \ 227096273Sobrien $(docdir)/cppenv.texi $(docdir)/cppopts.texi 227190081Sobrien cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cpp.info doc/cpp.texi 227218334Speter 227390081Sobrien$(docdir)/gcc.info: $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \ 227490081Sobrien $(docdir)/frontends.texi $(docdir)/standards.texi \ 227590081Sobrien $(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \ 227690081Sobrien $(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \ 227790081Sobrien $(docdir)/bugreport.texi $(docdir)/service.texi \ 227890081Sobrien $(docdir)/contribute.texi $(docdir)/vms.texi \ 227990081Sobrien $(docdir)/include/funding.texi $(docdir)/gnu.texi \ 228090081Sobrien $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \ 228196273Sobrien $(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi 228290081Sobrien cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gcc.info doc/gcc.texi 228318334Speter 228490081Sobrien$(docdir)/gccint.info: $(docdir)/gccint.texi \ 228590081Sobrien $(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \ 228690081Sobrien $(docdir)/makefile.texi $(docdir)/configterms.texi \ 228790081Sobrien $(docdir)/portability.texi $(docdir)/interface.texi \ 228890081Sobrien $(docdir)/passes.texi $(docdir)/c-tree.texi \ 228990081Sobrien $(docdir)/rtl.texi $(docdir)/md.texi $(docdir)/tm.texi \ 229090081Sobrien $(docdir)/hostconfig.texi $(docdir)/fragments.texi \ 229190081Sobrien $(docdir)/configfiles.texi $(docdir)/collect2.texi \ 229290081Sobrien $(docdir)/headerdirs.texi $(docdir)/include/funding.texi \ 229390081Sobrien $(docdir)/gnu.texi $(docdir)/include/gpl.texi \ 229490081Sobrien $(docdir)/include/fdl.texi $(docdir)/contrib.texi \ 229590081Sobrien $(docdir)/languages.texi $(docdir)/sourcebuild.texi 229690081Sobrien cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gccint.info doc/gccint.texi 229790081Sobrien 229890081Sobrien$(docdir)/cppinternals.info: $(docdir)/cppinternals.texi 229990081Sobrien cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cppinternals.info \ 230090081Sobrien doc/cppinternals.texi 230190081Sobrien 230290081Sobriendvi: gcc.dvi gccint.dvi cpp.dvi lang.dvi cppinternals.dvi 230390081Sobrien 230418334Speter# This works with GNU Make's default rule. 230596273Sobriencpp.dvi: $(docdir)/cpp.texi $(docdir)/include/fdl.texi \ 230696273Sobrien $(docdir)/cppenv.texi $(docdir)/cppopts.texi 230790081Sobrien $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cpp.texi 230818334Speter 230990081Sobriengcc.dvi: $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \ 231090081Sobrien $(docdir)/frontends.texi $(docdir)/standards.texi \ 231190081Sobrien $(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \ 231290081Sobrien $(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \ 231390081Sobrien $(docdir)/bugreport.texi $(docdir)/service.texi \ 231490081Sobrien $(docdir)/contribute.texi $(docdir)/vms.texi \ 231590081Sobrien $(docdir)/include/funding.texi $(docdir)/gnu.texi \ 231690081Sobrien $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \ 231796273Sobrien $(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi 231890081Sobrien $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gcc.texi 231918334Speter 232090081Sobriengccint.dvi: $(docdir)/gccint.texi \ 232190081Sobrien $(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \ 232290081Sobrien $(docdir)/makefile.texi $(docdir)/configterms.texi \ 232390081Sobrien $(docdir)/portability.texi $(docdir)/interface.texi \ 232490081Sobrien $(docdir)/passes.texi $(docdir)/c-tree.texi \ 232590081Sobrien $(docdir)/rtl.texi $(docdir)/md.texi $(docdir)/tm.texi \ 232690081Sobrien $(docdir)/hostconfig.texi $(docdir)/fragments.texi \ 232790081Sobrien $(docdir)/configfiles.texi $(docdir)/collect2.texi \ 232890081Sobrien $(docdir)/headerdirs.texi $(docdir)/include/funding.texi \ 232990081Sobrien $(docdir)/gnu.texi $(docdir)/include/gpl.texi \ 233090081Sobrien $(docdir)/include/fdl.texi $(docdir)/contrib.texi \ 233190081Sobrien $(docdir)/languages.texi $(docdir)/sourcebuild.texi 233290081Sobrien $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gccint.texi 233350448Sobrien 233490081Sobriencppinternals.dvi: $(docdir)/cppinternals.texi 233590081Sobrien $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cppinternals.texi 233690081Sobrien 233790081Sobriengenerated-manpages: $(docdir)/gcov.1 $(docdir)/cpp.1 $(docdir)/gcc.1 \ 233890081Sobrien $(docdir)/gfdl.7 $(docdir)/gpl.7 $(docdir)/fsf-funding.7 \ 233990081Sobrien lang.generated-manpages 234090081Sobrien 234190081Sobrien$(docdir)/gcov.1: $(docdir)/gcov.texi 234290081Sobrien $(STAMP) $(docdir)/gcov.1 234396273Sobrien -$(TEXI2POD) $(docdir)/gcov.texi > gcov.pod 234490081Sobrien -($(POD2MAN) --section=1 gcov.pod > $(docdir)/gcov.1.T$$$$ && \ 234590081Sobrien mv -f $(docdir)/gcov.1.T$$$$ $(docdir)/gcov.1) || \ 234690081Sobrien (rm -f $(docdir)/gcov.1.T$$$$ && exit 1) 234790081Sobrien -rm -f gcov.pod 234890081Sobrien 234996273Sobrien$(docdir)/cpp.1: $(docdir)/cpp.texi $(docdir)/cppenv.texi \ 235096273Sobrien $(docdir)/cppopts.texi 235190081Sobrien $(STAMP) $(docdir)/cpp.1 235296273Sobrien -$(TEXI2POD) $(docdir)/cpp.texi > cpp.pod 235390081Sobrien -($(POD2MAN) --section=1 cpp.pod > $(docdir)/cpp.1.T$$$$ && \ 235490081Sobrien mv -f $(docdir)/cpp.1.T$$$$ $(docdir)/cpp.1) || \ 235590081Sobrien (rm -f $(docdir)/cpp.1.T$$$$ && exit 1) 235690081Sobrien -rm -f cpp.pod 235790081Sobrien 235896273Sobrien$(docdir)/gcc.1: $(docdir)/invoke.texi $(docdir)/cppenv.texi \ 235996273Sobrien $(docdir)/cppopts.texi 236090081Sobrien $(STAMP) $(docdir)/gcc.1 236196273Sobrien -$(TEXI2POD) $(docdir)/invoke.texi > gcc.pod 236290081Sobrien -($(POD2MAN) --section=1 gcc.pod > $(docdir)/gcc.1.T$$$$ && \ 236390081Sobrien mv -f $(docdir)/gcc.1.T$$$$ $(docdir)/gcc.1) || \ 236490081Sobrien (rm -f $(docdir)/gcc.1.T$$$$ && exit 1) 236590081Sobrien -rm -f gcc.pod 236690081Sobrien 236790081Sobrien$(docdir)/gfdl.7: $(docdir)/include/fdl.texi 236890081Sobrien $(STAMP) $(docdir)/gfdl.7 236996273Sobrien -$(TEXI2POD) $(docdir)/include/fdl.texi > gfdl.pod 237090081Sobrien -($(POD2MAN) --section=7 gfdl.pod > $(docdir)/gfdl.7.T$$$$ && \ 237190081Sobrien mv -f $(docdir)/gfdl.7.T$$$$ $(docdir)/gfdl.7) || \ 237290081Sobrien (rm -f $(docdir)/gfdl.7.T$$$$ && exit 1) 237390081Sobrien -rm -f gfdl.pod 237490081Sobrien 237590081Sobrien$(docdir)/gpl.7: $(docdir)/include/gpl.texi 237690081Sobrien $(STAMP) $(docdir)/gpl.7 237796273Sobrien -$(TEXI2POD) $(docdir)/include/gpl.texi > gpl.pod 237890081Sobrien -($(POD2MAN) --section=7 gpl.pod > $(docdir)/gpl.7.T$$$$ && \ 237990081Sobrien mv -f $(docdir)/gpl.7.T$$$$ $(docdir)/gpl.7) || \ 238090081Sobrien (rm -f $(docdir)/gpl.7.T$$$$ && exit 1) 238190081Sobrien -rm -f gpl.pod 238290081Sobrien 238390081Sobrien$(docdir)/fsf-funding.7: $(docdir)/include/funding.texi 238490081Sobrien $(STAMP) $(docdir)/fsf-funding.7 238596273Sobrien -$(TEXI2POD) $(docdir)/include/funding.texi > fsf-funding.pod 238690081Sobrien -($(POD2MAN) --section=7 fsf-funding.pod \ 238790081Sobrien > $(docdir)/fsf-funding.7.T$$$$ && \ 238890081Sobrien mv -f $(docdir)/fsf-funding.7.T$$$$ $(docdir)/fsf-funding.7) || \ 238990081Sobrien (rm -f $(docdir)/fsf-funding.7.T$$$$ && exit 1) 239090081Sobrien -rm -f fsf-funding.pod 239190081Sobrien 239250448Sobrien# 239318334Speter# Deletion of files made during compilation. 239418334Speter# There are four levels of this: 239518334Speter# `mostlyclean', `clean', `distclean' and `maintainer-clean'. 239618334Speter# `mostlyclean' is useful while working on a particular type of machine. 239718334Speter# It deletes most, but not all, of the files made by compilation. 239818334Speter# It does not delete libgcc.a or its parts, so it won't have to be recompiled. 239918334Speter# `clean' deletes everything made by running `make all'. 240018334Speter# `distclean' also deletes the files made by config. 240118334Speter# `maintainer-clean' also deletes everything that could be regenerated 240250448Sobrien# automatically, except for `configure'. 240350448Sobrien# We remove as much from the language subdirectories as we can 240418334Speter# (less duplicated code). 240518334Speter 240690081SobrienINTL_MOSTLYCLEAN = intl.mostlyclean 240790081Sobrienmostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean 240818334Speter -rm -f $(STAGESTUFF) 240990081Sobrien -rm -rf libgcc 241018334Speter# Delete the temporary source copies for cross compilation. 241190081Sobrien -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)print-rtl.c 241290081Sobrien -rm -f $(HOST_PREFIX_1)bitmap.c $(HOST_PREFIX_1)errors.c 241390081Sobrien -rm -f $(HOST_PREFIX_1)ggc-none.c 241418334Speter# Delete the temp files made in the course of building libgcc.a. 241590081Sobrien -rm -f xlimits.h 241650448Sobrien# Delete other built files. 241790081Sobrien -rm -f t-float.h-cross xsys-protos.hT 241850448Sobrien# Delete the stamp and temporary files. 241950448Sobrien -rm -f s-* tmp-* stamp-* stmp-* 242018334Speter -rm -f */stamp-* */tmp-* 242118334Speter# Delete debugging dump files. 242290081Sobrien -rm -f *.[0-9][0-9].* */*.[0-9][0-9].* 242318334Speter# Delete some files made during installation. 242452298Sobrien -rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c 242590081Sobrien -rm -f collect collect2 mips-tfile mips-tdump 242618334Speter# Delete files generated for fixproto 242790081Sobrien -rm -rf fix-header$(build_exeext) xsys-protos.h deduced.h tmp-deduced.h \ 242890081Sobrien gen-protos$(build_exeext) fixproto.list fixtmp.* fixhdr.ready 242990081Sobrien# Delete files generated for fixincl 243090081Sobrien -rm -rf fixincl fixinc.sh specs.ready 243190081Sobrien (cd fixinc && $(MAKE) clean) 243218334Speter# Delete unwanted output files from TeX. 243318334Speter -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg 243418334Speter -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg 243518334Speter# Delete sorted indices we don't actually use. 243618334Speter -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns 243718334Speter# Delete core dumps. 243818334Speter -rm -f core */core 243918334Speter 244018334Speter# Delete all files made by compilation 244118334Speter# that don't exist in the distribution. 244290081SobrienINTL_CLEAN = intl.clean 244390081Sobrienclean: mostlyclean $(INTL_CLEAN) lang.clean 244490081Sobrien -rm -f libgcc.a libgcc_eh.a libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1 244590081Sobrien -rm -f config.h tconfig.h hconfig.h tm_p.h 244690081Sobrien -rm -f cs-* 244790081Sobrien -rm -rf libgcc 244818334Speter -rm -f *.dvi 244918334Speter -rm -f */*.dvi 245018334Speter# Delete the include directory. 245150448Sobrien -rm -rf include 245218334Speter# Delete files used by the "multilib" facility (including libgcc subdirs). 245318334Speter -rm -f multilib.h tmpmultilib* 245418334Speter -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \ 245518334Speter rm -rf $(MULTILIB_DIRNAMES); \ 245618334Speter else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \ 245718334Speter rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \ 245818334Speter fi ; fi 245950448Sobrien -rm -fr stage1 stage2 stage3 stage4 246090081Sobrien# Delete stamps of bootstrap stages 246190081Sobrien -rm -f stage?_* 246290081Sobrien -rm -f clean?_* 246390081Sobrien -rm -f stage_last 246418334Speter 246518334Speter# Delete all files that users would normally create 246618334Speter# while building and installing GCC. 246752298SobrienINTL_DISTCLEAN = intl.distclean 246852298Sobriendistclean: clean $(INTL_DISTCLEAN) lang.distclean 246990081Sobrien -rm -f auto-host.h auto-build.h 247090081Sobrien -rm -f cstamp-h 247150448Sobrien -rm -f config.status config.run config.cache config.bak 247250448Sobrien -rm -f Make-lang Make-hooks Make-host Make-target 247352298Sobrien -rm -f Makefile specs.h options.h gencheck.h *.oaux 247450448Sobrien -rm -f gthr-default.h 247518334Speter -rm -f */stage1 */stage2 */stage3 */stage4 */include 247618334Speter -rm -f c-parse.output 247718334Speter -rm -f *.asm 247850448Sobrien -rm -f float.h 247950448Sobrien -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak 248050448Sobrien -rm -f testsuite/{gcc,g++}.{log,sum} 248152298Sobrien -rm -f intl/libintl.h libintl.h 248290081Sobrien -rm -f cxxmain.c 248396273Sobrien -rm -f mklibgcc gccbug .gdbinit configargs.h 248490081Sobrien -rm -f gcov.pod 248590081Sobrien -rm -f fixinc/Makefile 248690081Sobrien -rmdir ada cp f java objc fixinc intl po 2>/dev/null 248718334Speter 248818334Speter# Delete anything likely to be found in the source directory 248918334Speter# that shouldn't be in the distribution. 249018334Speterextraclean: distclean lang.extraclean 249118334Speter -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~* 249218334Speter -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej 249318334Speter -rm -f config/*/=* config/*/"#"* config/*/*~* 249418334Speter -rm -f config/*/*.orig config/*/*.rej 249518334Speter -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz 249618334Speter -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs 249718334Speter -rm -f *lose config/*lose config/*/*lose 249850448Sobrien -rm -f *.s *.s[0-9] *.i config/ChangeLog 249952298Sobrien -rm -f y.tab.c yacc.* 250018334Speter -rm -f */=* */"#"* */*~* 250118334Speter -rm -f */patch* */*.orig */*.rej 250218334Speter -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz 250318334Speter -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs 250418334Speter -rm -f */*lose */*.s */*.s[0-9] */*.i 250518334Speter 250650448Sobrien# Get rid of every file that's generated from some other file, except for `configure'. 250718334Speter# Most of these files ARE PRESENT in the GCC distribution. 250890081Sobrien# We define INTL_DISTCLEAN, INTL_CLEAN & INTL_MOSTLYCLEAN to be empty in the 250990081Sobrien# submake, so that we don't descend into intl after its makefile has been 251090081Sobrien# removed. 251150448Sobrienmaintainer-clean: 251250448Sobrien @echo 'This command is intended for maintainers to use; it' 251350448Sobrien @echo 'deletes files that may need special tools to rebuild.' 251490081Sobrien $(MAKE) INTL_DISTCLEAN= INTL_CLEAN= INTL_MOSTLYCLEAN= \ 251590081Sobrien intl.maintainer-clean lang.maintainer-clean distclean 251690081Sobrien -rm -f c-parse.y c-parse.c c-parse.output TAGS 251790081Sobrien -rm -f cpp.??s cpp.*aux 251890081Sobrien -rm -f gcc.??s gcc.*aux 251990081Sobrien -rm -f $(docdir)/cpp.info* $(docdir)/gcc.info* $(docdir)/gccint.info* 252090081Sobrien -rm -f $(docdir)/cppinternals.info* 252190081Sobrien -rm -f $(docdir)/gcov.1 $(docdir)/cpp.1 $(docdir)/gcc.1 252290081Sobrien -rm -f $(docdir)/fsf-funding.7 $(docdir)/gfdl.7 $(docdir)/gpl.7 252350448Sobrien# 252418334Speter# Entry points `install' and `uninstall'. 252518334Speter# Also use `install-collect2' to install collect2 when the config files don't. 252618334Speter 252718334Speter# Copy the compiler files into directories where they will be run. 252818334Speter# Install the driver last so that the window when things are 252918334Speter# broken is small. 253090081Sobrieninstall: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ 253190081Sobrien $(INSTALL_CPP) install-man install-info intl.install install-@POSUB@ \ 253290081Sobrien lang.install-normal install-driver 253318334Speter 253450448Sobrien# Handle cpp installation. 253570638Sobrieninstall-cpp: cpp$(exeext) 253690081Sobrien -if [ -f gcc-cross$(exeext) ] ; then \ 253790081Sobrien rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ 253890081Sobrien $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ 253990081Sobrien if [ x$(cpp_install_dir) != x ]; then \ 254090081Sobrien rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ 254190081Sobrien $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ 254290081Sobrien else true; fi; \ 254390081Sobrien else \ 254490081Sobrien rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ 254590081Sobrien $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ 254690081Sobrien if [ x$(cpp_install_dir) != x ]; then \ 254790081Sobrien rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ 254890081Sobrien $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ 254990081Sobrien else true; fi; \ 255090081Sobrien fi 255150448Sobrien 255250448Sobrienuninstall-cpp: 255390081Sobrien -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext) 255490081Sobrien -rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext) 255550448Sobrien -if [ x$(cpp_install_dir) != x ]; then \ 255690081Sobrien rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ 255790081Sobrien rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ 255850448Sobrien else true; fi 255950448Sobrien 256050448Sobrien# Create the installation directories. 256150448Sobrieninstalldirs: 256250448Sobrien -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi 256350448Sobrien -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi 256418334Speter -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi 256518334Speter -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi 256618334Speter# This dir isn't currently searched by cpp. 256718334Speter# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi 256850448Sobrien -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \ 256950448Sobrien fdir=$${fdir}/$${dir}; \ 257050448Sobrien if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \ 257150448Sobrien done 257218334Speter -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi 257318334Speter -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi 257418334Speter -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi 257590081Sobrien -if [ -d $(slibdir) ] ; then true ; else mkdir $(slibdir) ; chmod a+rx $(slibdir) ; fi 257652298Sobrien# We don't use mkdir -p to create the parents of man1dir, 257718334Speter# because some systems don't support it. 257852298Sobrien# Instead, we use this technique to create the immediate parent of man1dir. 257952298Sobrien -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ 258018334Speter if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi 258152298Sobrien -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi 258290081Sobrien -if [ -d $(man7dir) ] ; then true ; else mkdir $(man7dir) ; chmod a+rx $(man7dir) ; fi 258318334Speter 258418334Speter# Install the compiler executables built during cross compilation. 258590081Sobrieninstall-common: native $(EXTRA_PARTS) lang.install-common 258618334Speter for file in $(COMPILERS); do \ 258718334Speter if [ -f $$file ] ; then \ 258818334Speter rm -f $(libsubdir)/$$file; \ 258918334Speter $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ 259018334Speter else true; \ 259118334Speter fi; \ 259218334Speter done 259318334Speter for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \ 259418334Speter if [ x"$$file" != x.. ]; then \ 259518334Speter rm -f $(libsubdir)/$$file; \ 259618334Speter $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ 259718334Speter else true; fi; \ 259818334Speter done 259918334Speter for file in $(EXTRA_PARTS) ..; do \ 260018334Speter if [ x"$$file" != x.. ]; then \ 260118334Speter rm -f $(libsubdir)/$$file; \ 260218334Speter $(INSTALL_DATA) $$file $(libsubdir)/$$file; \ 260350448Sobrien chmod a-x $(libsubdir)/$$file; \ 260418334Speter else true; fi; \ 260518334Speter done 260618334Speter# Don't mess with specs if it doesn't exist yet. 260718334Speter -if [ -f specs ] ; then \ 260818334Speter rm -f $(libsubdir)/specs; \ 260918334Speter $(INSTALL_DATA) specs $(libsubdir)/specs; \ 261050448Sobrien chmod a-x $(libsubdir)/specs; \ 261118334Speter fi 261218334Speter# Install protoize if it was compiled. 261318334Speter -if [ -f protoize$(exeext) ]; \ 261418334Speter then \ 261550448Sobrien if [ -f gcc-cross$(exeext) ] ; then \ 261650448Sobrien rm -f $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ 261750448Sobrien $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ 261850448Sobrien rm -f $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ 261950448Sobrien $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ 262050448Sobrien else \ 262150448Sobrien rm -f $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ 262250448Sobrien $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ 262350448Sobrien rm -f $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ 262450448Sobrien $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ 262550448Sobrien fi ; \ 262618334Speter rm -f $(libsubdir)/SYSCALLS.c.X; \ 262718334Speter $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ 262818334Speter chmod a-x $(libsubdir)/SYSCALLS.c.X; \ 262918334Speter fi 263070638Sobrien -rm -f $(libsubdir)/cpp0$(exeext) 263170638Sobrien $(INSTALL_PROGRAM) cpp0$(exeext) $(libsubdir)/cpp0$(exeext) 263290081Sobrien -rm -f $(libsubdir)/tradcpp0$(exeext) 263390081Sobrien $(INSTALL_PROGRAM) tradcpp0$(exeext) $(libsubdir)/tradcpp0$(exeext) 263450448Sobrien# Install gcov if it was compiled. 263550448Sobrien -if [ -f gcov$(exeext) ]; \ 263650448Sobrien then \ 263750448Sobrien rm -f $(bindir)/gcov$(exeext); \ 263852298Sobrien $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ 263950448Sobrien fi 264090081Sobrien $(INSTALL_SCRIPT) gccbug $(bindir)/$(GCCBUG_INSTALL_NAME) 264118334Speter 264250448Sobrien# Install the driver program as $(target_alias)-gcc 264352298Sobrien# and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc. 264490081Sobrieninstall-driver: installdirs xgcc$(exeext) 264518334Speter -if [ -f gcc-cross$(exeext) ] ; then \ 264618334Speter rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ 264718334Speter $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ 264852298Sobrien if [ -d $(gcc_tooldir)/bin/. ] ; then \ 264952298Sobrien rm -f $(gcc_tooldir)/bin/gcc$(exeext); \ 265052298Sobrien $(INSTALL_PROGRAM) gcc-cross$(exeext) $(gcc_tooldir)/bin/gcc$(exeext); \ 265118334Speter else true; fi; \ 265218334Speter else \ 265318334Speter rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ 265418334Speter $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ 265550448Sobrien rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \ 265650448Sobrien $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \ 265790081Sobrien mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(GCC_TARGET_INSTALL_NAME)$(exeext); \ 265818334Speter fi 265918334Speter 266018334Speter# Install the info files. 266150448Sobrien# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir 266250448Sobrien# to do the install. 266350448Sobrieninstall-info: doc installdirs lang.install-info 266418334Speter -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* 266590081Sobrien -rm -f $(infodir)/cppinternals.info* $(infodir)/gccint.info* 266690081Sobrien if [ -f $(docdir)/gcc.info ]; then \ 266790081Sobrien for f in $(docdir)/cpp.info* $(docdir)/gcc.info* \ 266890081Sobrien $(docdir)/cppinternals.info* $(docdir)/gccint.info*; do \ 266990081Sobrien realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ 267090081Sobrien $(INSTALL_DATA) $$f $(infodir)/$$realfile; \ 267190081Sobrien done; \ 267290081Sobrien else true; fi 267350448Sobrien -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ 267450448Sobrien if [ -f $(infodir)/dir ] ; then \ 267590081Sobrien for f in cpp.info gcc.info gccint.info cppinternals.info; do \ 267690081Sobrien if [ -f $(infodir)/$$f ]; then \ 267790081Sobrien install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \ 267890081Sobrien else true; fi; \ 267950448Sobrien done; \ 268050448Sobrien else true; fi; \ 268150448Sobrien else true; fi; 268218334Speter -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info* 268390081Sobrien -chmod a-x $(infodir)/cppinternals.info* $(infodir)/gccint.info* 268418334Speter 268518334Speter# Install the man pages. 268690081Sobrieninstall-man: installdirs $(GENERATED_MANPAGES) lang.install-man 268750448Sobrien -if [ -f gcc-cross$(exeext) ] ; then \ 268890081Sobrien rm -f $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ 268990081Sobrien $(INSTALL_DATA) $(docdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ 269090081Sobrien chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ 269118334Speter else \ 269290081Sobrien rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ 269390081Sobrien $(INSTALL_DATA) $(docdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ 269490081Sobrien chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ 269518334Speter fi 269690081Sobrien -rm -f $(man1dir)/cpp$(man1ext) 269790081Sobrien -$(INSTALL_DATA) $(docdir)/cpp.1 $(man1dir)/cpp$(man1ext) 269890081Sobrien -chmod a-x $(man1dir)/cpp$(man1ext) 269990081Sobrien -rm -f $(man1dir)/gcov$(man1ext) 270090081Sobrien -$(INSTALL_DATA) $(docdir)/gcov.1 $(man1dir)/gcov$(man1ext) 270190081Sobrien -chmod a-x $(man1dir)/gcov$(man1ext) 270290081Sobrien -rm -f $(man7dir)/fsf-funding$(man7ext) 270390081Sobrien -$(INSTALL_DATA) $(docdir)/fsf-funding.7 $(man7dir)/fsf-funding$(man7ext) 270490081Sobrien -chmod a-x $(man7dir)/fsf-funding$(man7ext) 270590081Sobrien -rm -f $(man7dir)/gfdl$(man7ext) 270690081Sobrien -$(INSTALL_DATA) $(docdir)/gfdl.7 $(man7dir)/gfdl$(man7ext) 270790081Sobrien -chmod a-x $(man7dir)/gfdl$(man7ext) 270890081Sobrien -rm -f $(man7dir)/gpl$(man7ext) 270990081Sobrien -$(INSTALL_DATA) $(docdir)/gpl.7 $(man7dir)/gpl$(man7ext) 271090081Sobrien -chmod a-x $(man7dir)/gpl$(man7ext) 271118334Speter 271218334Speter# Install the library. 271390081Sobrieninstall-libgcc: libgcc.mk libgcc.a installdirs 271490081Sobrien if $(RANLIB_TEST_FOR_TARGET); then \ 271590081Sobrien r_f_t=$(RANLIB_FOR_TARGET); \ 271690081Sobrien else \ 271790081Sobrien r_f_t=: ; \ 271890081Sobrien fi; \ 271990081Sobrien $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ 272090081Sobrien HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ 272190081Sobrien AR_FOR_TARGET="$(AR_FOR_TARGET)" \ 272290081Sobrien AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ 272390081Sobrien AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ 272490081Sobrien CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ 272590081Sobrien RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \ 272690081Sobrien NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \ 272790081Sobrien LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \ 272890081Sobrien INCLUDES="$(INCLUDES)" \ 272990081Sobrien CONFIG_H="$(TCONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \ 273090081Sobrien LIB1ASMSRC='$(LIB1ASMSRC)' \ 273190081Sobrien MAKEOVERRIDES= \ 273290081Sobrien INSTALL_DATA="$(INSTALL_DATA)" \ 273390081Sobrien RANLIB_FOR_TARGET="$$r_f_t" \ 273490081Sobrien libsubdir="$(libsubdir)" \ 273590081Sobrien slibdir="$(slibdir)" \ 273690081Sobrien -f libgcc.mk install 273718334Speter 273818334Speter# Install multiple versions of libgcc.a. 273950448Sobrieninstall-multilib: stmp-multilib installdirs 274090081Sobrien if $(RANLIB_TEST_FOR_TARGET); then \ 274190081Sobrien r_f_t=$(RANLIB_FOR_TARGET); \ 274290081Sobrien else \ 274390081Sobrien r_f_t=: ; \ 274490081Sobrien fi; \ 274590081Sobrien $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ 274690081Sobrien HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ 274790081Sobrien AR_FOR_TARGET="$(AR_FOR_TARGET)" \ 274890081Sobrien AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ 274990081Sobrien AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ 275090081Sobrien CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ 275190081Sobrien RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \ 275290081Sobrien NM_FOR_TARGET="$(NM_FOR_TARGET)" AWK="$(AWK)" \ 275390081Sobrien LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \ 275490081Sobrien INCLUDES="$(INCLUDES)" \ 275590081Sobrien CONFIG_H="$(CONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \ 275690081Sobrien LIB1ASMSRC='$(LIB1ASMSRC)' \ 275790081Sobrien MAKEOVERRIDES= \ 275890081Sobrien INSTALL_DATA="$(INSTALL_DATA)" \ 275990081Sobrien RANLIB_FOR_TARGET="$$r_f_t" \ 276090081Sobrien libsubdir="$(libsubdir)" \ 276190081Sobrien slibdir="$(slibdir)" \ 276290081Sobrien -f libgcc.mk install 276318334Speter 276418334Speter# Install all the header files built in the include subdirectory. 276590081Sobrieninstall-headers: $(INSTALL_HEADERS_DIR) 276618334Speter# Fix symlinks to absolute paths in the installed include directory to 276718334Speter# point to the installed directory, not the build directory. 276850448Sobrien# Don't need to use LN_S here since we really do need ln -s and no substitutes. 276918334Speter -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \ 277018334Speter if [ $$? -eq 0 ]; then \ 277118334Speter dir=`cd include; pwd`; \ 277218334Speter for i in $$files; do \ 277318334Speter dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \ 277418334Speter if expr "$$dest" : "$$dir.*" > /dev/null; then \ 277518334Speter rm -f $(libsubdir)/include/$$i; \ 277618334Speter ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \ 277718334Speter fi; \ 277818334Speter done; \ 277918334Speter fi 278018334Speter 278118334Speter# Create or recreate the gcc private include file directory. 278250448Sobrieninstall-include-dir: installdirs 278318334Speter -rm -rf $(libsubdir)/include 278418334Speter mkdir $(libsubdir)/include 278518334Speter -chmod a+rx $(libsubdir)/include 278618334Speter 278718334Speter# Install the include directory using tar. 278890081Sobrieninstall-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir 278952298Sobrien# We use `pwd`/include instead of just include to problems with CDPATH 279052298Sobrien# Unless a full pathname is provided, some shells would print the new CWD, 279152298Sobrien# found in CDPATH, corrupting the output. We could just redirect the 279252298Sobrien# output of `cd', but some shells lose on redirection within `()'s 279352298Sobrien (cd `pwd`/include ; \ 279490081Sobrien tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar xpf - ) 279518334Speter# /bin/sh on some systems returns the status of the first tar, 279618334Speter# and that can lose with GNU tar which always writes a full block. 279718334Speter# So use `exit 0' to ignore its exit status. 279818334Speter 279918334Speter# Install the include directory using cpio. 280090081Sobrieninstall-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir 280152298Sobrien# See discussion about the use of `pwd` above 280252298Sobrien cd `pwd`/include ; \ 280352298Sobrien find . -print | cpio -pdum $(libsubdir)/include 280418334Speter 280590081Sobrien# Install the include directory using cp. 280690081Sobrieninstall-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir 280790081Sobrien cp -p -r include $(libsubdir) 280818334Speter 280950448Sobrien# Use this target to install the program `collect2' under the name `collect2'. 281050448Sobrieninstall-collect2: collect2 installdirs 281150448Sobrien $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext) 281218334Speter# Install the driver program as $(libsubdir)/gcc for collect2. 281318334Speter $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext) 281418334Speter 281518334Speter# Cancel installation by deleting the installed files. 281652298Sobrienuninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP) 281718334Speter -rm -rf $(libsubdir) 281818334Speter -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext) 281918334Speter -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext) 282052298Sobrien -rm -rf $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext) 282152298Sobrien -rm -rf $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext) 282252298Sobrien -rm -rf $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext) 282352298Sobrien -rm -rf $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext) 282452298Sobrien -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext) 282590081Sobrien -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) 282690081Sobrien -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(man1ext) 282790081Sobrien -rm -rf $(man1dir)/cpp$(man1ext) 282890081Sobrien -rm -rf $(man1dir)/protoize$(man1ext) 282990081Sobrien -rm -rf $(man1dir)/unprotoize$(man1ext) 283050448Sobrien -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* 283190081Sobrien -rm -f $(infodir)/cppinternals.info* $(infodir)/gccint.info* 283250448Sobrien# 283390081Sobrien# These targets are for the dejagnu testsuites. The file site.exp 283450448Sobrien# contains global variables that all the testsuites will use. 283550448Sobrien 283650448Sobrien# Set to $(target_alias)/ for cross. 283750448Sobrientarget_subdir = @target_subdir@ 283850448Sobrien 283950448Sobriensite.exp: ./config.status Makefile 284050448Sobrien @echo "Making a new config file..." 284150448Sobrien -@rm -f ./tmp? 284290081Sobrien @$(STAMP) site.exp 284350448Sobrien -@mv site.exp site.bak 284450448Sobrien @echo "## these variables are automatically generated by make ##" > ./tmp0 284550448Sobrien @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 284650448Sobrien @echo "# add them to the last section" >> ./tmp0 284750448Sobrien @echo "set rootme \"`pwd`\"" >> ./tmp0 284850448Sobrien @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0 284950448Sobrien @echo "set host_triplet $(host_canonical)" >> ./tmp0 285050448Sobrien @echo "set build_triplet $(build_canonical)" >> ./tmp0 285150448Sobrien @echo "set target_triplet $(target)" >> ./tmp0 285250448Sobrien @echo "set target_alias $(target_alias)" >> ./tmp0 285350448Sobrien# CFLAGS is set even though it's empty to show we reserve the right to set it. 285450448Sobrien @echo "set CFLAGS \"\"" >> ./tmp0 285550448Sobrien @echo "set CXXFLAGS \"-I$(objdir)/../$(target_subdir)libio -I\$$srcdir/../libg++/src -I\$$srcdir/../libio -I\$$srcdir/../libstdc++ -I\$$srcdir/../libstdc++/stl -L$(objdir)/../$(target_subdir)libg++ -L$(objdir)/../$(target_subdir)libstdc++\"" >> ./tmp0 285690081Sobrien @echo "set TESTING_IN_BUILD_TREE 1" >> ./tmp0 285790081Sobrien @echo "set HAVE_LIBSTDCXX_V3 1" >> ./tmp0 285850448Sobrien# If newlib has been configured, we need to pass -B to gcc so it can find 285950448Sobrien# newlib's crt0.o if it exists. This will cause a "path prefix not used" 286050448Sobrien# message if it doesn't, but the testsuite is supposed to ignore the message - 286150448Sobrien# it's too difficult to tell when to and when not to pass -B (not all targets 286250448Sobrien# have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that 286350448Sobrien# seems like too selective a test. 286450448Sobrien# ??? Another way to solve this might be to rely on linker scripts. Then 286550448Sobrien# theoretically the -B won't be needed. 286650448Sobrien# We also need to pass -L ../ld so that the linker can find ldscripts. 286750448Sobrien @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \ 286850448Sobrien echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \ 286950448Sobrien echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \ 287050448Sobrien echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \ 287150448Sobrien echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \ 287250448Sobrien echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \ 287350448Sobrien else true; \ 287450448Sobrien fi 287550448Sobrien @if [ -d $(objdir)/../ld ] ; then \ 287650448Sobrien echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \ 287750448Sobrien else true; \ 287850448Sobrien fi 287950448Sobrien echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 288050448Sobrien @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0 288150448Sobrien @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 288250448Sobrien @cat ./tmp0 > site.exp 288350448Sobrien @cat site.bak | sed \ 288450448Sobrien -e '1,/^## All variables above are.*##/ d' >> site.exp 288550448Sobrien -@rm -f ./tmp? 288650448Sobrien 288796273SobrienCHECK_TARGETS = check-gcc check-fixinc @check_languages@ 288850448Sobrien 288990081Sobriencheck-c++ : check-g++ 289090081Sobriencheck-f77 : check-g77 289190081Sobriencheck-java : 289290081Sobrien 289396273Sobriencheck-fixinc : 289496273Sobrien if (autogen --ver=v) > /dev/null 2>&1 ; \ 289596273Sobrien then cd fixinc && $(MAKE) check ; \ 289696273Sobrien else true ; fi 289796273Sobrien 289850448Sobriencheck: $(CHECK_TARGETS) 289950448Sobrien 290090081Sobrien# The idea is to parallelize testing of multilibs, for example: 290190081Sobrien# make -j3 check-gcc//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu} 290290081Sobrien# will run 3 concurrent sessions of check-gcc, eventually testing 290390081Sobrien# all 10 combinations. GNU make is required, as is a shell that expands 290490081Sobrien# alternations within braces. 290590081Sobriencheck-gcc//% check-g++//% check-g77//% check-objc//%: site.exp 290690081Sobrien target=`echo "$@" | sed 's,//.*,,'`; \ 290790081Sobrien variant=`echo "$@" | sed 's,^[^/]*//,,'`; \ 290890081Sobrien vardots=`echo "$$variant" | sed 's,/,.,g'`; \ 290990081Sobrien $(MAKE) TESTSUITEDIR="testsuite.$$vardots" \ 291090081Sobrien RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \ 291190081Sobrien "$$target" 291250448Sobrien 291390081SobrienTESTSUITEDIR = testsuite 291490081Sobrien 291590081Sobrien$(TESTSUITEDIR)/site.exp: site.exp 291690081Sobrien test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR) 291790081Sobrien -rm -f $@ 291890081Sobrien sed '/set tmpdir/ s|testsuite|$(TESTSUITEDIR)|' < site.exp > $@ 291990081Sobrien 292090081Sobriencheck-g++: $(TESTSUITEDIR)/site.exp 292190081Sobrien -(rootme=`pwd`; export rootme; \ 292250448Sobrien srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ 292390081Sobrien cd $(TESTSUITEDIR); \ 292450448Sobrien EXPECT=${EXPECT} ; export EXPECT ; \ 292550448Sobrien if [ -f $${rootme}/../expect/expect ] ; then \ 292652298Sobrien TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ 292750448Sobrien export TCL_LIBRARY ; fi ; \ 292890081Sobrien $(RUNTEST) --tool g++ $(RUNTESTFLAGS)) 292950448Sobrien 293090081Sobriencheck-gcc: $(TESTSUITEDIR)/site.exp 293190081Sobrien -(rootme=`pwd`; export rootme; \ 293250448Sobrien srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ 293390081Sobrien cd $(TESTSUITEDIR); \ 293450448Sobrien EXPECT=${EXPECT} ; export EXPECT ; \ 293550448Sobrien if [ -f $${rootme}/../expect/expect ] ; then \ 293652298Sobrien TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ 293750448Sobrien export TCL_LIBRARY ; fi ; \ 293890081Sobrien $(RUNTEST) --tool gcc $(RUNTESTFLAGS)) 293950448Sobrien 294090081Sobriencheck-g77: $(TESTSUITEDIR)/site.exp 294190081Sobrien -(rootme=`pwd`; export rootme; \ 294250448Sobrien srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ 294390081Sobrien cd $(TESTSUITEDIR); \ 294450448Sobrien EXPECT=${EXPECT} ; export EXPECT ; \ 294550448Sobrien if [ -f $${rootme}/../expect/expect ] ; then \ 294652298Sobrien TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ 294750448Sobrien export TCL_LIBRARY ; fi ; \ 294890081Sobrien $(RUNTEST) --tool g77 $(RUNTESTFLAGS)) 294950448Sobrien 295090081Sobriencheck-objc: $(TESTSUITEDIR)/site.exp 295190081Sobrien -(rootme=`pwd`; export rootme; \ 295290081Sobrien srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ 295390081Sobrien cd $(TESTSUITEDIR); \ 295490081Sobrien EXPECT=${EXPECT} ; export EXPECT ; \ 295590081Sobrien if [ -f $${rootme}/../expect/expect ] ; then \ 295690081Sobrien TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ 295790081Sobrien export TCL_LIBRARY ; fi ; \ 295890081Sobrien $(RUNTEST) --tool objc $(RUNTESTFLAGS)) 295990081Sobrien 296090081Sobriencheck-consistency: testsuite/site.exp 296152298Sobrien -rootme=`pwd`; export rootme; \ 296252298Sobrien srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ 296352298Sobrien cd testsuite; \ 296452298Sobrien EXPECT=${EXPECT} ; export EXPECT ; \ 296552298Sobrien if [ -f $${rootme}/../expect/expect ] ; then \ 296652298Sobrien TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ 296790081Sobrien export TCL_LIBRARY ; fi ; \ 296890081Sobrien $(RUNTEST) --tool consistency $(RUNTESTFLAGS) 296952298Sobrien 297018334Speter# These exist for maintenance purposes. 297118334Speter 297218334Speter# Update the tags table. 297318334SpeterTAGS: force 297490081Sobrien (cd $(srcdir); \ 297550448Sobrien mkdir tmp-tags; \ 297690081Sobrien mv -f c-parse.[ch] =*.[chy] tmp-tags; \ 297718334Speter etags *.y *.h *.c; \ 297850448Sobrien mv tmp-tags/* .; \ 297990081Sobrien rmdir tmp-tags) 298018334Speter 298190081Sobrien# A list of files to be destroyed during "lean" builds. 298290081SobrienVOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*` 298318334Speter 298490081Sobrien# Flags to pass to stage2 and later recursive makes. Note that the 298590081Sobrien# WARN_CFLAGS setting can't be to the expansion of GCC_WARN_CFLAGS in 298690081Sobrien# the context of the stage_x rule. 298790081SobrienSTAGE2_FLAGS_TO_PASS = \ 298890081Sobrien CFLAGS="$(BOOT_CFLAGS)" \ 298990081Sobrien LDFLAGS="$(BOOT_LDFLAGS)" \ 299090081Sobrien WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \ 299190081Sobrien STRICT_WARN="$(STRICT2_WARN)" \ 299290081Sobrien libdir=$(libdir) \ 299390081Sobrien LANGUAGES="$(LANGUAGES)" \ 299490081Sobrien MAKEOVERRIDES= \ 299590081Sobrien OUTPUT_OPTION="-o \$$@" 299618334Speter 299790081Sobrien# Only build the C compiler for stage1, because that is the only one that 299890081Sobrien# we can guarantee will build with the native compiler, and also it is the 299990081Sobrien# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS), 300090081Sobrien# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them 300190081Sobrien# overrideable (for a bootstrap build stage1 also builds gcc.info). 300290081Sobrienstage1_build: 300390081Sobrien $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \ 300490081Sobrien CFLAGS="$(STAGE1_CFLAGS)" MAKEINFO="$(MAKEINFO)" \ 300590081Sobrien MAKEINFOFLAGS="$(MAKEINFOFLAGS)" 300690081Sobrien $(STAMP) stage1_build 300790081Sobrien echo stage1_build > stage_last 300818334Speter 300990081Sobrienstage1_copy: stage1_build 301090081Sobrien $(MAKE) stage1 301190081Sobrien $(STAMP) stage1_copy 301290081Sobrien echo stage2_build > stage_last 301318334Speter 301490081Sobrienstage2_build: stage1_copy 301590081Sobrien $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ 301690081Sobrien STAGE_PREFIX=stage1/ \ 301790081Sobrien $(STAGE2_FLAGS_TO_PASS) 301890081Sobrien $(STAMP) stage2_build 301990081Sobrien echo stage2_build > stage_last 302018334Speter 302190081Sobrienstage2_copy: stage2_build 302290081Sobrien $(MAKE) stage2 302390081Sobrien $(STAMP) stage2_copy 302490081Sobrien echo stage3_build > stage_last 302518334Speter 302690081Sobrienstage3_build: stage2_copy 302790081Sobrien $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \ 302890081Sobrien STAGE_PREFIX=stage2/ \ 302990081Sobrien $(STAGE2_FLAGS_TO_PASS) 303090081Sobrien $(STAMP) stage3_build 303190081Sobrien echo stage3_build > stage_last 303252298Sobrien 303390081Sobrien# For bootstrap4: 303490081Sobrienstage3_copy: stage3_build 303590081Sobrien $(MAKE) stage3 303690081Sobrien $(STAMP) stage3_copy 303790081Sobrien echo stage4_build > stage_last 303818334Speter 303990081Sobrienstage4_build: stage3_copy 304090081Sobrien $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \ 304190081Sobrien STAGE_PREFIX=stage3/ \ 304290081Sobrien $(STAGE2_FLAGS_TO_PASS) 304390081Sobrien $(STAMP) stage4_build 304490081Sobrien echo stage4_build > stage_last 304518334Speter 304690081Sobrien# Additional steps for *-lean targets: 304790081Sobrienclean_s1: stage1_copy 304890081Sobrien -(cd stage1 && rm -f $(VOL_FILES)) 304990081Sobrien $(STAMP) clean_s1 305018334Speter 305190081Sobrienclean_s2: stage2_copy 305290081Sobrien -rm -rf stage1 305390081Sobrien $(STAMP) clean_s2 305418334Speter 305590081Sobrien# The various entry points for bootstrapping. 305650448Sobrien 305790081Sobrienbootstrap: stage3_build 305890081Sobrien @echo 305990081Sobrien @echo Bootstrap complete - make \"quickstrap\" to redo last build, 306090081Sobrien @echo \"restage1\" through \"restage3\" to rebuild specific stages, 306190081Sobrien @echo or \"cleanstrap\" to redo the bootstrap from scratch. 306290081Sobrien 306390081Sobrienbootstrap-lean : clean_s1 clean_s2 stage3_build 306490081Sobrien @echo 306590081Sobrien @echo Bootstrap complete - make \"quickstrap\" to redo last build, 306690081Sobrien @echo or \"cleanstrap\" to redo the bootstrap from scratch. 306790081Sobrien 306890081Sobrienbootstrap2: bootstrap 306990081Sobrien 307090081Sobrienbootstrap2-lean : bootstrap-lean 307190081Sobrien 307290081Sobrienbootstrap3 bootstrap3-lean: bootstrap 307390081Sobrien 307490081Sobrienbootstrap4 bootstrap4-lean: stage4_build 307590081Sobrien 307690081Sobrienunstage1 unstage2 unstage3 unstage4: 307790081Sobrien -set -vx; stage=`echo $@ | sed -e 's/un//'`; \ 307890081Sobrien rm -f $$stage/as$(exeext); \ 307990081Sobrien rm -f $$stage/ld$(exeext); \ 308090081Sobrien rm -f $$stage/collect-ld$(exeext); \ 308190081Sobrien if test -d $$stage; then \ 308290081Sobrien mv $$stage/* . 2>/dev/null; \ 308390081Sobrien for i in `cd $$stage; echo *` ; do \ 308490081Sobrien if test -d $$stage/$$i; then \ 308590081Sobrien mv $$stage/$$i/* $$i/. 2>/dev/null; \ 308690081Sobrien else \ 308790081Sobrien mv $$stage/$$i .; \ 308890081Sobrien fi; \ 308990081Sobrien done \ 309090081Sobrien fi ; \ 309190081Sobrien rm -f $${stage}_build $${stage}_copy ;\ 309290081Sobrien echo $${stage}_build > stage_last 309390081Sobrien 309490081Sobrienrestage1: unstage1 309590081Sobrien $(MAKE) stage1_build 309690081Sobrien 309790081Sobrienrestage2: unstage2 309890081Sobrien $(MAKE) LANGUAGES="$(LANGUAGES)" stage2_build 309990081Sobrien 310090081Sobrienrestage3: unstage3 310190081Sobrien $(MAKE) LANGUAGES="$(LANGUAGES)" stage3_build 310290081Sobrien 310390081Sobrienrestage4: unstage4 310490081Sobrien $(MAKE) LANGUAGES="$(LANGUAGES)" stage4_build 310590081Sobrien 310690081Sobrienbubblestrap: 310790081Sobrien if test -f stage3_build; then true; else \ 310890081Sobrien echo; echo You must \"make bootstrap\" first.; \ 310990081Sobrien exit 1; \ 311090081Sobrien fi 311190081Sobrien for i in stage3 \ 311290081Sobrien unstage1 stage1_build stage1_copy \ 311390081Sobrien unstage2 stage2_build stage2_copy \ 311490081Sobrien unstage3 stage3_build ; \ 311590081Sobrien do \ 311690081Sobrien $(MAKE) LANGUAGES="$(LANGUAGES)" $$i || exit 1 ; \ 311790081Sobrien done 311890081Sobrien 311990081Sobrienquickstrap: 312090081Sobrien if test -f stage_last ; then \ 312190081Sobrien LAST=`cat stage_last`; rm $$LAST; $(MAKE) LANGUAGES="$(LANGUAGES)" $$LAST; \ 312290081Sobrien else \ 312390081Sobrien $(MAKE) stage1_build; \ 312490081Sobrien fi 312590081Sobrien 312690081Sobriencleanstrap: 312790081Sobrien -$(MAKE) clean 312890081Sobrien $(MAKE) LANGUAGES="$(LANGUAGES)" bootstrap 312990081Sobrien 313018334Speter# Compare the object files in the current directory with those in the 313118334Speter# stage2 directory. 313218334Speter 313318334Speter# ./ avoids bug in some versions of tail. 313450448Sobriencompare compare3 compare4 compare-lean compare3-lean compare4-lean: force 313550448Sobrien -rm -f .bad_compare 313650448Sobrien case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 313718334Speter for file in *$(objext); do \ 313818334Speter tail +16c ./$$file > tmp-foo1; \ 313950448Sobrien tail +16c stage$$stage/$$file > tmp-foo2 \ 314050448Sobrien && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ 314118334Speter done 314250448Sobrien case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 314352298Sobrien for dir in tmp-foo intl $(SUBDIRS); do \ 314418334Speter if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ 314518334Speter for file in $$dir/*$(objext); do \ 314652298Sobrien tail +16c ./$$file > tmp-foo1; \ 314752298Sobrien tail +16c stage$$stage/$$file > tmp-foo2 \ 314852298Sobrien && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ 314918334Speter done; \ 315052298Sobrien else true; fi; \ 315118334Speter done 315218334Speter -rm -f tmp-foo* 315350448Sobrien case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 315450448Sobrien if [ -f .bad_compare ]; then \ 315550448Sobrien echo "Bootstrap comparison failure!"; \ 315650448Sobrien cat .bad_compare; \ 315750448Sobrien exit 1; \ 315850448Sobrien else \ 315950448Sobrien case "$@" in \ 316050448Sobrien *-lean ) rm -rf stage$$stage ;; \ 316150448Sobrien *) ;; \ 316250448Sobrien esac; true; \ 316350448Sobrien fi 316418334Speter 316518334Speter# Compare the object files in the current directory with those in the 316618334Speter# stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid 316718334Speter# running tail and the overhead of twice copying each object file. 316818334Speter 316950448Sobriengnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force 317050448Sobrien -rm -f .bad_compare 317150448Sobrien case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 317218334Speter for file in *$(objext); do \ 317350448Sobrien (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ 317418334Speter done 317550448Sobrien case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 317652298Sobrien for dir in tmp-foo intl $(SUBDIRS); do \ 317718334Speter if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ 317818334Speter for file in $$dir/*$(objext); do \ 317952298Sobrien (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ 318018334Speter done; \ 318152298Sobrien else true; fi; \ 318218334Speter done 318350448Sobrien case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 318450448Sobrien if [ -f .bad_compare ]; then \ 318550448Sobrien echo "Bootstrap comparison failure!"; \ 318650448Sobrien cat .bad_compare; \ 318750448Sobrien exit 1; \ 318850448Sobrien else \ 318950448Sobrien case "$@" in \ 319050448Sobrien *-lean ) rm -rf stage$$stage ;; \ 319150448Sobrien esac; true; \ 319250448Sobrien fi 319318334Speter 319418334Speter# Copy the object files from a particular stage into a subdirectory. 319518334Speterstage1-start: 319618334Speter -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi 319790081Sobrien $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage1 319852298Sobrien -for dir in intl $(SUBDIRS) ; \ 319918334Speter do \ 320018334Speter if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \ 320118334Speter done 320218334Speter -mv $(STAGESTUFF) stage1 320352298Sobrien -mv intl/*$(objext) stage1/intl 320418334Speter# Copy as/ld if they exist to stage dir, so that running xgcc from the stage 320518334Speter# dir will work properly. 320690081Sobrien -if [ -f as$(exeext) ] ; then (cd stage1 && $(LN_S) ../as$(exeext) .) ; else true ; fi 320790081Sobrien -if [ -f ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../ld$(exeext) .) ; else true ; fi 320890081Sobrien -if [ -f collect-ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi 320990081Sobrien -rm -f stage1/libgcc.a stage1/libgcc_eh.a 321018334Speter -cp libgcc.a stage1 321152298Sobrien -if $(RANLIB_TEST_FOR_TARGET) ; then \ 321252298Sobrien $(RANLIB_FOR_TARGET) stage1/libgcc.a; \ 321352298Sobrien else true; fi 321490081Sobrien -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage1; \ 321590081Sobrien if $(RANLIB_TEST_FOR_TARGET) ; then \ 321690081Sobrien $(RANLIB_FOR_TARGET) stage1/libgcc_eh.a; \ 321790081Sobrien else true; fi; fi 321850448Sobrien -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ 321950448Sobrien cp stage1/$${f} . ; \ 322050448Sobrien else true; \ 322150448Sobrien fi; done 322218334Speterstage1: force stage1-start lang.stage1 322318334Speter 322418334Speterstage2-start: 322518334Speter -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi 322690081Sobrien $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage2 322752298Sobrien -for dir in intl $(SUBDIRS) ; \ 322818334Speter do \ 322918334Speter if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \ 323018334Speter done 323118334Speter -mv $(STAGESTUFF) stage2 323252298Sobrien -mv intl/*$(objext) stage2/intl 323318334Speter# Copy as/ld if they exist to stage dir, so that running xgcc from the stage 323418334Speter# dir will work properly. 323590081Sobrien -if [ -f as$(exeext) ] ; then (cd stage2 && $(LN_S) ../as$(exeext) .) ; else true ; fi 323690081Sobrien -if [ -f ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../ld$(exeext) .) ; else true ; fi 323790081Sobrien -if [ -f collect-ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi 323890081Sobrien -rm -f stage2/libgcc.a stage2/libgcc_eh.a 323918334Speter -cp libgcc.a stage2 324052298Sobrien -if $(RANLIB_TEST_FOR_TARGET) ; then \ 324152298Sobrien $(RANLIB_FOR_TARGET) stage2/libgcc.a; \ 324252298Sobrien else true; fi 324390081Sobrien -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage2; \ 324490081Sobrien if $(RANLIB_TEST_FOR_TARGET) ; then \ 324590081Sobrien $(RANLIB_FOR_TARGET) stage2/libgcc_eh.a; \ 324690081Sobrien else true; fi; fi 324750448Sobrien -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ 324850448Sobrien cp stage2/$${f} . ; \ 324950448Sobrien else true; \ 325050448Sobrien fi; done 325118334Speterstage2: force stage2-start lang.stage2 325218334Speter 325318334Speterstage3-start: 325418334Speter -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi 325590081Sobrien $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage3 325652298Sobrien -for dir in intl $(SUBDIRS) ; \ 325718334Speter do \ 325818334Speter if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \ 325918334Speter done 326018334Speter -mv $(STAGESTUFF) stage3 326152298Sobrien -mv intl/*$(objext) stage3/intl 326218334Speter# Copy as/ld if they exist to stage dir, so that running xgcc from the stage 326318334Speter# dir will work properly. 326490081Sobrien -if [ -f as$(exeext) ] ; then (cd stage3 && $(LN_S) ../as$(exeext) .) ; else true ; fi 326590081Sobrien -if [ -f ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../ld$(exeext) .) ; else true ; fi 326690081Sobrien -if [ -f collect-ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi 326790081Sobrien -rm -f stage3/libgcc.a stage3/libgcc_eh.a 326818334Speter -cp libgcc.a stage3 326952298Sobrien -if $(RANLIB_TEST_FOR_TARGET) ; then \ 327052298Sobrien $(RANLIB_FOR_TARGET) stage3/libgcc.a; \ 327152298Sobrien else true; fi 327290081Sobrien -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage3; \ 327390081Sobrien if $(RANLIB_TEST_FOR_TARGET) ; then \ 327490081Sobrien $(RANLIB_FOR_TARGET) stage3/libgcc_eh.a; \ 327590081Sobrien else true; fi; fi 327650448Sobrien -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ 327750448Sobrien cp stage3/$${f} . ; \ 327850448Sobrien else true; \ 327950448Sobrien fi; done 328018334Speterstage3: force stage3-start lang.stage3 328118334Speter 328218334Speterstage4-start: 328318334Speter -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi 328490081Sobrien $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage4 328552298Sobrien -for dir in intl $(SUBDIRS) ; \ 328618334Speter do \ 328718334Speter if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \ 328818334Speter done 328918334Speter -mv $(STAGESTUFF) stage4 329052298Sobrien -mv intl/*$(objext) stage4/intl 329118334Speter# Copy as/ld if they exist to stage dir, so that running xgcc from the stage 329218334Speter# dir will work properly. 329390081Sobrien -if [ -f as$(exeext) ] ; then (cd stage4 && $(LN_S) ../as$(exeext) .) ; else true ; fi 329490081Sobrien -if [ -f ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../ld$(exeext) .) ; else true ; fi 329590081Sobrien -if [ -f collect-ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi 329690081Sobrien -rm -f stage4/libgcc.a stage4/libgcc_eh.a 329718334Speter -cp libgcc.a stage4 329852298Sobrien -if $(RANLIB_TEST_FOR_TARGET) ; then \ 329952298Sobrien $(RANLIB_FOR_TARGET) stage4/libgcc.a; \ 330052298Sobrien else true; fi 330190081Sobrien -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage4; \ 330290081Sobrien if $(RANLIB_TEST_FOR_TARGET) ; then \ 330390081Sobrien $(RANLIB_FOR_TARGET) stage4/libgcc_eh.a; \ 330490081Sobrien else true; fi; fi 330550448Sobrien -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ 330650448Sobrien cp stage4/$${f} . ; \ 330750448Sobrien else true; \ 330850448Sobrien fi; done 330918334Speterstage4: force stage4-start lang.stage4 331018334Speter 331118334Speter# Copy just the executable files from a particular stage into a subdirectory, 331218334Speter# and delete the object files. Use this if you're just verifying a version 331318334Speter# that is pretty sure to work, and you are short of disk space. 331418334Speterrisky-stage1: stage1 331590081Sobrien -$(MAKE) clean 331618334Speter 331718334Speterrisky-stage2: stage2 331890081Sobrien -$(MAKE) clean 331918334Speter 332018334Speterrisky-stage3: stage3 332190081Sobrien -$(MAKE) clean 332218334Speter 332318334Speterrisky-stage4: stage4 332490081Sobrien -$(MAKE) clean 332518334Speter 332618334Speter#In GNU Make, ignore whether `stage*' exists. 332718334Speter.PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap 332818334Speter.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 332918334Speter 333018334Speterforce: 333150448Sobrien 333250448Sobrien# --- 333350448Sobrien# The enquire rules are still useful for building new float-anything.h. 333450448Sobrien# Special flags for compiling enquire. 333550448Sobrien# We disable optimization to make floating point more reliable. 333650448SobrienENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 333750448SobrienENQUIRE_LDFLAGS = $(LDFLAGS) 333850448Sobrien 333950448Sobrien# Enquire target (This is a variable so that a target can choose not to 334050448Sobrien# build it.) 334150448SobrienENQUIRE = enquire 334250448Sobrien 334350448Sobrien# Test to see whether <float.h> exists in the system header files, 334450448Sobrien# and is not derived from GCC. 334550448SobrienFLOAT_H_TEST = \ 334650448Sobrien [ -f $(SYSTEM_HEADER_DIR)/float.h ] && \ 334750448Sobrien if grep 'ifndef _FLOAT_H___' $(SYSTEM_HEADER_DIR)/float.h >/dev/null; \ 334850448Sobrien then false; \ 334950448Sobrien else :; fi 335050448Sobrien# We pretend to not having a usable <float.h>, hence disable the FLOAT_H_TEST 335150448Sobrien# to ensure, we're emitting a full blown <float.h> ourselves. 335250448SobrienFLOAT_H_TEST = false 335350448Sobrien 335450448Sobrien# Used to compile enquire with standard cc, but have forgotten why. 335550448Sobrien# Let's try with GCC. 335650448Sobrienenquire: enquire.o $(GCC_PARTS) 335750448Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@ 335850448Sobrienenquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs 335950448Sobrien if $(FLOAT_H_TEST); then \ 336050448Sobrien rm -f include/float.h; \ 336150448Sobrien SYS_FLOAT_H_WRAP=1; \ 336250448Sobrien else :; \ 336350448Sobrien SYS_FLOAT_H_WRAP=0; \ 336450448Sobrien fi; \ 336550448Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) \ 336650448Sobrien -DSYS_FLOAT_H_WRAP=$$SYS_FLOAT_H_WRAP \ 336790081Sobrien -I. -c $(srcdir)/enquire.c $(OUTPUT_OPTION) 336850448Sobrien 336950448Sobrien# Create float.h source for the native machine. 337050448Sobrien# Make it empty if we can use the system float.h without changes. 337150448Sobrienfloat.h-nat: enquire 337250448Sobrien -./enquire -f > tmp-float.h 337350448Sobrien grep '#define [^_]' tmp-float.h >/dev/null || true > tmp-float.h 337450448Sobrien mv tmp-float.h float.h-nat 337550448Sobrien 337650448Sobrien# Create a dummy float.h source for a cross-compiler. 337750448Sobrien# ??? This isn't used anymore. Should we create config/float-unkn.h 337850448Sobrien# and make that the default float_format in configure? 337950448Sobrienfloat.h-cross: 338050448Sobrien echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross 338150448Sobrien echo "#error float.h values not known for cross-compiler" >> t-float.h-cross 338250448Sobrien echo "#endif" >> t-float.h-cross 338350448Sobrien mv t-float.h-cross float.h-cross 338450448Sobrien 338590081Sobrien# Rules for generating translated message descriptions. 338690081Sobrien# Disabled by autoconf if the tools are not available. 338790081Sobrien 338890081SobrienXGETTEXT = @XGETTEXT@ 338990081SobrienGMSGFMT = @GMSGFMT@ 339090081SobrienMSGMERGE = msgmerge 339190081Sobrien 339290081SobrienPACKAGE = @PACKAGE@ 339390081SobrienCATALOGS = @CATALOGS@ 339490081Sobrien 339590081Sobrien.PHONY: build- install- build-po install-po update-po 339690081Sobrien 339790081Sobrien# Dummy rules to deal with dependencies produced by use of 339890081Sobrien# "build-@POSUB@" and "install-@POSUB@" above, when NLS is disabled. 339990081Sobrienbuild-: ; @true 340090081Sobrieninstall-: ; @true 340190081Sobrien 340290081Sobrienbuild-po: $(CATALOGS) 340390081Sobrien 340490081Sobrien# This notation should be acceptable to all Make implementations used 340590081Sobrien# by people who are interested in updating .po files. 340690081Sobrienupdate-po: $(CATALOGS:.gmo=.pox) 340790081Sobrien 340890081Sobrien# N.B. We do not attempt to copy these into $(srcdir). The snapshot 340990081Sobrien# script does that. 341090081Sobrien.po.gmo: 341190081Sobrien -test -d po || mkdir po 341290081Sobrien $(GMSGFMT) --statistics -o $@ $< 341390081Sobrien 341490081Sobrien# The new .po has to be gone over by hand, so we deposit it into 341590081Sobrien# build/po with a different extension. 341690081Sobrien# If build/po/$(PACKAGE).pot exists, use it (it was just created), 341790081Sobrien# else use the one in srcdir. 341890081Sobrien.po.pox: 341990081Sobrien -test -d po || mkdir po 342090081Sobrien $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \ 342190081Sobrien then echo po/$(PACKAGE).pot; \ 342290081Sobrien else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@ 342390081Sobrien 342490081Sobrien# This rule has to look for .gmo modules in both srcdir and 342590081Sobrien# the cwd, and has to check that we actually have a catalog 342690081Sobrien# for each language, in case they weren't built or included 342790081Sobrien# with the distribution. 342890081Sobrieninstall-po: 342990081Sobrien $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir) 343090081Sobrien for cat in $(CATALOGS); do \ 343190081Sobrien lang=`basename $$cat | sed 's/\.gmo$$//'`; \ 343290081Sobrien if [ -f $$cat ]; then :; \ 343390081Sobrien elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \ 343490081Sobrien else continue; \ 343590081Sobrien fi; \ 343690081Sobrien dir=$(localedir)/$$lang/LC_MESSAGES; \ 343790081Sobrien echo $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$$dir; \ 343890081Sobrien $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$$dir || exit 1; \ 343990081Sobrien echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ 344090081Sobrien $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ 344190081Sobrien done 344290081Sobrien 344390081Sobrien# Rule for regenerating the message template (gcc.pot). 344490081Sobrien# Instead of forcing everyone to edit POTFILES.in, which proved impractical, 344590081Sobrien# this rule has no dependencies and always regenerates gcc.pot. This is 344690081Sobrien# relatively harmless since the .po files do not directly depend on it. 344790081Sobrien# Note that exgettext has an awk script embedded in it which requires a 344890081Sobrien# fairly modern (POSIX-compliant) awk. 344990081Sobrien# The .pot file is left in the build directory. 345090081Sobrien$(PACKAGE).pot: po/$(PACKAGE).pot 345190081Sobrienpo/$(PACKAGE).pot: force 345290081Sobrien -test -d po || mkdir po 345390081Sobrien $(MAKE) po-generated 345490081Sobrien AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \ 345590081Sobrien $(XGETTEXT) $(PACKAGE) $(srcdir) 3456