SConscript 658 B

1234567891011121314151617181920212223242526272829
  1. import os
  2. from building import *
  3. objs = []
  4. cwd = GetCurrentDir()
  5. # add general drivers
  6. src = []
  7. path = [cwd]
  8. if GetDepend(['BSP_USING_ETH']):
  9. src += Glob('w5500_device.c')
  10. if GetDepend(['BSP_USING_WIFI_OR_GPRS']):
  11. src += Glob('esp02_device.c')
  12. if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
  13. src += Glob('on_chip_flash_init.c')
  14. CPPDEFINES = ['STM32F103xE']
  15. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  16. list = os.listdir(cwd)
  17. for item in list:
  18. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  19. group = group + SConscript(os.path.join(item, 'SConscript'))
  20. Return('group')