[Cbe-oss-dev] [PATCH 05/10]MARS/core: Workload module split fix build files

Yuji Mano yuji.mano at am.sony.com
Fri Nov 21 11:06:43 EST 2008


This fixes the build and implementation for the core library after the removal
of task related sources.

Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>

---
 core/src/host/lib/Makefile.am      |   35 ++++++++--------------------------
 core/src/host/lib/context.c        |    2 -
 core/src/host/lib/mutex.c          |    2 -
 core/src/host/lib/workload_queue.c |    7 ++----
 core/src/mpu/lib/Makefile.am       |   38 ++++++++++++-------------------------
 core/src/mpu/lib/mutex.c           |    6 +----
 6 files changed, 28 insertions(+), 62 deletions(-)

--- a/core/src/host/lib/Makefile.am
+++ b/core/src/host/lib/Makefile.am
@@ -59,21 +59,12 @@ MAINTAINERCLEANFILES = Makefile.in
 pkginclude_HEADERS = \
 	$(srcdir)/../../../include/common/mars/error.h \
 	$(srcdir)/../../../include/common/mars/mutex_types.h \
-	$(srcdir)/../../../include/common/mars/task_barrier_types.h \
-	$(srcdir)/../../../include/common/mars/task_event_flag_types.h \
-	$(srcdir)/../../../include/common/mars/task_queue_types.h \
-	$(srcdir)/../../../include/common/mars/task_semaphore_types.h \
-	$(srcdir)/../../../include/common/mars/task_types.h \
+	$(srcdir)/../../../include/common/mars/workload_types.h \
 	$(srcdir)/../../../include/host/mars/context.h \
 	$(srcdir)/../../../include/host/mars/core.h \
 	$(srcdir)/../../../include/host/mars/mars.h \
 	$(srcdir)/../../../include/host/mars/mutex.h \
-	$(srcdir)/../../../include/host/mars/task.h \
-	$(srcdir)/../../../include/host/mars/task_barrier.h \
-	$(srcdir)/../../../include/host/mars/task_event_flag.h \
-	$(srcdir)/../../../include/host/mars/task_queue.h \
-	$(srcdir)/../../../include/host/mars/task_semaphore.h \
-	$(srcdir)/../../../include/host/mars/task_signal.h
+	$(srcdir)/../../../include/host/mars/workload_queue.h
 
 AM_CPPFLAGS = \
 	$(extra_cppflags) \
@@ -95,28 +86,20 @@ AM_CFLAGS = \
 AM_LDFLAGS = \
 	$(extra_ldflags)
 
-lib_LTLIBRARIES = libmars.la
+lib_LTLIBRARIES = libmars_core.la
 
-libmars_la_SOURCES = \
+libmars_core_la_SOURCES = \
 	$(srcdir)/../../../src/common/*.h \
 	alloc.c \
 	context.c \
-	context_internal_types.h \
 	ea.c \
 	mutex.c \
-	task.c \
-	task_barrier.c \
-	task_event_flag.c \
-	task_queue.c \
-	task_semaphore.c \
-	task_signal.c \
-	workload_queue.c \
-	workload_queue.h
+	workload_queue.c
 
-nodist_libmars_la_SOURCES = \
+nodist_libmars_core_la_SOURCES = \
 	mars_kernel.eo
 
-libmars_la_DEPENDENCIES = mars_kernel.eo
+libmars_core_la_DEPENDENCIES = mars_kernel.eo
 
 mars_kernel.eo: ${MARS_KERNEL}
 	$(EMBEDSPU) $(CFLAGS) mars_kernel_entry  $< $@
@@ -134,10 +117,10 @@ mars_kernel.eo: ${MARS_KERNEL}
 # * keep 'current' and 'revision', and increment 'age', if there's no API
 #   change but implementation is changed.
 
-libmars_la_LDFLAGS = \
+libmars_core_la_LDFLAGS = \
 	-version-info 1:0:0 \
 	-Wl,-Map -Wl,$@.map -Wl,--cref
 
-libmars_la_LIBADD = -lspe2
+libmars_core_la_LIBADD = -lspe2
 
 CLEANFILES = *.eo *.map
--- a/core/src/host/lib/context.c
+++ b/core/src/host/lib/context.c
@@ -43,10 +43,10 @@
 #include "mars/context.h"
 #include "mars/core.h"
 #include "mars/error.h"
+#include "mars/workload_queue.h"
 
 #include "context_internal_types.h"
 #include "kernel_internal_types.h"
-#include "workload_queue.h"
 
 extern struct spe_program_handle mars_kernel_entry;
 static struct mars_context *mars_shared_context;
--- a/core/src/host/lib/mutex.c
+++ b/core/src/host/lib/mutex.c
@@ -41,8 +41,6 @@
 #include "mars/error.h"
 #include "mars/mutex.h"
 
-#include "mutex_internal_types.h"
-
 int mars_mutex_create(struct mars_mutex **mutex_ret)
 {
 	struct mars_mutex *mutex;
--- a/core/src/host/lib/workload_queue.c
+++ b/core/src/host/lib/workload_queue.c
@@ -36,18 +36,17 @@
  */
 
 #include <sched.h>
-#include <unistd.h>
 #include <string.h>
+#include <unistd.h>
 
 #include "mars/core.h"
-#include "mars/mutex.h"
 #include "mars/error.h"
+#include "mars/mutex.h"
+#include "mars/workload_queue.h"
 
 #include "context_internal_types.h"
-#include "mutex_internal_types.h"
 #include "kernel_internal_types.h"
 #include "workload_internal_types.h"
-#include "workload_queue.h"
 
 int mars_workload_queue_create(struct mars_context *mars)
 {
--- a/core/src/mpu/lib/Makefile.am
+++ b/core/src/mpu/lib/Makefile.am
@@ -57,20 +57,12 @@ MAINTAINERCLEANFILES = Makefile.in
 pkginclude_HEADERS = \
 	$(srcdir)/../../../include/common/mars/error.h \
 	$(srcdir)/../../../include/common/mars/mutex_types.h \
-	$(srcdir)/../../../include/common/mars/task_types.h \
-	$(srcdir)/../../../include/common/mars/task_barrier_types.h \
-	$(srcdir)/../../../include/common/mars/task_event_flag_types.h \
-	$(srcdir)/../../../include/common/mars/task_queue_types.h \
-	$(srcdir)/../../../include/common/mars/task_semaphore_types.h \
+	$(srcdir)/../../../include/common/mars/workload_types.h \
 	$(srcdir)/../../../include/mpu/mars/core.h \
+	$(srcdir)/../../../include/mpu/mars/dma.h \
 	$(srcdir)/../../../include/mpu/mars/mars.h \
-	$(srcdir)/../../../include/mpu/mars/mutex.h \
-	$(srcdir)/../../../include/mpu/mars/task.h \
-	$(srcdir)/../../../include/mpu/mars/task_barrier.h \
-	$(srcdir)/../../../include/mpu/mars/task_event_flag.h \
-	$(srcdir)/../../../include/mpu/mars/task_queue.h \
-	$(srcdir)/../../../include/mpu/mars/task_semaphore.h \
-	$(srcdir)/../../../include/mpu/mars/task_signal.h
+	$(srcdir)/../../../include/mpu/mars/module.h \
+	$(srcdir)/../../../include/mpu/mars/mutex.h
 
 AM_CPPFLAGS = \
 	$(extra_cppflags) \
@@ -79,6 +71,7 @@ AM_CPPFLAGS = \
 	-I$(srcdir)/../../../src/common
 
 AM_CFLAGS = \
+	$(extra_cflags) \
 	-W \
 	-Wall \
 	-Wunused \
@@ -88,18 +81,13 @@ AM_CFLAGS = \
 	-Wmissing-prototypes \
 	-Wmissing-declarations
 
-lib_LIBRARIES = libmars.a
+AM_LDFLAGS = \
+	$(extra_ldflags) \
+	-static
 
-libmars_a_SOURCES = \
+lib_LTLIBRARIES = libmars_core.la
+
+libmars_core_la_SOURCES = \
 	$(srcdir)/../../../src/common/*.h \
-	dma.h \
-	entry.S \
-	mutex.c \
-	syscalls.c \
-	syscalls.h \
-	task.c \
-	task_barrier.c \
-	task_event_flag.c \
-	task_queue.c \
-	task_semaphore.c \
-	task_signal.c
+	module.c \
+	mutex.c
--- a/core/src/mpu/lib/mutex.c
+++ b/core/src/mpu/lib/mutex.c
@@ -37,11 +37,9 @@
 
 #include <spu_mfcio.h>
 
-#include "mars/mutex.h"
+#include "mars/dma.h"
 #include "mars/error.h"
-
-#include "mutex_internal_types.h"
-#include "dma.h"
+#include "mars/mutex.h"
 
 static struct mars_mutex mutex;
 






More information about the cbe-oss-dev mailing list