SConscript 570 B

1234567891011121314151617181920212223242526
  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_EXT_SRAM']):
  9. src += Glob('drv_sram.c')
  10. if GetDepend(['BSP_USING_SPI_FLASH']):
  11. src += Glob('spi_flash_init.c')
  12. CPPDEFINES = ['STM32F103xE']
  13. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  14. list = os.listdir(cwd)
  15. for item in list:
  16. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  17. group = group + SConscript(os.path.join(item, 'SConscript'))
  18. Return('group')