1# RT-Thread building script for component 2 3from building import * 4 5Import('rtconfig') 6 7cwd = GetCurrentDir() 8src = Glob('*.c') + Glob('*.cpp') 9CPPPATH = [cwd] 10 11if rtconfig.PLATFORM in ['armcc', 'armclang']: 12 src += Glob('*_rvds.S') 13 14if rtconfig.PLATFORM in ['gcc']: 15 src += Glob('*_init.S') 16 src += Glob('*_gcc.S') 17 18if rtconfig.PLATFORM in ['iccarm']: 19 src += Glob('*_iar.S') 20 21if not GetDepend('RT_USING_MEM_PROTECTION') and not GetDepend('RT_USING_HW_STACK_GUARD'): 22 SrcRemove(src, 'mpu.c') 23 24group = DefineGroup('libcpu', src, depend = [''], CPPPATH = CPPPATH) 25 26Return('group') 27