SCsub 971 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. env_backtrace = env.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. thirdparty_dir = "#thirdparty/libbacktrace/"
  8. thirdparty_sources = [
  9. "atomic.c",
  10. "dwarf.c",
  11. "fileline.c",
  12. "posix.c",
  13. "print.c",
  14. "sort.c",
  15. "state.c",
  16. "backtrace.c",
  17. "simple.c",
  18. "pecoff.c",
  19. "read.c",
  20. "alloc.c",
  21. ]
  22. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  23. env_backtrace.Prepend(CPPPATH=[thirdparty_dir])
  24. env_thirdparty = env_backtrace.Clone()
  25. env_thirdparty.disable_warnings()
  26. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  27. env.drivers_sources += thirdparty_obj
  28. # Godot source files
  29. driver_obj = []
  30. env_backtrace.add_source_files(driver_obj, "*.cpp")
  31. env.drivers_sources += driver_obj
  32. # Needed to force rebuilding the driver files when the thirdparty library is updated.
  33. env.Depends(driver_obj, thirdparty_obj)