SConscript 685 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # Copyright (c) 2021, RT-Thread Development Team
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  5. #
  6. from building import *
  7. import os
  8. cwd = GetCurrentDir()
  9. src = Split('''
  10. ''')
  11. def addSrcFiles(arr, path):
  12. for f in os.listdir(path):
  13. fpath = os.path.join(path, f);
  14. if os.path.isfile(fpath):
  15. ext = os.path.splitext(fpath)[-1]
  16. if ext == '.c' or ext == '.cpp':
  17. arr += [fpath]
  18. elif os.path.isdir(fpath):
  19. addSrcFiles(arr, fpath)
  20. addSrcFiles(src, cwd);
  21. CPPPATH = [cwd, cwd+'/../include']
  22. group = DefineGroup('iwasm_platform_core', src, depend = [''], CPPPATH = CPPPATH)
  23. Return('group')