SCons: using 1 env for all drivers
(cherry picked from commit6cf2353305
) (cherry picked from commit12bd9ee6f2
) (cherry picked from commit4c4d79e3c9
) (cherry picked from commitdbb4c0c9b7
)
This commit is contained in:
parent
4dc2d78d2e
commit
803438d448
|
@ -1,9 +1,12 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
|
env_drivers = env.Clone()
|
||||||
|
|
||||||
env.drivers_sources=[]
|
env.drivers_sources=[]
|
||||||
#env.add_source_files(env.drivers_sources,"*.cpp")
|
#env.add_source_files(env.drivers_sources,"*.cpp")
|
||||||
env.Append(CPPPATH=["vorbis"])
|
env_drivers.Append(CPPPATH=["vorbis"])
|
||||||
Export('env')
|
|
||||||
|
Export('env_drivers')
|
||||||
|
|
||||||
SConscript('unix/SCsub');
|
SConscript('unix/SCsub');
|
||||||
SConscript('alsa/SCsub');
|
SConscript('alsa/SCsub');
|
||||||
|
@ -14,12 +17,9 @@ SConscript('gl_context/SCsub');
|
||||||
SConscript('pnm/SCsub');
|
SConscript('pnm/SCsub');
|
||||||
|
|
||||||
if (env['openssl']!='no'):
|
if (env['openssl']!='no'):
|
||||||
env_ssl = env.Clone()
|
env_drivers.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
|
||||||
Export('env_ssl')
|
|
||||||
|
|
||||||
env_ssl.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
|
|
||||||
if (env['openssl']=="builtin"):
|
if (env['openssl']=="builtin"):
|
||||||
env_ssl.Append(CPPPATH=['#drivers/builtin_openssl2'])
|
env_drivers.Append(CPPPATH=['#drivers/builtin_openssl2'])
|
||||||
SConscript("builtin_openssl2/SCsub");
|
SConscript("builtin_openssl2/SCsub");
|
||||||
|
|
||||||
SConscript('openssl/SCsub')
|
SConscript('openssl/SCsub')
|
||||||
|
@ -47,7 +47,7 @@ if (env["vorbis"]=="yes" or env["speex"]=="yes" or env["theoralib"]=="yes" or en
|
||||||
if (env["vorbis"]=="yes"):
|
if (env["vorbis"]=="yes"):
|
||||||
SConscript("vorbis/SCsub");
|
SConscript("vorbis/SCsub");
|
||||||
if (env["opus"]=="yes"):
|
if (env["opus"]=="yes"):
|
||||||
SConscript('opus/SCsub');
|
SConscript('opus/SCsub');
|
||||||
if (env["tools"]=="yes"):
|
if (env["tools"]=="yes"):
|
||||||
SConscript("convex_decomp/SCsub");
|
SConscript("convex_decomp/SCsub");
|
||||||
|
|
||||||
|
@ -84,14 +84,14 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until
|
||||||
base = string.join(fname.split("/")[:2], "/")
|
base = string.join(fname.split("/")[:2], "/")
|
||||||
if base != cur_base and len(list) > max_src:
|
if base != cur_base and len(list) > max_src:
|
||||||
if num > 0:
|
if num > 0:
|
||||||
lib = env.Library("drivers"+str(num), list)
|
lib = env_drivers.Library("drivers"+str(num), list)
|
||||||
lib_list.append(lib)
|
lib_list.append(lib)
|
||||||
list = []
|
list = []
|
||||||
num = num+1
|
num = num+1
|
||||||
cur_base = base
|
cur_base = base
|
||||||
list.append(f)
|
list.append(f)
|
||||||
|
|
||||||
lib = env.Library("drivers"+str(num), list)
|
lib = env_drivers.Library("drivers"+str(num), list)
|
||||||
lib_list.append(lib)
|
lib_list.append(lib)
|
||||||
|
|
||||||
if len(lib_list) > 0:
|
if len(lib_list) > 0:
|
||||||
|
@ -99,15 +99,15 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until
|
||||||
if os.name=='posix' and sys.platform=='msys':
|
if os.name=='posix' and sys.platform=='msys':
|
||||||
env.Replace(ARFLAGS=['rcsT'])
|
env.Replace(ARFLAGS=['rcsT'])
|
||||||
|
|
||||||
lib = env.Library("drivers_collated", lib_list)
|
lib = env_drivers.Library("drivers_collated", lib_list)
|
||||||
lib_list = [lib]
|
lib_list = [lib]
|
||||||
|
|
||||||
drivers_base=[]
|
drivers_base=[]
|
||||||
env.add_source_files(drivers_base,"*.cpp")
|
env_drivers.add_source_files(drivers_base,"*.cpp")
|
||||||
lib_list.insert(0, env.Library("drivers", drivers_base))
|
lib_list.insert(0, env_drivers.Library("drivers", drivers_base))
|
||||||
|
|
||||||
env.Prepend(LIBS=lib_list)
|
env.Prepend(LIBS=lib_list)
|
||||||
else:
|
else:
|
||||||
env.add_source_files(env.drivers_sources,"*.cpp")
|
env_drivers.add_source_files(env.drivers_sources,"*.cpp")
|
||||||
lib = env.Library("drivers",env.drivers_sources)
|
lib = env_drivers.Library("drivers",env.drivers_sources)
|
||||||
env.Prepend(LIBS=[lib])
|
env.Prepend(LIBS=[lib])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
Import('env_ssl')
|
Import('env_drivers')
|
||||||
|
|
||||||
openssl_sources = [
|
openssl_sources = [
|
||||||
"ssl/t1_lib.c",
|
"ssl/t1_lib.c",
|
||||||
|
@ -642,17 +642,17 @@ openssl_sources = [
|
||||||
|
|
||||||
#env.drivers_sources+=openssl_sources
|
#env.drivers_sources+=openssl_sources
|
||||||
|
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"])
|
||||||
#env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"])
|
#env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"])
|
||||||
env_ssl.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"])
|
env_drivers.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"])
|
||||||
|
|
||||||
# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517)
|
# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517)
|
||||||
import os
|
import os
|
||||||
if not (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): # not Windows and not MSVC
|
if not (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): # not Windows and not MSVC
|
||||||
env_ssl.Append(CFLAGS=["-Wno-error=implicit-function-declaration"])
|
env_drivers.Append(CFLAGS=["-Wno-error=implicit-function-declaration"])
|
||||||
|
|
||||||
env_ssl.add_source_files(env.drivers_sources,openssl_sources)
|
env_drivers.add_source_files(env.drivers_sources,openssl_sources)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Import('env_ssl')
|
Import('env_drivers')
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
env_ssl.add_source_files(env.drivers_sources,"*.cpp")
|
env_drivers.add_source_files(env.drivers_sources,"*.cpp")
|
||||||
env_ssl.add_source_files(env.drivers_sources,"*.c")
|
env_drivers.add_source_files(env.drivers_sources,"*.c")
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
|
Import('env_drivers')
|
||||||
|
|
||||||
|
|
||||||
png_sources = [
|
png_sources = [
|
||||||
|
@ -25,15 +26,15 @@ png_sources = [
|
||||||
# Currently .ASM filter_neon.S does not compile on NT.
|
# Currently .ASM filter_neon.S does not compile on NT.
|
||||||
import os
|
import os
|
||||||
if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt":
|
if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt":
|
||||||
env.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"])
|
env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"])
|
||||||
env_neon = env.Clone();
|
env_neon = env_drivers.Clone();
|
||||||
if "S_compiler" in env:
|
if "S_compiler" in env:
|
||||||
env_neon['CC'] = env['S_compiler']
|
env_neon['CC'] = env['S_compiler']
|
||||||
#env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"])
|
#env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"])
|
||||||
png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c"))
|
png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c"))
|
||||||
png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S"))
|
png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S"))
|
||||||
else:
|
else:
|
||||||
env.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"])
|
env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"])
|
||||||
|
|
||||||
env.drivers_sources+=png_sources
|
env.drivers_sources+=png_sources
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue