SConscript 518 B

12345678910111213141516171819202122
  1. from building import *
  2. cwd = GetCurrentDir()
  3. src = Glob('*.c') + Glob('iomux/*.c')
  4. if GetDepend(['BSP_USING_USB_DEVICE']):
  5. src += Glob('usb/device/*.c')
  6. src += Glob('usb/phy/*.c')
  7. list = os.listdir(cwd)
  8. CPPPATH = [cwd]
  9. objs = []
  10. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
  11. for d in list:
  12. path = os.path.join(cwd, d)
  13. if os.path.isfile(os.path.join(path, 'SConscript')):
  14. objs = objs + SConscript(os.path.join(d, 'SConscript'))
  15. objs = objs + group
  16. Return('objs')