SCsub 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_theora = env_modules.Clone()
  5. # Thirdparty source files
  6. if env["builtin_libtheora"]:
  7. thirdparty_dir = "#thirdparty/libtheora/"
  8. thirdparty_sources = [
  9. # "analyze.c",
  10. # "apiwrapper.c",
  11. "bitpack.c",
  12. "cpu.c",
  13. # "decapiwrapper.c",
  14. "decinfo.c",
  15. "decode.c",
  16. "dequant.c",
  17. # "encapiwrapper.c",
  18. # "encfrag.c",
  19. # "encinfo.c",
  20. # "encode.c",
  21. # "encoder_disabled.c",
  22. # "enquant.c",
  23. # "fdct.c",
  24. "fragment.c",
  25. "huffdec.c",
  26. # "huffenc.c",
  27. "idct.c",
  28. "info.c",
  29. "internal.c",
  30. # "mathops.c",
  31. # "mcenc.c",
  32. "quant.c",
  33. # "rate.c",
  34. "state.c",
  35. # "tokenize.c",
  36. ]
  37. thirdparty_sources_x86 = [
  38. # "x86/mmxencfrag.c",
  39. # "x86/mmxfdct.c",
  40. "x86/mmxfrag.c",
  41. "x86/mmxidct.c",
  42. "x86/mmxstate.c",
  43. # "x86/sse2fdct.c",
  44. # "x86/x86enc.c",
  45. "x86/x86state.c",
  46. ]
  47. thirdparty_sources_x86_vc = [
  48. # "x86_vc/mmxencfrag.c",
  49. # "x86_vc/mmxfdct.c",
  50. "x86_vc/mmxfrag.c",
  51. "x86_vc/mmxidct.c",
  52. "x86_vc/mmxstate.c",
  53. # "x86_vc/x86enc.c",
  54. "x86_vc/x86state.c",
  55. ]
  56. if env["x86_libtheora_opt_gcc"]:
  57. thirdparty_sources += thirdparty_sources_x86
  58. if env["x86_libtheora_opt_vc"]:
  59. thirdparty_sources += thirdparty_sources_x86_vc
  60. if env["x86_libtheora_opt_gcc"] or env["x86_libtheora_opt_vc"]:
  61. env_theora.Append(CPPDEFINES=["OC_X86_ASM"])
  62. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  63. env_theora.Prepend(CPPPATH=[thirdparty_dir])
  64. # also requires libogg and libvorbis
  65. if env["builtin_libogg"]:
  66. env_theora.Prepend(CPPPATH=["#thirdparty/libogg"])
  67. if env["builtin_libvorbis"]:
  68. env_theora.Prepend(CPPPATH=["#thirdparty/libvorbis"])
  69. env_thirdparty = env_theora.Clone()
  70. env_thirdparty.disable_warnings()
  71. env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
  72. # Godot source files
  73. env_theora.add_source_files(env.modules_sources, "*.cpp")