Index: Makefile.am
===================================================================
--- Makefile.am	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ Makefile.am	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -55,5 +55,5 @@
 
 noinst_SCRIPTS = \
-autogen
+bootstrap
 
 EXTRA_DIST = \
Index: togen
===================================================================
--- autogen	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ 	(revision )
@@ -1,114 +1,0 @@
-#!/bin/sh
-#
-# helps bootstrapping, when checked out from CVS
-# requires GNU autoconf and GNU automake
-#
-# $Id$
-
-# this is not meant to be exported outside the source tree
-
-# NOTE: Inspired by libtool's autogen script
-
-# to be run from the toplevel directory of RTEMS'
-# source tree
-
-progname=`basename $0`
-verbose="";
-quiet="false"
-mode="generate"
-
-usage()
-{
-  echo
-  echo "usage: ${progname} [-h|-q|-v]"
-  echo
-  echo "options:"
-  echo "	-h .. display this message and exit";
-  echo "	-q .. quiet, don't display directories";
-  echo "	-v .. verbose, pass -v to automake when invoking automake"
-  echo "	-c .. clean, remove all aclocal/autoconf/automake generated files"
-  echo
-  exit 1;
-}
-
-if test ! -f VERSION; then
-  echo "${progname}:"
-  echo "	Please change directory to RTEMS's toplevel directory"
-  exit 1;
-fi
-
-while test $# -gt 0; do
-case $1 in
--h|--he|--hel|--help)
-  usage ;;
--q|--qu|--qui|--quie|--quiet)
-  quiet="true";
-  shift;;
--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
-  verbose="-v";
-  shift;;
--c|--cl|--cle|--clea|--clean)
-  mode="clean";
-  shift;;
--*) echo "unknown option $1" ;
-  usage ;;
-*) echo "invalid parameter $1" ;
-  usage ;;
-esac
-done
-
-pwd=`pwd`;
-
-case $mode in
-generate)
-  confs=`find $pwd -name 'configure.in' -print`
-  aclocal_dir=$pwd/aclocal
-  for i in $confs; do
-  dir=`dirname $i`;
-  ( test "$quiet" = "true" || echo "$dir";
-    cd $dir;
-    aclocal -I $aclocal_dir;
-    autoconf;
-    test -f Makefile.am && automake $verbose ;
-    test -n "`grep CONFIG_HEADER configure.in`" && autoheader ;
-    test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
-      && echo timestamp > stamp-h.in
-  )
-  done
-  ;;
-clean)
-  test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
-  files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;
-  for i in $files; do if test -f $i; then
-    rm -f $i
-    test "$verbose" = "-v" && echo "$i"    
-  fi; done
-
-  test "$quiet" = "true" || echo "removing configure files"
-  files=`find . -name 'configure' -print` ;
-  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
-  for i in $files; do if test -f $i; then
-    rm -f $i
-    test "$verbose" = "-v" && echo "$i"    
-  fi; done
-  
-  test "$quiet" = "true" || echo "removing aclocal.m4 files"
-  files=`find . -name 'aclocal.m4' -print` ;
-  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
-  for i in $files; do if test -f $i; then
-    rm -f $i
-    test "$verbose" = "-v" && echo "$i"    
-  fi; done
-
-  find . -name '*~' -print | xargs rm -f
-  find . -name '*.orig' -print | xargs rm -f
-  find . -name '*.rej' -print | xargs rm -f
-  find . -name 'config.status' -print | xargs rm -f
-  find . -name 'config.log' -print | xargs rm -f
-  find . -name 'config.cache' -print | xargs rm -f
-  find . -name 'Makefile' -print | xargs rm -f
-  find . -name '.deps' -print | xargs rm -rf
-  find . -name '.libs' -print | xargs rm -rf
-  find . -name 'stamp-h.in' | xargs rm -rf
-  ;;
-esac
Index: bootstrap
===================================================================
--- bootstrap	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
+++ bootstrap	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -0,0 +1,114 @@
+#!/bin/sh
+#
+# helps bootstrapping, when checked out from CVS
+# requires GNU autoconf and GNU automake
+#
+# $Id$
+
+# this is not meant to be exported outside the source tree
+
+# NOTE: Inspired by libtool's autogen script
+
+# to be run from the toplevel directory of RTEMS'
+# source tree
+
+progname=`basename $0`
+verbose="";
+quiet="false"
+mode="generate"
+
+usage()
+{
+  echo
+  echo "usage: ${progname} [-h|-q|-v]"
+  echo
+  echo "options:"
+  echo "	-h .. display this message and exit";
+  echo "	-q .. quiet, don't display directories";
+  echo "	-v .. verbose, pass -v to automake when invoking automake"
+  echo "	-c .. clean, remove all aclocal/autoconf/automake generated files"
+  echo
+  exit 1;
+}
+
+if test ! -f VERSION; then
+  echo "${progname}:"
+  echo "	Please change directory to RTEMS's toplevel directory"
+  exit 1;
+fi
+
+while test $# -gt 0; do
+case $1 in
+-h|--he|--hel|--help)
+  usage ;;
+-q|--qu|--qui|--quie|--quiet)
+  quiet="true";
+  shift;;
+-v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
+  verbose="-v";
+  shift;;
+-c|--cl|--cle|--clea|--clean)
+  mode="clean";
+  shift;;
+-*) echo "unknown option $1" ;
+  usage ;;
+*) echo "invalid parameter $1" ;
+  usage ;;
+esac
+done
+
+pwd=`pwd`;
+
+case $mode in
+generate)
+  confs=`find $pwd -name 'configure.in' -print`
+  aclocal_dir=$pwd/aclocal
+  for i in $confs; do
+  dir=`dirname $i`;
+  ( test "$quiet" = "true" || echo "$dir";
+    cd $dir;
+    aclocal -I $aclocal_dir;
+    autoconf;
+    test -f Makefile.am && automake $verbose ;
+    test -n "`grep CONFIG_HEADER configure.in`" && autoheader ;
+    test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
+      && echo timestamp > stamp-h.in
+  )
+  done
+  ;;
+clean)
+  test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
+  files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;
+  for i in $files; do if test -f $i; then
+    rm -f $i
+    test "$verbose" = "-v" && echo "$i"    
+  fi; done
+
+  test "$quiet" = "true" || echo "removing configure files"
+  files=`find . -name 'configure' -print` ;
+  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
+  for i in $files; do if test -f $i; then
+    rm -f $i
+    test "$verbose" = "-v" && echo "$i"    
+  fi; done
+  
+  test "$quiet" = "true" || echo "removing aclocal.m4 files"
+  files=`find . -name 'aclocal.m4' -print` ;
+  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
+  for i in $files; do if test -f $i; then
+    rm -f $i
+    test "$verbose" = "-v" && echo "$i"    
+  fi; done
+
+  find . -name '*~' -print | xargs rm -f
+  find . -name '*.orig' -print | xargs rm -f
+  find . -name '*.rej' -print | xargs rm -f
+  find . -name 'config.status' -print | xargs rm -f
+  find . -name 'config.log' -print | xargs rm -f
+  find . -name 'config.cache' -print | xargs rm -f
+  find . -name 'Makefile' -print | xargs rm -f
+  find . -name '.deps' -print | xargs rm -rf
+  find . -name '.libs' -print | xargs rm -rf
+  find . -name 'stamp-h.in' | xargs rm -rf
+  ;;
+esac
Index: c/Makefile.am
===================================================================
--- c/Makefile.am	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/Makefile.am	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -13,4 +13,5 @@
 ## triggered before $(RTEMS_BSP_LIST) subdirectories are made.
 SUBDIRS= \
+make \
 . \
 $(RTEMS_BSP)
Index: c/configure.in
===================================================================
--- c/configure.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/configure.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -99,4 +99,6 @@
 AC_SUBST(RTEMS_BSP_LIST)
 
+AC_CONFIG_SUBDIRS(make)
+
 AC_OUTPUT( 
 Makefile
Index: c/make/Makefile.am
===================================================================
--- c/make/Makefile.am	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
+++ c/make/Makefile.am	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -0,0 +1,17 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+rtems_makedir=$(prefix)/make
+
+GENERIC_FILES = \
+target.cfg
+
+rtems_make_DATA = \
+$(GENERIC_FILES)
+
+include $(top_srcdir)/../../automake/subdirs.am
+include $(top_srcdir)/../../automake/local.am
Index: c/make/configure.in
===================================================================
--- c/make/configure.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
+++ c/make/configure.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -0,0 +1,59 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl  $Id$
+
+dnl
+dnl This script configures the configuration files below c/make/
+dnl
+
+AC_PREREQ(2.13)
+AC_INIT(target.cfg.in)
+RTEMS_TOP(../..)
+AC_CONFIG_AUX_DIR(../..)
+
+RTEMS_CANONICAL_TARGET_CPU
+
+AM_INIT_AUTOMAKE(rtems-c-make,$RTEMS_VERSION,no)
+AM_MAINTAINER_MODE
+
+RTEMS_ENABLE_MULTIPROCESSING
+RTEMS_ENABLE_POSIX
+RTEMS_ENABLE_NETWORKING
+RTEMS_ENABLE_RDBG
+RTEMS_ENABLE_INLINES
+RTEMS_ENABLE_CXX
+RTEMS_ENABLE_GCC28
+RTEMS_ENABLE_LIBCDIR
+
+RTEMS_CHECK_CPU
+RTEMS_CANONICAL_HOST
+
+RTEMS_PROJECT_ROOT
+
+dnl check target cc
+RTEMS_PROG_CC_FOR_TARGET
+
+dnl check for g++
+if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
+  RTEMS_PROG_CXX_FOR_TARGET
+fi
+
+RTEMS_CANONICALIZE_TOOLS
+
+AC_SUBST(rtems_cv_prog_cc_cross)
+AC_SUBST(RTEMS_HAS_POSIX)
+AC_SUBST(RTEMS_HOST)
+AC_SUBST(RTEMS_HAS_MULTIPROCESSING)
+AC_SUBST(RTEMS_HAS_POSIX_API)
+AC_SUBST(RTEMS_HAS_NETWORKING)
+AC_SUBST(RTEMS_HAS_RDBG)
+AC_SUBST(RTEMS_HAS_CPLUSPLUS)
+AC_SUBST(RTEMS_USE_MACROS)
+AC_SUBST(RTEMS_USE_GCC272)
+AC_SUBST(RTEMS_LIBC_DIR)
+AC_SUBST(RTEMS_CPU)
+
+AC_OUTPUT( 
+Makefile
+target.cfg
+)
Index: c/make/target.cfg.in
===================================================================
--- c/make/target.cfg.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
+++ c/make/target.cfg.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -0,0 +1,69 @@
+#
+# $Id$
+#
+# Target specific settings. 
+#
+
+prefix = @prefix@
+
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DEFS = @DEFS@
+LDFLAGS =
+LIBS = @LIBS@
+
+CC = @CC_FOR_TARGET@
+AS = @AS_FOR_TARGET@
+AR = @AR_FOR_TARGET@
+NM = @NM_FOR_TARGET@
+LD = @LD_FOR_TARGET@
+SIZE = @SIZE_FOR_TARGET@
+STRIP = @STRIP_FOR_TARGET@
+OBJCOPY = @OBJCOPY_FOR_TARGET@
+RANLIB = @RANLIB_FOR_TARGET@
+
+CXX = @CXX_FOR_TARGET@
+
+export CC
+export AS
+export LD
+export NM
+export AR
+export SIZE
+export OBJCOPY
+
+export CXX
+
+RTEMS_CROSS_TARGET=@rtems_cv_prog_cc_cross@
+
+RTEMS_HOST = @RTEMS_HOST@
+RTEMS_HAS_MULTIPROCESSING = @RTEMS_HAS_MULTIPROCESSING@
+RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
+RTEMS_HAS_ITRON_API = @RTEMS_HAS_ITRON_API@
+RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@
+RTEMS_HAS_RDBG = @RTEMS_HAS_RDBG@
+RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
+RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
+RTEMS_USE_GCC272 = @RTEMS_USE_GCC272@
+RTEMS_LIBC_DIR = @RTEMS_LIBC_DIR@
+RTEMS_CPU = @RTEMS_CPU@
+
+XCFLAGS=$(CFLAGS_FOR_TARGET)
+ 
+export RTEMS_BSP
+export RTEMS_CUSTOM
+export PROJECT_ROOT
+
+# List (possibly empty) of required managers
+# We require:
+#    region  -- used by lib/libcsupport for malloc()
+#    ext     -- used by libc for libc reentrancy hooks
+
+MANAGERS_REQUIRED=region ext sem
+
+# Create a RTEMS executable based on MANAGERS which was set in
+#  app's Makefile
+
+MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS) \
+	$(MANAGERS_REQUIRED), $(MANAGER_LIST))
+
Index: c/src/make/Makefile.am
===================================================================
--- c/src/make/Makefile.am	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/make/Makefile.am	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -9,5 +9,5 @@
 
 GENERIC_FILES = \
-host.cfg target.cfg
+host.cfg
 
 MAKE_FILES = README \
@@ -38,6 +38,4 @@
 	cp $< $@
 
-$(srcdir)/target.cfg.in: $(top_srcdir)/@RTEMS_TOPdir@/make/target.cfg.in
-	cp $< $@
 endif
 
Index: c/src/make/bsp.cfg.in
===================================================================
--- c/src/make/bsp.cfg.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/make/bsp.cfg.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -30,2 +30,6 @@
 ##
 HAS_NETWORKING = @HAS_NETWORKING@
+
+## Only used for the bare bsp
+BARE_CPU_MODEL = @BARE_CPU_MODEL@
+BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@
Index: c/src/make/compilers/gcc-target-default.cfg
===================================================================
--- c/src/make/compilers/gcc-target-default.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/make/compilers/gcc-target-default.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -83,5 +83,5 @@
 # Define this to yes if C++ is included in the development environment.
 # This requires that at least the GNU C++ compiler and libg++ be installed.
-ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
+ifeq ($(HAS_CPLUSPLUS),yes)
 CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
 endif
@@ -173,11 +173,13 @@
 # How to compile stuff into ${ARCH} subdirectory
 #
+# OBSOLETE: we use make's default rules now
+#
 # NOTE: we override COMPILE.[c|cc|S]
 # because gmake default rules use TARGET_ARCH for different purposes
 #
-
-COMPILE.c=$(CC) $(CPPFLAGS) $(CFLAGS) -c
-COMPILE.cc=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
-COMPILE.S=$(CC) $(ASFLAGS) $(CPPFLAGS) -c
+#
+# COMPILE.c=$(CC) $(CPPFLAGS) $(CFLAGS) -c
+# COMPILE.cc=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
+# COMPILE.S=$(CC) $(ASFLAGS) $(CPPFLAGS) -c
 
 ${ARCH}/%.o: %.c
@@ -198,11 +200,4 @@
 ${ARCH}/%.o: %.S
 	${COMPILE.S} -DASM -o $@ $<
-
-# OBSOLETE: the rule above should be equivalent.
-# strip out C++ style comments.
-# ${ARCH}/%.o: %.S
-#	sed -e 's/\/\/.*$$//' < $< | \
-#	    $(CPP) $(CPPFLAGS) -I. -I$(srcdir) -DASM - >$(ARCH)/$*.i
-#	$(AS) $(ASFLAGS) -o $@ $(ARCH)/$*.i
 
 # Make foo.rel from foo.o
@@ -217,8 +212,8 @@
 
 # Dependency files for use by gmake
-# NOTE: we don't put in $(TARGET_ARCH)
+# NOTE: we don't put them into $(ARCH)
 #       so that 'make clean' doesn't blow it away
 
-DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+DEPEND=Depends-${ARCH}
 
 CLEAN_DEPEND=$(DEPEND).tmp
Index: c/src/make/configure.in
===================================================================
--- c/src/make/configure.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/make/configure.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -125,5 +125,4 @@
 main.cfg
 host.cfg
-target.cfg
 bsp.cfg
 custom/Makefile
Index: c/src/make/custom/default.cfg.in
===================================================================
--- c/src/make/custom/default.cfg.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/make/custom/default.cfg.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -9,12 +9,6 @@
 #
 
-include $(RTEMS_ROOT)/make/target.cfg
+include $(RTEMS_ROOT)/../make/target.cfg
 include $(RTEMS_ROOT)/make/host.cfg
-
-# Specify here the host and target "architectures"
-HOST_ARCH=o-$(RTEMS_HOST)
-ifndef TARGET_ARCH
-TARGET_ARCH=o-@RTEMS_BSP@
-endif
 
 include $(RTEMS_ROOT)/make/main.cfg
@@ -22,5 +16,5 @@
 
 ## Target compiler config file, if any
-CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+CONFIG.CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
 
 ## GCC specs extension file location
Index: c/src/make/main.cfg.in
===================================================================
--- c/src/make/main.cfg.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/make/main.cfg.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -18,9 +18,9 @@
 
 #
-# Target architecture; may be changed as per 'make "ARCH=${TARGET_ARCH}-debug"'
+# Target architecture; may be changed as per 'make "ARCH=debug"'
 # This is where the object files get put.
 #
 
-ARCH=${TARGET_ARCH}
+ARCH=o-optimize
 
 VARIANT=
@@ -44,10 +44,10 @@
 # Target variant names
 #
-TARGET_VARIANTS = debug profile
+TARGET_VARIANTS = optimize debug profile
 
 #
-# Generate list of object directories: sun4, sun4-debug, sun4-profile
+# Generate list of object directories: o-optimize, o-debug, o-profile
 #
-VARIANTS=${TARGET_ARCH} ${TARGET_VARIANTS:%=${TARGET_ARCH}-%}
+VARIANTS=${TARGET_VARIANTS:%=o-%}
 
 #
Index: src/make/target.cfg.in
===================================================================
--- c/src/make/target.cfg.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ 	(revision )
@@ -1,73 +1,0 @@
-#
-# $Id$
-#
-# Target specific settings. 
-#
-
-prefix = @prefix@
-
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@
-LDFLAGS =
-LIBS = @LIBS@
-
-CC = @CC_FOR_TARGET@
-AS = @AS_FOR_TARGET@
-AR = @AR_FOR_TARGET@
-NM = @NM_FOR_TARGET@
-LD = @LD_FOR_TARGET@
-SIZE = @SIZE_FOR_TARGET@
-STRIP = @STRIP_FOR_TARGET@
-OBJCOPY = @OBJCOPY_FOR_TARGET@
-RANLIB = @RANLIB_FOR_TARGET@
-
-CXX = @CXX_FOR_TARGET@
-
-export CC
-export AS
-export LD
-export NM
-export AR
-export SIZE
-export OBJCOPY
-
-export CXX
-
-RTEMS_CROSS_TARGET=@rtems_cv_prog_cc_cross@
-
-RTEMS_HOST = @RTEMS_HOST@
-RTEMS_HAS_MULTIPROCESSING = @RTEMS_HAS_MULTIPROCESSING@
-RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
-RTEMS_HAS_ITRON_API = @RTEMS_HAS_ITRON_API@
-RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@
-RTEMS_HAS_RDBG = @RTEMS_HAS_RDBG@
-RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
-RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
-RTEMS_USE_GCC272 = @RTEMS_USE_GCC272@
-RTEMS_LIBC_DIR = @RTEMS_LIBC_DIR@
-RTEMS_CPU = @RTEMS_CPU@
-
-# the following are only used for the bare bsp
-BARE_CPU_MODEL = @BARE_CPU_MODEL@
-BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@
- 
-XCFLAGS=$(CFLAGS_FOR_TARGET)
- 
-export RTEMS_BSP
-export RTEMS_CUSTOM
-export PROJECT_ROOT
-
-# List (possibly empty) of required managers
-# We require:
-#    region  -- used by lib/libcsupport for malloc()
-#    ext     -- used by libc for libc reentrancy hooks
-
-MANAGERS_REQUIRED=region ext sem
-
-# Create a RTEMS executable based on MANAGERS which was set in
-#  app's Makefile
-
-MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS) \
-	$(MANAGERS_REQUIRED), $(MANAGER_LIST))
-
Index: c/src/tests/samples/cdtest/Makefile.in
===================================================================
--- c/src/tests/samples/cdtest/Makefile.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/tests/samples/cdtest/Makefile.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -51,5 +51,5 @@
 
 DEFINES +=
-CPPFLAGS += -I$(LIBCC_INCLUDE)
+CPPFLAGS +=
 CFLAGS +=
 
Index: c/src/tests/samples/paranoia/Makefile.in
===================================================================
--- c/src/tests/samples/paranoia/Makefile.in	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ c/src/tests/samples/paranoia/Makefile.in	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -53,5 +53,5 @@
 
 LD_PATHS +=
-LD_LIBS += $(LIBC_LIBM)
+LD_LIBS += -lm
 LDFLAGS +=
 
Index: make/Makefile.am
===================================================================
--- make/Makefile.am	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/Makefile.am	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -15,6 +15,5 @@
 host.cfg.in \
 leaf.cfg \
-lib.cfg \
-target.cfg.in
+lib.cfg
 
 SUBDIRS = \
Index: make/compilers/gcc-target-default.cfg
===================================================================
--- make/compilers/gcc-target-default.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/compilers/gcc-target-default.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -83,5 +83,5 @@
 # Define this to yes if C++ is included in the development environment.
 # This requires that at least the GNU C++ compiler and libg++ be installed.
-ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
+ifeq ($(HAS_CPLUSPLUS),yes)
 CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
 endif
@@ -173,11 +173,13 @@
 # How to compile stuff into ${ARCH} subdirectory
 #
+# OBSOLETE: we use make's default rules now
+#
 # NOTE: we override COMPILE.[c|cc|S]
 # because gmake default rules use TARGET_ARCH for different purposes
 #
-
-COMPILE.c=$(CC) $(CPPFLAGS) $(CFLAGS) -c
-COMPILE.cc=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
-COMPILE.S=$(CC) $(ASFLAGS) $(CPPFLAGS) -c
+#
+# COMPILE.c=$(CC) $(CPPFLAGS) $(CFLAGS) -c
+# COMPILE.cc=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
+# COMPILE.S=$(CC) $(ASFLAGS) $(CPPFLAGS) -c
 
 ${ARCH}/%.o: %.c
@@ -198,11 +200,4 @@
 ${ARCH}/%.o: %.S
 	${COMPILE.S} -DASM -o $@ $<
-
-# OBSOLETE: the rule above should be equivalent.
-# strip out C++ style comments.
-# ${ARCH}/%.o: %.S
-#	sed -e 's/\/\/.*$$//' < $< | \
-#	    $(CPP) $(CPPFLAGS) -I. -I$(srcdir) -DASM - >$(ARCH)/$*.i
-#	$(AS) $(ASFLAGS) -o $@ $(ARCH)/$*.i
 
 # Make foo.rel from foo.o
@@ -217,8 +212,8 @@
 
 # Dependency files for use by gmake
-# NOTE: we don't put in $(TARGET_ARCH)
+# NOTE: we don't put them into $(ARCH)
 #       so that 'make clean' doesn't blow it away
 
-DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+DEPEND=Depends-${ARCH}
 
 CLEAN_DEPEND=$(DEPEND).tmp
Index: make/custom/FreeBSD-posix.cfg
===================================================================
--- make/custom/FreeBSD-posix.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/FreeBSD-posix.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -11,5 +11,4 @@
 # This is the actual bsp directory used during the build process.
 RTEMS_BSP_FAMILY=posix
-TARGET_ARCH=o-freebsd2
 
 include $(RTEMS_ROOT)/make/custom/default.cfg
@@ -24,10 +23,4 @@
 LIBC_DEFINES += -DHEAPSPACE_MB=1
 
-
-# Define this to yes if C++ is included in the development environment
-# This requires that at least the GNU C++ compiler and libg++ be installed.
-ifeq ($(HAS_CPLUSPLUS),yes)
-CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
-endif
 
 # optimize flag: typically -0, could use -O4 or -fast
Index: make/custom/HPUX9-posix.cfg
===================================================================
--- make/custom/HPUX9-posix.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/HPUX9-posix.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -13,5 +13,4 @@
 # This is the actual bsp directory used during the build process.
 RTEMS_BSP_FAMILY=posix
-TARGET_ARCH=o-hpux9
 
 include $(RTEMS_ROOT)/make/custom/default.cfg
Index: make/custom/Linux-posix.cfg
===================================================================
--- make/custom/Linux-posix.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/Linux-posix.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -12,5 +12,4 @@
 # This is the actual bsp directory used during the build process.
 RTEMS_BSP_FAMILY=posix
-TARGET_ARCH=o-linux1
 
 include $(RTEMS_ROOT)/make/custom/default.cfg
@@ -26,10 +25,4 @@
 
 DEFINES += -D_BSD_SOURCE
-
-# Define this to yes if C++ is included in the development environment
-# This requires that at least the GNU C++ compiler and libg++ be installed.
-ifeq ($(HAS_CPLUSPLUS),yes)
-CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
-endif
 
 # optimize flag: typically -0, could use -O4 or -fast
Index: make/custom/Solaris-posix.cfg
===================================================================
--- make/custom/Solaris-posix.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/Solaris-posix.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -12,5 +12,4 @@
 # This is the actual bsp directory used during the build process.
 RTEMS_BSP_FAMILY=posix
-TARGET_ARCH=o-solaris2
 
 include $(RTEMS_ROOT)/make/custom/default.cfg
@@ -23,10 +22,4 @@
 
 DEFINES += -D__EXTENSIONS__ -Dsolaris2
-
-# Define this to yes if C++ is included in the development environment
-# This requires that at least the GNU C++ compiler and libg++ be installed.
-ifeq ($(HAS_CPLUSPLUS),yes)
-CPLUS_LD_LIBS=$(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
-endif
 
 # optimize flag: typically -0, could use -O4 or -fast
Index: make/custom/bare.cfg
===================================================================
--- make/custom/bare.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/bare.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -11,6 +11,4 @@
 
 RTEMS_CPU_MODEL=$(BARE_CPU_MODEL)
-
-TARGET_ARCH=o-$(RTEMS_BSP_FAMILY)-$(BARE_CPU_MODEL)
 
 CPU_CFLAGS=$(BARE_CPU_CFLAGS)
Index: make/custom/default.cfg
===================================================================
--- make/custom/default.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/default.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -11,9 +11,4 @@
 include $(RTEMS_ROOT)/make/target.cfg
 include $(RTEMS_ROOT)/make/host.cfg
-
-# Specify here the host and target "architectures"
-ifndef TARGET_ARCH
-TARGET_ARCH=o-$(RTEMS_BSP)
-endif
 
 include $(RTEMS_ROOT)/make/main.cfg
@@ -31,5 +26,5 @@
 
 ## Target compiler config file, if any
-CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+CONFIG.CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
 
 ## GCC specs extension file location
Index: make/custom/gen68360.cfg
===================================================================
--- make/custom/gen68360.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/gen68360.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -8,8 +8,6 @@
 
 ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
-TARGET_ARCH=o-gen68360_040
 RTEMS_CPU_MODEL=m68040
 else
-TARGET_ARCH=o-gen68360
 RTEMS_CPU_MODEL=mcpu32
 endif
Index: make/custom/mvme162.cfg
===================================================================
--- make/custom/mvme162.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/mvme162.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -11,5 +11,4 @@
 ifeq ($(RTEMS_MVME162_MODEL),mvme162lx)
 
-TARGET_ARCH=o-mvme162lx
 RTEMS_CPU_MODEL=m68lc040
 
@@ -18,5 +17,4 @@
 
 RTEMS_MVME162_MODEL=mvme162
-TARGET_ARCH=o-mvme162
 RTEMS_CPU_MODEL=m68040
 
Index: make/custom/ods68302.cfg
===================================================================
--- make/custom/ods68302.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/custom/ods68302.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -32,12 +32,5 @@
 
 # debugging please
-CFLAGS_DEBUG_V+=-g
-
-# Define this to yes if C++ is included in the development environment.
-# This requires that at least the GNU C++ compiler and libg++ be installed.
-ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
-HAS_CPLUSPLUS=yes
-CPLUS_LD_LIBS=$(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
-endif
+CFLAGS_DEBUG_V =
 
 START_BASE=start302
Index: make/leaf.cfg
===================================================================
--- make/leaf.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/leaf.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -38,5 +38,5 @@
 # Programs built on the host use automake generated rules.
 # This will not change $(ARCH) -- binaries will still be place as per target
-include ${CONFIG.$(TARGET_ARCH).CC}
+include ${CONFIG.CC}
 ifeq (${DEPEND},$(wildcard ${DEPEND}))
 include ${DEPEND}		     # pull in dependencies if they exist
@@ -47,5 +47,5 @@
 #
 debug:
-	$(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=${TARGET_ARCH}-debug" \
+	$(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=o-debug" \
       "CFLAGS_DEBUG=$(CFLAGS_DEBUG_V)" \
       "CFLAGS_OPTIMIZE=$(CFLAGS_DEBUG_OPTIMIZE_V)" \
@@ -54,5 +54,5 @@
 profile:
 	$(MAKE) -f $(MAKEFILE) \
-      MAKEFILE=$(MAKEFILE) "ARCH=${TARGET_ARCH}-profile" \
+      MAKEFILE=$(MAKEFILE) "ARCH=o-profile" \
       "CFLAGS_PROFILE=$(CFLAGS_PROFILE_V)" \
       "LDFLAGS_PROFILE=$(LDFLAGS_PROFILE_V)" $(TARGET_VA)
@@ -64,7 +64,7 @@
 #
 
-VARIANT-$(TARGET_ARCH)-v =
-VARIANT-$(TARGET_ARCH)-debug-v = debug
-VARIANT-$(TARGET_ARCH)-profile-v = profile
+VARIANT-o-optimize-v =
+VARIANT-o-debug-v = debug
+VARIANT-o-profile-v = profile
 
 VARIANT_VA = $(VARIANT-$(ARCH)-v)
@@ -87,7 +87,7 @@
 #
 
-LIBSUFFIX_$(TARGET_ARCH)_V=
-LIBSUFFIX_$(TARGET_ARCH)-debug_V=_g
-LIBSUFFIX_$(TARGET_ARCH)-profile_V=_p
+LIBSUFFIX_o-optimize_V=
+LIBSUFFIX_o-debug_V=_g
+LIBSUFFIX_o-profile_V=_p
 
 LIB_VARIANT=$(LIBSUFFIX_$(ARCH)_V)
Index: make/main.cfg
===================================================================
--- make/main.cfg	(revision fa3346f5095ce15640a5c1785aa513ae961e3d7a)
+++ make/main.cfg	(revision d6c8352925bc2286b24f01b8cfababa16782b1f5)
@@ -18,9 +18,9 @@
 
 #
-# Target architecture; may be changed as per 'make "ARCH=${TARGET_ARCH}-debug"'
+# Target architecture; may be changed as per 'make "ARCH=debug"'
 # This is where the object files get put.
 #
 
-ARCH=${TARGET_ARCH}
+ARCH=o-optimize
 
 VARIANT=
@@ -44,10 +44,10 @@
 # Target variant names
 #
-TARGET_VARIANTS = debug profile
+TARGET_VARIANTS = optimize debug profile
 
 #
-# Generate list of object directories: sun4, sun4-debug, sun4-profile
+# Generate list of object directories: o-optimize, o-debug, o-profile
 #
-VARIANTS=${TARGET_ARCH} ${TARGET_VARIANTS:%=${TARGET_ARCH}-%}
+VARIANTS=${TARGET_VARIANTS:%=o-%}
 
 #
