2019-06-12 15:01:12 +08:00
|
|
|
import rtconfig
|
2018-10-10 09:26:50 +08:00
|
|
|
from building import *
|
2022-08-08 00:15:13 +08:00
|
|
|
import os
|
2018-10-10 09:26:50 +08:00
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Glob('*.c')
|
2019-06-12 15:01:12 +08:00
|
|
|
CPPPATH = [cwd]
|
2018-10-10 09:26:50 +08:00
|
|
|
|
2022-08-15 11:21:27 +08:00
|
|
|
# add for startup script
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2018-10-10 09:26:50 +08:00
|
|
|
CPPDEFINES = ['__START=entry']
|
|
|
|
else:
|
|
|
|
CPPDEFINES = []
|
2022-08-15 11:21:27 +08:00
|
|
|
|
2018-10-10 09:26:50 +08:00
|
|
|
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
|
|
|
|
|
2022-08-08 00:15:13 +08:00
|
|
|
list = os.listdir(cwd)
|
|
|
|
for item in list:
|
|
|
|
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
|
|
|
group = group + SConscript(os.path.join(item, 'SConscript'))
|
2022-08-15 11:21:27 +08:00
|
|
|
|
2018-10-10 09:26:50 +08:00
|
|
|
Return('group')
|