summaryrefslogtreecommitdiffstats
path: root/SConstruct
blob: 377297c5dd5a73fdca3fef05e0c6c879f0e46079 (plain) (blame)
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
# #####################################################################
# User configuration.
MAX_TASKS = 1000 # max number of tasks per trace

# #####################################################################
# Internal configuration.
DEBUG_FLAGS  = '-Wall -g -Wdeclaration-after-statement'
INCLUDE_DIRS = 'include/'
# #####################################################################
# Build configuration.
from os import uname

# sanity check
(os, _, _, _, arch) = uname()
if os != 'Linux':
    print 'Error: Building sched_trace tools is only supported on Linux.'
    Exit(1)

# base config
env = Environment(
    CC = 'gcc',
    CCFLAGS = Split(DEBUG_FLAGS),
    CPPPATH = Split(INCLUDE_DIRS),
    CPPDEFINES = '-DMAX_TASKS=%d' % MAX_TASKS,
)

# #####################################################################
# Targets: sched_trace tools
common = ['src/load.c', 'src/eheap.c', 'src/util.c']
env.Program('st_convert', ['src/st2pl.c'] + common)
env.Program('st_show', ['src/showst.c'] + common)