summaryrefslogtreecommitdiff
path: root/cesar/common/make/test/modules
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/common/make/test/modules')
-rw-r--r--cesar/common/make/test/modules/a/Module2
-rw-r--r--cesar/common/make/test/modules/a/a.h23
-rw-r--r--cesar/common/make/test/modules/a/src/a.c25
-rw-r--r--cesar/common/make/test/modules/b/Config3
-rw-r--r--cesar/common/make/test/modules/b/Module1
-rw-r--r--cesar/common/make/test/modules/b/b.h26
-rw-r--r--cesar/common/make/test/modules/b/inc/b_shout.h18
-rw-r--r--cesar/common/make/test/modules/b/src/b_print.c33
-rw-r--r--cesar/common/make/test/modules/b/src/b_shout.c34
9 files changed, 165 insertions, 0 deletions
diff --git a/cesar/common/make/test/modules/a/Module b/cesar/common/make/test/modules/a/Module
new file mode 100644
index 0000000000..247658ae25
--- /dev/null
+++ b/cesar/common/make/test/modules/a/Module
@@ -0,0 +1,2 @@
+SOURCES := a.c
+MODULES := common/make/test/modules/b
diff --git a/cesar/common/make/test/modules/a/a.h b/cesar/common/make/test/modules/a/a.h
new file mode 100644
index 0000000000..843e51522b
--- /dev/null
+++ b/cesar/common/make/test/modules/a/a.h
@@ -0,0 +1,23 @@
+#ifndef a_h
+#define a_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file a.h
+ * \brief Test module header for build system tests.
+ * \ingroup test
+ */
+
+BEGIN_DECLS
+
+void
+a_print (void);
+
+END_DECLS
+
+#endif /* a_h */
diff --git a/cesar/common/make/test/modules/a/src/a.c b/cesar/common/make/test/modules/a/src/a.c
new file mode 100644
index 0000000000..9fa32f6ae7
--- /dev/null
+++ b/cesar/common/make/test/modules/a/src/a.c
@@ -0,0 +1,25 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file a.c
+ * \brief Test module for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "a.h"
+
+#include <stdio.h>
+
+/**
+ * Print module's deepest thought.
+ */
+void
+a_print (void)
+{
+ printf ("I am the a module!\n");
+}
diff --git a/cesar/common/make/test/modules/b/Config b/cesar/common/make/test/modules/b/Config
new file mode 100644
index 0000000000..860e294ba9
--- /dev/null
+++ b/cesar/common/make/test/modules/b/Config
@@ -0,0 +1,3 @@
+CONFIG_B_LISTEN_CAREFULLY = y
+CONFIG_B_SHOUT_TWICE = y
+CONFIG_B_REPEAT = 1
diff --git a/cesar/common/make/test/modules/b/Module b/cesar/common/make/test/modules/b/Module
new file mode 100644
index 0000000000..b52b97a009
--- /dev/null
+++ b/cesar/common/make/test/modules/b/Module
@@ -0,0 +1 @@
+SOURCES := b_print.c b_shout.c
diff --git a/cesar/common/make/test/modules/b/b.h b/cesar/common/make/test/modules/b/b.h
new file mode 100644
index 0000000000..4e0724428b
--- /dev/null
+++ b/cesar/common/make/test/modules/b/b.h
@@ -0,0 +1,26 @@
+#ifndef b_h
+#define b_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b.h
+ * \brief Test module header for build system tests.
+ * \ingroup test
+ */
+
+BEGIN_DECLS
+
+void
+b_print (void);
+
+void
+b_shout (void);
+
+END_DECLS
+
+#endif /* b_h */
diff --git a/cesar/common/make/test/modules/b/inc/b_shout.h b/cesar/common/make/test/modules/b/inc/b_shout.h
new file mode 100644
index 0000000000..9e80de10e3
--- /dev/null
+++ b/cesar/common/make/test/modules/b/inc/b_shout.h
@@ -0,0 +1,18 @@
+#ifndef b_shout_h
+#define b_shout_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b_shout.h
+ * \brief Test module private header for build system tests.
+ * \ingroup test
+ */
+
+#define B_SHOUT "I AM THE B MODULE!\n"
+
+#endif /* b_shout_h */
diff --git a/cesar/common/make/test/modules/b/src/b_print.c b/cesar/common/make/test/modules/b/src/b_print.c
new file mode 100644
index 0000000000..b3b5d2f2ea
--- /dev/null
+++ b/cesar/common/make/test/modules/b/src/b_print.c
@@ -0,0 +1,33 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b_print.c
+ * \brief Test module for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "b.h"
+
+#include "config/b/listen/carefully.h"
+#include "config/b/repeat.h"
+
+#include <stdio.h>
+
+/**
+ * Print module's deepest thought.
+ */
+void
+b_print (void)
+{
+#if CONFIG_B_LISTEN_CAREFULLY
+ printf ("please listen carefully (however, it is a stupid example):\n");
+#endif
+ uint i;
+ for (i = 0; i < CONFIG_B_REPEAT; i++)
+ printf ("I am the b module!\n");
+}
diff --git a/cesar/common/make/test/modules/b/src/b_shout.c b/cesar/common/make/test/modules/b/src/b_shout.c
new file mode 100644
index 0000000000..06472cf872
--- /dev/null
+++ b/cesar/common/make/test/modules/b/src/b_shout.c
@@ -0,0 +1,34 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b_shout.c
+ * \brief Test module for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "inc/b_shout.h"
+#include "b.h"
+
+#include "config/b.h"
+
+#include <stdio.h>
+
+/**
+ * Shout module's deepest thought.
+ */
+void
+b_shout (void)
+{
+#if CONFIG_B_LISTEN_CAREFULLY
+ printf ("please listen carefully (however, it is a stupid example):\n");
+#endif
+ printf (B_SHOUT);
+#if CONFIG_B_SHOUT_TWICE
+ printf (B_SHOUT);
+#endif
+}