Debian Codegraph @

modules/theora/SCsub

raw symbols SCIP
1 #!/usr/bin/env python
2 from misc.utility.scons_hints import *
3
4 Import("env")
5 Import("env_modules")
6
7 env_theora = env_modules.Clone()
8
9 # Thirdparty source files
10
11 thirdparty_obj = []
12
13 if env["builtin_libtheora"]:
14 thirdparty_dir = "#thirdparty/libtheora/"
15 thirdparty_sources = [
16 "bitpack.c",
17 "decinfo.c",
18 "decode.c",
19 "dequant.c",
20 "fragment.c",
21 "huffdec.c",
22 "idct.c",
23 "info.c",
24 "internal.c",
25 "quant.c",
26 "state.c",
27 ]
28
29 if env.editor_build:
30 thirdparty_sources += [
31 "analyze.c",
32 "encfrag.c",
33 "encinfo.c",
34 "encode.c",
35 "enquant.c",
36 "fdct.c",
37 "huffenc.c",
38 "mathops.c",
39 "mcenc.c",
40 "rate.c",
41 "tokenize.c",
42 ]
43
44 thirdparty_sources_x86 = [
45 "x86/mmxfrag.c",
46 "x86/mmxidct.c",
47 "x86/mmxstate.c",
48 "x86/sse2idct.c",
49 "x86/x86cpu.c",
50 "x86/x86state.c",
51 ]
52
53 if env.editor_build:
54 thirdparty_sources_x86 += [
55 "x86/mmxencfrag.c",
56 "x86/mmxfdct.c",
57 "x86/sse2encfrag.c",
58 "x86/sse2fdct.c",
59 "x86/x86enc.c",
60 "x86/x86enquant.c",
61 ]
62
63 thirdparty_sources_x86_vc = [
64 "x86_vc/mmxfrag.c",
65 "x86_vc/mmxidct.c",
66 "x86_vc/mmxstate.c",
67 "x86_vc/x86cpu.c",
68 "x86_vc/x86state.c",
69 ]
70
71 if env.editor_build:
72 thirdparty_sources_x86_vc += [
73 "x86_vc/mmxencfrag.c",
74 "x86_vc/mmxfdct.c",
75 "x86_vc/x86enc.c",
76 ]
77
78 if env["x86_libtheora_opt_gcc"]:
79 thirdparty_sources += thirdparty_sources_x86
80
81 if env["x86_libtheora_opt_vc"]:
82 thirdparty_sources += thirdparty_sources_x86_vc
83
84 if env["x86_libtheora_opt_gcc"] or env["x86_libtheora_opt_vc"]:
85 env_theora.Append(CPPDEFINES=["OC_X86_ASM"])
86
87 thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
88
89 env_theora.Prepend(CPPPATH=[thirdparty_dir])
90
91 # also requires libogg and libvorbis
92 if env["builtin_libogg"]:
93 env_theora.Prepend(CPPPATH=["#thirdparty/libogg"])
94 if env["builtin_libvorbis"]:
95 env_theora.Prepend(CPPPATH=["#thirdparty/libvorbis"])
96
97 env_thirdparty = env_theora.Clone()
98 env_thirdparty.disable_warnings()
99 env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
100 env.modules_sources += thirdparty_obj
101
102
103 # Godot source files
104
105 module_obj = []
106
107 env_theora.add_source_files(module_obj, "*.cpp")
108
109 if env.editor_build:
110 env_theora.add_source_files(module_obj, "editor/*.cpp")
111
112 env.modules_sources += module_obj
113
114 # Needed to force rebuilding the module files when the thirdparty library is updated.
115 env.Depends(module_obj, thirdparty_obj)