SConscript 709 B

12345678910111213141516171819202122232425262728293031
  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('phy_reset.c')
  10. if GetDepend(['BSP_USING_SPI_FLASH']):
  11. src += Glob('spi_flash_init.c')
  12. if GetDepend(['BSP_USING_SDCARD']):
  13. src += Glob('sdcard_port.c')
  14. if GetDepend(['BSP_USING_EXT_FMC_IO']):
  15. src += Glob('drv_ext_io.c')
  16. CPPDEFINES = ['STM32F429xx']
  17. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  18. list = os.listdir(cwd)
  19. for item in list:
  20. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  21. group = group + SConscript(os.path.join(item, 'SConscript'))
  22. Return('group')