SConscript 714 B

12345678910111213141516171819202122232425262728293031323334
  1. # RT-Thread building script for component
  2. from building import *
  3. cwd = GetCurrentDir()
  4. src = []
  5. path = [cwd]
  6. path += [cwd + '/config']
  7. if GetDepend('RT_USING_PIN'):
  8. src += ['drv_gpio.c']
  9. if GetDepend('RT_USING_SERIAL'):
  10. src += ['drv_usart.c']
  11. if GetDepend('RT_USING_SDIO'):
  12. src += ['drv_sdio.c']
  13. if GetDepend('RT_USING_I2C'):
  14. src += ['drv_soft_i2c.c']
  15. if GetDepend('RT_USING_WDT'):
  16. src += ['drv_wdt.c']
  17. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
  18. objs = [group]
  19. list = os.listdir(cwd)
  20. for item in list:
  21. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  22. objs = objs + SConscript(os.path.join(item, 'SConscript'))
  23. Return('objs')