Index: c/src/lib/libbsp/bare/include/Makefile.am
===================================================================
--- c/src/lib/libbsp/bare/include/Makefile.am	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ c/src/lib/libbsp/bare/include/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -4,13 +4,16 @@
 
 AUTOMAKE_OPTIONS = foreign 1.4
-H_FILES = bsp.h $(srcdir)/../../../shared/coverhd.h
-
+H_FILES = bsp.h
 noinst_HEADERS = $(H_FILES)
 
 TMPINSTALL_FILES += \
 $(PROJECT_INCLUDE) \
-$(H_FILES:%=$(PROJECT_INCLUDE)/%)
+$(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \
+$(PROJECT_INCLUDE)/coverhd.h
 
 $(PROJECT_INCLUDE)/%.h: %.h
+	$(INSTALL_DATA) $< $@
+
+$(PROJECT_INCLUDE)/coverhd.h: $(srcdir)/../../shared/include/coverhd.h
 	$(INSTALL_DATA) $< $@
 
Index: c/src/lib/libbsp/configure.in
===================================================================
--- c/src/lib/libbsp/configure.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ c/src/lib/libbsp/configure.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -59,23 +59,29 @@
   RTEMS_LIBBSP_CPU_SUBDIR="bare"
 else
-  RTEMS_LIBBSP_CPU_SUBDIR='$(RTEMS_CPU)'
+  RTEMS_LIBBSP_CPU_SUBDIR=$RTEMS_CPU
 fi
 AC_SUBST(RTEMS_LIBBSP_CPU_SUBDIR)
 
+if test ! -f ${srcdir}/${RTEMS_LIBBSP_CPU_SUBDIR}/configure.in
+then
+
 # find all the Makefiles for the BSPs
-makefiles="$makefiles $RTEMS_CPU/Makefile"
+  makefiles="$makefiles $RTEMS_CPU/Makefile"
      
-if test -d "$srcdir/$bspcpudir$bspdir"; then
-  RTEMS_CHECK_MAKEFILE(${bspcpudir}$bspdir)
-  RTEMS_CHECK_MAKEFILE(${bspcpudir}shared)
+  if test -d "$srcdir/$bspcpudir$bspdir"; then
+    RTEMS_CHECK_MAKEFILE(${bspcpudir}$bspdir)
+    RTEMS_CHECK_MAKEFILE(${bspcpudir}shared)
 
-  # HACK: sed out bsp-tools from makefiles
-  t="$bspcpudir$bspdir/tools"
-  if test -d "$srcdir/$t"; then
-    bsptools_cfgdirs="$bsptools_cfgdirs $t"
-    makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
+    # HACK: sed out bsp-tools from makefiles
+    t="$bspcpudir$bspdir/tools"
+    if test -d "$srcdir/$t"; then
+      bsptools_cfgdirs="$bsptools_cfgdirs $t"
+      makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
+    fi
+  else
+    AC_MSG_ERROR([unable to find libbsp subdirectory ($bspdir) for  ${RTEMS_BSP}])
   fi
 else
-  AC_MSG_ERROR([unable to find libbsp subdirectory ($bspdir) for  ${RTEMS_BSP}])
+  cfg_subdirs="$RTEMS_LIBBSP_CPU_SUBDIR"
 fi
 
@@ -87,11 +93,9 @@
   makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
 fi
+
 AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes")
 
 AC_CONFIG_SUBDIRS($bsptools_cfgdirs)
 
-if test "$RTEMS_BSP" = "bare"; then
-cfg_subdirs="bare"
-fi
 AC_CONFIG_SUBDIRS($cfg_subdirs)
 
Index: c/src/lib/libbsp/sh/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,12 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+# Descend into the $(RTEMS_BSP_FAMILY) directory
+SUBDIRS = shared $(RTEMS_BSP_FAMILY)
+
+include $(top_srcdir)/../../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../../automake/local.am
Index: src/lib/libbsp/sh/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = sh
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/directory.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-# Descend into the $(RTEMS_BSP_FAMILY) directory
-SUBDIRS = $(RTEMS_BSP_FAMILY)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/configure.in
===================================================================
--- c/src/lib/libbsp/sh/configure.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/configure.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,27 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl $Id$
+
+AC_PREREQ(2.13)
+AC_INIT(gensh1)
+RTEMS_TOP(../../../../..)
+AC_CONFIG_AUX_DIR(../../../../..)
+
+RTEMS_CANONICAL_TARGET_CPU
+AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp-sh,$RTEMS_VERSION,no)
+AM_MAINTAINER_MODE
+
+RTEMS_ENABLE_LIBCDIR
+
+RTEMS_ENV_RTEMSBSP
+RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
+RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
+
+RTEMS_PROJECT_ROOT
+RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
+AC_CONFIG_SUBDIRS($bspdir)
+
+# try to explicitly list a Makefile here 
+AC_OUTPUT( 
+Makefile
+shared/Makefile)
Index: c/src/lib/libbsp/sh/gensh1/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh1/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh1/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,17 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+# wrapup is the one that actually builds and installs the library
+#  from the individual .rel files built in other directories
+SUBDIRS = include start startup scitab console wrapup
+
+include $(top_srcdir)/../../bsp.am
+
+EXTRA_DIST = bsp_specs times
+
+include $(top_srcdir)/../../../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh1/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../..
-subdir = sh/gensh1
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/directory.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-# wrapup is the one that actually builds and installs the library
-#  from the individual .rel files built in other directories
-SUBDIRS = include start startup scitab console wrapup
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh1/configure.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/configure.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh1/configure.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,30 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl $Id$
+
+AC_PREREQ(2.13)
+AC_INIT(bsp_specs)
+RTEMS_TOP(../../../../../..)
+AC_CONFIG_AUX_DIR(../../../../../..)
+
+RTEMS_CANONICAL_TARGET_CPU
+AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp-sh-gensh1,$RTEMS_VERSION,no)
+AM_MAINTAINER_MODE
+
+RTEMS_ENABLE_LIBCDIR
+
+RTEMS_ENV_RTEMSBSP
+RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
+RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
+RTEMS_CANONICAL_HOST
+
+RTEMS_PROJECT_ROOT
+
+AC_OUTPUT( 
+Makefile
+console/Makefile
+include/Makefile
+scitab/Makefile
+start/Makefile
+startup/Makefile
+wrapup/Makefile)
Index: c/src/lib/libbsp/sh/gensh1/console/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh1/console/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh1/console/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,32 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/../../shared
+
+PGM = ${ARCH}/console.rel
+
+## C source names
+C_FILES = console.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): ${OBJS}
+	$(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by 
+# 	../wrapup/Makefile
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh1/console/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/console/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,71 +1,0 @@
-##
-##  $Id$
-##
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh1/console
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@top_srcdir@/sh/shared
-
-PGM = ${ARCH}/console.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = console
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-# Assembly source names, if any, go here -- minus the .S
-S_PIECES =
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(C_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-$(PGM): ${OBJS}
-	$(make-rel)
-
-all: ${ARCH} $(SRCS) $(PGM)
-
-# the .rel file built here will be put into libbsp.a by 
-# 	../wrapup/Makefile
-install: all
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh1/include/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh1/include/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh1/include/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,20 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+H_FILES = bsp.h coverhd.h
+noinst_HEADERS = $(H_FILES)
+
+$(PROJECT_INCLUDE):
+	$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/%.h: %.h
+	$(INSTALL_DATA) $< $@
+
+PREINSTALL_FILES = $(PROJECT_INCLUDE) $(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h)
+
+all-local: $(PREINSTALL_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh1/include/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/include/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh1/include
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h
-
-#
-#  Equate files are for including from assembly preprocessed by
-#  gm4 or gasp.  No examples are provided except for those for
-#  other CPUs.  The best way to generate them would be to
-#  provide a program which generates the constants used based
-#  on the C equivalents.
-#
-
-EQ_FILES =
-
-SRCS = $(H_FILES) $(EQ_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_INCLUDE)
-
-$(INSTALLDIRS):
-	@$(mkinstalldirs) $(INSTALLDIRS)
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-all: preinstall
-
-preinstall: $(SRCS)
-	$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,34 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = $(ARCH)/scitab.rel
+
+## C source names
+C_FILES = scitab.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+SHGEN = $(PROJECT_ROOT)/tools/cpu/sh/shgen
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+CLEANFILES = scitab.c
+
+$(PGM): ${OBJS}
+	$(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+scitab.c: $(SHGEN)
+	$(SHGEN) -H $(HZ) sci > $@
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh1/scitab/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/scitab/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh1/scitab
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = $(ARCH)/scitab.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = scitab
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-# Assembly source names, if any, go here -- minus the .S
-S_PIECES =
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-SHGEN = $(PROJECT_ROOT)/tools/cpu/sh/shgen
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS += scitab.c
-CLOBBER_ADDITIONS +=
-
-$(PGM): ${OBJS}
-	$(make-rel)
-
-all: ${ARCH} $(SRCS) $(PGM)
-
-scitab.c: $(SHGEN)
-	$(SHGEN) -H $(HZ) sci > $@
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-install: all
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh1/start/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh1/start/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh1/start/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,32 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/start.o
+
+## Assembly source names
+S_FILES = start.S
+S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PROJECT_RELEASE)/lib:
+	$(mkinstalldirs) $@
+
+$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o: $(PGM)
+	$(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+
+all-local: ${ARCH} $(PGM) $(TMPINSTALL_FILES)
+
+EXTRA_DIST = $(S_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh1/start/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/start/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh1/start
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/start.o
-
-# C source names, if any, go here -- minus the .c
-C_PIECES =
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-# Assembly source names, if any, go here -- minus the .S
-S_PIECES = start
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-all: ${ARCH} $(SRCS) $(OBJS) $(PGM)
-	$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/lib
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh1/startup/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh1/startup/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh1/startup/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,39 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/startup.rel
+
+VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
+   
+## C source names
+C_FILES = bsplibc.c bsppost.c bspstart.c bspclean.c sbrk.c bootcard.c main.c \
+    gnatinstallhandler.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -DHZ=$(HZ)
+
+$(PGM): ${OBJS}
+	$(make-rel)
+
+$(PROJECT_RELEASE)/lib/linkcmds: linkcmds
+	$(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(PGM) $(TMPINSTALL_FILES)
+
+EXTRA_DIST = bspclean.c bspstart.c linkcmds
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh1/startup/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/startup/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,77 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh1/startup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
-
-PGM = ${ARCH}/startup.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = bsplibc bsppost bspstart bspclean sbrk bootcard main \
-    gnatinstallhandler
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-# Assembly source names, if any, go here -- minus the .S
-S_PIECES =
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = linkcmds $(C_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_RELEASE)/lib
-
-$(INSTALLDIRS):
-	@$(mkinstalldirs) $(INSTALLDIRS)
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS += $(BSP_CPPFLAGS)
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-$(PGM): ${OBJS}
-	$(make-rel)
-
-all: ${ARCH} $(SRCS) $(PGM)
-	$(INSTALL_CHANGE) -m 644 $(srcdir)/linkcmds $(PROJECT_RELEASE)/lib
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -8,6 +8,6 @@
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh1/wrapup
+top_builddir = ..
+subdir = wrapup
 
 RTEMS_ROOT = @RTEMS_ROOT@
@@ -63,12 +63,7 @@
 
 $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA): $(LIB)
-	$(INSTALL_DATA) $^ $@
+	$(INSTALL_DATA) $< $@
 
-all: ${ARCH} $(SRCS) $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA)
-
-install: all
-
-$(PROJECT_ROOT)/@RTEMS_BSP@/lib/bsp_specs: ../bsp_specs
-	$(INSTALL_DATA) $< $@
+all: ${ARCH} $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA)
 
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: c/src/lib/libbsp/sh/gensh2/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh2/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh2/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,17 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+## wrapup is the one that actually builds and installs the library
+##  from the individual .rel files built in other directories
+SUBDIRS = include start startup scitab console wrapup
+
+include $(top_srcdir)/../../bsp.am
+
+EXTRA_DIST = bsp_specs
+
+include $(top_srcdir)/../../../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh2/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,27 +1,0 @@
-##
-## $Id$
-##
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../..
-subdir = sh/gensh2
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/directory.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-## wrapup is the one that actually builds and installs the library
-##  from the individual .rel files built in other directories
-SUBDIRS = include start startup scitab console wrapup
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh2/configure.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/configure.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh2/configure.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,31 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl $Id$
+
+AC_PREREQ(2.13)
+AC_INIT(bsp_specs)
+RTEMS_TOP(../../../../../..)
+AC_CONFIG_AUX_DIR(../../../../../..)
+
+RTEMS_CANONICAL_TARGET_CPU
+AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp-sh-gensh1,$RTEMS_VERSION,no)
+AM_MAINTAINER_MODE
+
+RTEMS_ENABLE_LIBCDIR
+
+RTEMS_ENV_RTEMSBSP
+RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
+RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
+RTEMS_CANONICAL_HOST
+
+RTEMS_PROJECT_ROOT
+
+# Explicitly list a Makefile here 
+AC_OUTPUT( 
+Makefile
+console/Makefile
+include/Makefile
+scitab/Makefile
+start/Makefile
+startup/Makefile
+wrapup/Makefile)
Index: c/src/lib/libbsp/sh/gensh2/console/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh2/console/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh2/console/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,34 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/../../shared
+
+PGM = ${ARCH}/console.rel
+
+## C source names
+C_FILES = console.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): ${OBJS}
+	$(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by 
+# 	../wrapup/Makefile
+
+EXTRA_DIST = $(C_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh2/console/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/console/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,71 +1,0 @@
-##
-##  $Id$
-##
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh2/console
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@top_srcdir@/sh/shared
-
-PGM = ${ARCH}/console.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = console
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-# Assembly source names, if any, go here -- minus the .S
-S_PIECES =
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(C_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-$(PGM): ${OBJS}
-	$(make-rel)
-
-all: ${ARCH} $(SRCS) $(PGM)
-
-# the .rel file built here will be put into libbsp.a by 
-# 	../wrapup/Makefile
-install: all
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh2/include/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh2/include/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh2/include/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,17 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+H_FILES = bsp.h coverhd.h
+noinst_HEADERS = $(H_FILES)
+
+$(PROJECT_INCLUDE)/%.h: %.h
+	$(INSTALL_DATA) $< $@
+
+PREINSTALL_FILES = $(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h)
+
+all-local: $(PREINSTALL_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh2/include/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/include/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,43 +1,0 @@
-##
-## $Id$
-##
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh2/include
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h
-
-#
-#  Equate files are for including from assembly preprocessed by
-#  gm4 or gasp.  No examples are provided except for those for
-#  other CPUs.  The best way to generate them would be to
-#  provide a program which generates the constants used based
-#  on the C equivalents.
-#
-
-EQ_FILES =
-
-SRCS = $(H_FILES) $(EQ_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-all: $(SRCS)
-	@INSTALL@ -m 644 $(H_FILES) $(PROJECT_INCLUDE)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,36 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = $(ARCH)/scitab.rel
+
+## C source names
+C_FILES = scitab.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+SHGEN = $(PROJECT_ROOT)/tools/cpu/sh/shgen
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): ${OBJS}
+	$(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+scitab.c: $(SHGEN)
+	$(SHGEN) -H $(HZ) sci > $@
+
+# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+
+EXTRA_DIST = $(C_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh2/scitab/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/scitab/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,74 +1,0 @@
-##
-##  $Id$
-##
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh2/scitab
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = $(ARCH)/scitab.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = scitab
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-# Assembly source names, if any, go here -- minus the .s
-S_PIECES =
-S_FILES = $(S_PIECES:%=%.s)
-S_O_FILES = $(S_FILES:%.s=${ARCH}/%.o)
-
-SRCS = $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-SHGEN = $(PROJECT_ROOT)/tools/cpu/sh/shgen
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-$(PGM): ${OBJS}
-	$(make-rel)
-
-all: ${ARCH} $(SRCS) $(PGM)
-
-scitab.c: $(SHGEN)
-	$(SHGEN) -H $(HZ) sci > $@
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-install: all
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh2/start/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh2/start/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh2/start/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,27 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGMS = ${ARCH}/start.o
+
+## Assembly source names
+S_FILES = start.S
+S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
+
+OBJS = $(S_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(OBJS)
+	@$(INSTALL_VARIANT) -m 755 ${PGMS} $(PROJECT_RELEASE)/lib
+
+EXTRA_DIST = $(S_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh2/start/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/start/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,70 +1,0 @@
-##
-## $Id$
-##
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh2/start
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGMS = ${ARCH}/start.o
-
-# C source names, if any, go here -- minus the .c
-C_PIECES =
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-# Assembly source names, if any, go here -- minus the .S
-S_PIECES = start
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(C_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-# force optimization, otherwise start.o will not work
-# CFLAGS_PROFILE=
-# CFLAGS_DEBUG=-O3
-# CFLAGS_OPTIMIZE=-O3
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-all: ${ARCH} $(SRCS) $(OBJS) $(PGM)
-	@$(INSTALL_VARIANT) -m 755 ${PGMS} $(PROJECT_RELEASE)/lib
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh2/startup/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/gensh2/startup/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/gensh2/startup/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,39 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
+
+PGM = ${ARCH}/startup.rel
+
+## C source names
+C_FILES = hw_init.c bsplibc.c bsppost.c bspstart.c bspclean.c sbrk.c \
+    bootcard.c main.c gnatinstallhandler.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PROJECT_RELEASE)/lib/linkcmds: linkcmds
+	$(INSTALL_DATA) $< $@
+ 
+PREINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds
+
+AM_CPPFLAGS += -DHZ=$(HZ)
+
+$(PGM): ${OBJS}
+	$(make-rel)
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(PGM)
+
+EXTRA_DIST = $(C_FILES) linkcmds linkcmds.rom linkcmds.ram
+
+include $(top_srcdir)/../../../../../../automake/local.am
Index: src/lib/libbsp/sh/gensh2/startup/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/startup/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ 	(revision )
@@ -1,77 +1,0 @@
-##
-## $Id$
-##
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh2/startup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
-
-PGM = ${ARCH}/startup.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = hw_init bsplibc bsppost bspstart bspclean sbrk bootcard main \
-    gnatinstallhandler
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-# Assembly source names, if any, go here -- minus the .s
-S_PIECES =
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = linkcmds $(C_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_RELEASE)/lib
-
-$(INSTALLDIRS):
-	@$(mkinstalldirs) $(INSTALLDIRS)
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS += $(BSP_CPPFLAGS)
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-$(PGM): ${OBJS}
-	$(make-rel)
-
-all: ${ARCH} $(SRCS) $(PGM)
-	$(INSTALL_CHANGE) -m 644 $(srcdir)/linkcmds $(PROJECT_RELEASE)/lib
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in
===================================================================
--- c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in	(revision 338f1dc186d23648ebbfcf583f637b40ace19378)
+++ c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -8,6 +8,6 @@
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh2/wrapup
+top_builddir = ..
+subdir = wrapup
 
 RTEMS_ROOT = @RTEMS_ROOT@
@@ -61,8 +61,9 @@
 	$(make-library)
 
-all: ${ARCH} $(SRCS) $(LIB)
-	$(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib
+$(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA): $(LIB)
+	$(INSTALL_DATA) $< $@
 
-install: all
+all: ${ARCH} $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA)
+
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	cd $(top_builddir) \
Index: c/src/lib/libbsp/sh/shared/Makefile.am
===================================================================
--- c/src/lib/libbsp/sh/shared/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
+++ c/src/lib/libbsp/sh/shared/Makefile.am	(revision 94608578a2c5d90d87ca729bb5d45f945679254a)
@@ -0,0 +1,11 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+C_FILES = console.c setvec.c
+
+EXTRA_DIST = $(C_FILES)
+
+include $(top_srcdir)/../../../../../automake/local.am
