SConscript 605 B

12345678910111213141516171819202122232425
  1. import os
  2. from building import *
  3. cwd = GetCurrentDir()
  4. # add general drivers
  5. src = Split('''
  6. board.c
  7. CubeMX_Config/Src/stm32f4xx_hal_msp.c
  8. ''')
  9. path = [cwd]
  10. path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
  11. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
  12. # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
  13. # group = group + SConscript(os.path.join("ports", 'SConscript'))
  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')