2021-04-21 00:56:36 +08:00
|
|
|
from building import *
|
2021-04-25 21:10:31 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
|
|
|
|
src = []
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
group = []
|
2022-06-19 21:56:24 +08:00
|
|
|
CPPPATH = [cwd + '/include']
|
2021-10-21 09:44:01 +08:00
|
|
|
CPPDEFINES = []
|
2021-04-25 21:10:31 +08:00
|
|
|
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-10-28 14:48:51 +08:00
|
|
|
CPPDEFINES += ['__CLK_TCK=RT_TICK_PER_SECOND']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2022-04-22 02:03:04 +08:00
|
|
|
CPPDEFINES += ['CLOCKS_PER_SEC=RT_TICK_PER_SECOND'] # forcly revert to 1 by IAR
|
2021-10-28 14:48:51 +08:00
|
|
|
|
2021-12-26 22:41:24 +08:00
|
|
|
src += Glob('*.c')
|
2021-04-25 21:10:31 +08:00
|
|
|
|
2021-12-29 12:25:16 +08:00
|
|
|
group = DefineGroup('Compiler', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
2021-05-15 21:27:31 +08:00
|
|
|
|
|
|
|
list = os.listdir(cwd)
|
2021-10-25 01:08:48 +08:00
|
|
|
for item in list:
|
|
|
|
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
|
|
|
group = group + SConscript(os.path.join(item, 'SConscript'))
|
2021-05-15 21:27:31 +08:00
|
|
|
|
2021-04-25 21:10:31 +08:00
|
|
|
Return('group')
|