1from building import * 2 3objs = [] 4 5if not GetDepend(['RT_USING_OFW']): 6 Return('objs') 7 8cwd = GetCurrentDir() 9list = os.listdir(cwd) 10CPPPATH = [cwd, cwd + '/../include'] 11 12src = Glob('*.c') 13 14if GetDepend('RT_USING_PIC') == False: 15 SrcRemove(src, ['irq.c']) 16 17group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH) 18 19for d in list: 20 path = os.path.join(cwd, d) 21 if os.path.isfile(os.path.join(path, 'SConscript')): 22 objs = objs + SConscript(os.path.join(d, 'SConscript')) 23objs = objs + group 24 25Return('objs') 26