source: examples-v2/filesystem/fat_ramdisk/wscript @ f3ff072

4.11
Last change on this file since f3ff072 was f3ff072, checked in by Gedare Bloom <gedare@…>, on Nov 23, 2013 at 6:47:16 PM

filesystem: minor fixes

  • Property mode set to 100644
File size: 1.3 KB
Line 
1# Copyright 2013 Gedare Bloom (gedare@rtems.org)
2#
3# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
4#
5
6# Waf build script for RTEMS fat_ramdisk
7
8import rtems_waf.rtems as rtems
9version = "1.0.0"
10
11## FilesystemImage processing
12from waflib.Task import Task
13from waflib.TaskGen import extension
14class bin2c(Task):
15  run_str = 'rtems-bin2c ${SRC} ${TGT[0].abspath()} && ' + \
16            'touch ${TGT[1].abspath()}'
17  ext_out = ['.h']
18
19@extension('FilesystemImage')
20def process_FilesystemImage(self, node):
21  c_node = node.change_ext('.c')
22  h_node = node.change_ext('.h')
23  self.create_task('bin2c', node, [c_node, h_node])
24  self.source.append(c_node)
25
26def build(bld):
27    rtems.build(bld)
28
29    arch_bsp = bld.get_env()['RTEMS_ARCH_BSP']
30    arch = bld.get_env()['RTEMS_ARCH']
31    bsp = bld.get_env()['RTEMS_BSP']
32    cflags = bld.get_env()['CFLAGS']
33
34    #
35    # The include paths and defines.
36    #
37    bld.includes = ['.']
38    bld.defines = ['PACKAGE_VERSION="' + version + '"']
39    bld(rule='tar -C ' + bld.path.find_dir('rootfs').abspath() + \
40              ' -cf ${TGT} .',
41        target='FilesystemImage')
42
43    bld(features = 'c cprogram',
44        target = 'fat_ramdisk.exe',
45        includes = bld.includes,
46        defines = bld.defines,
47        cflags = cflags,
48        source = 'init.c FilesystemImage')
49
Note: See TracBrowser for help on using the repository browser.