1# RT-Thread building script for component 2 3from building import * 4 5cwd = GetCurrentDir() 6src = Glob('*.c') 7list = os.listdir(cwd) 8CPPPATH = [cwd] 9objs = [] 10 11group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) 12 13for d in list: 14 path = os.path.join(cwd, d) 15 if os.path.isfile(os.path.join(path, 'SConscript')): 16 objs = objs + SConscript(os.path.join(d, 'SConscript')) 17objs = objs + group 18 19Return('objs') 20