SConscript 638 B

123456789101112131415161718192021222324
  1. import os
  2. from building import *
  3. objs = []
  4. if GetDepend('ARCH_ARM_CORTEX_A') or GetDepend('ARCH_ARMV8') or GetDepend('ARCH_RISCV64'):
  5. cwd = GetCurrentDir()
  6. src = Glob('*.c') + Glob('*_gcc.S')
  7. if not GetDepend('RT_USING_MEMBLOCK'):
  8. SrcRemove(src, ['mm_memblock.c'])
  9. CPPPATH = [cwd]
  10. group = DefineGroup('mm', src, depend = ['ARCH_MM_MMU'], CPPPATH = CPPPATH)
  11. objs = [group]
  12. list = os.listdir(cwd)
  13. for d in list:
  14. path = os.path.join(cwd, d)
  15. if os.path.isfile(os.path.join(path, 'SConscript')):
  16. objs = objs + SConscript(os.path.join(d, 'SConscript'))
  17. Return('objs')