diff options
author | Ariel Manzur <ariel@godotengine.org> | 2016-05-21 19:31:58 -0300 |
---|---|---|
committer | Ariel Manzur <ariel@godotengine.org> | 2016-05-21 19:31:58 -0300 |
commit | 6cf2353305922f3464ff91ae1b137e747e1d2961 (patch) | |
tree | 02eda3ddd260691867ad70ccac5b7f91e289ca7f | |
parent | 87e8e8d37298a126214679dfdbe3ef7db3543fd5 (diff) |
using 1 env for all drivers
-rw-r--r-- | drivers/SCsub | 37 | ||||
-rw-r--r-- | drivers/builtin_openssl2/SCsub | 17 | ||||
-rw-r--r-- | drivers/openssl/SCsub | 5 |
3 files changed, 28 insertions, 31 deletions
diff --git a/drivers/SCsub b/drivers/SCsub index 63f37698fb..71ebb85c38 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -1,9 +1,11 @@ Import('env') -env.drivers_sources=[] +env_drivers = env.Clone() + +env_drivers.drivers_sources=[] #env.add_source_files(env.drivers_sources,"*.cpp") -env.Append(CPPPATH=["vorbis"]) -Export('env') +env_drivers.Append(CPPPATH=["vorbis"]) +Export(env = env_drivers) SConscript('unix/SCsub'); SConscript('alsa/SCsub'); @@ -14,12 +16,9 @@ SConscript('gl_context/SCsub'); SConscript('pnm/SCsub'); if (env['openssl']!='no'): - env_ssl = env.Clone() - Export('env_ssl') - - env_ssl.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); + env_drivers.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); if (env['openssl']=="builtin"): - env_ssl.Append(CPPPATH=['#drivers/builtin_openssl2']) + env_drivers.Append(CPPPATH=['#drivers/builtin_openssl2']) SConscript("builtin_openssl2/SCsub"); SConscript('openssl/SCsub') @@ -47,7 +46,7 @@ if (env["vorbis"]=="yes" or env["speex"]=="yes" or env["theoralib"]=="yes" or en if (env["vorbis"]=="yes"): SConscript("vorbis/SCsub"); if (env["opus"]=="yes"): - SConscript('opus/SCsub'); + SConscript('opus/SCsub'); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); @@ -62,7 +61,7 @@ if (env["squish"]=="yes" and env["tools"]=="yes"): num = 0 cur_base = "" -total = len(env.drivers_sources) +total = len(env_drivers.drivers_sources) max_src = 64 list = [] lib_list = [] @@ -70,11 +69,11 @@ lib_list = [] import string if env['vsproj']=="yes": - env.AddToVSProject(env.drivers_sources) + env.AddToVSProject(env_drivers.drivers_sources) if (env.split_drivers): #split drivers, this used to be needed for windows until separate builders for windows were created - for f in env.drivers_sources: + for f in env_drivers.drivers_sources: fname = "" if type(f) == type(""): fname = env.File(f).path @@ -84,14 +83,14 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until base = string.join(fname.split("/")[:2], "/") if base != cur_base and len(list) > max_src: if num > 0: - lib = env.Library("drivers"+str(num), list) + lib = env_drivers.Library("drivers"+str(num), list) lib_list.append(lib) list = [] num = num+1 cur_base = base list.append(f) - lib = env.Library("drivers"+str(num), list) + lib = env_drivers.Library("drivers"+str(num), list) lib_list.append(lib) if len(lib_list) > 0: @@ -99,15 +98,15 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until if os.name=='posix' and sys.platform=='msys': env.Replace(ARFLAGS=['rcsT']) - lib = env.Library("drivers_collated", lib_list) + lib = env_drivers.Library("drivers_collated", lib_list) lib_list = [lib] drivers_base=[] - env.add_source_files(drivers_base,"*.cpp") - lib_list.insert(0, env.Library("drivers", drivers_base)) + env_drivers.add_source_files(drivers_base,"*.cpp") + lib_list.insert(0, env_drivers.Library("drivers", drivers_base)) env.Prepend(LIBS=lib_list) else: - env.add_source_files(env.drivers_sources,"*.cpp") - lib = env.Library("drivers",env.drivers_sources) + env_drivers.add_source_files(env_drivers.drivers_sources,"*.cpp") + lib = env_drivers.Library("drivers",env_drivers.drivers_sources) env.Prepend(LIBS=[lib]) diff --git a/drivers/builtin_openssl2/SCsub b/drivers/builtin_openssl2/SCsub index 06d6b07c11..13a844c39a 100644 --- a/drivers/builtin_openssl2/SCsub +++ b/drivers/builtin_openssl2/SCsub @@ -1,5 +1,4 @@ Import('env') -Import('env_ssl') openssl_sources = [ "ssl/t1_lib.c", @@ -642,17 +641,17 @@ openssl_sources = [ #env.drivers_sources+=openssl_sources -env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"]) -env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"]) -env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"]) -env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"]) -env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) +env.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"]) +env.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"]) +env.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"]) +env.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"]) +env.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) #env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) -env_ssl.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"]) +env.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"]) # Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) import os 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.Append(CFLAGS=["-Wno-error=implicit-function-declaration"]) -env_ssl.add_source_files(env.drivers_sources,openssl_sources) +env.add_source_files(env.drivers_sources,openssl_sources) diff --git a/drivers/openssl/SCsub b/drivers/openssl/SCsub index b7a84cd122..e40ebcf720 100644 --- a/drivers/openssl/SCsub +++ b/drivers/openssl/SCsub @@ -1,6 +1,5 @@ -Import('env_ssl') Import('env') -env_ssl.add_source_files(env.drivers_sources,"*.cpp") -env_ssl.add_source_files(env.drivers_sources,"*.c") +env.add_source_files(env.drivers_sources,"*.cpp") +env.add_source_files(env.drivers_sources,"*.c") |