SConscript 1017 B

123456789101112131415161718192021222324252627
  1. # for libc component
  2. import os
  3. Import('rtconfig')
  4. from building import *
  5. objs = []
  6. cwd = GetCurrentDir()
  7. if GetDepend('RT_USING_LIBC'):
  8. if os.path.isfile(os.path.join(cwd, 'newlib/SConscript')) and rtconfig.PLATFORM == 'gcc':
  9. objs = objs + SConscript('newlib/SConscript')
  10. elif os.path.isfile(os.path.join(cwd, 'armlibc/SConscript')) and rtconfig.PLATFORM == 'armcc':
  11. objs = objs + SConscript('armlibc/SConscript')
  12. elif os.path.isfile(os.path.join(cwd, 'dlib/SConscript')) and rtconfig.PLATFORM == 'iar':
  13. objs = objs + SConscript('dlib/SConscript')
  14. else:
  15. if os.path.isfile(os.path.join(cwd, 'minilibc/SConscript')) and rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim':
  16. objs = objs + SConscript('minilibc/SConscript')
  17. if GetDepend('RT_USING_LIBC') and GetDepend('RT_USING_PTHREADS'):
  18. objs = objs + SConscript('pthreads/SConscript')
  19. if GetDepend('RT_USING_MODULE') and GetDepend('RT_USING_LIBDL'):
  20. objs = objs + SConscript('libdl/SConscript')
  21. Return('objs')