summaryrefslogtreecommitdiff
path: root/cesar/common/make/test/project
diff options
context:
space:
mode:
authorsave2008-04-07 14:17:42 +0000
committersave2008-04-07 14:17:42 +0000
commit3d58a62727346b7ac1a6cb36fed1a06ed72228dd (patch)
treed7788c3cf9f76426aef0286d0202e2097f0fa0eb /cesar/common/make/test/project
parent095dca4b0a8d4924093bab424f71f588fdd84613 (diff)
Moved the complete svn base into the cesar directory.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1769 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/common/make/test/project')
-rw-r--r--cesar/common/make/test/project/Config2
-rw-r--r--cesar/common/make/test/project/Config.alt2
-rw-r--r--cesar/common/make/test/project/Makefile20
-rw-r--r--cesar/common/make/test/project/ecos.ecc.sh11
-rw-r--r--cesar/common/make/test/project/inc/test_make.h18
-rw-r--r--cesar/common/make/test/project/src/test_cpp.cpp27
-rw-r--r--cesar/common/make/test/project/src/test_make.c26
7 files changed, 106 insertions, 0 deletions
diff --git a/cesar/common/make/test/project/Config b/cesar/common/make/test/project/Config
new file mode 100644
index 0000000000..31dbc59855
--- /dev/null
+++ b/cesar/common/make/test/project/Config
@@ -0,0 +1,2 @@
+CONFIG_B_SHOUT_TWICE = n
+CONFIG_B_REPEAT = 3
diff --git a/cesar/common/make/test/project/Config.alt b/cesar/common/make/test/project/Config.alt
new file mode 100644
index 0000000000..b46399634a
--- /dev/null
+++ b/cesar/common/make/test/project/Config.alt
@@ -0,0 +1,2 @@
+CONFIG_B_SHOUT_TWICE = y
+CONFIG_B_REPEAT = 3
diff --git a/cesar/common/make/test/project/Makefile b/cesar/common/make/test/project/Makefile
new file mode 100644
index 0000000000..f247892fe9
--- /dev/null
+++ b/cesar/common/make/test/project/Makefile
@@ -0,0 +1,20 @@
+BASE = ../../../..
+
+ECOS = y
+TARGET = sparc
+
+# This is an extra include.
+INCLUDES = common/make/test
+
+HOST_PROGRAMS = test_make test_cpp
+test_make_SOURCES = test_make.c
+test_make_MODULES = lib common/make/test/modules/a
+
+test_cpp_SOURCES = test_cpp.cpp
+test_cpp_MODULES = lib common/make/test/modules/a common/make/test/modules/b
+
+TARGET_PROGRAMS = test_make_ecos
+test_make_ecos_SOURCES = test_make.c
+test_make_ecos_MODULES = lib common/make/test/modules/a
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/common/make/test/project/ecos.ecc.sh b/cesar/common/make/test/project/ecos.ecc.sh
new file mode 100644
index 0000000000..be98f3e872
--- /dev/null
+++ b/cesar/common/make/test/project/ecos.ecc.sh
@@ -0,0 +1,11 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new sparc_leon default
+cat >> $config <<EOF
+cdl_component CYGHWR_HAL_SPARC_FLAT {
+ user_value 1
+}
+cdl_component CYGPKG_HAL_SPARC_REGISTER_WINDOWS {
+ user_value 2
+}
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/common/make/test/project/inc/test_make.h b/cesar/common/make/test/project/inc/test_make.h
new file mode 100644
index 0000000000..acbf024439
--- /dev/null
+++ b/cesar/common/make/test/project/inc/test_make.h
@@ -0,0 +1,18 @@
+#ifndef test_make_h
+#define test_make_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file test_make.h
+ * \brief Test program header for build system tests.
+ * \ingroup test
+ */
+
+#define TEST_MAKE_EXIT 0
+
+#endif /* test_make_h */
diff --git a/cesar/common/make/test/project/src/test_cpp.cpp b/cesar/common/make/test/project/src/test_cpp.cpp
new file mode 100644
index 0000000000..a514ab66e0
--- /dev/null
+++ b/cesar/common/make/test/project/src/test_cpp.cpp
@@ -0,0 +1,27 @@
+// Cesar project {{{
+//
+// Copyright (C) 2007 Spidcom
+//
+// <<<Licence>>>
+//
+// }}}
+/// \file test_cpp.cpp
+/// \brief Test c++ program for build system tests.
+/// \ingroup test
+#include "common/std.h"
+#include "inc/test_make.h"
+
+#include "modules/a/a.h"
+#include "modules/b/b.h"
+
+#include <iostream>
+
+int
+main (void)
+{
+ std::cout << "I am a c++ program" << std::endl;
+ a_print ();
+ b_print ();
+ b_shout ();
+ return TEST_MAKE_EXIT;
+}
diff --git a/cesar/common/make/test/project/src/test_make.c b/cesar/common/make/test/project/src/test_make.c
new file mode 100644
index 0000000000..faf947c5b2
--- /dev/null
+++ b/cesar/common/make/test/project/src/test_make.c
@@ -0,0 +1,26 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file test_make.c
+ * \brief Test program for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "inc/test_make.h"
+
+#include "modules/a/a.h"
+#include "modules/b/b.h"
+
+int
+main (void)
+{
+ a_print ();
+ b_print ();
+ b_shout ();
+ return TEST_MAKE_EXIT;
+}