[examples-v2 commit] led: posix_*: Add support to build with waf

Gedare Bloom gedare at rtems.org
Thu Dec 12 19:49:55 UTC 2013


Module:    examples-v2
Branch:    master
Commit:    4ada4d05b0fce5bcba50e7632da4cd0a43a4d110
Changeset: http://git.rtems.org/examples-v2/commit/?id=4ada4d05b0fce5bcba50e7632da4cd0a43a4d110

Author:    Chirayu Desai <cdesai at cyanogenmod.org>
Date:      Tue Dec  3 22:37:42 2013 +0530

led: posix_*: Add support to build with waf

Add wscript(s) to build with waf if POSIX is enabled.

---

 led/posix_cond_server/wscript     |   15 +++++++++++++++
 led/posix_delay_nanosleep/wscript |   15 +++++++++++++++
 led/posix_delay_sleep/wscript     |   15 +++++++++++++++
 led/posix_mutex_server/wscript    |   15 +++++++++++++++
 led/wscript                       |    7 ++++++-
 5 files changed, 66 insertions(+), 1 deletions(-)

diff --git a/led/posix_cond_server/wscript b/led/posix_cond_server/wscript
new file mode 100644
index 0000000..0834c43
--- /dev/null
+++ b/led/posix_cond_server/wscript
@@ -0,0 +1,15 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+# Waf build script for an RTEMS Hello
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'c cprogram',
+        target = 'posix_condvar.exe',
+        source = ['test.c'])
+
diff --git a/led/posix_delay_nanosleep/wscript b/led/posix_delay_nanosleep/wscript
new file mode 100644
index 0000000..4143dd7
--- /dev/null
+++ b/led/posix_delay_nanosleep/wscript
@@ -0,0 +1,15 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+# Waf build script for an RTEMS Hello
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'c cprogram',
+        target = 'posix_delay_nanosleep.exe',
+        source = ['test.c'])
+
diff --git a/led/posix_delay_sleep/wscript b/led/posix_delay_sleep/wscript
new file mode 100644
index 0000000..4143dd7
--- /dev/null
+++ b/led/posix_delay_sleep/wscript
@@ -0,0 +1,15 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+# Waf build script for an RTEMS Hello
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'c cprogram',
+        target = 'posix_delay_nanosleep.exe',
+        source = ['test.c'])
+
diff --git a/led/posix_mutex_server/wscript b/led/posix_mutex_server/wscript
new file mode 100644
index 0000000..38da2e7
--- /dev/null
+++ b/led/posix_mutex_server/wscript
@@ -0,0 +1,15 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+# Waf build script for an RTEMS Hello
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'c cprogram',
+        target = 'posix_mutex_server.exe',
+        source = ['test.c'])
+
diff --git a/led/wscript b/led/wscript
index a27e9ce..f3791d4 100644
--- a/led/wscript
+++ b/led/wscript
@@ -15,4 +15,9 @@ def build(bld):
     bld.recurse('timeout_event')
     bld.recurse('ratemon1')
     bld.recurse('ratemon2')
-    bld.recurse('ratemon_cond_server')
+    if rtems.check_posix(bld):
+        bld.recurse('ratemon_cond_server')
+        bld.recurse('posix_cond_server')
+        bld.recurse('posix_delay_nanosleep')
+        bld.recurse('posix_delay_sleep')
+        bld.recurse('posix_mutex_server')




More information about the vc mailing list