SConscript 598 B

1234567891011121314151617181920212223242526272829
  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. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
  14. objs = [group]
  15. list = os.listdir(cwd)
  16. for item in list:
  17. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  18. objs = objs + SConscript(os.path.join(item, 'SConscript'))
  19. Return('objs')