1# RT-Thread building script for component 2 3import SCons, os 4from building import * 5 6group = [] 7if not GetDepend(['RT_USING_VBUS']): 8 Return('group') 9 10cwd = GetCurrentDir() 11src = Glob('*.c') 12 13for c, f in [['RT_USING_VBUS_RFS', 'utilities/rfs.c'], 14 ['RT_USING_VBUS_RSHELL', 'utilities/rshell.c'], 15 ]: 16 if GetDepend(c): 17 src += Glob(f) 18 19CPPPATH = [cwd, os.path.join(cwd, 'share_hdr')] 20 21group = DefineGroup('VBus', src, depend = ['RT_USING_VBUS'], CPPPATH = CPPPATH) 22 23Return('group') 24