-
Notifications
You must be signed in to change notification settings - Fork 5
/
wscript
51 lines (43 loc) · 1.33 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2014 Daniel Ramirez ([email protected])
#
# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
#
# Waf build script for RTEMS examples
#
# To configure, build and run do:
#
# $ waf configure --rtems=/Users/chris/Development/rtems/build/4.11 \
# --rtems-tools=/Users/chris/Development/rtems/4.11 \
# --rtems-bsps=sparc/sis
# $ waf
# $ /Users/chris/Development/rtems/4.11/bin/sparc-rtems4.11-run ./build/sparc-rtems4.11-sis/hello
#
# You can use '--rtems-archs=sparc,i386' or '--rtems-bsps=sparc/sis,i386/pc586'
# to build for more than BSP at a time.
#
try:
import rtems_waf.rtems as rtems
except:
print 'error: no rtems_waf git submodule; see README.waf'
import sys
sys.exit(1)
def init(ctx):
rtems.init(ctx)
def options(opt):
rtems.options(opt)
def configure(conf):
rtems.configure(conf)
def build(bld):
rtems.build(bld)
bld.env.CFLAGS += ['-O2','-g']
bld.recurse('task-switch')
bld.recurse('task-preempt')
bld.recurse('interrupt-latency')
bld.recurse('semaphore-shuffle')
bld.recurse('message-latency')
bld.recurse('deadlock-break')
def rebuild(ctx):
import waflib.Options
waflib.Options.commands.extend(['clean', 'build'])
def tags(ctx):
ctx.exec_command('etags $(find . -name \*.[sSch])', shell = True)