Index: c/src/lib/libbsp/or32/orp/ChangeLog
===================================================================
--- c/src/lib/libbsp/or32/orp/ChangeLog	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ c/src/lib/libbsp/or32/orp/ChangeLog	(revision eb3456d0c308da0dba8d67f53f77d50b273a0dd9)
@@ -1,2 +1,11 @@
+2004-01-30	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* Makefile.am: Merge-in clock/Makefile.am, console/Makefile.am,
+	start/Makefile.am, startup/Makefile.am, timer/Makefile.am,
+	wrapup/Makefile.am. Use automake compilation rules.
+	* clock/Makefile.am, console/Makefile.am, start/Makefile.am,
+	startup/Makefile.am, timer/Makefile.am, wrapup/Makefile.am: Remove.
+	* configure.ac: Reflect changes above.
+
 2004-01-28	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/lib/libbsp/or32/orp/Makefile.am
===================================================================
--- c/src/lib/libbsp/or32/orp/Makefile.am	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ c/src/lib/libbsp/or32/orp/Makefile.am	(revision eb3456d0c308da0dba8d67f53f77d50b273a0dd9)
@@ -5,15 +5,96 @@
 ACLOCAL_AMFLAGS = -I ../../../../aclocal
 
-# wrapup is the one that actually builds and installs the library
-# from the individual .rel files built in other directories
-SUBDIRS = . clock console startup timer start wrapup
-
+include $(top_srcdir)/../../../../automake/compile.am
 include $(top_srcdir)/../../bsp.am
 
+EXTRA_PROGRAMS =
+CLEANFILES =
+noinst_DATA =
+
 include_HEADERS += include/coverhd.h
+
+EXTRA_DIST = start.S
+start$(LIB_VARIANT).$(OBJEXT): start/start.S
+	${CCASCOMPILE} -DASM -o $@ -c $<
+project_lib_DATA = start$(LIB_VARIANT).$(OBJEXT)
+
+dist_project_lib_DATA += startup/linkcmds
+
+EXTRA_PROGRAMS += startup.rel
+CLEANFILES += startup.rel
+startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
+    startup/bspstart.c startup/bspclean.c ../../shared/bootcard.c \
+    ../../shared/main.c ../../shared/sbrk.c \
+    ../../shared/gnatinstallhandler.c startup/setvec.c
+startup_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
+startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+EXTRA_PROGRAMS += startup_g.rel
+CLEANFILES += startup_g.rel
+startup_g_rel_SOURCES = $(startup_rel_SOURCES)
+startup_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
+startup_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+noinst_DATA += startup$(LIB_VARIANT).rel
+
+EXTRA_PROGRAMS += clock.rel
+CLEANFILES += clock.rel
+clock_rel_SOURCES = clock/clockdrv.c
+clock_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
+clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+EXTRA_PROGRAMS += clock_g.rel
+CLEANFILES += clock_g.rel
+clock_g_rel_SOURCES = $(clock_rel_SOURCES)
+clock_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
+clock_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+noinst_DATA += clock$(LIB_VARIANT).rel
+
+EXTRA_PROGRAMS += console.rel
+CLEANFILES += console.rel
+console_rel_SOURCES = console/console.c console/console.h
+console_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
+console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+EXTRA_PROGRAMS += console_g.rel
+CLEANFILES += console_g.rel
+console_g_rel_SOURCES = $(console_rel_SOURCES)
+console_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
+console_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+noinst_DATA += console$(LIB_VARIANT).rel
+
+EXTRA_PROGRAMS += timer.rel
+CLEANFILES += timer.rel
+timer_rel_SOURCES = timer/timer.c timer/timerisr.c
+timer_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
+timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+EXTRA_PROGRAMS += timer_g.rel
+CLEANFILES += timer_g.rel
+timer_g_rel_SOURCES = $(timer_rel_SOURCES)
+timer_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
+timer_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+noinst_DATA += timer$(LIB_VARIANT).rel
+
+EXTRA_LIBRARIES = libbsp.a
+CLEANFILES += libbsp.a
+libbsp_a_SOURCES =
+libbsp_a_LIBADD = startup$(LIB_VARIANT).rel clock$(LIB_VARIANT).rel \
+    console$(LIB_VARIANT).rel timer$(LIB_VARIANT).rel
+
+EXTRA_LIBRARIES += libbsp_g.a
+CLEANFILES += libbsp_g.a
+libbsp_g_a_SOURCES = $(libbsp_a_SOURCES)
+libbsp_g_a_LIBADD = $(libbsp_a_LIBADD)
+
+noinst_DATA += libbsp$(LIB_VARIANT).a
 
 all-local: $(PREINSTALL_FILES)
 
 PREINSTALL_DIRS =
+TMPINSTALL_FILES =
 
 $(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
@@ -21,7 +102,15 @@
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
 
-CLEANFILES = $(PREINSTALL_FILES)
+$(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT): start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
+TMPINSTALL_FILES += $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
+
+$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
+TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
+
+CLEANFILES += $(PREINSTALL_FILES)
 DISTCLEANFILES = $(PREINSTALL_DIRS)
+CLEANFILES += $(TMPINSTALL_FILES)
 
-include $(top_srcdir)/../../../../automake/subdirs.am
 include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/or32/orp/clock/.cvsignore
===================================================================
--- c/src/lib/libbsp/or32/orp/clock/.cvsignore	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libbsp/or32/orp/clock/Makefile.am
===================================================================
--- c/src/lib/libbsp/or32/orp/clock/Makefile.am	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,30 +1,0 @@
-##
-## $Id$
-##
-
-PGM = $(ARCH)/clock.rel
-
-C_FILES = clockdrv.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
-
-OBJS = $(C_O_FILES)
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
-	$(make-rel)
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-all-local: $(OBJS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = clockdrv.c
-
-include $(top_srcdir)/../../../../automake/local.am
Index: c/src/lib/libbsp/or32/orp/configure.ac
===================================================================
--- c/src/lib/libbsp/or32/orp/configure.ac	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ c/src/lib/libbsp/or32/orp/configure.ac	(revision eb3456d0c308da0dba8d67f53f77d50b273a0dd9)
@@ -17,10 +17,4 @@
 
 # Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile
-clock/Makefile
-console/Makefile
-start/Makefile
-startup/Makefile
-timer/Makefile
-wrapup/Makefile])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
Index: src/lib/libbsp/or32/orp/console/.cvsignore
===================================================================
--- c/src/lib/libbsp/or32/orp/console/.cvsignore	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libbsp/or32/orp/console/Makefile.am
===================================================================
--- c/src/lib/libbsp/or32/orp/console/Makefile.am	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,32 +1,0 @@
-##
-## $Id$
-##
-
-VPATH = @srcdir@:@srcdir@/../../../shared
-
-PGM = $(ARCH)/console.rel
-
-C_FILES = console.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
-
-OBJS = $(C_O_FILES)
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
-	$(make-rel)
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-all-local: $(OBJS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = console.c console.h
-
-include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/or32/orp/start/.cvsignore
===================================================================
--- c/src/lib/libbsp/or32/orp/start/.cvsignore	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libbsp/or32/orp/start/Makefile.am
===================================================================
--- c/src/lib/libbsp/or32/orp/start/Makefile.am	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,37 +1,0 @@
-##
-## $Id$
-##
-
-S_FILES = start.S
-S_O_FILES = $(S_FILES:%.c=$(ARCH)/%.$(OBJEXT))
-
-OBJS = $(S_O_FILES)
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../../../automake/lib.am
-include $(top_srcdir)/../../bspstart.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-project_lib_DATA = $(ARCH)/start$(LIB_VARIANT).$(OBJEXT)
-
-all-local: $(TMPINSTALL_FILES)
-
-EXTRA_DIST = start.S
-
-TMPINSTALL_FILES =
-
-$(PROJECT_LIB)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_LIB)
-	@: > $(PROJECT_LIB)/$(dirstamp)
-TMPINSTALL_FILES += $(PROJECT_LIB)/$(dirstamp)
-
-$(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT): $(ARCH)/start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
-
-CLEANFILES = $(TMPINSTALL_FILES)
-
-include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/or32/orp/startup/.cvsignore
===================================================================
--- c/src/lib/libbsp/or32/orp/startup/.cvsignore	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libbsp/or32/orp/startup/Makefile.am
===================================================================
--- c/src/lib/libbsp/or32/orp/startup/Makefile.am	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,46 +1,0 @@
-##
-## $Id$
-##
-
-VPATH = @srcdir@:@srcdir@/../../../shared
-
-PGM = $(ARCH)/startup.rel
-
-C_FILES = bsplibc.c bsppost.c bspstart.c bspclean.c bootcard.c main.c sbrk.c \
-    gnatinstallhandler.c setvec.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
-
-OBJS = $(C_O_FILES)
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
-	$(make-rel)
-
-project_lib_DATA = linkcmds
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-all-local: $(PGM) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = bspclean.c bspstart.c exit.c linkcmds setvec.c
-
-TMPINSTALL_FILES =
-
-$(PROJECT_LIB)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_LIB)
-	@: > $(PROJECT_LIB)/$(dirstamp)
-TMPINSTALL_FILES += $(PROJECT_LIB)/$(dirstamp)
-
-$(PROJECT_LIB)/linkcmds: linkcmds $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-
-CLEANFILES = $(TMPINSTALL_FILES)
-
-include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/or32/orp/timer/.cvsignore
===================================================================
--- c/src/lib/libbsp/or32/orp/timer/.cvsignore	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libbsp/or32/orp/timer/Makefile.am
===================================================================
--- c/src/lib/libbsp/or32/orp/timer/Makefile.am	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,32 +1,0 @@
-##
-## $Id$
-##
-
-VPATH = @srcdir@:@srcdir@/../../../shared
-
-PGM = $(ARCH)/timer.rel
-
-C_FILES = timer.c timerisr.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
-
-OBJS = $(C_O_FILES)
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
-	$(make-rel)
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-all-local: $(OBJS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = timer.c timerisr.c
-
-include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/or32/orp/wrapup/.cvsignore
===================================================================
--- c/src/lib/libbsp/or32/orp/wrapup/.cvsignore	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libbsp/or32/orp/wrapup/Makefile.am
===================================================================
--- c/src/lib/libbsp/or32/orp/wrapup/Makefile.am	(revision dd551dbf0271b5994924e48f2e6cb95fbb7a9112)
+++ 	(revision )
@@ -1,22 +1,0 @@
-##
-## $Id$
-##
-
-BSP_FILES = startup clock console timer
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../../../automake/lib.am
-
-# bummer; have to use $foreach since % pattern subst rules only replace 1x
-OBJS = $(foreach piece, $(BSP_FILES), ../$(piece)/$(ARCH)/*.$(OBJEXT)) \
-    $(wildcard \
-    ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/$(ARCH)/*.$(OBJEXT)) \
-    $(foreach piece, $(GENERIC_FILES), \
-    ../../../$(piece)/$(ARCH)/$(piece).rel)
-
-$(ARCH)/libbsp.a: ${OBJS}
-	$(make-library)
-
-noinst_DATA = $(ARCH)/libbsp.a
-
-include $(top_srcdir)/../../../../automake/local.am
