[examples-v2 commit] added wscript to file_io and subdirectories

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


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

Author:    Daniel Ramirez <javamonn at gmail.com>
Date:      Fri Nov 29 00:19:31 2013 -0600

added wscript to file_io and subdirectories

---

 file_io/crc/wscript            |   48 ++++++++++++++++++++++++++++++++++++++++
 file_io/fdopen/wscript         |    8 ++++++
 file_io/filerdback/wscript     |    8 ++++++
 file_io/repeated_opens/wscript |    8 ++++++
 file_io/wscript                |   12 ++++++++++
 wscript                        |    1 +
 6 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/file_io/crc/wscript b/file_io/crc/wscript
new file mode 100644
index 0000000..00db909
--- /dev/null
+++ b/file_io/crc/wscript
@@ -0,0 +1,48 @@
+#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 RTEMS fat_ramdisk
+
+import rtems_waf.rtems as rtems
+version = "1.0.0"
+
+## FilesystemImage processing
+from waflib.Task import Task
+from waflib.TaskGen import extension
+class bin2c(Task):
+  run_str = '${RTEMS_BIN2C} ${SRC} ${TGT[0].abspath()} && ' + \
+            'touch ${TGT[1].abspath()}'
+  ext_out = ['.h']
+
+ at extension('FilesystemImage')
+def process_FilesystemImage(self, node):
+  c_node = node.change_ext('.c')
+  h_node = node.change_ext('.h')
+  self.create_task('bin2c', node, [c_node, h_node])
+  self.source.append(c_node)
+
+def build(bld):
+    rtems.build(bld)
+
+    arch_bsp = bld.get_env()['RTEMS_ARCH_BSP']
+    arch = bld.get_env()['RTEMS_ARCH']
+    bsp = bld.get_env()['RTEMS_BSP']
+    cflags = bld.get_env()['CFLAGS']
+
+    #
+    # The include paths and defines.
+    #
+    bld.includes = ['.']
+    bld.defines = ['PACKAGE_VERSION="' + version + '"']
+    bld(rule='tar -C ' + bld.path.find_dir('rootfs').abspath() + \
+              ' -cf ${TGT} .',
+        target='FilesystemImage')
+
+    bld(features = 'c cprogram',
+        target = 'crc.exe',
+        includes = bld.includes,
+        defines = bld.defines,
+        cflags = cflags,
+        source = 'init.c FilesystemImage crc_32.c')
diff --git a/file_io/fdopen/wscript b/file_io/fdopen/wscript
new file mode 100644
index 0000000..71333ce
--- /dev/null
+++ b/file_io/fdopen/wscript
@@ -0,0 +1,8 @@
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'c cprogram',
+        target = 'test',
+        source = ['test.c'])
diff --git a/file_io/filerdback/wscript b/file_io/filerdback/wscript
new file mode 100644
index 0000000..71333ce
--- /dev/null
+++ b/file_io/filerdback/wscript
@@ -0,0 +1,8 @@
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'c cprogram',
+        target = 'test',
+        source = ['test.c'])
diff --git a/file_io/repeated_opens/wscript b/file_io/repeated_opens/wscript
new file mode 100644
index 0000000..71333ce
--- /dev/null
+++ b/file_io/repeated_opens/wscript
@@ -0,0 +1,8 @@
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'c cprogram',
+        target = 'test',
+        source = ['test.c'])
diff --git a/file_io/wscript b/file_io/wscript
new file mode 100644
index 0000000..b3549d6
--- /dev/null
+++ b/file_io/wscript
@@ -0,0 +1,12 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    bld.recurse('crc')
+    bld.recurse('fdopen')
+    bld.recurse('filerdback')
+    bld.recurse('repeated_opens')
diff --git a/wscript b/wscript
index 2474172..72ce400 100644
--- a/wscript
+++ b/wscript
@@ -34,6 +34,7 @@ def build(bld):
     bld.recurse('hello')
     bld.recurse('filesystem/fat_ramdisk')
     bld.recurse('classic_api')
+    bld.recurse('file_io')
 
 def rebuild(ctx):
     import waflib.Options




More information about the vc mailing list