SCsub 848 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_ogg = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. if env["builtin_libogg"]:
  8. thirdparty_dir = "#thirdparty/libogg/"
  9. thirdparty_sources = [
  10. "bitwise.c",
  11. "framing.c",
  12. ]
  13. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  14. env_ogg.Prepend(CPPPATH=[thirdparty_dir])
  15. env_thirdparty = env_ogg.Clone()
  16. env_thirdparty.disable_warnings()
  17. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  18. env.modules_sources += thirdparty_obj
  19. # Godot source files
  20. module_obj = []
  21. env_ogg.add_source_files(module_obj, "*.cpp")
  22. env.modules_sources += module_obj
  23. # Needed to force rebuilding the module files when the thirdparty library is updated.
  24. env.Depends(module_obj, thirdparty_obj)