source: examples-v2/wscript @ 843e7f1

4.11
Last change on this file since 843e7f1 was 1d008f2, checked in by Chirayu Desai <cdesai@…>, on Nov 30, 2013 at 4:09:56 PM

benchmarks: Add support to build with waf

Add wscript(s) to support building benchmarks/nbench with waf

  • Property mode set to 100644
File size: 1.3 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
20import rtems_waf.rtems as rtems
21
22def init(ctx):
23    rtems.init(ctx)
24
25def options(opt):
26    rtems.options(opt)
27
28def configure(conf):
29    rtems.configure(conf)
30
31def build(bld):
32    rtems.build(bld)
33    bld.env.CFLAGS += ['-O2','-g']
34    bld.recurse('hello')
35    bld.recurse('gdb')
36    bld.recurse('filesystem/fat_ramdisk')
37    bld.recurse('classic_api')
38    bld.recurse('file_io')
39    bld.recurse('ticker')
40    bld.recurse('uboot')
41    bld.recurse('led')
42    bld.recurse('misc')
43    bld.recurse('benchmarks')
44
45def rebuild(ctx):
46    import waflib.Options
47    waflib.Options.commands.extend(['clean', 'build'])
48
49def tags(ctx):
50    ctx.exec_command('etags $(find . -name \*.[sSch])', shell = True)
Note: See TracBrowser for help on using the repository browser.