$(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
$(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
$(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
- $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) \
+ $(srcdir)/ginclude/va-c4x.h $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) \
$(srcdir)/ginclude/proto.h $(srcdir)/ginclude/stdbool.h
# Target to use whe installing assert.h. Some systems may
# The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
# Usually the one we just built.
# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
-GCC_FOR_TARGET = ./xgcc -B./
+GCC_FOR_TARGET = ./xgcc -B./ -B$(build_tooldir)/bin/
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
libdir = @libdir@
# Directory in which the compiler finds executables, libraries, etc.
libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
+# Used to produce a relative $(tooldir) in gcc.o
+unlibsubdir = ../../..
# Directory in which the compiler finds g++ includes.
gxx_include_dir= @gxx_include_dir@
-# Directory in which the old g++ header files may be found.
-# The reason we use $(libdir)/g++-include rather than using libsubdir
-# is for compatibility with older versions of libg++.
-old_gxx_include_dir= $(libdir)/g++-include
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.
mandir = @mandir@/man1
# Directory in which to find other cross-compilation tools and headers.
# Used in install-cross.
-tooldir = $(exec_prefix)/$(target_alias)
+tooldir = $(libsubdir)/$(unlibsubdir)/../$(target_alias)
+# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
+build_tooldir = $(exec_prefix)/$(target_alias)
# Dir for temp files.
tmpdir = /tmp
all.indirect: $(ALL)
-# IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
-# ??? IN_GCC should be obsolete now.
+# IN_GCC tells various files that system.h, toplev.c, etc are available.
INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
# This is the variable actually used when we compile.
# How to link with both our special library facilities
# and the system's installed libraries.
-LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(CLIB)
+LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(CLIB) \
+ ../libiberty/libiberty.a
# Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC.
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
+INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include
# Always use -I$(srcdir)/config when compiling.
.c.o:
insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
profile.o insn-attrtab.o $(out_object_file) getpwd.o $(EXTRA_OBJS) convert.o \
- mbchar.o dyn-string.o
+ mbchar.o dyn-string.o splay-tree.o
# GEN files are listed separately, so they can be built before doing parallel
# makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
gcc-cross: xgcc$(exeext)
cp xgcc$(exeext) gcc-cross$(exeext)
-cc1$(exeext): $(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(LIBS)
+cc1$(exeext): $(P) $(OBJS) $(C_OBJS) $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) $(LIBS)
# Copy float.h from its source.
gfloat.h: $(FLOAT_H)
$(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
$(srcdir)/c-gperf.h: c-parse.gperf
- gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
- $(srcdir)/c-parse.gperf >tmp-gperf.h
+ gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \
+ -k1,3,$$ $(srcdir)/c-parse.gperf >tmp-gperf.h
$(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \
cplus-dem.o underscore.o version.o choose-temp.o mkstemp.o $(LIBS)
-collect2.o : collect2.c $(CONFIG_H) system.h gansidecl.h gstab.h obstack.h \
- $(DEMANGLE_H)
+collect2.o : collect2.c $(CONFIG_H) system.h gansidecl.h gstab.h \
+ $(srcdir)/../include/obstack.h $(DEMANGLE_H)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
-c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
$(LN_S) $(srcdir)/../libiberty/pexecute.c pexecute.c
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) pexecute.c
+vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(CONFIG_H) system.h gansidecl.h
+ rm -f vfprintf.c
+ $(LN_S) $(srcdir)/../libiberty/vfprintf.c vfprintf.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) vfprintf.c
+
+splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \
+ $(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h \
+ gansidecl.h
+ rm -f splay-tree.c
+ $(LN_S) $(srcdir)/../libiberty/splay-tree.c splay-tree.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) splay-tree.c
+
underscore.c: s-under ; @true
s-under: $(GCC_PASSES)
# A file used by all variants of C.
c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
- flags.h toplev.h output.h
+ flags.h toplev.h output.h c-pragma.h $(RTL_H)
# Language-independent files.
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
gencheck.o $(HOST_LIBS)
-gencheck.o : gencheck.c hconfig.h system.h
+gencheck.o : gencheck.c hconfig.h system.h gansidecl.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencheck.c
dumpvers: dumpvers.c
version.o: version.c
-obstack.o: obstack.c $(CONFIG_H)
-choose-temp.o: choose-temp.c $(CONFIG_H) gansidecl.h system.h
-mkstemp.o: mkstemp.c $(CONFIG_H) gansidecl.h system.h
+obstack.o: $(srcdir)/../libiberty/obstack.c $(CONFIG_H)
+ rm -f obstack.c
+ $(LN_S) $(srcdir)/../libiberty/obstack.c obstack.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) obstack.c
+
+choose-temp.o: $(srcdir)/../libiberty/choose-temp.c $(CONFIG_H) gansidecl.h \
+ system.h
+ rm -f choose-temp.c
+ $(LN_S) $(srcdir)/../libiberty/choose-temp.c choose-temp.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) choose-temp.c
+
+mkstemp.o: $(srcdir)/../libiberty/mkstemp.c $(CONFIG_H) gansidecl.h system.h
+ rm -f mkstemp.c
+ $(LN_S) $(srcdir)/../libiberty/mkstemp.c mkstemp.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) mkstemp.c
+
prefix.o: prefix.c $(CONFIG_H) system.h gansidecl.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DPREFIX=\"$(prefix)\" \
toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h dwarfout.h \
- dwarf2out.h sdbout.h dbxout.h \
+ dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
$(lang_options_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
-DTARGET_NAME=\"$(target_alias)\" \
toplev.h
sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) defaults.h real.h \
- insn-config.h obstack.h xcoffout.h c-pragma.h sdbout.h toplev.h
+ insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \
+ sdbout.h toplev.h
dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
flags.h toplev.h output.h dbxout.h
emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
except.h function.h $(REGS_H) insn-config.h $(RECOG_H) real.h \
- $(EXPR_H) obstack.h hard-reg-set.h bitmap.h
+ $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h
real.o : real.c $(CONFIG_H) system.h $(TREE_H) toplev.h
getpwd.o : getpwd.c $(CONFIG_H) system.h
insn-config.h insn-flags.h $(RECOG_H) $(EXPR_H) real.h except.h \
toplev.h
stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \
- flags.h toplev.h
+ $(BASIC_BLOCK_H) insn-config.h reload.h flags.h toplev.h
cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h
gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h
profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \
- gcov-io.h $(TREE_H) output.h $(REGS_H) toplev.h
+ gcov-io.h $(TREE_H) output.h $(REGS_H) toplev.h insn-config.h
loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
insn-flags.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) real.h \
toplev.h
unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
- $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h
+ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h recog.h
combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h \
insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
$(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
insn-attr.h toplev.h
bitmap.o : bitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H) \
$(REGS_H)
-global.o : global.c $(CONFIG_H) system.h $(RTL_H) flags.h \
+global.o : global.c $(CONFIG_H) system.h $(RTL_H) flags.h reload.h \
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h output.h toplev.h
varray.o : varray.c $(CONFIG_H) system.h varray.h $(RTL_H) $(TREE_H) bitmap.h
$(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h \
$(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
$(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
- $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
- toplev.h
+ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h \
+ insn-attr.h toplev.h recog.h
final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
$(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h
recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) \
$(REGS_H) $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
- insn-flags.h insn-codes.h real.h
+ insn-flags.h insn-codes.h real.h toplev.h
reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) \
$(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h
dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h gansidecl.h
# Normally this target is not used; but it is used if you
# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
# from the GNU Emacs distribution.
-alloca.o: alloca.c
+alloca.o: $(srcdir)/../libiberty/alloca.c
+ rm -f alloca.c
+ $(LN_S) $(srcdir)/../libiberty/alloca.c alloca.c
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
- -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
+ -c `echo alloca.c | sed 's,^\./,,'`
$(ALLOCA_FINISH)
#\f
# Generate header and source files from the machine description,
touch s-codes
insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
- insn-config.h insn-flags.h insn-codes.h system.h reload.h
+ insn-config.h insn-flags.h insn-codes.h system.h reload.h recog.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
insn-emit.c: s-emit ; @true
$(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
touch s-opinit
-insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h
+insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h \
+ insn-config.h recog.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
insn-extract.c: s-extract ; @true
$(srcdir)/move-if-change tmp-extract.c insn-extract.c
touch s-extract
-insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h system.h
+insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \
+ system.h insn-config.h recog.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
insn-peep.c: s-peep ; @true
$(srcdir)/move-if-change tmp-peep.c insn-peep.c
touch s-peep
-insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h output.h \
- insn-attr.h insn-config.h system.h
+insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \
+ output.h insn-attr.h insn-config.h system.h toplev.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
insn-attr.h: s-attr ; @true
sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
-$(HOST_PREFIX_1)alloca.o: alloca.c
+$(HOST_PREFIX_1)alloca.o: $(srcdir)/../libiberty/alloca.c
rm -f $(HOST_PREFIX)alloca.c
- cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
+ $(LN_S) $(srcdir)/../libiberty/alloca.c $(HOST_PREFIX)alloca.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
-$(HOST_PREFIX_1)obstack.o: obstack.c
+$(HOST_PREFIX_1)obstack.o: $(srcdir)/../libiberty/obstack.c
rm -f $(HOST_PREFIX)obstack.c
- sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
+ sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/obstack.c > $(HOST_PREFIX)obstack.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
$(HOST_PREFIX_1)vfprintf.o: $(srcdir)/../libiberty/vfprintf.c
rm -f $(HOST_PREFIX)vfprintf.c
- sed -e 's/config[.]h/hconfig.h/' $(srcdir)../libiberty/vfprintf.c > $(HOST_PREFIX)vfprintf.c
+ sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/vfprintf.c > $(HOST_PREFIX)vfprintf.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)vfprintf.c
$(HOST_PREFIX_1)doprint.o: doprint.c
$(srcdir)/cexp.c: $(srcdir)/cexp.y
cd $(srcdir); $(BISON) -o cexp.c cexp.y
+# We use $(libsubdir)/$(unlibsubdir) to match the
+# -iprefix argument which gcc will pass if GCC_EXEC_PREFIX is used.
cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status system.h gansidecl.h \
mbchar.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
- -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
-c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
-cppmain$(exeext): cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
- prefix.o version.o mbchar.o @extra_cpp_objs@ $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
- mbchar.o @extra_cpp_objs@ \
- cppalloc.o cpperror.o cppexp.o prefix.o version.o $(LIBS)
+LIBCPP_OBJS = cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o cppfiles.o \
+ cppulp.o prefix.o version.o mbchar.o @extra_cpp_objs@
+
+libcpp.a: $(LIBCPP_OBJS)
+ $(AR) $(ARFLAGS) libcpp.a $(LIBCPP_OBJS)
+
+cppmain$(exeext): cppmain.o libcpp.a $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \
+ libcpp.a $(LIBS)
cppmain.o: cppmain.c $(CONFIG_H) cpplib.h system.h gansidecl.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
- -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
cppexp.o: cppexp.c $(CONFIG_H) cpplib.h system.h gansidecl.h
+cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h system.h gansidecl.h
+
cpphash.o: cpphash.c cpplib.h cpphash.h $(CONFIG_H) system.h gansidecl.h
cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h system.h gansidecl.h
unprotoize.o getopt.o getopt1.o getpwd.o version.o \
pexecute.o choose-temp.o mkstemp.o $(LIBS)
-protoize.o: protoize.c getopt.h $(CONFIG_H) system.h
+protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
- -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
+ -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DSTD_PROTO_DIR=\"$(libsubdir)\" \
$(srcdir)/protoize.c
-unprotoize.o: unprotoize.c protoize.c getopt.h $(CONFIG_H) system.h
+unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
- -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
+ -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DSTD_PROTO_DIR=\"$(libsubdir)\" \
$(srcdir)/unprotoize.c
-getopt.o: getopt.c getopt.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
-getopt1.o: getopt1.c getopt.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
+getopt.o: $(srcdir)/../libiberty/getopt.c $(srcdir)/../include/getopt.h
+ rm -f getopt.c
+ $(LN_S) $(srcdir)/../libiberty/getopt.c getopt.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt.c
+
+getopt1.o: $(srcdir)/../libiberty/getopt1.c $(srcdir)/../include/getopt.h
+ rm -f getopt1.c
+ $(LN_S) $(srcdir)/../libiberty/getopt1.c getopt1.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt1.c
# This info describes the target machine, so compile with GCC just built.
SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
$(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
else true; fi; \
done; \
- rm -f include/assert.h; \
- cp $(srcdir)/assert.h include/assert.h; \
- chmod a+r include/assert.h; \
+ if [ x$(INSTALL_ASSERT_H) != x ] ; \
+ then \
+ rm -f include/assert.h; \
+ cp $(srcdir)/assert.h include/assert.h; \
+ chmod a+r include/assert.h; \
+ fi \
else true; \
fi
rm -f include/syslimits.h
cp $(srcdir)/gsyslimits.h include/syslimits.h; \
fi
chmod a+r include/syslimits.h
+# If $(SYSTEM_HEADER_DIR) is $(tooldir)/sys-include, and
+# that directory exists, then make sure that $(libsubdir) exists.
+# This is because cpp is compiled to find $(tooldir)/include via
+# $(libsubdir)/$(unlibsubdir), which will only work if $(libsubdir)
+# exists.
+ if [ "$(SYSTEM_HEADER_DIR)" = "$(tooldir)/sys-include" ] \
+ && [ -d $(tooldir)/sys-include ]; then \
+ if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \
+ if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \
+ if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \
+ if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \
+ else true; fi
+
touch stmp-fixinc
# Files related to the fixproto script.
rm -rf fixtmp.c
fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
- cpplib.o cpphash.o cppalloc.o cppexp.o prefix.o version.o
+ libcpp.a
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
- scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o prefix.o \
- version.o cppexp.o $(HOST_LIBS)
+ scan-decls.o scan.o libcpp.a $(HOST_LIBS)
-fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file) \
- system.h cpplib.h cpphash.h
+fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \
+ xsys-protos.h $(build_xm_file) system.h cpplib.h cpphash.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h gansidecl.h
tar -chf tmp-gcc.xtar gcc-$(version)
distdir-cvs: force
- if [ -d $(srcdir)/CVS ]; then cvs -r update; fi
+ if [ -d $(srcdir)/CVS ]; then cd $(srcdir) && cvs -r update; fi
# This target exists to do the initial work before the language specific
# stuff gets done.
awk '$$1 " " $$2 " " $$3 == "This directory contains" \
{ $$6 = version; print $$0 } \
$$1 " " $$2 " " $$3 != "This directory contains"' \
- version=$(version) README > tmp.README
+ version=$(version) $(srcdir)/README > tmp.README
mv tmp.README README
-rm -rf gcc-$(version) tmp
# Put all the files in a temporary subdirectory
mkdir tmp
mkdir tmp/config
mkdir tmp/ginclude
- for file in *[0-9a-zA-Z+]; do \
- $(LN) $$file tmp; \
+ mkdir tmp/objc
+ for file in `(cd $(srcdir) && echo *[0-9a-zA-Z+])`; do \
+ test -f $(srcdir)/$$file && $(LN_S) $(srcdir)/$$file tmp; \
done
- cd config; \
- for file in *[0-9a-zA-Z+]; do \
- if test -d $$file && test "$$file" != RCS && test "$$file" != CVS; then \
- mkdir ../tmp/config/$$file; \
- cd $$file; \
- for subfile in *[0-9a-zA-Z+]; do \
- $(LN) $$subfile ../../tmp/config/$$file; \
+ if test "$(srcdir)" != "." ; then \
+ for file in c-parse.c cexp.c ; do \
+ test -f ./$$file && $(LN_S) ../$$file tmp; \
+ done; \
+ fi
+ for file in `(cd $(srcdir)/config && echo *[0-9a-zA-Z+])`; do \
+ if test -d $(srcdir)/config/$$file \
+ && test "$$file" != RCS && test "$$file" != CVS; then \
+ mkdir tmp/config/$$file; \
+ for subfile in `(cd $(srcdir)/config/$$file && echo *[0-9a-zA-Z+])`; do \
+ $(LN_S) $(srcdir)/config/$$file/$$subfile tmp/config/$$file; \
done; \
- cd ..; \
else \
- $(LN) $$file ../tmp/config; \
+ $(LN_S) $(srcdir)/config/$$file tmp/config; \
fi; \
done
- cd ginclude; \
- for file in *[0-9a-zA-Z+]; do \
- $(LN) $$file ../tmp/ginclude; \
+ for file in `(cd $(srcdir)/ginclude && echo *[0-9a-zA-Z+])`; do \
+ $(LN_S) $(srcdir)/ginclude/$$file tmp/ginclude; \
done
- cd objc; \
- for file in *[0-9a-zA-Z+]; do \
- $(LN) $$file ../tmp/objc; \
+ for file in `(cd $(srcdir)/objc && echo *[0-9a-zA-Z+])`; do \
+ $(LN_S) $(srcdir)/objc/$$file tmp/objc; \
done
- $(LN) .gdbinit tmp
+ $(LN_S) .gdbinit tmp
# Finish making `distdir', after the languages have done their thing.
distdir-finish:
# To prevent `make install' from compiling alloca.o and then relinking cc1
# because alloca.o is newer, we permit these recursive makes to compile
# alloca.o. Then cc1 is newer, so it won't have to be relinked.
- $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
+ $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
$(MAKE) stage2
-if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi
- $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+ $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap2 bootstrap2-lean: force
- $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
+ $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
$(MAKE) stage2
-if test $@ = bootstrap2-lean; then rm -rf stage1; else true; fi
- $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+ $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap3 bootstrap3-lean: force
- $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+ $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap4 bootstrap4-lean: force
- $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
+ $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
# Compare the object files in the current directory with those in the
# stage2 directory.