[examples-v2 commit] filesystem: initial attempt at waf conversion
Gedare Bloom
gedare at rtems.org
Thu Dec 12 19:49:53 UTC 2013
Module: examples-v2
Branch: master
Commit: b9cf40d39d52ea7f1551cf01a8e6c80358151db2
Changeset: http://git.rtems.org/examples-v2/commit/?id=b9cf40d39d52ea7f1551cf01a8e6c80358151db2
Author: Gedare Bloom <gedare at rtems.org>
Date: Fri Nov 22 07:17:44 2013 -0500
filesystem: initial attempt at waf conversion
---
filesystem/fat_ramdisk/wscript | 39 +++++++++++++++++++++++++++++++++++++++
wscript | 1 +
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/filesystem/fat_ramdisk/wscript b/filesystem/fat_ramdisk/wscript
new file mode 100644
index 0000000..d480ee5
--- /dev/null
+++ b/filesystem/fat_ramdisk/wscript
@@ -0,0 +1,39 @@
+# 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"
+
+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 + '"']
+
+ generate_fs = 'cd rootfs ; tar cf ../FilesystemImage .'
+ generate_fs = generate_fs + ' ; cd .. ; '
+ generate_fs = generate_fs + 'rtems-bin2c FilesystemImage FilesystemImage'
+ bld(rule=generate_fs,
+ source='rootfs/shell-init',
+ target=['FilesystemImage.c','FilesystemImage.h'])
+
+ bld(features = 'c cprogram',
+ target = 'fat_ramdisk.exe',
+ includes = bld.includes,
+ defines = bld.defines,
+ cflags = cflags,
+ source = ['init.c', 'FilesystemImage.c', 'FilesystemImage.h'])
+
diff --git a/wscript b/wscript
index dd01a6a..7749843 100644
--- a/wscript
+++ b/wscript
@@ -31,6 +31,7 @@ def configure(conf):
def build(bld):
rtems.build(bld)
bld.recurse('hello')
+ bld.recurse('filesystem/fat_ramdisk')
def rebuild(ctx):
import waflib.Options
More information about the vc
mailing list