2016-10-13 17:40:40 +00:00
|
|
|
Import('env')
|
|
|
|
Import('env_modules')
|
|
|
|
|
|
|
|
env_theora = env_modules.Clone()
|
|
|
|
|
|
|
|
# Thirdparty source files
|
|
|
|
if (env["libtheora"] != "system"): # builtin
|
|
|
|
thirdparty_dir = "#thirdparty/libtheora/"
|
|
|
|
thirdparty_sources = [
|
2016-10-16 20:22:21 +00:00
|
|
|
#"analyze.c",
|
|
|
|
#"apiwrapper.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"bitpack.c",
|
|
|
|
"cpu.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"decapiwrapper.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"decinfo.c",
|
|
|
|
"decode.c",
|
|
|
|
"dequant.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"encapiwrapper.c",
|
|
|
|
#"encfrag.c",
|
|
|
|
#"encinfo.c",
|
|
|
|
#"encode.c",
|
|
|
|
#"encoder_disabled.c",
|
|
|
|
#"enquant.c",
|
|
|
|
#"fdct.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"fragment.c",
|
|
|
|
"huffdec.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"huffenc.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"idct.c",
|
|
|
|
"info.c",
|
|
|
|
"internal.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"mathops.c",
|
|
|
|
#"mcenc.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"quant.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"rate.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"state.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"tokenize.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
thirdparty_sources_x86 = [
|
2016-10-16 20:22:21 +00:00
|
|
|
#"x86/mmxencfrag.c",
|
|
|
|
#"x86/mmxfdct.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"x86/mmxfrag.c",
|
|
|
|
"x86/mmxidct.c",
|
|
|
|
"x86/mmxstate.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"x86/sse2fdct.c",
|
|
|
|
#"x86/x86enc.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"x86/x86state.c",
|
|
|
|
]
|
|
|
|
|
|
|
|
thirdparty_sources_x86_vc = [
|
2016-10-16 20:22:21 +00:00
|
|
|
#"x86_vc/mmxencfrag.c",
|
|
|
|
#"x86_vc/mmxfdct.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"x86_vc/mmxfrag.c",
|
|
|
|
"x86_vc/mmxidct.c",
|
|
|
|
"x86_vc/mmxstate.c",
|
2016-10-16 20:22:21 +00:00
|
|
|
#"x86_vc/x86enc.c",
|
2016-10-13 17:40:40 +00:00
|
|
|
"x86_vc/x86state.c",
|
|
|
|
]
|
|
|
|
|
2016-10-16 20:22:21 +00:00
|
|
|
if (env["x86_libtheora_opt_gcc"]):
|
2016-10-13 17:40:40 +00:00
|
|
|
thirdparty_sources += thirdparty_sources_x86
|
|
|
|
|
2016-10-16 20:22:21 +00:00
|
|
|
if (env["x86_libtheora_opt_vc"]):
|
2016-10-13 17:40:40 +00:00
|
|
|
thirdparty_sources += thirdparty_sources_x86_vc
|
|
|
|
|
2016-10-16 20:22:21 +00:00
|
|
|
if (env["x86_libtheora_opt_gcc"] or env["x86_libtheora_opt_vc"]):
|
2016-10-13 17:40:40 +00:00
|
|
|
env_theora.Append(CCFLAGS = ["-DOC_X86_ASM"])
|
|
|
|
|
|
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
|
|
|
|
env_theora.add_source_files(env.modules_sources, thirdparty_sources)
|
|
|
|
env_theora.Append(CPPPATH = [thirdparty_dir])
|
|
|
|
|
|
|
|
# also requires libogg and libvorbis
|
|
|
|
if (env["libogg"] != "system"): # builtin
|
|
|
|
env_theora.Append(CPPPATH = ["#thirdparty/libogg"])
|
|
|
|
if (env["libvorbis"] != "system"): # builtin
|
|
|
|
env_theora.Append(CPPPATH = ["#thirdparty/libvorbis"])
|
|
|
|
|
|
|
|
# Godot source files
|
|
|
|
env_theora.add_source_files(env.modules_sources, "*.cpp")
|