summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-12 16:38:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-12 16:38:56 +0000
commit69537ca9eccfa12142dea588fa34b70a6d220705 (patch)
tree6480f82ae96a1614df3d0719635213e194dc66ae /c/src/lib
parentCalled symbol table ".nm" not .num like every other BSP. (diff)
downloadrtems-69537ca9eccfa12142dea588fa34b70a6d220705.tar.bz2
Patch rtems-rc-20000104-16.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that converts the libbsp/i386 subdirectory to full automake.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/i386/i386ex/clock/Makefile.am30
-rw-r--r--c/src/lib/libbsp/i386/i386ex/console/Makefile.am33
-rw-r--r--c/src/lib/libbsp/i386/i386ex/console/Makefile.in69
-rw-r--r--c/src/lib/libbsp/i386/i386ex/include/Makefile.am21
-rw-r--r--c/src/lib/libbsp/i386/i386ex/include/Makefile.in52
-rw-r--r--c/src/lib/libbsp/i386/i386ex/start/Makefile.am37
-rw-r--r--c/src/lib/libbsp/i386/i386ex/start/Makefile.in69
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/Makefile.am48
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/Makefile.in82
-rw-r--r--c/src/lib/libbsp/i386/i386ex/timer/Makefile.am31
-rw-r--r--c/src/lib/libbsp/i386/i386ex/timer/Makefile.in70
-rw-r--r--c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am39
-rw-r--r--c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.in65
-rw-r--r--c/src/lib/libbsp/i386/pc386/3c509/Makefile.am37
-rw-r--r--c/src/lib/libbsp/i386/pc386/3c509/Makefile.in65
-rw-r--r--c/src/lib/libbsp/i386/pc386/Makefile.am14
-rw-r--r--c/src/lib/libbsp/i386/pc386/clock/Makefile.am30
-rw-r--r--c/src/lib/libbsp/i386/pc386/clock/Makefile.in65
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/Makefile.am34
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/Makefile.in70
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/Makefile.am31
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/Makefile.in56
-rw-r--r--c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am34
-rw-r--r--c/src/lib/libbsp/i386/pc386/ne2000/Makefile.in65
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/Makefile.am48
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/Makefile.in77
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/start16.S3
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/Makefile.am47
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/Makefile.in79
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/ldsegs.S3
-rw-r--r--c/src/lib/libbsp/i386/pc386/timer/Makefile.am31
-rw-r--r--c/src/lib/libbsp/i386/pc386/timer/Makefile.in70
-rw-r--r--c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am34
-rw-r--r--c/src/lib/libbsp/i386/pc386/wd8003/Makefile.in65
-rw-r--r--c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am39
-rw-r--r--c/src/lib/libbsp/i386/pc386/wrapup/Makefile.in77
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/Makefile.am7
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am30
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.in70
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am33
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/console/Makefile.in69
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am25
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/include/Makefile.in56
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am38
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/network/Makefile.in66
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am37
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/start/Makefile.in68
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am48
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in82
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am31
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.in70
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/configure.in7
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am16
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am16
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am14
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am24
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am12
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am13
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am39
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.in72
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c10
-rw-r--r--c/src/lib/libbsp/m68k/efi332/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/m68k/efi332/start/start.c8
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/start/start.c8
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/start/start.S6
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/start/start.S20
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/start/start.S2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp84
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom82
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/start/reset.S8
-rw-r--r--c/src/lib/libbsp/m68k/shared/start.S6
76 files changed, 1142 insertions, 1787 deletions
diff --git a/c/src/lib/libbsp/i386/i386ex/clock/Makefile.am b/c/src/lib/libbsp/i386/i386ex/clock/Makefile.am
new file mode 100644
index 0000000000..cfcc5d0e38
--- /dev/null
+++ b/c/src/lib/libbsp/i386/i386ex/clock/Makefile.am
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/clock.rel
+
+## C source names
+C_FILES = ckinit.c
+clock_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(clock_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = ckinit.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/i386ex/console/Makefile.am b/c/src/lib/libbsp/i386/i386ex/console/Makefile.am
new file mode 100644
index 0000000000..6a4eba54bd
--- /dev/null
+++ b/c/src/lib/libbsp/i386/i386ex/console/Makefile.am
@@ -0,0 +1,33 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/../../shared/io
+
+PGM = ${ARCH}/console.rel
+
+## sources
+C_FILES = console.c printk.c
+
+console_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(console_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = console.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/i386ex/console/Makefile.in b/c/src/lib/libbsp/i386/i386ex/console/Makefile.in
deleted file mode 100644
index 5b4af61582..0000000000
--- a/c/src/lib/libbsp/i386/i386ex/console/Makefile.in
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = console
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@srcdir@/../../shared/io
-
-PGM = ${ARCH}/console.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = console printk
-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@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-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/i386/i386ex/include/Makefile.am b/c/src/lib/libbsp/i386/i386ex/include/Makefile.am
new file mode 100644
index 0000000000..fdc80607dc
--- /dev/null
+++ b/c/src/lib/libbsp/i386/i386ex/include/Makefile.am
@@ -0,0 +1,21 @@
+##
+## $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/i386/i386ex/include/Makefile.in b/c/src/lib/libbsp/i386/i386ex/include/Makefile.in
deleted file mode 100644
index e8c70a72e0..0000000000
--- a/c/src/lib/libbsp/i386/i386ex/include/Makefile.in
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = 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: $(SRCS)
- @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
- @$(INSTALL_CHANGE) -m 644 $(EQ_FILES) $(PROJECT_INCLUDE)
-
-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/i386/i386ex/start/Makefile.am b/c/src/lib/libbsp/i386/i386ex/start/Makefile.am
new file mode 100644
index 0000000000..27fc0369cc
--- /dev/null
+++ b/c/src/lib/libbsp/i386/i386ex/start/Makefile.am
@@ -0,0 +1,37 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGMS = ${ARCH}/start.o
+
+# Assembly source names, if any, go here -- minus the .S
+S_FILES = start.S
+S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
+
+H_FILES = 80386ex.h
+noinst_HEADERS = $(H_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+if RTEMS_GAS_CODE16
+AM_CPPFLAGS += -DNEW_GAS
+endif
+
+$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o: $(ARCH)/start.o
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += \
+$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+
+all-local: $(ARCH) $(TMPINSTALL_FILES)
+
+EXTRA_DIST = 80386ex.inc macros.inc start.S
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/i386ex/start/Makefile.in b/c/src/lib/libbsp/i386/i386ex/start/Makefile.in
deleted file mode 100644
index 29fbb7c1de..0000000000
--- a/c/src/lib/libbsp/i386/i386ex/start/Makefile.in
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = 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 +=
-#
-
-@RTEMS_GAS_CODE16_TRUE@CPPFLAGS += -DNEW_GAS
-
-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 ${PGMS} $(PROJECT_RELEASE)/lib
-
-# Install the program(s), appending _g or _p as appropriate.
-# for include files, just use $(INSTALL_CHANGE)
-
-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/i386/i386ex/startup/Makefile.am b/c/src/lib/libbsp/i386/i386ex/startup/Makefile.am
new file mode 100644
index 0000000000..0cfef970f2
--- /dev/null
+++ b/c/src/lib/libbsp/i386/i386ex/startup/Makefile.am
@@ -0,0 +1,48 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = \
+ @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/comm:@srcdir@/../../shared/irq:@srcdir@/../../shared/io
+
+PGM = ${ARCH}/startup.rel
+
+## C source names
+C_FILES = bspclean.c bsplibc.c bsppost.c bspstart.c bootcard.c main.c sbrk.c \
+ irq.c irq_init.c i386-stub.c i386-stub-glue.c uart.c gnatinstallhandler.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+## Assembly source names
+S_FILES = irq_asm.S
+S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
+
+startup_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+## FIXME: This doesn't seem to be useful
+## AM_CPPFLAGS += -I$(srcdir)
+
+AM_CPPFLAGS += -DBSP_IS_I386EX=1
+
+$(PGM): ${startup_rel_OBJECTS}
+ $(make-rel)
+
+$(PROJECT_RELEASE)/lib/linkcmds: linkcmds
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(PGM) $(TMPINSTALL_FILES)
+
+UNUSED_C_FILES = setvec.c
+EXTRA_DIST = README bspstart.c linkcmds $(UNUSED_C_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/i386ex/startup/Makefile.in b/c/src/lib/libbsp/i386/i386ex/startup/Makefile.in
deleted file mode 100644
index b0912c5cfa..0000000000
--- a/c/src/lib/libbsp/i386/i386ex/startup/Makefile.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = startup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = \
- @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/comm:@srcdir@/../../shared/irq:@srcdir@/../../shared/io
-
-PGM = ${ARCH}/startup.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = bspclean bsplibc bsppost bspstart bootcard main sbrk irq irq_init \
- i386-stub-glue uart i386-stub 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
-# removed initcsu piece, ldsegs piece and flush
-S_PIECES = irq_asm
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(srcdir)/linkcmds $(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@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_RELEASE)/lib
-
-$(INSTALLDIRS):
- @$(mkinstalldirs) $(INSTALLDIRS)
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-#DEFINES += -DPRINTON
-
-DEFINES += -I$(srcdir) -DBSP_IS_I386EX=1
-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
-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/i386/i386ex/timer/Makefile.am b/c/src/lib/libbsp/i386/i386ex/timer/Makefile.am
new file mode 100644
index 0000000000..8f377f2007
--- /dev/null
+++ b/c/src/lib/libbsp/i386/i386ex/timer/Makefile.am
@@ -0,0 +1,31 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/timer.rel
+
+## sources
+C_FILES = timer.c
+S_FILES = timerisr.S
+timer_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o) $(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 +=
+#
+
+$(PGM): $(timer_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = timer.c timerisr.S
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/i386ex/timer/Makefile.in b/c/src/lib/libbsp/i386/i386ex/timer/Makefile.in
deleted file mode 100644
index b49fe27e61..0000000000
--- a/c/src/lib/libbsp/i386/i386ex/timer/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = timer
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/timer.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = timer
-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 = timerisr
-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 +=
-
-$(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/i386/i386ex/wrapup/Makefile.am b/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am
new file mode 100644
index 0000000000..6bef023a8c
--- /dev/null
+++ b/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am
@@ -0,0 +1,39 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+# We only build the Network library if HAS_NETWORKING was defined
+# dec21140 is supported via libchip
+if HAS_NETWORKING
+NETWORK = network
+endif
+
+BSP_FILES = startup clock console timer $(NETWORK)
+GENERIC_FILES =
+
+# bummer; have to use $foreach since % pattern subst rules only replace 1x
+OBJS = $(foreach piece, $(BSP_FILES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
+ $(foreach piece, $(GENERIC_FILES), \
+ ../../../$(piece)/$(ARCH)/$(piece).rel)
+LIB = $(ARCH)/libbsp.a
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(LIB): ${OBJS}
+ $(make-library)
+
+$(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a: $(LIB)
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(LIB) $(TMPINSTALL_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.in b/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.in
deleted file mode 100644
index f14096c7c1..0000000000
--- a/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = wrapup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-BSP_PIECES = startup clock console timer $(NETWORK)
-GENERIC_PIECES =
-
-# We only build the Network library if HAS_NETWORKING was defined
-NETWORK_yes_V = network
-NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
-
-# bummer; have to use $foreach since % pattern subst rules only replace 1x
-OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
- $(foreach piece, $(GENERIC_PIECES), \
- ../../../$(piece)/$(ARCH)/$(piece).rel)
-LIB = $(ARCH)/libbsp.a
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/lib.cfg
-
-INSTALL = @INSTALL@
-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 +=
-
-$(LIB): ${OBJS}
- $(make-library)
-
-all: ${ARCH} $(SRCS) $(LIB)
- $(INSTALL_VARIANT) -m 644 $(LIB) $(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/i386/pc386/3c509/Makefile.am b/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
new file mode 100644
index 0000000000..3cf4acc84a
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
@@ -0,0 +1,37 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/3c509.rel
+
+## C source names
+C_FILES = 3c509.c elink.c
+X3c509_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = 3c509.h elink.h
+noinst_HEADERS = $(H_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
+
+$(PGM): $(X3c509_rel_OBJECTS)
+ $(make-rel)
+
+if HAS_NETWORKING
+all-local: ${ARCH} $(PGM)
+endif
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = 3c509.c elink.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/3c509/Makefile.in b/c/src/lib/libbsp/i386/pc386/3c509/Makefile.in
deleted file mode 100644
index eb570c134f..0000000000
--- a/c/src/lib/libbsp/i386/pc386/3c509/Makefile.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = 3c509
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/3c509.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = 3c509 elink
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_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 += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
-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/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am
index 66d4dd9e23..c332929df0 100644
--- a/c/src/lib/libbsp/i386/pc386/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/Makefile.am
@@ -5,18 +5,18 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-if HAS_NETWORKING
-# We only build the Network library if HAS_NETWORKING was defined
-# dec21140 is supported via libchip
-NETWORK = ne2000 wd8003 3c509
-endif
-
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUBDIRS = . include tools start startup clock console timer $(NETWORK) wrapup
+SUBDIRS = . include tools start startup clock console timer ne2000 wd8003 \
+ 3c509 wrapup
include $(top_srcdir)/../../bsp.am
+$(PROJECT_RELEASE)/BootImgs:
+ $(mkinstalldirs) $@
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/BootImgs
+
EXTRA_DIST = HOWTO README.dec21140 STATUS bsp_specs times_i486dx times_p5
include $(top_srcdir)/../../../../../../automake/subdirs.am
diff --git a/c/src/lib/libbsp/i386/pc386/clock/Makefile.am b/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
new file mode 100644
index 0000000000..ec33e3e531
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/clock.rel
+
+## C source names
+C_FILES = ckinit.c rtc.c
+clock_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(clock_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = ckinit.c rtc.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/clock/Makefile.in b/c/src/lib/libbsp/i386/pc386/clock/Makefile.in
deleted file mode 100644
index f18adedd97..0000000000
--- a/c/src/lib/libbsp/i386/pc386/clock/Makefile.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = clock
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/clock.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = ckinit rtc
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_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/i386/pc386/console/Makefile.am b/c/src/lib/libbsp/i386/pc386/console/Makefile.am
new file mode 100644
index 0000000000..60af714fe3
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/console/Makefile.am
@@ -0,0 +1,34 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/../../shared/io
+
+PGM = ${ARCH}/console.rel
+
+## sources
+C_FILES = console.c inch.c outch.c printk.c
+S_FILES = videoAsm.S
+
+console_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o) $(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 +=
+#
+
+$(PGM): $(console_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = console.c inch.c outch.c videoAsm.S
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/console/Makefile.in b/c/src/lib/libbsp/i386/pc386/console/Makefile.in
deleted file mode 100644
index e2fa5b5859..0000000000
--- a/c/src/lib/libbsp/i386/pc386/console/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = console
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@srcdir@/../../shared/io
-
-PGM = ${ARCH}/console.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = console inch outch printk
-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 = videoAsm
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(C_FILES) $(H_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/i386/pc386/include/Makefile.am b/c/src/lib/libbsp/i386/pc386/include/Makefile.am
new file mode 100644
index 0000000000..e17a9968b1
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/include/Makefile.am
@@ -0,0 +1,31 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+# This driver needs to be reworked for the BSD stack.
+# We only install wd80x3.h if HAS_NETWORKING was defined
+if HAS_NETWORKING
+WD80X3 = wd80x3.h
+endif
+
+H_FILES = bsp.h crt.h $(WD80X3)
+noinst_HEADERS = $(H_FILES)
+
+$(PROJECT_INCLUDE):
+ $(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/%.h: %.h
+ $(INSTALL_DATA) $< $@
+
+$(PROJECT_INCLUDE)/coverhd.h: $(top_srcdir)/../../shared/include/coverhd.h
+ $(INSTALL_DATA) $< $@
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE) \
+$(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \
+$(PROJECT_INCLUDE)/coverhd.h
+
+all-local: $(PREINSTALL_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/include/Makefile.in b/c/src/lib/libbsp/i386/pc386/include/Makefile.in
deleted file mode 100644
index 9aa7e20e26..0000000000
--- a/c/src/lib/libbsp/i386/pc386/include/Makefile.in
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = include
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-# This driver needs to be reworked for the BSD stack.
-# We only install wd80x3.h if HAS_NETWORKING was defined
-WD80X3_yes_V = $(srcdir)/wd80x3.h
-WD80X3 = $(WD80X3_$(HAS_NETWORKING)_V)
-
-H_FILES = $(srcdir)/bsp.h $(srcdir)/../../../shared/include/coverhd.h \
- $(srcdir)/crt.h $(WD80X3)
-
-#
-# 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: $(SRCS)
- @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
- @$(INSTALL_CHANGE) -m 644 $(EQ_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/i386/pc386/ne2000/Makefile.am b/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
new file mode 100644
index 0000000000..0634c5a66f
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
@@ -0,0 +1,34 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/ne2000.rel
+
+## C source names
+C_FILES = ne2000.c
+ne2000_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
+
+$(PGM): $(ne2000_rel_OBJECTS)
+ $(make-rel)
+
+if HAS_NETWORKING
+all-local: ${ARCH} $(PGM)
+endif
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = ne2000.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.in b/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.in
deleted file mode 100644
index b1aafa58d5..0000000000
--- a/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = ne2000
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/ne2000.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = ne2000
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_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 += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
-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/i386/pc386/start/Makefile.am b/c/src/lib/libbsp/i386/pc386/start/Makefile.am
new file mode 100644
index 0000000000..32ef8a28df
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/start/Makefile.am
@@ -0,0 +1,48 @@
+#
+# $Id$
+#
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGMS = ${ARCH}/start.o ${ARCH}/start16.bin
+
+# Assembly source names, if any, go here -- minus the .S
+S_FILES = start16.S 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 +=
+#
+
+if RTEMS_GAS_CODE16
+AM_CPPFLAGS += -DNEW_GAS
+endif
+
+LINKCMDS = $(top_srcdir)/startup/linkcmds
+
+${ARCH}/start16.o: start16.S
+ ${COMPILE.S} $(AM_CPPFLAGS) -DHEADERADDR=$(HEADERADDR) -o $@ $<
+
+${ARCH}/start16.bin: ${ARCH}/start16.o
+ $(LD) -N -T $(LINKCMDS) -Ttext $(START16ADDR) -e start16 -nostdlib \
+ --oformat=elf32-i386 -o $(basename $@).obj $(basename $@).o
+ $(OBJCOPY) -O binary $(basename $@).obj $@
+
+$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin: ${ARCH}/start16.bin
+ $(INSTALL_DATA) $< $@
+
+$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o: $(ARCH)/start.o
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += \
+$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin \
+$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+
+all-local: $(ARCH) $(TMPINSTALL_FILES)
+
+EXTRA_DIST = start.S start16.S
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/start/Makefile.in b/c/src/lib/libbsp/i386/pc386/start/Makefile.in
deleted file mode 100644
index 4fbe83b4c8..0000000000
--- a/c/src/lib/libbsp/i386/pc386/start/Makefile.in
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = start
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGMS = ${ARCH}/start.o ${ARCH}/start16.bin
-
-# 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 = start16 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 +=
-#
-
-@RTEMS_GAS_CODE16_TRUE@CPPFLAGS += -DNEW_GAS
-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) $(PGMS)
- $(INSTALL_VARIANT) -m 755 ${PGMS} $(PROJECT_RELEASE)/lib
-
-# Install the program(s), appending _g or _p as appropriate.
-# for include files, just use $(INSTALL_CHANGE)
-
-LINKCMDS = $(srcdir)/../startup/linkcmds
-
-${ARCH}/start16.o: start16.S
- ${COMPILE.S} -DHEADERADDR=$(HEADERADDR) -o $@ $<
-
-${ARCH}/start16.bin: ${ARCH}/start16.o
- $(LD) -N -T $(LINKCMDS) -Ttext $(START16ADDR) -e start16 -nostdlib \
- --oformat=elf32-i386 -o $(basename $@).obj $(basename $@).o
- $(OBJCOPY) -O binary $(basename $@).obj $@
-
-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/i386/pc386/start/start16.S b/c/src/lib/libbsp/i386/pc386/start/start16.S
index 730bb60265..5d80c28c72 100644
--- a/c/src/lib/libbsp/i386/pc386/start/start16.S
+++ b/c/src/lib/libbsp/i386/pc386/start/start16.S
@@ -16,9 +16,6 @@
|
| This file is provided "AS IS" without warranty of any kind, either
| expressed or implied.
-+--------------------------------------------------------------------------+
-| This code is partly based on (from the Linux source tree):
-| video.S - Copyright (C) 1995, 1996 Martin Mares <mj@k332.feld.cvut.cz>
+--------------------------------------------------------------------------*/
diff --git a/c/src/lib/libbsp/i386/pc386/startup/Makefile.am b/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
new file mode 100644
index 0000000000..aa01e3c529
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
@@ -0,0 +1,47 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = \
+ @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/irq:@srcdir@/../../shared/comm:@srcdir@/../../shared/pci
+
+PGM = ${ARCH}/startup.rel
+
+## C source names
+C_FILES = bsplibc.c bsppost.c bspstart.c exit.c irq.c irq_init.c bootcard.c \
+ main.c sbrk.c i386-stub.c i386-stub-glue.c uart.c pcibios.c \
+ gnatinstallhandler.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+## Assembly source names
+S_FILES = ldsegs.S irq_asm.S
+S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
+
+startup_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+# USE_INIT_FINI tells main.c what C++ help we need.
+
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
+$(PGM): ${startup_rel_OBJECTS}
+ $(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 = bspstart.c exit.c sbrk.c ldsegs.S linkcmds
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/startup/Makefile.in b/c/src/lib/libbsp/i386/pc386/startup/Makefile.in
deleted file mode 100644
index 4369d24fb6..0000000000
--- a/c/src/lib/libbsp/i386/pc386/startup/Makefile.in
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = startup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = \
- @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/irq:@srcdir@/../../shared/comm:@srcdir@/../../shared/pci
-
-PGM = ${ARCH}/startup.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = bsplibc bsppost bspstart exit irq irq_init bootcard main sbrk \
- i386-stub i386-stub-glue uart pcibios 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 = ldsegs irq_asm
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(srcdir)/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 +=
-#
-
-# USE_INIT_FINI tells main.c what C++ help we need.
-
-DEFINES += -DUSE_INIT_FINI
-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/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index 802afab9d3..87fc02f0f4 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -33,9 +33,6 @@
| **************************************************************************
|
| $Id$
-|
-| Also based on (from the Linux source tree):
-| setup.S - Copyright (C) 1991, 1992 Linus Torvalds
+--------------------------------------------------------------------------*/
diff --git a/c/src/lib/libbsp/i386/pc386/timer/Makefile.am b/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
new file mode 100644
index 0000000000..8f377f2007
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
@@ -0,0 +1,31 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/timer.rel
+
+## sources
+C_FILES = timer.c
+S_FILES = timerisr.S
+timer_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o) $(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 +=
+#
+
+$(PGM): $(timer_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = timer.c timerisr.S
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/timer/Makefile.in b/c/src/lib/libbsp/i386/pc386/timer/Makefile.in
deleted file mode 100644
index c8101fae5a..0000000000
--- a/c/src/lib/libbsp/i386/pc386/timer/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = timer
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/timer.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = timer
-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 = timerisr
-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/i386/pc386/wd8003/Makefile.am b/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
new file mode 100644
index 0000000000..a38c375424
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
@@ -0,0 +1,34 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/wd8003.rel
+
+## C source names
+C_FILES = wd8003.c
+wd8003_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
+
+$(PGM): $(wd8003_rel_OBJECTS)
+ $(make-rel)
+
+if HAS_NETWORKING
+all-local: ${ARCH} $(PGM)
+endif
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = wd8003.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.in b/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.in
deleted file mode 100644
index 9b3764f07b..0000000000
--- a/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = wd8003
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/wd8003.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = wd8003
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_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 += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
-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/i386/pc386/wrapup/Makefile.am b/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
new file mode 100644
index 0000000000..0454256b83
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
@@ -0,0 +1,39 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+# We only build the Network library if HAS_NETWORKING was defined
+# dec21140 is supported via libchip
+if HAS_NETWORKING
+NETWORK = ne2000 wd8003 3c509
+endif
+
+BSP_FILES = startup clock console timer $(NETWORK)
+GENERIC_FILES =
+
+# bummer; have to use $foreach since % pattern subst rules only replace 1x
+OBJS = $(foreach piece, $(BSP_FILES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
+ $(foreach piece, $(GENERIC_FILES), \
+ ../../../$(piece)/$(ARCH)/$(piece).rel)
+LIB = $(ARCH)/libbsp.a
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(LIB): ${OBJS}
+ $(make-library)
+
+$(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a: $(LIB)
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(LIB) $(TMPINSTALL_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.in b/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.in
deleted file mode 100644
index 06d40ca9b3..0000000000
--- a/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.in
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = wrapup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-# We only build the Network library if HAS_NETWORKING was defined
-# dec21140 is supported via libchip
-NETWORK_yes_V = ne2000 wd8003 3c509
-NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
-
-BSP_PIECES = startup clock console timer $(NETWORK)
-GENERIC_PIECES =
-
-# bummer; have to use $foreach since % pattern subst rules only replace 1x
-OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
- $(foreach piece, $(GENERIC_PIECES), \
- ../../../$(piece)/$(ARCH)/$(piece).rel)
-LIB = $(ARCH)/libbsp.a
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/lib.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_RELEASE)/BootImgs
-
-$(INSTALLDIRS):
- @$(mkinstalldirs) $(INSTALLDIRS)
-
-#
-# (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 +=
-
-$(LIB): ${OBJS}
- $(make-library)
-
-all: preinstall ${ARCH} $(SRCS) $(LIB)
- $(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib
-
-# HACK:
-# we create here a directory specific to the PC386 BSP to store the BootImage
-# files so they can be easily found
-preinstall: $(INSTALLDIRS)
- $(mkinstalldirs) $(INSTALLDIRS)
-
-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/i386/ts_386ex/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/Makefile.am
index 5abfad9cfa..399e5d6822 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/Makefile.am
@@ -5,14 +5,9 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-if HAS_NETWORKING
-# We only build the Network library if HAS_NETWORKING was defined
-NETWORK = network
-endif
-
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUBDIRS = . include tools start startup clock console timer $(NETWORK) wrapup
+SUBDIRS = . include tools start startup clock console timer network wrapup
include $(top_srcdir)/../../bsp.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am
new file mode 100644
index 0000000000..ec33e3e531
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/clock.rel
+
+## C source names
+C_FILES = ckinit.c rtc.c
+clock_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(clock_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = ckinit.c rtc.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.in
deleted file mode 100644
index 01309dab96..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = clock
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/clock.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = ckinit rtc
-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@
-
-#
-# (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/i386/ts_386ex/console/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am
new file mode 100644
index 0000000000..6a4eba54bd
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am
@@ -0,0 +1,33 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/../../shared/io
+
+PGM = ${ARCH}/console.rel
+
+## sources
+C_FILES = console.c printk.c
+
+console_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(console_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = console.c
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.in
deleted file mode 100644
index 5b4af61582..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.in
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = console
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@srcdir@/../../shared/io
-
-PGM = ${ARCH}/console.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = console printk
-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@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-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/i386/ts_386ex/include/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am
new file mode 100644
index 0000000000..718cdd3acd
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am
@@ -0,0 +1,25 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+if HAS_NETWORKING
+NETWORK_H_FILES = wd80x3.h
+endif
+
+H_FILES = bsp.h coverhd.h $(NETWORK_H_FILES)
+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/i386/ts_386ex/include/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.in
deleted file mode 100644
index 65150dbcfa..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.in
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = include
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-# We only install wd80x3.h if HAS_NETWORKING was defined
-NE2000_yes_V = $(srcdir)/wd80x3.h
-NE2000 = $(NE2000_$(HAS_NETWORKING)_V)
-
-H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h $(NE2000)
-
-#
-# 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: $(SRCS)
- @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
- @$(INSTALL_CHANGE) -m 644 $(EQ_FILES) $(PROJECT_INCLUDE)
-
-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/i386/ts_386ex/network/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am
new file mode 100644
index 0000000000..2188e6cdf8
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am
@@ -0,0 +1,38 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/network.rel
+
+## C source names
+C_FILES = ne2000.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 += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
+ -DBOOTP_COMPAT
+
+$(PGM): ${OBJS}
+ $(make-rel)
+
+if HAS_NETWORKING
+all-local: ${ARCH} $(PGM)
+else
+all-local:
+endif
+
+# 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/i386/ts_386ex/network/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.in
deleted file mode 100644
index 79ec429d67..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.in
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = network
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/network.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = ne2000
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_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 += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-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/i386/ts_386ex/start/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am
new file mode 100644
index 0000000000..303858640b
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am
@@ -0,0 +1,37 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGMS = ${ARCH}/start.o
+
+# Assembly source names, if any, go here -- minus the .S
+S_FILES = start.S
+S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
+
+H_FILES = 80386ex.h
+noinst_HEADERS = $(H_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+if RTEMS_GAS_CODE16
+AM_CPPFLAGS += -DNEW_GAS
+endif
+
+$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o: $(ARCH)/start.o
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += \
+$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+
+all-local: $(ARCH) $(TMPINSTALL_FILES)
+
+EXTRA_DIST = 80386ex.inc macros.inc ts_1325.inc start.S
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.in
deleted file mode 100644
index 781d04584f..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.in
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = 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 +=
-#
-
-@RTEMS_GAS_CODE16_TRUE@CPPFLAGS += -DNEW_GAS
-
-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 ${PGMS} $(PROJECT_RELEASE)/lib
-
-# Install the program(s), appending _g or _p as appropriate.
-# for include files, just use $(INSTALL_CHANGE)
-
-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/i386/ts_386ex/startup/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am
new file mode 100644
index 0000000000..311b2c6d07
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am
@@ -0,0 +1,48 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = \
+ @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/comm:@srcdir@/../../shared/irq:@srcdir@/../../shared/io
+
+PGM = ${ARCH}/startup.rel
+
+## C source names
+C_FILES = bspclean.c bsplibc.c bsppost.c bspstart.c bootcard.c main.c sbrk.c \
+ irq.c irq_init.c i386-stub.c i386-stub-glue.c uart.c gnatinstallhandler.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+## Assembly source names
+S_FILES = irq_asm.S
+S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
+
+startup_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+## FIXME: This doesn't seem to be useful
+## AM_CPPFLAGS += -I$(srcdir)
+
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
+$(PGM): ${startup_rel_OBJECTS}
+ $(make-rel)
+
+$(PROJECT_RELEASE)/lib/linkcmds: linkcmds
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(PGM) $(TMPINSTALL_FILES)
+
+UNUSED_C_FILES = setvec.c
+EXTRA_DIST = README bspstart.c linkcmds $(UNUSED_C_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in
deleted file mode 100644
index bf1c733f24..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = startup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = \
- @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/comm:@srcdir@/../../shared/irq:@srcdir@/../../shared/io
-
-PGM = ${ARCH}/startup.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = bspclean bsplibc bsppost bspstart bootcard main sbrk irq irq_init \
- i386-stub-glue uart i386-stub 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
-# removed initcsu piece, ldsegs piece and flush
-S_PIECES = irq_asm
-S_FILES = $(S_PIECES:%=%.S)
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-SRCS = $(srcdir)/linkcmds $(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@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_RELEASE)/lib
-
-$(INSTALLDIRS):
- @$(mkinstalldirs) $(INSTALLDIRS)
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-#DEFINES += -DPRINTON
-
-DEFINES += -DUSE_INIT_FINI
-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
-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/i386/ts_386ex/timer/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am
new file mode 100644
index 0000000000..8f377f2007
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am
@@ -0,0 +1,31 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = ${ARCH}/timer.rel
+
+## sources
+C_FILES = timer.c
+S_FILES = timerisr.S
+timer_rel_OBJECTS = $(C_FILES:%.c=${ARCH}/%.o) $(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 +=
+#
+
+$(PGM): $(timer_rel_OBJECTS)
+ $(make-rel)
+
+all-local: ${ARCH} $(PGM)
+
+# the .rel file built here will be put into libbsp.a by
+# ../wrapup/Makefile
+
+EXTRA_DIST = timer.c timerisr.S
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.in
deleted file mode 100644
index b49fe27e61..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = timer
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/timer.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = timer
-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 = timerisr
-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 +=
-
-$(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/i386/ts_386ex/tools/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am
index a0136ce4ae..20363ef67b 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am
@@ -6,10 +6,14 @@ AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
noinst_SCRIPTS = \
-coff2bin
+coff2bin \
+elf2exe
SUBDIRS = \
ts_1325_ada \
+network_ada \
+debug_ada \
+debug_c \
dos_sup
EXTRA_DIST = \
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/configure.in b/c/src/lib/libbsp/i386/ts_386ex/tools/configure.in
index 31cb42ee7c..e9db1bad01 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/configure.in
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/configure.in
@@ -18,4 +18,11 @@ AC_OUTPUT(
Makefile
dos_sup/Makefile
ts_1325_ada/Makefile
+debug_ada/Makefile
+debug_c/Makefile
+network_ada/Makefile
+network_ada/adasockets/Makefile
+network_ada/listener/Makefile
+network_ada/tcprelay/Makefile
+ts_1325_ada/Makefile
)
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am
new file mode 100644
index 0000000000..fbd84a542a
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am
@@ -0,0 +1,16 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+EXTRA_DIST = \
+Makefile.ts_386ex \
+cmds \
+ddd-rtems \
+debug.adb \
+init.c \
+serial_debug.adb \
+serial_debug.ads
+
+include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am
new file mode 100644
index 0000000000..302758aef7
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am
@@ -0,0 +1,16 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+EXTRA_DIST = \
+cmds \
+ddd-rtems \
+debug_test.c \
+init.c \
+serial_gdb.c \
+serial_gdb.h \
+system.h
+
+include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am
new file mode 100644
index 0000000000..92493e4a02
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am
@@ -0,0 +1,14 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+SUBDIRS = adasockets listener tcprelay
+
+EXTRA_DIST = \
+README \
+networkconfig.h
+
+include $(top_srcdir)/../../../../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am
new file mode 100644
index 0000000000..e53f89a255
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am
@@ -0,0 +1,24 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+EXTRA_DIST = \
+AUTHORS \
+COPYING \
+NEWS \
+README \
+sockets-constants.ads \
+sockets-link.ads \
+sockets-multicast.adb \
+sockets-multicast.ads \
+sockets-naming.adb \
+sockets-naming.ads \
+sockets-thin.ads \
+sockets-utils.adb \
+sockets-utils.ads \
+sockets.adb \
+sockets.ads
+
+include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am
new file mode 100644
index 0000000000..086f023968
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am
@@ -0,0 +1,12 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+EXTRA_DIST = \
+Makefile.ts_386ex \
+init.c \
+listener.adb
+
+include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am
new file mode 100644
index 0000000000..fff9bfe048
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am
@@ -0,0 +1,13 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+EXTRA_DIST = \
+Makefile.ts_386ex \
+init.c \
+print_error.c \
+tcprelay.adb
+
+include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am
new file mode 100644
index 0000000000..6bef023a8c
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am
@@ -0,0 +1,39 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+# We only build the Network library if HAS_NETWORKING was defined
+# dec21140 is supported via libchip
+if HAS_NETWORKING
+NETWORK = network
+endif
+
+BSP_FILES = startup clock console timer $(NETWORK)
+GENERIC_FILES =
+
+# bummer; have to use $foreach since % pattern subst rules only replace 1x
+OBJS = $(foreach piece, $(BSP_FILES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
+ $(foreach piece, $(GENERIC_FILES), \
+ ../../../$(piece)/$(ARCH)/$(piece).rel)
+LIB = $(ARCH)/libbsp.a
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(LIB): ${OBJS}
+ $(make-library)
+
+$(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a: $(LIB)
+ $(INSTALL_DATA) $< $@
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(LIB) $(TMPINSTALL_FILES)
+
+include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.in
deleted file mode 100644
index f8d5c70292..0000000000
--- a/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.in
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = wrapup
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-# We only build the Network library if HAS_NETWORKING was defined
-NETWORK_yes_V = network
-NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
-
-VPATH = @srcdir@
-
-BSP_PIECES = startup clock console timer $(NETWORK)
-GENERIC_PIECES =
-
-# bummer; have to use $foreach since % pattern subst rules only replace 1x
-OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
- $(foreach piece, $(GENERIC_PIECES), \
- ../../../$(piece)/$(ARCH)/$(piece).rel)
-LIB = $(ARCH)/libbsp.a
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/lib.cfg
-
-INSTALL = @INSTALL@
-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 +=
-
-$(LIB): ${OBJS}
- $(make-library)
-
-all: ${ARCH} $(SRCS) $(LIB)
- $(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib
-
-install: all
-
-$(PROJECT_ROOT)/@RTEMS_BSP@/lib/bsp_specs: ../bsp_specs
- $(INSTALL_DATA) $< $@
-
-preinstall: $(PROJECT_ROOT)/@RTEMS_BSP@/lib/bsp_specs
-
-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/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
index 9fea220c0c..be4acce753 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
@@ -56,14 +56,10 @@ void bsp_libc_init( void *, unsigned32, int );
void bsp_pretasking_hook(void)
{
- extern int end;
- rtems_unsigned32 heap_start;
+ extern void *_HeapStart;
+ extern rtems_unsigned32 _HeapSize;
- heap_start = (rtems_unsigned32) &end;
- if (heap_start & (CPU_ALIGNMENT-1))
- heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-
- bsp_libc_init((void *) heap_start, 64 * 1024, 0);
+ bsp_libc_init( &_HeapStart, _HeapSize, 0 );
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
diff --git a/c/src/lib/libbsp/m68k/efi332/include/bsp.h b/c/src/lib/libbsp/m68k/efi332/include/bsp.h
index 81e93ebeea..6e5ffea7d7 100644
--- a/c/src/lib/libbsp/m68k/efi332/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/efi332/include/bsp.h
@@ -72,11 +72,11 @@ extern "C" {
/* externals */
-extern char _endtext[];
-extern char _sdata[];
+extern char _etext[];
+extern char _copy_start[];
extern char _edata[];
-extern char __bss_start[];
-extern char _end[];
+extern char _bss_start[];
+extern char end[];
extern char _copy_data_from_rom[];
extern char __end_of_ram[];
diff --git a/c/src/lib/libbsp/m68k/efi332/start/start.c b/c/src/lib/libbsp/m68k/efi332/start/start.c
index ef7f2beffd..fa48e03ae2 100644
--- a/c/src/lib/libbsp/m68k/efi332/start/start.c
+++ b/c/src/lib/libbsp/m68k/efi332/start/start.c
@@ -31,7 +31,7 @@ void dumby_start() {
asm volatile ( "oriw #0x0700, %sr;
moveal #M68Kvec, %a0;
movec %a0, %vbr;
- movel #_end, %d0;
+ movel #end, %d0;
addl " STACK_SIZE ",%d0;
movel %d0,%sp;
movel %d0,%a6"
@@ -198,8 +198,8 @@ void dumby_start() {
* needed) and "zero-ing" the .bss section.
*/
{
- register char *src = _endtext;
- register char *dst = _sdata;
+ register char *src = _etext;
+ register char *dst = _copy_start;
if (_copy_data_from_rom)
/* ROM has data at end of text; copy it. */
@@ -207,7 +207,7 @@ void dumby_start() {
*dst++ = *src++;
/* Zero bss */
- for (dst = __bss_start; dst< _end; dst++)
+ for (dst = _bss_start; dst< end; dst++)
*dst = 0;
}
diff --git a/c/src/lib/libbsp/m68k/efi68k/include/bsp.h b/c/src/lib/libbsp/m68k/efi68k/include/bsp.h
index 62d74f77f3..eea1ea6348 100644
--- a/c/src/lib/libbsp/m68k/efi68k/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/efi68k/include/bsp.h
@@ -72,11 +72,11 @@ extern "C" {
/* externals */
-extern char _endtext[];
-extern char _sdata[];
+extern char _etext[];
+extern char _copy_start[];
extern char _edata[];
-extern char __bss_start[];
-extern char _end[];
+extern char _bss_start[];
+extern char end[];
extern char _copy_data_from_rom[];
extern char __end_of_ram[];
diff --git a/c/src/lib/libbsp/m68k/efi68k/start/start.c b/c/src/lib/libbsp/m68k/efi68k/start/start.c
index f63381c57f..ea6973ee11 100644
--- a/c/src/lib/libbsp/m68k/efi68k/start/start.c
+++ b/c/src/lib/libbsp/m68k/efi68k/start/start.c
@@ -30,7 +30,7 @@ void boot_card();
/* disable interrupts, load stack pointer */
asm volatile ( "oriw #0x0700, %sr;
- movel #_end, %d0;
+ movel #end, %d0;
addl " STACK_SIZE ",%d0;
movel %d0,%sp;
link %a6, #0"
@@ -40,8 +40,8 @@ void boot_card();
* needed) and "zero-ing" the .bss section.
*/
{
- register char *src = _endtext;
- register char *dst = _sdata;
+ register char *src = _etext;
+ register char *dst = _copy_start;
if (_copy_data_from_rom)
/* ROM has data at end of text; copy it. */
@@ -49,7 +49,7 @@ void boot_card();
*dst++ = *src++;
/* Zero bss */
- for (dst = __bss_start; dst< _end; dst++)
+ for (dst = _bss_start; dst< end; dst++)
*dst = 0;
}
diff --git a/c/src/lib/libbsp/m68k/gen68302/start/start.S b/c/src/lib/libbsp/m68k/gen68302/start/start.S
index 5e46b06edf..a3dd257fe7 100644
--- a/c/src/lib/libbsp/m68k/gen68302/start/start.S
+++ b/c/src/lib/libbsp/m68k/gen68302/start/start.S
@@ -197,15 +197,15 @@ cpy_Bad1: move.l d1,(a0)+
| zero out uninitialized data area
|
zerobss:
- moveal # SYM (end),a0 | find end of .bss
- moveal # SYM (bss_start),a1 | find beginning of .bss
+ moveal # SYM (_end),a0 | find end of .bss
+ moveal # SYM (_bss_start),a1 | find beginning of .bss
moveq #0,d0
loop: movel d0,a1@+ | to zero out uninitialized
cmpal a0,a1
jlt loop | loop until _end reached
- movel # SYM (end),d0 | d0 = end of bss/start of heap
+ movel # SYM (_end),d0 | d0 = end of bss/start of heap
addl # SYM (heap_size),d0 | d0 = end of heap
movel d0, SYM (stack_start) | Save for brk() routine
addl # SYM (stack_size),d0 | make room for stack
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
index ac7666d1bd..ae5f6774df 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
@@ -56,10 +56,10 @@ void bsp_libc_init( void *, unsigned32, int );
void bsp_pretasking_hook(void)
{
- extern int end;
+ extern int _end;
rtems_unsigned32 heap_start;
- heap_start = (rtems_unsigned32) &end;
+ heap_start = (rtems_unsigned32) &_end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
diff --git a/c/src/lib/libbsp/m68k/gen68340/start/start.S b/c/src/lib/libbsp/m68k/gen68340/start/start.S
index 43b4186eaf..3569118a8b 100644
--- a/c/src/lib/libbsp/m68k/gen68340/start/start.S
+++ b/c/src/lib/libbsp/m68k/gen68340/start/start.S
@@ -501,8 +501,8 @@ sync_wait349:
/*--------------------------------------------------------*/
/* -- copy to address of the 68349 initialization code -- */
- lea.l _copy_start(%pc),crt0_ptr3
- lea.l _copy_end(%pc),crt0_ptr4
+ lea.l _copy_start_code(%pc),crt0_ptr3
+ lea.l _copy_end_code(%pc),crt0_ptr4
move.l crt0_ptr4,crt0_temp
sub.l crt0_ptr3,crt0_temp
add.l #3,crt0_temp | adjust to next long word
@@ -518,7 +518,7 @@ _copy_loop:
/*------------------------------------*/
/* -- start of initialization code -- */
-_copy_start:
+_copy_start_code:
bra.l _begin_68349_init
/*----------------------------------------------------------*/
@@ -709,7 +709,7 @@ _init_cache_end:
jmp.l (_fill_test) | must be absolute long
-_copy_end:
+_copy_end_code:
/*-------------------------------------------------
initialization code for the 68340 board
@@ -812,11 +812,11 @@ _dont_fill:
*/
PUBLIC (_CopyDataClearBSSAndStart)
SYM(_CopyDataClearBSSAndStart):
- lea copy_start,a0 | Get start of DATA in RAM
- lea SYM(etext),a2 | Get start of DATA in ROM
+ lea SYM(_copy_start),a0 | Get start of DATA in RAM
+ lea SYM(_etext),a2 | Get start of DATA in ROM
cmpl a0,a2 | Are they the same?
beq.s NOCOPY | Yes, no copy necessary
- lea copy_end,a1 | Get end of DATA in RAM
+ lea SYM(_copy_end),a1 | Get end of DATA in RAM
bra.s COPYLOOPTEST | Branch into copy loop
COPYLOOP:
movel a2@+,a0@+ | Copy word from ROM to RAM
@@ -825,8 +825,8 @@ COPYLOOPTEST:
bcs.s COPYLOOP | No, skip
NOCOPY:
- lea clear_start,a0 | Get start of BSS
- lea clear_end,a1 | Get end of BSS
+ lea _clear_start,a0 | Get start of BSS
+ lea _clear_end,a1 | Get end of BSS
clrl d0 | Value to set
bra.s ZEROLOOPTEST | Branch into clear loop
ZEROLOOP:
@@ -835,7 +835,7 @@ ZEROLOOPTEST:
cmpl a1,a0 | Done?
bcs.s ZEROLOOP | No, skip
- movel #stack_init,a7 | set master stack pointer
+ movel #_stack_init,a7 | set master stack pointer
movel d0,a7@- | environp
movel d0,a7@- | argv
movel d0,a7@- | argc
diff --git a/c/src/lib/libbsp/m68k/gen68360/start/start.S b/c/src/lib/libbsp/m68k/gen68360/start/start.S
index 4a10e7748c..c3110c9780 100644
--- a/c/src/lib/libbsp/m68k/gen68360/start/start.S
+++ b/c/src/lib/libbsp/m68k/gen68360/start/start.S
@@ -394,7 +394,7 @@ ZEROLOOPTEST:
cmpl a1,a0 | Done?
bcs.s ZEROLOOP | No, skip
- movel #stack_init,a7 | set master stack pointer
+ movel #_stack_init,a7 | set master stack pointer
pea env | envp
pea arg | argv
movel d0,a7@- | argc
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in
index 602d11b39c..771c89f5cb 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in
@@ -42,7 +42,7 @@ $(INSTALLDIRS):
# (OPTIONAL) Add local stuff here using +=
#
-DEFINES +=
+DEFINES += -DUSE_INIT_FINI
CPPFLAGS +=
CFLAGS +=
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
index e89ea38e86..6661fc2c2a 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
@@ -1,9 +1,9 @@
/*
* This file contains GNU linker directives for a generic MC68360 board.
- * Variations in hardware type and dynamic memory size can be made
- * by overriding some values with linker command-line arguments.
+ * Variations in memory size and allocation can be made by
+ * overriding some values with linker command-line arguments.
*
- * These linker directives are for producing a PROM version.
+ * These linker directives are for producing a bootstrap PROM version.
* The data segment is placed at the end of the text segment in the PROM.
* The start-up code takes care of copying this region to RAM.
*
@@ -11,15 +11,12 @@
* University of Saskatchewan
* Saskatoon, Saskatchewan, CANADA
* eric@skatter.usask.ca
- *
+ *
* $Id$
*/
/*
* Declare some sizes.
- * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
- * number used there is not constant. If this happens to you, edit
- * the lines marked XXX below to use a constant value.
*/
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
@@ -43,7 +40,6 @@ SECTIONS {
*/
rom : {
_RomBase = .;
- __RomBase = .;
} >rom
/*
@@ -51,44 +47,66 @@ SECTIONS {
*/
ram : {
_RamBase = .;
- __RamBase = .;
} >ram
/*
* Text, data and bss segments
*/
- .text : AT (0x00000000) {
- CREATE_OBJECT_SYMBOLS
+ .text : AT(0x0) {
*(.text)
- . = ALIGN (16);
- *(.eh_fram)
- . = ALIGN (16);
+ /*
+ * C++ constructors/destructors
+ */
+ *(.gnu.linkonce.t.*)
/*
- * C++ constructors
+ * Initialization and finalization code.
*/
- __CTOR_LIST__ = .;
- LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
+ PROVIDE (_init = .);
+ *crti.o(.init)
+ *(.init)
+ *crtn.o(.init)
+ PROVIDE (_fini = .);
+ *crti.o(.fini)
+ *(.fini)
+ *crtn.o(.fini)
+
+ /*
+ * C++ constructors/destructors
+ */
+ . = ALIGN (16);
+ *crtbegin.o(.ctors)
*(.ctors)
- LONG(0)
- __CTOR_END__ = .;
- __DTOR_LIST__ = .;
- LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
+ *crtend.o(.ctors)
+ *crtbegin.o(.dtors)
*(.dtors)
- LONG(0)
- __DTOR_END__ = .;
+ *crtend.o(.dtors)
- . = ALIGN (16);
+ /*
+ * Exception frame info
+ */
+ . = ALIGN (16);
+ *(.eh_frame)
- etext = .;
- _etext = .;
- } >rom
+ /*
+ * Read-only data
+ */
+ . = ALIGN (16);
+ _rodata_start = . ;
+ *(.rodata)
+ *(.gnu.linkonce.r*)
+
+ . = ALIGN (16);
+ PROVIDE (etext = .);
+ } >rom
.data : AT(SIZEOF(.text)) {
copy_start = .;
*(.data)
+ *(.gnu.linkonce.d*)
+ *(.gcc_except_table)
. = ALIGN (16);
- _edata = .;
+ PROVIDE (_edata = .);
copy_end = .;
} >myram
.bss : {
@@ -99,20 +117,16 @@ SECTIONS {
*(.bss)
*(COMMON)
. = ALIGN (16);
- _end = .;
+ PROVIDE (end = .);
_HeapStart = .;
- __HeapStart = .;
- . += HeapSize; /* XXX -- Old gld can't handle this */
- . += StackSize; /* XXX -- Old gld can't handle this */
- /* . += 0x10000; */ /* HeapSize for old gld */
- /* . += 0x1000; */ /* StackSize for old gld */
+ . += HeapSize;
+ . += StackSize;
. = ALIGN (16);
stack_init = .;
clear_end = .;
_WorkspaceBase = .;
- __WorkspaceBase = .;
} >myram
/*
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
index b816761852..522bea54ca 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
@@ -1,7 +1,7 @@
/*
* This file contains GNU linker directives for a generic MC68360 board.
- * Variations in hardware type and dynamic memory size can be made
- * by overriding some values with linker command-line arguments.
+ * Variations in memory size and allocation can be made by
+ * overriding some values with linker command-line arguments.
*
* These linker directives are for producing a PROM version.
* The data segment is placed at the end of the text segment in the PROM.
@@ -11,15 +11,12 @@
* University of Saskatchewan
* Saskatoon, Saskatchewan, CANADA
* eric@skatter.usask.ca
- *
+ *
* $Id$
*/
/*
* Declare some sizes.
- * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
- * number used there is not constant. If this happens to you, edit
- * the lines marked XXX below to use a constant value.
*/
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
@@ -42,7 +39,6 @@ SECTIONS {
*/
rom : {
_RomBase = .;
- __RomBase = .;
} >rom
/*
@@ -50,44 +46,66 @@ SECTIONS {
*/
ram : {
_RamBase = .;
- __RamBase = .;
} >ram
/*
* Text, data and bss segments
*/
- .text : AT (0x00000000) {
- CREATE_OBJECT_SYMBOLS
+ .text : AT(0x0) {
*(.text)
- . = ALIGN (16);
- *(.eh_fram)
- . = ALIGN (16);
+ /*
+ * C++ constructors/destructors
+ */
+ *(.gnu.linkonce.t.*)
/*
- * C++ constructors
+ * Initialization and finalization code.
*/
- __CTOR_LIST__ = .;
- LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
+ PROVIDE (_init = .);
+ *crti.o(.init)
+ *(.init)
+ *crtn.o(.init)
+ PROVIDE (_fini = .);
+ *crti.o(.fini)
+ *(.fini)
+ *crtn.o(.fini)
+
+ /*
+ * C++ constructors/destructors
+ */
+ . = ALIGN (16);
+ *crtbegin.o(.ctors)
*(.ctors)
- LONG(0)
- __CTOR_END__ = .;
- __DTOR_LIST__ = .;
- LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
+ *crtend.o(.ctors)
+ *crtbegin.o(.dtors)
*(.dtors)
- LONG(0)
- __DTOR_END__ = .;
+ *crtend.o(.dtors)
- . = ALIGN (16);
+ /*
+ * Exception frame info
+ */
+ . = ALIGN (16);
+ *(.eh_frame)
- etext = .;
- _etext = .;
- } >rom
+ /*
+ * Read-only data
+ */
+ . = ALIGN (16);
+ _rodata_start = . ;
+ *(.rodata)
+ *(.gnu.linkonce.r*)
+
+ . = ALIGN (16);
+ PROVIDE (etext = .);
+ } >rom
.data : AT(SIZEOF(.text)) {
copy_start = .;
*(.data)
+ *(.gnu.linkonce.d*)
+ *(.gcc_except_table)
. = ALIGN (16);
- _edata = .;
+ PROVIDE (_edata = .);
copy_end = .;
} >ram
.bss : {
@@ -98,20 +116,16 @@ SECTIONS {
*(.bss)
*(COMMON)
. = ALIGN (16);
- _end = .;
+ PROVIDE (end = .);
_HeapStart = .;
- __HeapStart = .;
- . += HeapSize; /* XXX -- Old gld can't handle this */
- . += StackSize; /* XXX -- Old gld can't handle this */
- /* . += 0x10000; */ /* HeapSize for old gld */
- /* . += 0x1000; */ /* StackSize for old gld */
+ . += HeapSize;
+ . += StackSize;
. = ALIGN (16);
stack_init = .;
clear_end = .;
_WorkspaceBase = .;
- __WorkspaceBase = .;
} >ram
/*
diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
index a3bd194c32..d67cb92225 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
@@ -63,10 +63,10 @@ void bsp_libc_init( void *, unsigned32, int );
void bsp_pretasking_hook(void)
{
- extern int end;
+ extern int _end;
rtems_unsigned32 heap_start;
- heap_start = (rtems_unsigned32) &end;
+ heap_start = (rtems_unsigned32) &_end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
diff --git a/c/src/lib/libbsp/m68k/ods68302/start/reset.S b/c/src/lib/libbsp/m68k/ods68302/start/reset.S
index 71d1071243..95447da7e1 100644
--- a/c/src/lib/libbsp/m68k/ods68302/start/reset.S
+++ b/c/src/lib/libbsp/m68k/ods68302/start/reset.S
@@ -438,9 +438,9 @@ copy_remap:
|
copy_data:
- moveal #etext,%a0 | find the end of .text
- moveal #data_start,%a1 | find the beginning of .data
- moveal #edata,%a2 | find the end of .data
+ moveal #_etext,%a0 | find the end of .text
+ moveal #_copy_start,%a1 | find the beginning of .data
+ moveal #_edata,%a2 | find the end of .data
copy_data_loop:
@@ -454,7 +454,7 @@ copy_data_loop:
zerobss:
moveal #end,%a0 | find end of .bss
- moveal #bss_start,%a1 | find beginning of .bss
+ moveal #_bss_start,%a1 | find beginning of .bss
moveq #0,%d0
zerobss_loop:
diff --git a/c/src/lib/libbsp/m68k/shared/start.S b/c/src/lib/libbsp/m68k/shared/start.S
index 6ab0974948..2791fab91e 100644
--- a/c/src/lib/libbsp/m68k/shared/start.S
+++ b/c/src/lib/libbsp/m68k/shared/start.S
@@ -68,15 +68,15 @@ SYM (start_around):
| zero out uninitialized data area
|
zerobss:
- moveal # SYM (end),a0 | find end of .bss
- moveal # SYM (bss_start),a1 | find beginning of .bss
+ moveal # SYM (end),a0 | find end of .bss
+ moveal # SYM (_bss_start),a1 | find beginning of .bss
movel #0,d0
loop: movel #0,a1@+ | to zero out uninitialized
cmpal a0,a1
jlt loop | loop until _end reached
- movel # SYM (stack_init),d0 | d0 = stop of stack
+ movel # SYM (_stack_init),d0 | d0 = stop of stack
andl #0xffffffc0,d0 | align it on 16 byte boundary
movw #0x3700,sr | SUPV MODE,INTERRUPTS OFF!!!
movel d0,a7 | set master stack pointer