Theora: Don't compile unnecessary files, rename "x86_opt_*"
This commit is contained in:
parent
89132224a6
commit
4ffa8f224d
|
@ -97,9 +97,8 @@ env_base.__class__.disable_module = methods.disable_module
|
||||||
env_base.__class__.add_source_files = methods.add_source_files
|
env_base.__class__.add_source_files = methods.add_source_files
|
||||||
env_base.__class__.use_windows_spawn_fix = methods.use_windows_spawn_fix
|
env_base.__class__.use_windows_spawn_fix = methods.use_windows_spawn_fix
|
||||||
|
|
||||||
env_base["x86_opt_gcc"]=False
|
env_base["x86_libtheora_opt_gcc"]=False
|
||||||
env_base["x86_opt_vc"]=False
|
env_base["x86_libtheora_opt_vc"]=False
|
||||||
env_base["armv7_opt_gcc"]=False
|
|
||||||
|
|
||||||
customs = ['custom.py']
|
customs = ['custom.py']
|
||||||
|
|
||||||
|
|
|
@ -7,63 +7,63 @@ env_theora = env_modules.Clone()
|
||||||
if (env["libtheora"] != "system"): # builtin
|
if (env["libtheora"] != "system"): # builtin
|
||||||
thirdparty_dir = "#thirdparty/libtheora/"
|
thirdparty_dir = "#thirdparty/libtheora/"
|
||||||
thirdparty_sources = [
|
thirdparty_sources = [
|
||||||
"analyze.c",
|
#"analyze.c",
|
||||||
"apiwrapper.c",
|
#"apiwrapper.c",
|
||||||
"bitpack.c",
|
"bitpack.c",
|
||||||
"cpu.c",
|
"cpu.c",
|
||||||
"decapiwrapper.c",
|
#"decapiwrapper.c",
|
||||||
"decinfo.c",
|
"decinfo.c",
|
||||||
"decode.c",
|
"decode.c",
|
||||||
"dequant.c",
|
"dequant.c",
|
||||||
"encapiwrapper.c",
|
#"encapiwrapper.c",
|
||||||
"encfrag.c",
|
#"encfrag.c",
|
||||||
"encinfo.c",
|
#"encinfo.c",
|
||||||
"encode.c",
|
#"encode.c",
|
||||||
"encoder_disabled.c",
|
#"encoder_disabled.c",
|
||||||
"enquant.c",
|
#"enquant.c",
|
||||||
"fdct.c",
|
#"fdct.c",
|
||||||
"fragment.c",
|
"fragment.c",
|
||||||
"huffdec.c",
|
"huffdec.c",
|
||||||
"huffenc.c",
|
#"huffenc.c",
|
||||||
"idct.c",
|
"idct.c",
|
||||||
"info.c",
|
"info.c",
|
||||||
"internal.c",
|
"internal.c",
|
||||||
"mathops.c",
|
#"mathops.c",
|
||||||
"mcenc.c",
|
#"mcenc.c",
|
||||||
"quant.c",
|
"quant.c",
|
||||||
"rate.c",
|
#"rate.c",
|
||||||
"state.c",
|
"state.c",
|
||||||
"tokenize.c",
|
#"tokenize.c",
|
||||||
]
|
]
|
||||||
|
|
||||||
thirdparty_sources_x86 = [
|
thirdparty_sources_x86 = [
|
||||||
"x86/mmxencfrag.c",
|
#"x86/mmxencfrag.c",
|
||||||
"x86/mmxfdct.c",
|
#"x86/mmxfdct.c",
|
||||||
"x86/mmxfrag.c",
|
"x86/mmxfrag.c",
|
||||||
"x86/mmxidct.c",
|
"x86/mmxidct.c",
|
||||||
"x86/mmxstate.c",
|
"x86/mmxstate.c",
|
||||||
"x86/sse2fdct.c",
|
#"x86/sse2fdct.c",
|
||||||
"x86/x86enc.c",
|
#"x86/x86enc.c",
|
||||||
"x86/x86state.c",
|
"x86/x86state.c",
|
||||||
]
|
]
|
||||||
|
|
||||||
thirdparty_sources_x86_vc = [
|
thirdparty_sources_x86_vc = [
|
||||||
"x86_vc/mmxencfrag.c",
|
#"x86_vc/mmxencfrag.c",
|
||||||
"x86_vc/mmxfdct.c",
|
#"x86_vc/mmxfdct.c",
|
||||||
"x86_vc/mmxfrag.c",
|
"x86_vc/mmxfrag.c",
|
||||||
"x86_vc/mmxidct.c",
|
"x86_vc/mmxidct.c",
|
||||||
"x86_vc/mmxstate.c",
|
"x86_vc/mmxstate.c",
|
||||||
"x86_vc/x86enc.c",
|
#"x86_vc/x86enc.c",
|
||||||
"x86_vc/x86state.c",
|
"x86_vc/x86state.c",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (env["x86_opt_gcc"]):
|
if (env["x86_libtheora_opt_gcc"]):
|
||||||
thirdparty_sources += thirdparty_sources_x86
|
thirdparty_sources += thirdparty_sources_x86
|
||||||
|
|
||||||
if (env["x86_opt_vc"]):
|
if (env["x86_libtheora_opt_vc"]):
|
||||||
thirdparty_sources += thirdparty_sources_x86_vc
|
thirdparty_sources += thirdparty_sources_x86_vc
|
||||||
|
|
||||||
if (env["x86_opt_gcc"] or env["x86_opt_vc"]):
|
if (env["x86_libtheora_opt_gcc"] or env["x86_libtheora_opt_vc"]):
|
||||||
env_theora.Append(CCFLAGS = ["-DOC_X86_ASM"])
|
env_theora.Append(CCFLAGS = ["-DOC_X86_ASM"])
|
||||||
|
|
||||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||||
|
|
|
@ -96,7 +96,7 @@ def configure(env):
|
||||||
|
|
||||||
if env['android_arch']=='x86':
|
if env['android_arch']=='x86':
|
||||||
env['NDK_TARGET']=env['NDK_TARGET_X86']
|
env['NDK_TARGET']=env['NDK_TARGET_X86']
|
||||||
env["x86_opt_gcc"]=True
|
env["x86_libtheora_opt_gcc"]=True
|
||||||
|
|
||||||
if env['PLATFORM'] == 'win32':
|
if env['PLATFORM'] == 'win32':
|
||||||
env.Tool('gcc')
|
env.Tool('gcc')
|
||||||
|
|
|
@ -102,4 +102,4 @@ def configure(env):
|
||||||
env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )
|
env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )
|
||||||
#env.Append( BUILDERS = { 'HLSL9' : env.Builder(action = methods.build_hlsl_dx9_headers, suffix = 'hlsl.h',src_suffix = '.hlsl') } )
|
#env.Append( BUILDERS = { 'HLSL9' : env.Builder(action = methods.build_hlsl_dx9_headers, suffix = 'hlsl.h',src_suffix = '.hlsl') } )
|
||||||
|
|
||||||
env["x86_opt_gcc"]=True
|
env["x86_libtheora_opt_gcc"]=True
|
||||||
|
|
|
@ -279,13 +279,13 @@ def configure(env):
|
||||||
# Forcing bits argument because MSVC does not have a flag to set this through SCons... it's different compilers (cl.exe's) called from the propper command prompt
|
# Forcing bits argument because MSVC does not have a flag to set this through SCons... it's different compilers (cl.exe's) called from the propper command prompt
|
||||||
# that decide the architecture that is build for. Scons can only detect the os.getenviron (because vsvarsall.bat sets a lot of stuff for cl.exe to work with)
|
# that decide the architecture that is build for. Scons can only detect the os.getenviron (because vsvarsall.bat sets a lot of stuff for cl.exe to work with)
|
||||||
env["bits"]="32"
|
env["bits"]="32"
|
||||||
env["x86_opt_vc"]=True
|
env["x86_libtheora_opt_vc"]=True
|
||||||
|
|
||||||
print "Detected MSVC compiler: "+compiler_version_str
|
print "Detected MSVC compiler: "+compiler_version_str
|
||||||
# If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writting)... vc compiler for 64bit can not compile _asm
|
# If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writting)... vc compiler for 64bit can not compile _asm
|
||||||
if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"):
|
if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"):
|
||||||
env["bits"]="64"
|
env["bits"]="64"
|
||||||
env["x86_opt_vc"]=False
|
env["x86_libtheora_opt_vc"]=False
|
||||||
print "Compiled program architecture will be a 64 bit executable (forcing bits=64)."
|
print "Compiled program architecture will be a 64 bit executable (forcing bits=64)."
|
||||||
elif (compiler_version_str=="x86" or compiler_version_str == "amd64_x86"):
|
elif (compiler_version_str=="x86" or compiler_version_str == "amd64_x86"):
|
||||||
print "Compiled program architecture will be a 32 bit executable. (forcing bits=32)."
|
print "Compiled program architecture will be a 32 bit executable. (forcing bits=32)."
|
||||||
|
@ -365,7 +365,7 @@ def configure(env):
|
||||||
env['AR'] = mingw_prefix+"ar"
|
env['AR'] = mingw_prefix+"ar"
|
||||||
env['RANLIB'] = mingw_prefix+"ranlib"
|
env['RANLIB'] = mingw_prefix+"ranlib"
|
||||||
env['LD'] = mingw_prefix+"g++"
|
env['LD'] = mingw_prefix+"g++"
|
||||||
env["x86_opt_gcc"]=True
|
env["x86_libtheora_opt_gcc"]=True
|
||||||
|
|
||||||
#env['CC'] = "winegcc"
|
#env['CC'] = "winegcc"
|
||||||
#env['CXX'] = "wineg++"
|
#env['CXX'] = "wineg++"
|
||||||
|
|
|
@ -237,5 +237,5 @@ def configure(env):
|
||||||
|
|
||||||
list_of_x86 = ['x86_64', 'x86', 'i386', 'i586']
|
list_of_x86 = ['x86_64', 'x86', 'i386', 'i586']
|
||||||
if any(platform.machine() in s for s in list_of_x86):
|
if any(platform.machine() in s for s in list_of_x86):
|
||||||
env["x86_opt_gcc"]=True
|
env["x86_libtheora_opt_gcc"]=True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue