SConscript 849 B

123456789101112131415161718192021222324252627282930313233
  1. #
  2. # Copyright (c) 2021, RT-Thread Development Team
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  5. #
  6. # for module compiling
  7. import os
  8. from building import *
  9. objs = []
  10. cwd = GetCurrentDir()
  11. list = os.listdir(cwd)
  12. if GetDepend(['PKG_USING_WAMR']):
  13. wamr_entry_sconscript = os.path.join(cwd, "product-mini", "platforms", "rt-thread", 'SConscript')
  14. if os.path.isfile(wamr_entry_sconscript):
  15. objs = objs + SConscript(wamr_entry_sconscript)
  16. else:
  17. print("[WAMR] entry script wrong:", wamr_entry_sconscript)
  18. Return('objs')
  19. wamr_runlib_sconsript = os.path.join(cwd, "build-scripts", 'SConscript')
  20. if os.path.isfile(wamr_runlib_sconsript):
  21. objs = objs + SConscript(wamr_runlib_sconsript)
  22. else:
  23. print("[WAMR] runtime lib script wrong:", wamr_runlib_sconsript)
  24. Return('objs')