-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSConscript
71 lines (55 loc) · 1.72 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
from building import *
import rtconfig
def get_path_files(dirs, file_ext):
path_files = []
# print('dir: ' + str(dirs))
for dir in dirs:
# print('dir: ' + dir)
path_files += Glob(dir + '/' + file_ext)
return path_files
cwd = GetCurrentDir()
path = []
src = []
C_DIRS = []
app = GetConfigValue('PKG_ZEPHYR_POLLING_EXAMPLE').replace('"', '')
chipset = GetConfigValue('PKG_ZEPHYR_POLLING_CHIPSET').replace('"', '')
porting = GetConfigValue('PKG_ZEPHYR_POLLING_PORTING').replace('"', '')
# print("app: %s" % app)
# print("chipset: %s" % chipset)
# print("porting: %s" % porting)
# Include stack info
stack_path = cwd + '/src'
path.append(stack_path)
C_DIRS.append(stack_path)
C_DIRS.append(stack_path + '/base')
C_DIRS.append(stack_path + '/bluetooth')
C_DIRS.append(stack_path + '/common')
C_DIRS.append(stack_path + '/drivers')
C_DIRS.append(stack_path + '/host')
C_DIRS.append(stack_path + '/logging')
C_DIRS.append(stack_path + '/utils')
C_DIRS.append(stack_path + '/services')
tmp_path = cwd + '/example/' + app
path.append(tmp_path)
C_DIRS.append(tmp_path)
tmp_path = cwd + '/chipset/'
path.append(tmp_path)
tmp_path = tmp_path + chipset
path.append(tmp_path)
C_DIRS.append(tmp_path)
tmp_path = cwd + '/platform/'
path.append(tmp_path)
tmp_path = tmp_path + 'rtthread'
path.append(tmp_path)
C_DIRS.append(tmp_path)
tmp_path = cwd + '/porting/'
path.append(tmp_path)
tmp_path = tmp_path + porting
path.append(tmp_path)
C_DIRS.append(tmp_path)
src = get_path_files(C_DIRS, '*.c')
# print("src: %s" % src)
# if rtconfig.CROSS_TOOL == 'keil':
# LOCAL_CCFLAGS += ' --gnu --diag_suppress=111'
group = DefineGroup('zephyr_polling', src, depend = ['PKG_USING_ZEPHYR_POLLING'], CPPPATH = path)
Return('group')