SConscript 759 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. CPPPATH = [cwd,
  12. cwd+'/sandboxed-system-primitives/include',
  13. cwd+'/sandboxed-system-primitives/src']
  14. def addSrcFiles(arr, path):
  15. for f in os.listdir(path):
  16. fpath = os.path.join(path, f);
  17. if os.path.isfile(fpath):
  18. ext = os.path.splitext(fpath)[-1]
  19. if ext == '.c' or ext == '.cpp':
  20. arr += [fpath]
  21. elif os.path.isdir(fpath):
  22. addSrcFiles(arr, fpath)
  23. addSrcFiles(src, cwd)
  24. group = DefineGroup('iwasm_libc_wasi', src, depend = [''], CPPPATH = CPPPATH)
  25. Return('group')