2021-10-06 16:50:57 +08:00
|
|
|
# for module compiling
|
|
|
|
import os
|
|
|
|
Import('RTT_ROOT')
|
2021-12-14 18:25:56 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
2021-10-06 16:50:57 +08:00
|
|
|
|
2021-12-14 18:25:56 +08:00
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = []
|
|
|
|
CPPPATH = []
|
2021-10-06 16:50:57 +08:00
|
|
|
list = os.listdir(cwd)
|
|
|
|
|
2021-12-14 18:25:56 +08:00
|
|
|
if rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
print("\nThe current project does not support iar build\n")
|
|
|
|
Return('group')
|
|
|
|
elif rtconfig.CROSS_TOOL == 'gcc':
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
src = Glob('./src/*.c')
|
|
|
|
|
|
|
|
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
2021-10-06 16:50:57 +08:00
|
|
|
for d in list:
|
|
|
|
path = os.path.join(cwd, d)
|
|
|
|
if os.path.isfile(os.path.join(path, 'SConscript')):
|
2021-12-14 18:25:56 +08:00
|
|
|
group = group + SConscript(os.path.join(d, 'SConscript'))
|
2021-10-06 16:50:57 +08:00
|
|
|
|
2021-12-14 18:25:56 +08:00
|
|
|
Return('group')
|