2015-01-31 11:13:50 +08:00
|
|
|
from building import *
|
2017-10-13 12:44:54 +08:00
|
|
|
Import('rtconfig')
|
2015-01-31 11:13:50 +08:00
|
|
|
|
2017-10-13 12:44:54 +08:00
|
|
|
src = Glob('*.c')
|
2015-01-31 11:13:50 +08:00
|
|
|
group = []
|
|
|
|
|
2022-05-31 06:11:15 +08:00
|
|
|
if rtconfig.PLATFORM in ['iccarm']:
|
2022-10-25 12:01:37 +08:00
|
|
|
CPPDEFINES = ['RT_USING_DLIBC', 'RT_USING_LIBC', '_DLIB_ADD_EXTRA_SYMBOLS=0']
|
|
|
|
AddDepend(['RT_USING_DLIBC', 'RT_USING_LIBC'])
|
|
|
|
|
2021-11-16 00:22:49 +08:00
|
|
|
if GetDepend('DFS_USING_POSIX'):
|
2018-04-15 14:39:35 +08:00
|
|
|
from distutils.version import LooseVersion
|
|
|
|
from iar import IARVersion
|
|
|
|
|
2018-04-07 00:43:28 +08:00
|
|
|
CPPDEFINES = CPPDEFINES + ['_DLIB_FILE_DESCRIPTOR']
|
2024-04-07 06:26:24 +08:00
|
|
|
iar_version = LooseVersion(IARVersion())
|
|
|
|
if iar_version != LooseVersion("0.0") and iar_version < LooseVersion("8.20.1"):
|
2018-04-07 00:43:28 +08:00
|
|
|
CPPDEFINES = CPPDEFINES + ['_DLIB_THREAD_SUPPORT']
|
2015-05-04 20:35:28 +08:00
|
|
|
|
2021-12-29 12:25:16 +08:00
|
|
|
group = DefineGroup('Compiler', src, depend = [''], CPPDEFINES = CPPDEFINES)
|
2015-01-31 11:13:50 +08:00
|
|
|
|
|
|
|
Return('group')
|