[examples-v2 commit] hello: Add support to build with waf

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


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

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

hello: Add support to build with waf

Add wscript(s) for building posix_hello_world and both_hello with waf

---

 hello/both_hello/wscript        |   14 ++++++++++++++
 hello/posix_hello_world/wscript |   14 ++++++++++++++
 hello/wscript                   |    3 +++
 3 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/hello/both_hello/wscript b/hello/both_hello/wscript
new file mode 100644
index 0000000..45c4c49
--- /dev/null
+++ b/hello/both_hello/wscript
@@ -0,0 +1,14 @@
+# 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 = 'both_hello.exe',
+        source = ['test.c'])
diff --git a/hello/posix_hello_world/wscript b/hello/posix_hello_world/wscript
new file mode 100644
index 0000000..c02422e
--- /dev/null
+++ b/hello/posix_hello_world/wscript
@@ -0,0 +1,14 @@
+# 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_hello.exe',
+        source = ['test.c'])
diff --git a/hello/wscript b/hello/wscript
index 1653dff..8515918 100644
--- a/hello/wscript
+++ b/hello/wscript
@@ -7,4 +7,7 @@ import rtems_waf.rtems as rtems
 
 def build(bld):
     bld.recurse('hello_world_c')
+    if rtems.check_posix:
+        bld.recurse('posix_hello_world')
+        bld.recurse('both_hello')
 




More information about the vc mailing list