Index: c/src/lib/libbsp/powerpc/helas403/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/helas403/ChangeLog	(revision fb6b168f61f86e9968df36cb4d3f52d1de8815e8)
+++ c/src/lib/libbsp/powerpc/helas403/ChangeLog	(revision 47caf1c21caae78fdfa936a297445c1d1693d50a)
@@ -1,2 +1,11 @@
+2004-01-30	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* Makefile.am: Merge-in dlentry/Makefile.am, flashentry/Makefile.am,
+	startup/Makefile.am. Use automake compilation rules.
+	* dlentry/Makefile.am, flashentry/Makefile.am, startup/Makefile.am:
+	Remove.
+	* configure.ac: Reflect changes above.
+	* wrapup/Makefile.am: Reflect changes above.
+
 2004-01-30	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/lib/libbsp/powerpc/helas403/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/helas403/Makefile.am	(revision fb6b168f61f86e9968df36cb4d3f52d1de8815e8)
+++ c/src/lib/libbsp/powerpc/helas403/Makefile.am	(revision 47caf1c21caae78fdfa936a297445c1d1693d50a)
@@ -7,7 +7,12 @@
 # wrapup is the one that actually builds and installs the library
 # from the individual .rel files built in other directories
-SUBDIRS = . dlentry flashentry startup @exceptions@ wrapup
+SUBDIRS = . @exceptions@ wrapup
 
+include $(top_srcdir)/../../../../automake/compile.am
 include $(top_srcdir)/../../bsp.am
+
+EXTRA_PROGRAMS =
+CLEANFILES =
+noinst_DATA =
 
 dist_project_lib_DATA += bsp_specs.dl
@@ -15,5 +20,52 @@
 include_HEADERS += include/coverhd.h
 
-all-local: $(PREINSTALL_FILES)
+EXTRA_PROGRAMS += dlentry.rel
+CLEANFILES += dlentry.rel
+dlentry_rel_SOURCES = dlentry/dlentry.S
+dlentry_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
+dlentry_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+EXTRA_PROGRAMS += dlentry_g.rel
+CLEANFILES += dlentry_g.rel
+dlentry_g_rel_SOURCES = $(dlentry_rel_SOURCES)
+dlentry_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
+dlentry_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+noinst_DATA += dlentry$(LIB_VARIANT).rel
+
+EXTRA_PROGRAMS += flashentry.rel
+CLEANFILES += flashentry.rel
+flashentry_rel_SOURCES = flashentry/flashentry.S
+flashentry_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
+flashentry_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+EXTRA_PROGRAMS += flashentry_g.rel
+CLEANFILES += flashentry_g.rel
+flashentry_g_rel_SOURCES = $(flashentry_rel_SOURCES)
+flashentry_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
+flashentry_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
+noinst_DATA += flashentry$(LIB_VARIANT).rel
+
+dist_project_lib_DATA += startup/linkcmds startup/linkcmds.dl
+
+EXTRA_PROGRAMS += startup.rel
+CLEANFILES += startup.rel
+startup_rel_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
+    ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
+    ../../shared/main.c ../../shared/sbrk.c startup/setvec.c \
+    ../../shared/gnatinstallhandler.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
+
+all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
 
 EXTRA_DIST = times
@@ -30,5 +82,13 @@
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
 
-CLEANFILES = $(PREINSTALL_FILES)
+$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
+TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
+
+$(PROJECT_LIB)/linkcmds.dl: startup/linkcmds.dl $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.dl
+TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.dl
+
+CLEANFILES += $(PREINSTALL_FILES)
 DISTCLEANFILES = $(PREINSTALL_DIRS)
 CLEANFILES += $(TMPINSTALL_FILES)
Index: c/src/lib/libbsp/powerpc/helas403/configure.ac
===================================================================
--- c/src/lib/libbsp/powerpc/helas403/configure.ac	(revision fb6b168f61f86e9968df36cb4d3f52d1de8815e8)
+++ c/src/lib/libbsp/powerpc/helas403/configure.ac	(revision 47caf1c21caae78fdfa936a297445c1d1693d50a)
@@ -34,7 +34,4 @@
 # Explicitly list all Makefiles here
 AC_CONFIG_FILES([Makefile
-dlentry/Makefile
-flashentry/Makefile
-startup/Makefile
 wrapup/Makefile])
 
Index: src/lib/libbsp/powerpc/helas403/dlentry/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/helas403/dlentry/Makefile.am	(revision fb6b168f61f86e9968df36cb4d3f52d1de8815e8)
+++ 	(revision )
@@ -1,30 +1,0 @@
-##
-## $Id$
-##
-
-PGM = $(ARCH)/dlentry.rel
-
-S_FILES = dlentry.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
-
-OBJS = $(S_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: $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = dlentry.S
-
-include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/powerpc/helas403/flashentry/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/helas403/flashentry/Makefile.am	(revision fb6b168f61f86e9968df36cb4d3f52d1de8815e8)
+++ 	(revision )
@@ -1,30 +1,0 @@
-##
-## $Id$
-##
-
-PGM = $(ARCH)/flashentry.rel
-
-S_FILES = flashentry.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
-
-OBJS = $(S_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: $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = flashentry.S
-
-include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/powerpc/helas403/startup/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/helas403/startup/Makefile.am	(revision fb6b168f61f86e9968df36cb4d3f52d1de8815e8)
+++ 	(revision )
@@ -1,49 +1,0 @@
-##
-## $Id$
-##
-
-PGM = $(ARCH)/startup.rel
-
-C_FILES = bspclean.c bspstart.c setvec.c
-OBJS = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../../../automake/lib.am
-
-shared_C_FILES = $(top_srcdir)/../../shared/bootcard.c
-shared_C_FILES += $(top_srcdir)/../../shared/bsplibc.c
-shared_C_FILES += $(top_srcdir)/../../shared/bsppost.c
-shared_C_FILES += $(top_srcdir)/../../shared/main.c
-shared_C_FILES += $(top_srcdir)/../../shared/sbrk.c
-shared_C_FILES += $(top_srcdir)/../../shared/gnatinstallhandler.c
-OBJS += \
-    $(shared_C_FILES:$(top_srcdir)/../../shared/%.c=$(ARCH)/%.$(OBJEXT))
-
-$(ARCH)/%.$(OBJEXT): $(top_srcdir)/../../shared/%.c $(ARCH)/$(dirstamp)
-	${COMPILE} -o $@ -c $<
-
-$(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 linkcmds linkcmds.dl 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: c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am	(revision fb6b168f61f86e9968df36cb4d3f52d1de8815e8)
+++ c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am	(revision 47caf1c21caae78fdfa936a297445c1d1693d50a)
@@ -3,10 +3,8 @@
 ##
 
-BSP_PIECES = startup dlentry flashentry
-# pieces to pick up out of libcpu/ppc
+OBJS = ../startup$(LIB_VARIANT).rel ../dlentry$(LIB_VARIANT).rel \
+    ../flashentry$(LIB_VARIANT).rel
 
-# bummer; have to use $foreach since % pattern subst rules only replace 1x
-OBJS = $(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/*.$(OBJEXT)) \
-    ../@exceptions@/rtems-cpu$(LIB_VARIANT).rel \
+OBJS += ../@exceptions@/rtems-cpu$(LIB_VARIANT).rel \
     ../../../../libcpu/@RTEMS_CPU@/ppc403/clock$(LIB_VARIANT).rel \
     ../../../../libcpu/@RTEMS_CPU@/ppc403/timer$(LIB_VARIANT).rel \
