[examples-v2 commit] misc: x86_display_cpu: 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:    e76c0c2d7675ff2dcc16d5861ec0ec57df434e39
Changeset: http://git.rtems.org/examples-v2/commit/?id=e76c0c2d7675ff2dcc16d5861ec0ec57df434e39

Author:    Chirayu Desai <cdesai at cyanogenmod.org>
Date:      Sat Nov 30 22:19:12 2013 +0530

misc: x86_display_cpu: Add support to build with waf

Add wscript to support building with waf
Build only if architecture is i386

---

 misc/wscript                 |    4 ++++
 misc/x86_display_cpu/wscript |   14 ++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/misc/wscript b/misc/wscript
index ad1b7a6..7439794 100644
--- a/misc/wscript
+++ b/misc/wscript
@@ -6,4 +6,8 @@
 import rtems_waf.rtems as rtems
 
 def build(bld):
+    arch = bld.get_env()['RTEMS_ARCH']
+
     bld.recurse('minimum')
+    if (arch == 'i386'):
+        bld.recurse('x86_display_cpu')
diff --git a/misc/x86_display_cpu/wscript b/misc/x86_display_cpu/wscript
new file mode 100644
index 0000000..6a08865
--- /dev/null
+++ b/misc/x86_display_cpu/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 = 'display_cpu',
+        source = ['test.c'],)




More information about the vc mailing list