-
Notifications
You must be signed in to change notification settings - Fork 3
/
SConstruct
50 lines (43 loc) · 1.46 KB
/
SConstruct
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
import os
import platform
import awtk_config as awtk
DefaultEnvironment(
CCFLAGS = awtk.CCFLAGS,
CFLAGS = awtk.CFLAGS,
CC=awtk.TOOLS_PREFIX+'gcc',
CXX=awtk.TOOLS_PREFIX+'g++',
LD=awtk.TOOLS_PREFIX+'g++',
AR=awtk.TOOLS_PREFIX+'ar',
STRIP=awtk.TOOLS_PREFIX+'strip',
LIBS = awtk.LIBS,
LIBPATH = awtk.LIBPATH,
CPPPATH = awtk.CPPPATH,
LINKFLAGS = awtk.LINKFLAGS,
OS_SUBSYSTEM_CONSOLE=awtk.OS_SUBSYSTEM_CONSOLE,
OS_SUBSYSTEM_WINDOWS=awtk.OS_SUBSYSTEM_WINDOWS,
OBJSUFFIX = ".o",
PROGSUFFIX = "",
TARGET_ARCH = "arm",
ENV = {'PATH' : os.environ['PATH']}
)
APP_ROOT=ARGUMENTS.get('APP', '')
TK_ROOT_VAR = awtk.joinPath(awtk.VAR_DIR, 'awtk')
VariantDir(TK_ROOT_VAR, awtk.TK_ROOT)
if APP_ROOT == '':
APP_PROJ_VAR = [awtk.joinPath(TK_ROOT_VAR, 'demos/SConscript')]
else:
(APP_PATH, APP_NAME) = os.path.split(APP_ROOT)
APP_ROOT_VAR = awtk.joinPath(awtk.VAR_DIR, APP_NAME)
APP_PROJ_VAR = [awtk.joinPath(APP_ROOT_VAR, 'src/SConscript')]
VariantDir(APP_ROOT_VAR, APP_ROOT)
SConscriptFiles=[
awtk.joinPath(TK_ROOT_VAR, '3rd/glad/SConscript'),
awtk.joinPath(TK_ROOT_VAR, '3rd/nanovg/SConscript'),
awtk.joinPath(TK_ROOT_VAR, '3rd/gpinyin/SConscript'),
awtk.joinPath(TK_ROOT_VAR, '3rd/libunibreak/SConscript'),
awtk.joinPath(TK_ROOT_VAR, 'src/SConscript'),
awtk.joinPath(TK_ROOT_VAR, 'tools/common/SConscript'),
awtk.joinPath(TK_ROOT_VAR, 'tools/ui_gen/xml_to_ui/SConscript'),
'gl/src/SConscript',
] + APP_PROJ_VAR;
SConscript(SConscriptFiles)