# should be built using the target tools.
TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
+# Target libraries are put under this directory:
+TARGET_SUBDIR = . # Changed by configure to $(target_alias) if cross.
+
# This is set by the configure script to the arguments passed to configure.
CONFIG_ARGUMENTS =
CC_FOR_TARGET = ` \
if [ -f $$r/gcc/Makefile ] ; then \
- if [ -f $$r/newlib/Makefile ] ; then \
- echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
+ if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
+ echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
else \
echo $$r/gcc/xgcc -B$$r/gcc/; \
fi; \
CXX_FOR_TARGET = ` \
if [ -f $$r/gcc/Makefile ] ; then \
- if [ -f $$r/newlib/Makefile ] ; then \
- echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
+ if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
+ echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
else \
echo $$r/gcc/xgcc -B$$r/gcc/; \
fi; \
# This is a list of the targets for all of the modules which are compiled
# using $(TARGET_FLAGS_TO_PASS).
-# RENAME these all-xinberty should be all-target-libiberty
ALL_TARGET_MODULES = \
all-target-libio \
all-target-libstdc++ \
# This is a list of the install targets for all of the modules which are
# compiled using $(TARGET_FLAGS_TO_PASS).
-CROSS=native # or CROSS=cross
-# Target libraries are put under this directory:
-TARGET_SUBDIR = . # Changed by configure to $(target_alias) if cross.
-
INSTALL_TARGET_MODULES = \
install-target-libio \
install-target-libstdc++ \
$${target}); \
then true; else exit 1; fi; \
else true; fi; \
- done;\
+ done
+ @target=`echo $@ | sed -e 's/^do-//'`; \
+ r=`pwd`; export r; \
+ srcroot=`cd $(srcdir); pwd`; export srcroot; \
for i in $(TARGET_CONFIGDIRS) -dummy-; do \
if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
for flag in $(EXTRA_TARGET_FLAGS); do \
configure-target-newlib: $(ALL_GCC)
all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
all-opcodes: all-bfd
-all-patch:
+all-patch: all-libiberty
all-prms: all-libiberty
all-rcs:
all-readline:
all-tgas: all-libiberty all-bfd
all-time:
all-wdiff:
-all-target-winsup: all-target-newlib
+all-target-winsup: all-target-newlib configure-target-winsup
configure-target-winsup: configure-target-newlib
all-uudecode: all-libiberty
configure-target-libiberty: $(ALL_GCC)