source: examples-v2/wscript @ 944b4f1

4.11
Last change on this file since 944b4f1 was c247956, checked in by Chris Johns <chrisj@…>, on Dec 13, 2013 at 11:08:41 AM

User friendly error message if the rtems_waf module is not included.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1# Copyright 2013 Chris Johns (chrisj@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 examples
7#
8# To configure, build and run do:
9#
10# $ waf configure --rtems=/Users/chris/Development/rtems/build/4.11 \
11#                 --rtems-tools=/Users/chris/Development/rtems/4.11 \
12#                 --rtems-bsps=sparc/sis
13# $ waf
14# $ /Users/chris/Development/rtems/4.11/bin/sparc-rtems4.11-run ./build/sparc-rtems4.11-sis/hello
15#
16# You can use '--rtems-archs=sparc,i386' or '--rtems-bsps=sparc/sis,i386/pc586'
17# to build for more than BSP at a time.
18#
19
20try:
21    import rtems_waf.rtems as rtems
22except:
23    print 'error: no rtems_waf git submodule; see README.waf'
24    import sys
25    sys.exit(1)
26
27def init(ctx):
28    rtems.init(ctx)
29
30def options(opt):
31    rtems.options(opt)
32
33def configure(conf):
34    rtems.configure(conf)
35
36def build(bld):
37    rtems.build(bld)
38    bld.env.CFLAGS += ['-O2','-g']
39    bld.recurse('hello')
40    bld.recurse('gdb')
41    bld.recurse('filesystem/fat_ramdisk')
42    bld.recurse('classic_api')
43    bld.recurse('file_io')
44    bld.recurse('ticker')
45    bld.recurse('uboot')
46    bld.recurse('led')
47    bld.recurse('misc')
48    bld.recurse('benchmarks')
49    bld.recurse('micromonitor')
50    bld.recurse('posix_api')
51    bld.recurse('cxx')
52
53def rebuild(ctx):
54    import waflib.Options
55    waflib.Options.commands.extend(['clean', 'build'])
56
57def tags(ctx):
58    ctx.exec_command('etags $(find . -name \*.[sSch])', shell = True)
Note: See TracBrowser for help on using the repository browser.