SConscript 604 B

12345678910111213141516171819202122232425
  1. import os
  2. from building import *
  3. cwd = GetCurrentDir()
  4. # add the general drivers.
  5. src = Glob('board.c')
  6. src += Glob('CubeMX_Config/Src/stm32f7xx_hal_msp.c')
  7. path = [cwd]
  8. path += [cwd + '/CubeMX_Config/Inc']
  9. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
  10. # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
  11. # group = group + SConscript(os.path.join("ports", 'SConscript'))
  12. list = os.listdir(cwd)
  13. for item in list:
  14. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  15. group = group + SConscript(os.path.join(item, 'SConscript'))
  16. Return('group')