1# for module compiling 2import os 3Import('RTT_ROOT') 4Import('rtconfig') 5from building import * 6from gcc import * 7 8cwd = GetCurrentDir() 9src = [] 10CPPPATH = [cwd] 11group = [] 12list = os.listdir(cwd) 13 14if rtconfig.PLATFORM in ['iccarm']: 15 group = DefineGroup('', src, depend = [''], CPPPATH = CPPPATH) 16elif rtconfig.PLATFORM in GetGCCLikePLATFORM(): 17 if GetOption('target') != 'mdk5': 18 CPPPATH = [cwd] 19 src = Glob('./src/*.c') 20 21group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) 22 23for d in list: 24 path = os.path.join(cwd, d) 25 if os.path.isfile(os.path.join(path, 'SConscript')): 26 group = group + SConscript(os.path.join(d, 'SConscript')) 27 28Return('group') 29