-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathSConscript
87 lines (66 loc) · 2.83 KB
/
SConscript
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# RT-Thread building script for JerryScript
import os
from building import *
# get current directory
cwd = GetCurrentDir()
jerry_core_dir = 'jerryscript/jerry-core'
jerry_core = Glob(jerry_core_dir + '/*.c')
jerry_core += Glob(jerry_core_dir + '/api/*.c')
jerry_core += Glob(jerry_core_dir + '/debugger/*.c')
jerry_core += Glob(jerry_core_dir + '/ecma/base/*.c')
jerry_core += Glob(jerry_core_dir + '/ecma/builtin-objects/*.c')
jerry_core += Glob(jerry_core_dir + '/ecma/builtin-objects/typedarray/*.c')
jerry_core += Glob(jerry_core_dir + '/ecma/operations/*.c')
jerry_core += Glob(jerry_core_dir + '/jcontext/*.c')
jerry_core += Glob(jerry_core_dir + '/jmem/*.c')
jerry_core += Glob(jerry_core_dir + '/jrt/*.c')
jerry_core += Glob(jerry_core_dir + '/lit/*.c')
jerry_core += Glob(jerry_core_dir + '/parser/js/*.c')
jerry_core += Glob(jerry_core_dir + '/parser/regexp/*.c')
jerry_core += Glob(jerry_core_dir + '/vm/*.c')
jerry_ext_dir = 'jerryscript/jerry-ext'
jerry_ext = Glob(jerry_ext_dir + '/arg/*.c')
jerry_ext += Glob(jerry_ext_dir + '/handler/*.c')
jerry_ext += Glob(jerry_ext_dir + '/include/*.c')
jerry_ext += Glob(jerry_ext_dir + '/module/*.c')
src = jerry_core + jerry_ext
CPPPATH = [cwd]
jerry_core_dir = cwd + '/jerryscript/jerry-core'
CPPPATH += [jerry_core_dir + '/api']
CPPPATH += [jerry_core_dir + '/debugger']
CPPPATH += [jerry_core_dir + '/ecma/base']
CPPPATH += [jerry_core_dir + '/ecma/builtin-objects']
CPPPATH += [jerry_core_dir + '/ecma/builtin-objects/typedarray']
CPPPATH += [jerry_core_dir + '/ecma/operations']
CPPPATH += [jerry_core_dir + '/include']
CPPPATH += [jerry_core_dir + '/jcontext']
CPPPATH += [jerry_core_dir + '/jmem']
CPPPATH += [jerry_core_dir + '/jrt']
CPPPATH += [jerry_core_dir + '/lit']
CPPPATH += [jerry_core_dir + '/parser/js']
CPPPATH += [jerry_core_dir + '/parser/regexp']
CPPPATH += [jerry_core_dir + '/vm']
jerry_ext_dir = cwd + '/jerryscript/jerry-ext'
CPPPATH += [jerry_ext_dir + '/arg']
CPPPATH += [jerry_ext_dir + '/handler']
CPPPATH += [jerry_ext_dir + '/include']
CPPPATH += [jerry_ext_dir + '/module']
LOCAL_CCFLAGS = ''
import rtconfig
if rtconfig.CROSS_TOOL == 'keil':
LOCAL_CCFLAGS += ' --gnu'
elif rtconfig.CROSS_TOOL == 'gcc':
LOCAL_CCFLAGS += ' -std=c11'
CPPDEFINES = ['JERRY_JS_PARSER', 'JERRY_ENABLE_EXTERNAL_CONTEXT']
if GetDepend('PKG_JERRY_ENABLE_ERROR_MESSAGES'):
CPPDEFINES += ['JERRY_ENABLE_ERROR_MESSAGES']
if GetDepend('PKG_JERRY_ENABLE_LOGGING'):
CPPDEFINES += ['JERRY_ENABLE_LOGGING']
if GetDepend('PKG_JMEM_STATS'):
CPPDEFINES += ['JMEM_STATS']
if GetDepend('PKG_CONFIG_DISABLE_ES2015'):
CPPDEFINES += ['CONFIG_DISABLE_ES2015']
group = DefineGroup('JerryScript', src, depend = ['PKG_USING_JERRYSCRIPT'], CPPPATH = CPPPATH,
CPPDEFINES = CPPDEFINES, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
group = group + SConscript(os.path.join('rtthread-port', 'SConscript'))
Return('group')