[Cbe-oss-dev] [PATCH 07/10 v2]MARS/modules: Task add build files

Yuji Mano yuji.mano at am.sony.com
Sat Nov 22 13:08:46 EST 2008


This adds the necessary build files for the new task module.

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

---
v2:
- update Makefile and adjust task module load address to 0x4000 above the kernel stack
- set the task module stack so task module uses 16K

 modules/task/COPYING                    |   35 ++++++
 modules/task/INSTALL                    |  168 ++++++++++++++++++++++++++++++++
 modules/task/Makefile.am                |   43 ++++++++
 modules/task/README                     |  105 ++++++++++++++++++++
 modules/task/acinclude.m4               |   75 ++++++++++++++
 modules/task/bootstrap                  |   89 ++++++++++++++++
 modules/task/configure.ac.in            |  104 +++++++++++++++++++
 modules/task/src/host/Makefile.am       |   43 ++++++++
 modules/task/src/host/bootstrap         |   50 +++++++++
 modules/task/src/host/configure.ac.in   |   53 ++++++++++
 modules/task/src/host/lib/Makefile.am   |  130 ++++++++++++++++++++++++
 modules/task/src/mpu/Makefile.am        |   43 ++++++++
 modules/task/src/mpu/bootstrap          |   50 +++++++++
 modules/task/src/mpu/configure.ac.in    |   52 +++++++++
 modules/task/src/mpu/lib/Makefile.am    |  103 +++++++++++++++++++
 modules/task/src/mpu/module/Makefile.am |  100 +++++++++++++++++++
 16 files changed, 1243 insertions(+)

--- /dev/null
+++ b/modules/task/COPYING
@@ -0,0 +1,35 @@
+
+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.
--- /dev/null
+++ b/modules/task/INSTALL
@@ -0,0 +1,168 @@
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes a while.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Type `make install' to install the programs and any data files and
+     documentation.
+
+  4. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
+
--- /dev/null
+++ b/modules/task/Makefile.am
@@ -0,0 +1,43 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+#
+#  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.
+#
+
+SUBDIRS = src/mpu src/host
+
+EXTRA_DIST = bootstrap configure.ac.in
+
+MAINTAINERCLEANFILES = Makefile.in
--- /dev/null
+++ b/modules/task/README
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ */
+
+MARS Library README
+
+Overview
+========
+
+The MARS (Multicore Application Runtime System) core provides an API to manage
+and create user programs that will be scheduled to run on various MPUs of a
+multicore environment with minimal runtime support required of the host.
+
+/core
+|
+|---/include		Include directory
+|   |
+|   |---/mars		MARS include sub-directory
+|	|
+|	|---/common	All common header files shared by both host and MPU
+|	|
+|	|---/host	All host specific header files
+|	|
+|	|---/mpu	All MPU specific header files
+|
+|---/src		Source directory
+    |
+    |---/host		All host source files
+    |   |
+    |   |---/lib	Source files for host side MARS library
+    |
+    |---/mpu		All MPU source files
+        |
+        |---/kernel	Source files for MPU MARS kernel
+        |
+        |---/lib	Source files for MPU side MARS library
+
+
+Building Source
+================
+
+* See the source file INSTALL for generic build info.
+
+* The configure scripts require the option --with-mars-platform.  Currently,
+only the Cell Broadband Engine (--with-mars-platfrom=cell) is supported.
+
+* Use the prefixes PPU_ and SPU_ on command line variables to the top level
+configure to specify variables for the different Cell toolchains.
+
+* When building 64-bit libraries for a powerpc host it is customary to use
+the --libdir configure option to install the libraries in a EPREFIX/lib64
+directory.  Run configure with the --help option for more info.
+
+For example, when using the Cell SDK toolchains use options similar to these:
+
+32-bit powerpc host
+-------------------
+  ./configure \
+    --with-mars-platform=cell \
+    PPU_EMBEDSPU=ppu-embedspu \
+    PPU_CC=ppu-gcc PPU_CFLAGS="-O3 -funroll-loops -m32" \
+    SPU_CC=spu-gcc SPU_CFLAGS="-O3 -funroll-loops"
+
+64-bit powerpc host
+-------------------
+  ./configure \
+    --libdir="/usr/lib64" \
+    --with-mars-platform=cell \
+    PPU_EMBEDSPU=ppu-embedspu \
+    PPU_CC=ppu-gcc PPU_CFLAGS="-O3 -funroll-loops -m64" \
+    SPU_CC=spu-gcc SPU_CFLAGS="-O3 -funroll-loops"
+
--- /dev/null
+++ b/modules/task/acinclude.m4
@@ -0,0 +1,75 @@
+## acinclude.m4 -- Common autoconf macro definitions
+#
+#  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.
+#
+
+AC_DEFUN([AC_CONFIG_MARS_PLATFORM],[
+
+AC_ARG_WITH([mars-platform],
+	[AS_HELP_STRING([--with-mars-platform=TYPE],
+		[specify mars platform TYPE (cell | spursengine)])],
+	[],
+	[AC_MSG_ERROR([missing option --with-mars-platform=])])
+AS_CASE([${with_mars_platform}],
+	[cell],[],
+	[spursengine],[],
+	[AC_MSG_ERROR([invalid option --with-mars-platform=${with_mars_platform}])])
+AM_CONDITIONAL([MARS_PLATFORM_CELL],
+	[test "x${with_mars_platform}" = "xcell"])
+AM_CONDITIONAL([MARS_PLATFORM_SPURSENGINE],
+	[test "x${with_mars_platform}" = "xspursengine"])
+AC_MSG_RESULT([using mars-platform ${with_mars_platform}])
+
+]) # AC_CONFIG_MARS_PLATFORM
+
+
+AC_DEFUN([AC_CONFIG_DEBUG],[
+
+AC_ARG_ENABLE(
+	[debug],
+	[AS_HELP_STRING([--enable-debug], [build debug versions of mars])])
+AM_CONDITIONAL([DEBUG], [test "x${enable_debug}" = "xyes"])
+AC_MSG_RESULT([using enable-debug ${enable_debug}])
+
+]) # AC_CONFIG_DEBUG
+
+
+AC_DEFUN([AC_CONFIG_MARS],[
+
+AC_CONFIG_MARS_PLATFORM
+AC_CONFIG_DEBUG
+
+]) # AC_CONFIG_MARS
--- /dev/null
+++ b/modules/task/bootstrap
@@ -0,0 +1,89 @@
+#! /bin/bash
+#  bootstrap -- Use this script to create generated files from a VCS checkout
+#
+#  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.
+#
+
+version=
+
+if [ "$1" ]; then
+	version=$1
+elif head=$(git rev-parse --short --verify HEAD 2>/dev/null); then
+
+	# If available, use the git commit revision for the package version.
+
+	months="Jan:01 Feb:02 Mar:03 Apr:04 May:05 Jun:06 Jul:07 Aug:08 \
+		Sep:09 Oct:10 Nov:11 Dec:12"
+
+	# Add a date prefix for easy reading.
+
+	date=$(git-log --pretty=format:"%cD" -1 HEAD)
+
+	# date='Fri, 2 Aug 2007 19:36:06 -0700'
+
+	date=${date##*, }
+	date=${date% [0-9][0-9]:*}
+	day=${date%* [A-Z][a-z][a-z] *}
+	year=${date##* [A-Z][a-z][a-z] 20}
+	month=${date##${day} }
+	month=${month%% 20${year}}
+	month=${months##*${month}:}
+	month=${month%% *}
+	[ ! ${day#[0-9][0-9]} ] || day="0$day"
+
+	version=$(printf '%s.%s.%s-%s%s' ${year} ${month} ${day} g ${head})
+
+	# Add a '-dirty' postfix for uncommitted changes.
+
+	if git diff-index HEAD | read dummy; then
+		version=`printf '%s%s' ${version} -dirty`
+	fi
+else
+	# Default to date and time.
+
+	version="dev-$(date +%y.%m.%d-%H.%M.%S)"
+fi
+
+set -x
+
+sed -e s, at version@,${version},g configure.ac.in > configure.ac
+
+aclocal
+automake --foreign --add-missing --copy
+autoconf
+
+pushd src/mpu > /dev/null && ./bootstrap ${version} && popd > /dev/null
+pushd src/host > /dev/null && ./bootstrap ${version} && popd > /dev/null
--- /dev/null
+++ b/modules/task/configure.ac.in
@@ -0,0 +1,104 @@
+## configure.ac -- Process this file with autoconf to produce configure
+#
+#  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.
+#
+
+AC_INIT([mars-task], [@version@], [MARS <cbe-oss-dev at ozlabs.org>])
+
+AC_PREFIX_DEFAULT([/usr])
+
+AC_CONFIG_MARS
+
+AC_CONFIG_AUX_DIR([.])
+
+AM_INIT_AUTOMAKE
+AC_SUBST([DESTDIR])
+AC_CONFIG_FILES([Makefile])
+
+mars_args_host=
+mars_args_prefix=
+mars_args_libdir=
+mars_args_other=
+
+if test "x${prefix}" = "xNONE"; then
+	prefix=$ac_default_prefix
+	ac_configure_args="$ac_configure_args '--prefix=$prefix'"
+fi
+
+for a in $ac_configure_args; do
+	case ${a} in
+	\'--host=*\' )
+		mars_args_host=${a}
+		;;
+	\'--prefix=*\' )
+		mars_args_prefix=${a}
+		;;
+	\'--libdir=*\' )
+		mars_args_libdir=${a}
+		;;
+	\'host_alias=*\' )
+		# ignore
+		;;
+	* )
+		mars_arg_other="${mars_arg_other} ${a}"
+		;;
+	esac
+done
+
+mars_args_prefix_spu=`echo "$mars_args_prefix" | sed 's,'\''$,/spu'\'',g'`
+mars_args_libdir_spu=`echo "$mars_args_prefix" | sed 's,'\''$,/spu/lib'\'',g' | sed 's,--prefix,--libdir,g'`
+
+mars_args_ppu=`echo "$mars_arg_other" | sed 's,'\''PPU_,'\'',g'`
+mars_args_ppu="$mars_args_ppu $mars_args_prefix $mars_args_libdir $mars_args_host"
+
+mars_args_spu=`echo "$mars_arg_other" | sed 's,'\''SPU_,'\'',g'`
+mars_args_spu="$mars_args_spu $mars_args_prefix_spu $mars_args_libdir_spu --host=spu"
+
+AC_MSG_RESULT([using mars_srcdir $ac_abs_confdir])
+AC_MSG_RESULT([using mars_builddir $ac_pwd])
+
+echo "mars_args_ppu=@$mars_args_ppu@"
+echo "mars_args_spu=@$mars_args_spu@"
+
+mkdir -p ${ac_pwd}/src/mpu
+pushd ${ac_pwd}/src/mpu > /dev/null && \
+	eval "${ac_abs_confdir}/src/mpu/configure $mars_args_spu" && popd || exit 1
+
+mkdir -p ${ac_pwd}/src/host
+pushd ${ac_pwd}/src/host > /dev/null && \
+	eval "${ac_abs_confdir}/src/host/configure $mars_args_ppu" && popd || exit 1
+
+AC_OUTPUT
--- /dev/null
+++ b/modules/task/src/host/Makefile.am
@@ -0,0 +1,43 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+#
+#  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.
+#
+
+SUBDIRS = lib
+
+EXTRA_DIST = bootstrap configure.ac.in
+
+MAINTAINERCLEANFILES = Makefile.in
--- /dev/null
+++ b/modules/task/src/host/bootstrap
@@ -0,0 +1,50 @@
+#! /bin/bash
+#  bootstrap -- Use this script to create generated files from a VCS checkout
+#
+#  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.
+#
+
+version="$1"
+
+sed -e s, at version@,${version},g configure.ac.in > configure.ac
+
+ln -sf ../../acinclude.m4 .
+
+aclocal
+libtoolize --force --copy
+autoheader
+automake --foreign --add-missing --copy
+autoconf
--- /dev/null
+++ b/modules/task/src/host/configure.ac.in
@@ -0,0 +1,53 @@
+## configure.ac -- Process this file with autoconf to produce configure
+#
+#  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.
+#
+
+AC_INIT([mars], [@version@], [MARS <cbe-oss-dev at ozlabs.org>])
+
+AC_CONFIG_MARS
+
+AC_CONFIG_AUX_DIR([.])
+
+AC_CHECK_TOOL([EMBEDSPU], [embedspu], [embedspu-not-found])
+
+AC_PROG_LIBTOOL
+AM_INIT_AUTOMAKE
+AC_SUBST([DESTDIR])
+AC_CONFIG_HEADERS([lib/config.h])
+AC_CONFIG_FILES([Makefile lib/Makefile])
+
+AC_OUTPUT
--- /dev/null
+++ b/modules/task/src/host/lib/Makefile.am
@@ -0,0 +1,130 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+#
+#  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.
+#
+
+extra_cppflags =
+extra_cflags =
+extra_ldflags =
+
+MARS_TASK_MODULE = ${top_builddir}/../mpu/module/mars_task_module
+
+if DEBUG
+ extra_cppflags += "-DDEBUG"
+else
+ extra_cppflags += "-DNDEBUG"
+endif
+
+if MARS_PLATFORM_CELL
+endif
+
+if MARS_PLATFORM_SPURSENGINE
+endif
+
+MAINTAINERCLEANFILES = Makefile.in
+
+pkginclude_HEADERS = \
+	$(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/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
+
+AM_CPPFLAGS = \
+	$(extra_cppflags) \
+	-I$(srcdir)/../../../include/host \
+	-I$(srcdir)/../../../include/common \
+	-I$(srcdir)/../../../src/common
+
+AM_CFLAGS = \
+	$(extra_cflags) \
+	-W \
+	-Wall \
+	-Wunused \
+	-Winline \
+	-Wredundant-decls \
+	-Wstrict-prototypes \
+	-Wmissing-prototypes \
+	-Wmissing-declarations
+
+AM_LDFLAGS = \
+	$(extra_ldflags)
+
+lib_LTLIBRARIES = libmars_task.la
+
+libmars_task_la_SOURCES = \
+	$(srcdir)/../../../src/common/*.h \
+	task.c \
+	task_barrier.c \
+	task_event_flag.c \
+	task_queue.c \
+	task_semaphore.c \
+	task_signal.c
+
+nodist_libmars_task_la_SOURCES = \
+	mars_task_module.eo
+
+libmars_task_la_DEPENDENCIES = mars_task_module.eo
+
+mars_task_module.eo: ${MARS_TASK_MODULE}
+	$(EMBEDSPU) $(CFLAGS) mars_task_module_entry  $< $@
+	$(EMBEDSPU) $(CFLAGS) -fPIC -DPIC mars_task_module_entry  $< .libs/$@
+
+.eo.lo:
+	@echo "# Generated by ltmain.sh - GNU libtool" > $@
+	@echo "pic_object='.libs/"$<"'" >> $@
+	@echo "non_pic_object='"$<"'" >> $@
+
+# library version-info rules (current:revision:age):
+# * increment 'current', if API is changed and compatibility is broken.
+# * keep 'current' and increment 'revision', if API is enhanced but
+#   compatibility is still kept.
+# * keep 'current' and 'revision', and increment 'age', if there's no API
+#   change but implementation is changed.
+
+libmars_task_la_LDFLAGS = \
+	-version-info 1:0:0 \
+	-Wl,-Map -Wl,$@.map -Wl,--cref
+
+libmars_task_la_LIBADD = -lmars_core
+
+CLEANFILES = *.eo *.map
--- /dev/null
+++ b/modules/task/src/mpu/Makefile.am
@@ -0,0 +1,43 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+#
+#  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.
+#
+
+SUBDIRS = lib module
+
+EXTRA_DIST = bootstrap configure.ac.in
+
+MAINTAINERCLEANFILES = Makefile.in
--- /dev/null
+++ b/modules/task/src/mpu/bootstrap
@@ -0,0 +1,50 @@
+#! /bin/bash
+#  bootstrap -- Use this script to create generated files from a VCS checkout
+#
+#  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.
+#
+
+version="$1"
+
+sed -e s, at version@,${version},g configure.ac.in > configure.ac
+
+ln -sf ../../acinclude.m4 .
+
+aclocal
+libtoolize --force --copy
+autoheader
+automake --foreign --add-missing --copy
+autoconf
--- /dev/null
+++ b/modules/task/src/mpu/configure.ac.in
@@ -0,0 +1,52 @@
+## configure.ac -- Process this file with autoconf to produce configure
+#
+#  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.
+#
+
+AC_INIT([mars], [@version@], [MARS <cbe-oss-dev at ozlabs.org>])
+
+AC_CONFIG_MARS
+
+AC_CONFIG_AUX_DIR([.])
+
+AC_PROG_LIBTOOL
+AM_INIT_AUTOMAKE
+AM_PROG_AS
+AC_SUBST([DESTDIR])
+AC_CONFIG_HEADERS([lib/config.h])
+AC_CONFIG_FILES([Makefile lib/Makefile module/Makefile])
+
+AC_OUTPUT
--- /dev/null
+++ b/modules/task/src/mpu/lib/Makefile.am
@@ -0,0 +1,103 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+#
+#  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.
+#
+
+extra_cppflags =
+extra_cflags =
+extra_ldflags =
+
+if DEBUG
+ extra_cppflags += "-DDEBUG"
+else
+ extra_cppflags += "-DNDEBUG"
+endif
+
+if MARS_PLATFORM_CELL
+endif
+
+if MARS_PLATFORM_SPURSENGINE
+endif
+
+MAINTAINERCLEANFILES = Makefile.in
+
+pkginclude_HEADERS = \
+	$(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/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
+
+AM_CPPFLAGS = \
+	$(extra_cppflags) \
+	-I$(srcdir)/../../../include/mpu \
+	-I$(srcdir)/../../../include/common \
+	-I$(srcdir)/../../../src/common \
+	-I$(srcdir)/../../../src/mpu/module
+
+AM_CFLAGS = \
+	$(extra_cflags) \
+	-W \
+	-Wall \
+	-Wunused \
+	-Winline \
+	-Wredundant-decls \
+	-Wstrict-prototypes \
+	-Wmissing-prototypes \
+	-Wmissing-declarations
+
+AM_LDFLAGS = \
+	$(extra_ldflags) \
+	-static
+
+lib_LTLIBRARIES = libmars_task.la
+
+libmars_task_la_SOURCES = \
+	$(srcdir)/../../../src/common/*.h \
+	task.c \
+	task_barrier.c \
+	task_event_flag.c \
+	task_queue.c \
+	task_semaphore.c \
+	task_signal.c
+
+libmars_task_la_LIBADD = -lmars_core
--- /dev/null
+++ b/modules/task/src/mpu/module/Makefile.am
@@ -0,0 +1,100 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+#
+#  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.
+#
+
+extra_cppflags =
+extra_cflags =
+extra_ldflags =
+
+if DEBUG
+ extra_cppflags += "-DDEBUG"
+ # debug module is 64K
+ extra_ldflags += -Wl,--defsym=__stack=0x1fff0 -Wl,--section-start,.init=0x10000
+else
+ extra_cppflags += "-DNDEBUG"
+ # release module is 16K
+ # ** todo **
+ extra_ldflags += -Wl,--defsym=__stack=0x7ff0 -Wl,--section-start,.init=0x4000
+endif
+
+if MARS_PLATFORM_CELL
+endif
+
+if MARS_PLATFORM_SPURSENGINE
+endif
+
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CPPFLAGS = \
+	$(extra_cppflags) \
+	-I$(srcdir)/../../../include/mpu \
+	-I$(srcdir)/../../../include/common \
+	-I$(srcdir)/../../../src/common \
+	-I$(srcdir)/../../../src/mpu/lib
+
+AM_CCASFLAGS = \
+	$(extra_cppflags)
+
+AM_CFLAGS = \
+	$(extra_cflags) \
+	-W \
+	-Wall \
+	-Wunused \
+	-Winline \
+	-Wredundant-decls \
+	-Wstrict-prototypes \
+	-Wmissing-prototypes \
+	-Wmissing-declarations
+
+AM_LDFLAGS = \
+	$(extra_ldflags) \
+	-Wl,--entry,mars_module_entry -Wl,-u,mars_module_entry \
+	-Wl,-Map -Wl,$@.map -Wl,--cref \
+	-Wl,-gc-sections \
+	-Wl,-N \
+	-Wl,-s
+
+noinst_PROGRAMS = mars_task_module
+
+mars_task_module_SOURCES = \
+	$(srcdir)/../../../src/common/*.h \
+	task_module.c \
+	task_module.h
+
+mars_task_module_LDADD = -lmars_core
+
+CLEANFILES = *.map





More information about the cbe-oss-dev mailing list