summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-10 13:56:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-10 13:56:35 +0000
commit94608578a2c5d90d87ca729bb5d45f945679254a (patch)
tree140f91ec5f522c2c11a18350b6868535a7a97e67 /c/src/lib/libbsp
parent338f1dc186d23648ebbfcf583f637b40ace19378 (diff)
downloadrtems-94608578a2c5d90d87ca729bb5d45f945679254a.tar.bz2
Patch rtems-rc-20000104-2.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that converts nearly all of libbsp/sh to automake. Comments follow: 1. Almost full automake support for the libbsp/sh/ subdirectories (exception libbsp/sh/gensh*/wrapup/*) 2. Fixes for libbsp/bare/* 3. Updates to libbsp/* configuration which supports old (autoconf/deep configuration) and new (automake/flat/cascaded configuration) style configuration of libbsp/<cpu>/*
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r--c/src/lib/libbsp/bare/include/Makefile.am9
-rw-r--r--c/src/lib/libbsp/configure.in34
-rw-r--r--c/src/lib/libbsp/sh/Makefile.am12
-rw-r--r--c/src/lib/libbsp/sh/Makefile.in26
-rw-r--r--c/src/lib/libbsp/sh/configure.in27
-rw-r--r--c/src/lib/libbsp/sh/gensh1/Makefile.am17
-rw-r--r--c/src/lib/libbsp/sh/gensh1/Makefile.in27
-rw-r--r--c/src/lib/libbsp/sh/gensh1/configure.in30
-rw-r--r--c/src/lib/libbsp/sh/gensh1/console/Makefile.am32
-rw-r--r--c/src/lib/libbsp/sh/gensh1/console/Makefile.in71
-rw-r--r--c/src/lib/libbsp/sh/gensh1/include/Makefile.am20
-rw-r--r--c/src/lib/libbsp/sh/gensh1/include/Makefile.in51
-rw-r--r--c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am34
-rw-r--r--c/src/lib/libbsp/sh/gensh1/scitab/Makefile.in74
-rw-r--r--c/src/lib/libbsp/sh/gensh1/start/Makefile.am32
-rw-r--r--c/src/lib/libbsp/sh/gensh1/start/Makefile.in65
-rw-r--r--c/src/lib/libbsp/sh/gensh1/startup/Makefile.am39
-rw-r--r--c/src/lib/libbsp/sh/gensh1/startup/Makefile.in77
-rw-r--r--c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in13
-rw-r--r--c/src/lib/libbsp/sh/gensh2/Makefile.am17
-rw-r--r--c/src/lib/libbsp/sh/gensh2/Makefile.in27
-rw-r--r--c/src/lib/libbsp/sh/gensh2/configure.in31
-rw-r--r--c/src/lib/libbsp/sh/gensh2/console/Makefile.am34
-rw-r--r--c/src/lib/libbsp/sh/gensh2/console/Makefile.in71
-rw-r--r--c/src/lib/libbsp/sh/gensh2/include/Makefile.am17
-rw-r--r--c/src/lib/libbsp/sh/gensh2/include/Makefile.in43
-rw-r--r--c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am36
-rw-r--r--c/src/lib/libbsp/sh/gensh2/scitab/Makefile.in74
-rw-r--r--c/src/lib/libbsp/sh/gensh2/start/Makefile.am27
-rw-r--r--c/src/lib/libbsp/sh/gensh2/start/Makefile.in70
-rw-r--r--c/src/lib/libbsp/sh/gensh2/startup/Makefile.am39
-rw-r--r--c/src/lib/libbsp/sh/gensh2/startup/Makefile.in77
-rw-r--r--c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in11
-rw-r--r--c/src/lib/libbsp/sh/shared/Makefile.am11
34 files changed, 490 insertions, 785 deletions
diff --git a/c/src/lib/libbsp/bare/include/Makefile.am b/c/src/lib/libbsp/bare/include/Makefile.am
index e5577f4fe6..46ceb70cac 100644
--- a/c/src/lib/libbsp/bare/include/Makefile.am
+++ b/c/src/lib/libbsp/bare/include/Makefile.am
@@ -3,17 +3,20 @@
##
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) $< $@
+
all-local: $(TMPINSTALL_FILES)
include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/configure.in b/c/src/lib/libbsp/configure.in
index 3db27b9f9b..d237d7d990 100644
--- a/c/src/lib/libbsp/configure.in
+++ b/c/src/lib/libbsp/configure.in
@@ -58,25 +58,31 @@ esac
if test "$RTEMS_BSP" = "bare" ; then
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)
-
- # 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"`
+ 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"`
+ 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
if test "$HAS_MP" = "yes"; then
@@ -86,13 +92,11 @@ else
t="$bspcpudir$bspdir/shmsupp"
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)
# try to explicitly list a Makefile here
diff --git a/c/src/lib/libbsp/sh/Makefile.am b/c/src/lib/libbsp/sh/Makefile.am
new file mode 100644
index 0000000000..0f5395fa38
--- /dev/null
+++ b/c/src/lib/libbsp/sh/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/Makefile.in b/c/src/lib/libbsp/sh/Makefile.in
deleted file mode 100644
index 37eab8e0a6..0000000000
--- a/c/src/lib/libbsp/sh/Makefile.in
+++ /dev/null
@@ -1,26 +0,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
diff --git a/c/src/lib/libbsp/sh/configure.in b/c/src/lib/libbsp/sh/configure.in
new file mode 100644
index 0000000000..6659f81adc
--- /dev/null
+++ b/c/src/lib/libbsp/sh/configure.in
@@ -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)
diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am
new file mode 100644
index 0000000000..1fefc6d5a6
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.in b/c/src/lib/libbsp/sh/gensh1/Makefile.in
deleted file mode 100644
index b95d0b35c9..0000000000
--- a/c/src/lib/libbsp/sh/gensh1/Makefile.in
+++ /dev/null
@@ -1,27 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh1/configure.in b/c/src/lib/libbsp/sh/gensh1/configure.in
new file mode 100644
index 0000000000..d15a1e7d41
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh1/configure.in
@@ -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)
diff --git a/c/src/lib/libbsp/sh/gensh1/console/Makefile.am b/c/src/lib/libbsp/sh/gensh1/console/Makefile.am
new file mode 100644
index 0000000000..ef2d64c4be
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh1/console/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh1/console/Makefile.in b/c/src/lib/libbsp/sh/gensh1/console/Makefile.in
deleted file mode 100644
index 5622f631c6..0000000000
--- a/c/src/lib/libbsp/sh/gensh1/console/Makefile.in
+++ /dev/null
@@ -1,71 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh1/include/Makefile.am b/c/src/lib/libbsp/sh/gensh1/include/Makefile.am
new file mode 100644
index 0000000000..1c911fd417
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh1/include/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh1/include/Makefile.in b/c/src/lib/libbsp/sh/gensh1/include/Makefile.in
deleted file mode 100644
index e58ed80066..0000000000
--- a/c/src/lib/libbsp/sh/gensh1/include/Makefile.in
+++ /dev/null
@@ -1,51 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am b/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am
new file mode 100644
index 0000000000..563f4cef46
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.in b/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.in
deleted file mode 100644
index 98887dd08d..0000000000
--- a/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.in
+++ /dev/null
@@ -1,74 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh1/start/Makefile.am b/c/src/lib/libbsp/sh/gensh1/start/Makefile.am
new file mode 100644
index 0000000000..7062e94218
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh1/start/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh1/start/Makefile.in b/c/src/lib/libbsp/sh/gensh1/start/Makefile.in
deleted file mode 100644
index 53175c1821..0000000000
--- a/c/src/lib/libbsp/sh/gensh1/start/Makefile.in
+++ /dev/null
@@ -1,65 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.am b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.am
new file mode 100644
index 0000000000..177f7f085d
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in
deleted file mode 100644
index 3de42b64e0..0000000000
--- a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in
+++ /dev/null
@@ -1,77 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in b/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in
index 231bef4fa5..b9c2187238 100644
--- a/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in
+++ b/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in
@@ -7,8 +7,8 @@
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh1/wrapup
+top_builddir = ..
+subdir = wrapup
RTEMS_ROOT = @RTEMS_ROOT@
PROJECT_ROOT = @PROJECT_ROOT@
@@ -62,15 +62,10 @@ $(LIB): ${OBJS}
$(make-library)
$(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA): $(LIB)
- $(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
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.am b/c/src/lib/libbsp/sh/gensh2/Makefile.am
new file mode 100644
index 0000000000..84c0f5d606
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh2/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.in b/c/src/lib/libbsp/sh/gensh2/Makefile.in
deleted file mode 100644
index ae9f203b14..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/Makefile.in
+++ /dev/null
@@ -1,27 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh2/configure.in b/c/src/lib/libbsp/sh/gensh2/configure.in
new file mode 100644
index 0000000000..95ba513044
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh2/configure.in
@@ -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)
diff --git a/c/src/lib/libbsp/sh/gensh2/console/Makefile.am b/c/src/lib/libbsp/sh/gensh2/console/Makefile.am
new file mode 100644
index 0000000000..7a0924d1d5
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh2/console/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh2/console/Makefile.in b/c/src/lib/libbsp/sh/gensh2/console/Makefile.in
deleted file mode 100644
index 24760fbe76..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/console/Makefile.in
+++ /dev/null
@@ -1,71 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh2/include/Makefile.am b/c/src/lib/libbsp/sh/gensh2/include/Makefile.am
new file mode 100644
index 0000000000..ae855815c3
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh2/include/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh2/include/Makefile.in b/c/src/lib/libbsp/sh/gensh2/include/Makefile.in
deleted file mode 100644
index abbcd26b6e..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/include/Makefile.in
+++ /dev/null
@@ -1,43 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am b/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am
new file mode 100644
index 0000000000..729473ac56
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.in b/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.in
deleted file mode 100644
index db7c92805b..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.in
+++ /dev/null
@@ -1,74 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh2/start/Makefile.am b/c/src/lib/libbsp/sh/gensh2/start/Makefile.am
new file mode 100644
index 0000000000..f6aeba8911
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh2/start/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh2/start/Makefile.in b/c/src/lib/libbsp/sh/gensh2/start/Makefile.in
deleted file mode 100644
index 6e7cdeba44..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/start/Makefile.in
+++ /dev/null
@@ -1,70 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh2/startup/Makefile.am b/c/src/lib/libbsp/sh/gensh2/startup/Makefile.am
new file mode 100644
index 0000000000..9fb68d4c9d
--- /dev/null
+++ b/c/src/lib/libbsp/sh/gensh2/startup/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/sh/gensh2/startup/Makefile.in b/c/src/lib/libbsp/sh/gensh2/startup/Makefile.in
deleted file mode 100644
index 9b8f5e6575..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/startup/Makefile.in
+++ /dev/null
@@ -1,77 +0,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
diff --git a/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in b/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in
index 19f6e613c5..2ed45ce42d 100644
--- a/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in
+++ b/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.in
@@ -7,8 +7,8 @@
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = sh/gensh2/wrapup
+top_builddir = ..
+subdir = wrapup
RTEMS_ROOT = @RTEMS_ROOT@
PROJECT_ROOT = @PROJECT_ROOT@
@@ -60,10 +60,11 @@ CLOBBER_ADDITIONS +=
$(LIB): ${OBJS}
$(make-library)
-all: ${ARCH} $(SRCS) $(LIB)
- $(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib
+$(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA): $(LIB)
+ $(INSTALL_DATA) $< $@
+
+all: ${ARCH} $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA)
-install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/c/src/lib/libbsp/sh/shared/Makefile.am b/c/src/lib/libbsp/sh/shared/Makefile.am
new file mode 100644
index 0000000000..38c0249417
--- /dev/null
+++ b/c/src/lib/libbsp/sh/shared/Makefile.am
@@ -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