forked from nelhage/bemu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConstruct
More file actions
37 lines (29 loc) · 1.14 KB
/
Copy pathSConstruct
File metadata and controls
37 lines (29 loc) · 1.14 KB
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
def dep_uasm(target, source, env):
source.append('uasm/uasm')
return target, source
uasm = Builder(action = 'uasm/uasm $SOURCE',
suffix = '.bin',
src_suffix = '.uasm',
emitter = dep_uasm)
env = Environment(CFLAGS = '-O2 -g -m32',
CCPATH = '.',
ASPPFLAGS='-m32',
LINKFLAGS='-m32')
env.Append(BUILDERS = {'UAsm': uasm})
debug = ARGUMENTS.get('debug', 0)
if(debug):
env.Append(CFLAGS = ' -DDEBUG')
env.Command('opcodes.h','insts.pl', 'perl $SOURCE > $TARGET')
bemu = env.Program('bemu', ['bemu.c', 'bcpu.c',
'bdecode.c', 'bt.c',
'bt_helper.S', 'bclock.c',
'bconsole.c'], LIBS = '-lrt')
Default(bemu)
AlwaysBuild(env.Command('TAGS', '', 'etags *.[ch]'))
env.Program('uasm/uasm.c')
tests = ['align', 'bench1', 'bench2', 'bench3', 'bench4',
'sancheck', 'supervisor', 'timer', 'litmus', 'qsort']
test_targets = []
for t in tests:
test_targets.append(env.UAsm('tests/' + t + '.uasm'))
AlwaysBuild(env.Command('test', [bemu, test_targets], './run-tests.sh'))