1# for module compiling 2import os 3Import('RTT_ROOT') 4Import('rtconfig') 5from building import * 6from gcc import * 7 8cwd = GetCurrentDir() 9src = [] 10CPPPATH = [] 11list = os.listdir(cwd) 12 13if rtconfig.PLATFORM in ['iccarm']: 14 print("\nThe current project does not support IAR build\n") 15 Return('group') 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