source: multiio/pcmmio/wscript @ dc256a4

Last change on this file since dc256a4 was dc256a4, checked in by Chirayu Desai <cdesai@…>, on Jan 3, 2014 at 8:49:45 AM

add support for building with waf

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