[Cbe-oss-dev] [PATCH 08/17]MARS/core: Add public config header
Yuji Mano
yuji.mano at am.sony.com
Wed Nov 26 14:40:06 EST 2008
From: Kazunori Asayama <asayama at sm.sony.co.jp>
Add public configuration header
This patch adds public configuration header mars/features.h to enable
to switch definitions in public headers between various build
configurations.
Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>
---
core/bootstrap | 1
core/configure.ac.in | 1
core/include/common/mars/features.h.in | 43 +++++++++++++++++++++++++++++++++
core/include/host/mars/mars.h | 1
core/include/mpu/mars/mars.h | 1
core/src/host/lib/Makefile.am | 3 ++
core/src/mpu/lib/Makefile.am | 3 ++
7 files changed, 53 insertions(+)
Index: b/core/configure.ac.in
===================================================================
--- a/core/configure.ac.in 2008-11-25 17:57:51.000000000 +0900
+++ b/core/configure.ac.in 2008-11-25 18:24:31.000000000 +0900
@@ -46,6 +46,7 @@ AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AC_SUBST([DESTDIR])
+AC_CONFIG_HEADERS([config.h include/common/mars/features.h])
AC_CONFIG_FILES([Makefile])
mars_args_host=
Index: b/core/include/common/mars/features.h.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ b/core/include/common/mars/features.h.in 2008-11-25 18:17:00.000000000 +0900
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2008 Sony Corporation of America
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this Library and associated documentation files (the
+ * "Library"), to deal in the Library without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Library, and to
+ * permit persons to whom the Library is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Library.
+ *
+ * If you modify the Library, you may copy and distribute your modified
+ * version of the Library in object code or as an executable provided
+ * that you also do one of the following:
+ *
+ * Accompany the modified version of the Library with the complete
+ * corresponding machine-readable source code for the modified version
+ * of the Library; or,
+ *
+ * Accompany the modified version of the Library with a written offer
+ * for a complete machine-readable copy of the corresponding source
+ * code of the modified version of the Library.
+ *
+ *
+ * THE LIBRARY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.
+ */
+
+#ifndef MARS_FEATURES_H
+#define MARS_FEATURES_H
+
+#undef MARS_ENABLE_DISCRETE_SHARED_MEMORY
+
+#endif
Index: b/core/src/host/lib/Makefile.am
===================================================================
--- a/core/src/host/lib/Makefile.am 2008-11-25 17:57:51.000000000 +0900
+++ b/core/src/host/lib/Makefile.am 2008-11-25 18:17:02.000000000 +0900
@@ -66,6 +66,9 @@ pkginclude_HEADERS = \
$(srcdir)/../../../include/host/mars/mutex.h \
$(srcdir)/../../../include/host/mars/workload_queue.h
+nodist_pkginclude_HEADERS = \
+ $(builddir)/../../../include/common/mars/features.h
+
AM_CPPFLAGS = \
$(extra_cppflags) \
-I$(srcdir)/../../../include/common \
Index: b/core/src/mpu/lib/Makefile.am
===================================================================
--- a/core/src/mpu/lib/Makefile.am 2008-11-25 17:57:51.000000000 +0900
+++ b/core/src/mpu/lib/Makefile.am 2008-11-25 17:57:55.000000000 +0900
@@ -64,6 +64,9 @@ pkginclude_HEADERS = \
$(srcdir)/../../../include/mpu/mars/module.h \
$(srcdir)/../../../include/mpu/mars/mutex.h
+nodist_pkginclude_HEADERS = \
+ $(builddir)/../../../include/common/mars/features.h
+
AM_CPPFLAGS = \
$(extra_cppflags) \
-I$(srcdir)/../../../include/common \
Index: b/core/include/host/mars/mars.h
===================================================================
--- a/core/include/host/mars/mars.h 2008-11-25 17:57:51.000000000 +0900
+++ b/core/include/host/mars/mars.h 2008-11-25 18:17:00.000000000 +0900
@@ -44,6 +44,7 @@
* \brief <b>[host]</b> MARS API
*/
+#include <mars/features.h>
#include <mars/context.h>
#include <mars/core.h>
#include <mars/error.h>
Index: b/core/include/mpu/mars/mars.h
===================================================================
--- a/core/include/mpu/mars/mars.h 2008-11-25 17:57:51.000000000 +0900
+++ b/core/include/mpu/mars/mars.h 2008-11-25 17:57:55.000000000 +0900
@@ -44,6 +44,7 @@
* \brief <b>[MPU]</b> MARS API
*/
+#include <mars/features.h>
#include <mars/core.h>
#include <mars/error.h>
#include <mars/mutex.h>
Index: b/core/bootstrap
===================================================================
--- a/core/bootstrap 2008-11-25 11:56:25.000000000 +0900
+++ b/core/bootstrap 2008-11-25 18:26:14.000000000 +0900
@@ -84,6 +84,7 @@ sed -e s, at version@,${version},g configur
ln -sf ../scripts/acinclude.m4 .
aclocal
+autoheader
automake --foreign --add-missing --copy
autoconf
More information about the cbe-oss-dev
mailing list