2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* start/reset.S: Remove cat(). Add EXPAND(). Make EXCEPTION_HANDLER
	ANSI-C compliant.
	* Makefile.am: Merge-in clock/Makefile.am, console/Makefile.am
	start/Makefile.am, startup/Makefile.am, timer/Makefile.am
	wrapup/Makefile.am.
	Use automake compilation rules.
	* clock/Makefile.am, console/Makefile.am, start/Makefile.am,
	startup/Makefile.am, timer/Makefile.am, wrapup/Makefile.am:
	Remove.
	* configure.ac: Reflect changes above.
This commit is contained in:
Ralf Corsepius
2004-01-28 12:23:23 +00:00
parent ed2426b66d
commit c95ab0d72f
10 changed files with 136 additions and 236 deletions
+13
View File
@@ -1,3 +1,16 @@
2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* start/reset.S: Remove cat(). Add EXPAND(). Make EXCEPTION_HANDLER
ANSI-C compliant.
* Makefile.am: Merge-in clock/Makefile.am, console/Makefile.am
start/Makefile.am, startup/Makefile.am, timer/Makefile.am
wrapup/Makefile.am.
Use automake compilation rules.
* clock/Makefile.am, console/Makefile.am, start/Makefile.am,
startup/Makefile.am, timer/Makefile.am, wrapup/Makefile.am:
Remove.
* configure.ac: Reflect changes above.
2004-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Add PREINSTALL_DIRS.
+119 -8
View File
@@ -4,21 +4,116 @@
ACLOCAL_AMFLAGS = -I ../../../../aclocal
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
SUBDIRS = . start startup clock console timer wrapup
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../bsp.am
EXTRA_PROGRAMS =
CLEANFILES =
noinst_DATA =
EXTRA_DIST =
include_HEADERS += include/bare.h
include_HEADERS += include/crc.h
include_HEADERS += include/debugport.h
include_HEADERS += include/m68302scc.h
include_HEADERS += include/coverhd.h
all-local: $(PREINSTALL_FILES)
# FIXME: Better merge both files into one and use #ifdef GDB_MONITOR_ACTIVE
if ODS68302_DEBUG
EXTRA_DIST += start/debugreset.S
start$(LIB_VARIANT).$(OBJEXT): start/debugreset.S
${CCASCOMPILE} -DASM -o $@ -c $<
else
EXTRA_DIST += start/reset.S
start$(LIB_VARIANT).$(OBJEXT): start/reset.S
${CCASCOMPILE} -DASM -o $@ -c $<
endif
project_lib_DATA = start$(LIB_VARIANT).$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds startup/rom startup/debugger
EXTRA_PROGRAMS += startup.rel
CLEANFILES += startup.rel
startup_rel_SOURCES = startup/cpuboot.c startup/crc.c startup/debugport.c \
startup/gdb-hooks.c ../../shared/bootcard.c ../../shared/main.c \
startup/m68302scc.c startup/m68k-stub.c ../shared/m68kpretaskinghook.c \
startup/memcheck.c startup/trace.c ../../shared/gnatinstallhandler.c \
../../shared/bsplibc.c ../../shared/bsppost.c startup/bspstart.c \
startup/bspclean.c ../../shared/sbrk.c ../shared/setvec.c
startup_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
EXTRA_PROGRAMS += startup_g.rel
CLEANFILES += startup_g.rel
startup_g_rel_SOURCES = $(startup_rel_SOURCES)
startup_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
startup_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_DATA += startup$(LIB_VARIANT).rel
EXTRA_PROGRAMS += clock.rel
CLEANFILES += clock.rel
clock_rel_SOURCES = clock/ckinit.c
clock_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
EXTRA_PROGRAMS += clock_g.rel
CLEANFILES += clock_g.rel
clock_g_rel_SOURCES = $(clock_rel_SOURCES)
clock_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
clock_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_DATA += clock$(LIB_VARIANT).rel
EXTRA_PROGRAMS += console.rel
CLEANFILES += console.rel
console_rel_SOURCES = console/console.c
console_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
EXTRA_PROGRAMS += console_g.rel
CLEANFILES += console_g.rel
console_g_rel_SOURCES = $(console_rel_SOURCES)
console_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
console_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_DATA += console$(LIB_VARIANT).rel
EXTRA_PROGRAMS += timer.rel
CLEANFILES += timer.rel
timer_rel_SOURCES = timer/timer.c timer/timerisr.S
timer_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
EXTRA_PROGRAMS += timer_g.rel
CLEANFILES += timer_g.rel
timer_g_rel_SOURCES = $(timer_rel_SOURCES)
timer_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
timer_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
noinst_DATA += timer$(LIB_VARIANT).rel
EXTRA_LIBRARIES = libbsp.a
CLEANFILES += libbsp.a
libbsp_a_SOURCES =
libbsp_a_LIBADD = startup$(LIB_VARIANT).rel clock$(LIB_VARIANT).rel \
console$(LIB_VARIANT).rel timer$(LIB_VARIANT).rel
libbsp_a_LIBADD += \
../../../libcpu/@RTEMS_CPU@/shared/cache$(LIB_VARIANT).rel \
../../../libcpu/@RTEMS_CPU@/shared/misc$(LIB_VARIANT).rel
EXTRA_LIBRARIES += libbsp_g.a
CLEANFILES += libbsp_g.a
libbsp_g_a_SOURCES = $(libbsp_a_SOURCES)
libbsp_g_a_LIBADD = $(libbsp_a_LIBADD)
noinst_DATA += libbsp$(LIB_VARIANT).a
all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
PREINSTALL_DIRS =
TMPINSTALL_FILES =
$(PROJECT_INCLUDE)/bare.h: include/bare.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bare.h
@@ -40,8 +135,24 @@ $(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
CLEANFILES = $(PREINSTALL_FILES)
DISTCLEANFILES = $(PREINSTALL_DIRS)
$(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT): start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
TMPINSTALL_FILES += $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
$(PROJECT_LIB)/rom: startup/rom $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/rom
TMPINSTALL_FILES += $(PROJECT_LIB)/rom
$(PROJECT_LIB)/debugger: startup/debugger $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/debugger
TMPINSTALL_FILES += $(PROJECT_LIB)/debugger
CLEANFILES += $(PREINSTALL_FILES)
DISTCLEANFILES = $(PREINSTALL_DIRS)
CLEANFILES += $(TMPINSTALL_FILES)
include $(top_srcdir)/../../../../automake/subdirs.am
include $(top_srcdir)/../../../../automake/local.am
@@ -1,30 +0,0 @@
##
## $Id$
##
PGM = $(ARCH)/clock.rel
C_FILES = ckinit.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
OBJS = $(C_O_FILES)
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../../../automake/lib.am
#
# (OPTIONAL) Add local stuff here using +=
#
$(PGM): $(OBJS)
$(make-rel)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
all-local: $(OBJS) $(PGM)
.PRECIOUS: $(PGM)
EXTRA_DIST = ckinit.c
include $(top_srcdir)/../../../../automake/local.am
+2 -7
View File
@@ -13,6 +13,7 @@ RTEMS_BSP_CONFIGURE
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
AC_ARG_ENABLE(ods68302-debug,
[AC_HELP_STRING([--enable-ods68302-debug],
@@ -32,11 +33,5 @@ AM_CONDITIONAL(ODS68302_DEBUG,[test "$ODS68302_DEBUG" = "yes"])
# AC_DEFINE_UNQUOTED([VARIANT],[${BSP_VARIANT}],[missing explanation])
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
clock/Makefile
console/Makefile
start/Makefile
startup/Makefile
timer/Makefile
wrapup/Makefile])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
@@ -1,30 +0,0 @@
##
## $Id$
##
PGM = $(ARCH)/console.rel
C_FILES = console.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
OBJS = $(C_O_FILES)
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../../../automake/lib.am
#
# (OPTIONAL) Add local stuff here using +=
#
$(PGM): $(OBJS)
$(make-rel)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
all-local: $(OBJS) $(PGM)
.PRECIOUS: $(PGM)
EXTRA_DIST = console.c
include $(top_srcdir)/../../../../automake/local.am
@@ -1,49 +0,0 @@
##
## $Id$
##
# FIXME: Better merge both files into one and use #ifdef GDB_MONITOR_ACTIVE
if ODS68302_DEBUG
RESET_S_FILES = debugreset.S
else
RESET_S_FILES = reset.S
endif
S_FILES = $(RESET_S_FILES)
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
OBJS = $(S_O_FILES) $(C_O_FILES)
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../../../automake/lib.am
include $(top_srcdir)/../../bspstart.am
#
# (OPTIONAL) Add local stuff here using +=
#
AM_CFLAGS += $(CFLAGS_V)
project_lib_DATA = $(ARCH)/start$(LIB_VARIANT).$(OBJEXT)
$(ARCH)/start.$(OBJEXT): $(OBJS)
cp $(S_O_FILES) $(ARCH)/start.$(OBJEXT)
all-local: $(TMPINSTALL_FILES)
EXTRA_DIST = debugreset.S reset.S
TMPINSTALL_FILES =
$(PROJECT_LIB)/$(dirstamp):
@$(mkdir_p) $(PROJECT_LIB)
@: > $(PROJECT_LIB)/$(dirstamp)
TMPINSTALL_FILES += $(PROJECT_LIB)/$(dirstamp)
$(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT): $(ARCH)/start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
TMPINSTALL_FILES += $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
CLEANFILES = $(TMPINSTALL_FILES)
include $(top_srcdir)/../../../../automake/local.am
+2 -2
View File
@@ -482,9 +482,9 @@ zerobss_loop:
| The macros are to create the labels and format vectors.
|
#define cat(x, y) x ## y
#define FORMAT_ID(n) (n << 2)
#define EXCEPTION_HANDLER(h, n) EH__##n: move.w cat(h, FORMAT_ID(n)),-(%sp) ; \
#define EXPAND(x) x
#define EXCEPTION_HANDLER(h, n) EH__##n: move.w EXPAND(h) FORMAT_ID(n),-(%sp) ; \
bra common_exception_handler
unhandled_exception:
@@ -1,57 +0,0 @@
##
## $Id$
##
VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
PGM = $(ARCH)/startup.rel
C_FILES = cpuboot.c crc.c debugport.c gdb-hooks.c bootcard.c main.c \
m68302scc.c m68k-stub.c m68kpretaskinghook.c memcheck.c trace.c \
gnatinstallhandler.c bsplibc.c bsppost.c bspstart.c bspclean.c sbrk.c \
setvec.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
OBJS = $(C_O_FILES)
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../../../automake/lib.am
#
# (OPTIONAL) Add local stuff here using +=
#
$(PGM): $(OBJS)
$(make-rel)
project_lib_DATA = linkcmds rom debugger
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
all-local: $(PGM) $(TMPINSTALL_FILES)
EXTRA_DIST = bspclean.c bspstart.c crc.c debugger debugport.c gdb-hooks.c \
linkcmds m68302scc.c m68k-stub.c memcheck.c rom trace.c
TMPINSTALL_FILES =
$(PROJECT_LIB)/$(dirstamp):
@$(mkdir_p) $(PROJECT_LIB)
@: > $(PROJECT_LIB)/$(dirstamp)
TMPINSTALL_FILES += $(PROJECT_LIB)/$(dirstamp)
$(PROJECT_LIB)/linkcmds: linkcmds $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
$(PROJECT_LIB)/rom: rom $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/rom
TMPINSTALL_FILES += $(PROJECT_LIB)/rom
$(PROJECT_LIB)/debugger: debugger $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/debugger
TMPINSTALL_FILES += $(PROJECT_LIB)/debugger
CLEANFILES = $(TMPINSTALL_FILES)
include $(top_srcdir)/../../../../automake/local.am
@@ -1,33 +0,0 @@
##
## $Id$
##
PGM = $(ARCH)/timer.rel
C_FILES = timer.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
S_FILES = timerisr.S
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
OBJS = $(C_O_FILES) $(S_O_FILES)
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../../../automake/lib.am
#
# (OPTIONAL) Add local stuff here using +=
#
$(PGM): $(OBJS)
$(make-rel)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
all-local: $(OBJS) $(PGM)
.PRECIOUS: $(PGM)
EXTRA_DIST = timer.c timerisr.S
include $(top_srcdir)/../../../../automake/local.am
@@ -1,20 +0,0 @@
##
## $Id$
##
BSP_PIECES = startup clock console timer
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/*.$(OBJEXT)) \
../../../../libcpu/@RTEMS_CPU@/shared/cache$(LIB_VARIANT).rel \
../../../../libcpu/@RTEMS_CPU@/shared/misc$(LIB_VARIANT).rel
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../../../automake/lib.am
$(ARCH)/libbsp.a: $(OBJS)
$(make-library)
noinst_DATA = $(ARCH)/libbsp.a
include $(top_srcdir)/../../../../automake/local.am