[PATCH 4/6] bsps: Move version.c and use bspopts.h

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 3 13:27:58 UTC 2018


This patch is a part of the BSP source reorganization.

Update #3285.
Update #3375.
---
 c/src/support/version.c => bsps/shared/rtems-version.c |  5 ++++-
 bsps/shared/shared.am                                  |  1 +
 c/src/configure.ac                                     |  2 --
 c/src/support/Makefile.am                              | 10 ----------
 c/src/wrapup/Makefile.am                               |  2 --
 5 files changed, 5 insertions(+), 15 deletions(-)
 rename c/src/support/version.c => bsps/shared/rtems-version.c (83%)
 delete mode 100644 c/src/support/Makefile.am

diff --git a/c/src/support/version.c b/bsps/shared/rtems-version.c
similarity index 83%
rename from c/src/support/version.c
rename to bsps/shared/rtems-version.c
index 4caf0bd3f7..16f74070bc 100644
--- a/c/src/support/version.c
+++ b/bsps/shared/rtems-version.c
@@ -9,6 +9,8 @@
 
 #include <rtems/system.h>
 
+#include <bspopts.h>
+
 #ifndef RTEMS_VERSION
 #error "Missing RTEMS_VERSION"
 #endif
@@ -23,4 +25,5 @@
 #endif
 
 const char _RTEMS_version[] =
-  "rtems-" RTEMS_VERSION " (" CPU_NAME "/" CPU_MODEL_NAME "/" RTEMS_BSP ")";
+  "rtems-" RTEMS_VERSION " (" CPU_NAME "/" CPU_MODEL_NAME "/"
+  RTEMS_XSTRING( RTEMS_BSP ) ")";
diff --git a/bsps/shared/shared.am b/bsps/shared/shared.am
index e69de29bb2..854710d804 100644
--- a/bsps/shared/shared.am
+++ b/bsps/shared/shared.am
@@ -0,0 +1 @@
+libbsp_a_SOURCES += ../../../../../../bsps/shared/rtems-version.c
diff --git a/c/src/configure.ac b/c/src/configure.ac
index ff7c7752ed..508f20f18e 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -134,7 +134,6 @@ AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
 
 BSP_SUBDIRS="$BSP_SUBDIRS lib/libbsp"
 BSP_SUBDIRS="$BSP_SUBDIRS libchip"
-BSP_SUBDIRS="$BSP_SUBDIRS support"
 BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
 
 # Build testsuites
@@ -168,7 +167,6 @@ AC_CONFIG_FILES([Makefile],
  MAKE=${MAKE}])
 
 AC_CONFIG_FILES([
-support/Makefile
 libchip/Makefile
 lib/libbsp/Makefile
 wrapup/Makefile
diff --git a/c/src/support/Makefile.am b/c/src/support/Makefile.am
deleted file mode 100644
index 66c81546c2..0000000000
--- a/c/src/support/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-include $(top_srcdir)/automake/compile.am
-
-AM_CPPFLAGS += -DRTEMS_BSP=\"@RTEMS_BSP@\"
-
-noinst_LIBRARIES = libsupport.a
-
-libsupport_a_SOURCES = version.c
-libsupport_a_CPPFLAGS = $(AM_CPPFLAGS)
-
-include $(top_srcdir)/automake/local.am
diff --git a/c/src/wrapup/Makefile.am b/c/src/wrapup/Makefile.am
index a52b90df6f..42d283ab6a 100644
--- a/c/src/wrapup/Makefile.am
+++ b/c/src/wrapup/Makefile.am
@@ -13,8 +13,6 @@ TMPINSTALL_FILES = $(PROJECT_LIB)/librtemsbsp.a
 
 CLEANFILES = o-optimize/librtemsbsp.a
 
-SRCS = ../support/libsupport.a
-
 SRCS += ../lib/libbsp/@RTEMS_CPU@/@RTEMS_BSP_FAMILY@/libbsp.a
 
 SRCS += ../libchip/libflash.a
-- 
2.12.3




More information about the devel mailing list