From baaa74f2153403044ab7570b920bc01317f8a047 Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Fri, 6 May 2016 22:43:22 -0300 Subject: [PATCH] cloning env for builtin_openssl _and_ openssl :) --- SConstruct | 8 ++++---- drivers/SCsub | 15 ++++++++++++--- drivers/builtin_openssl2/SCsub | 20 +++++++++----------- drivers/openssl/SCsub | 6 +++--- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/SConstruct b/SConstruct index a2c5edf5e05..3ea40489be9 100644 --- a/SConstruct +++ b/SConstruct @@ -307,10 +307,10 @@ if selected_platform in platform_list: if (env['musepack']=='yes'): env.Append(CPPFLAGS=['-DMUSEPACK_ENABLED']); - if (env['openssl']!='no'): - env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); - if (env['openssl']=="builtin"): - env.Append(CPPPATH=['#drivers/builtin_openssl2']) + #if (env['openssl']!='no'): + # env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); + # if (env['openssl']=="builtin"): + # env.Append(CPPPATH=['#drivers/builtin_openssl2']) if (env["builtin_zlib"]=='yes'): env.Append(CPPPATH=['#drivers/builtin_zlib/zlib']) diff --git a/drivers/SCsub b/drivers/SCsub index 701738c9f89..63f37698fbb 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -11,9 +11,20 @@ SConscript('pulseaudio/SCsub'); SConscript('windows/SCsub'); SConscript('gles2/SCsub'); SConscript('gl_context/SCsub'); -SConscript('openssl/SCsub'); SConscript('pnm/SCsub'); +if (env['openssl']!='no'): + env_ssl = env.Clone() + Export('env_ssl') + + env_ssl.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); + if (env['openssl']=="builtin"): + env_ssl.Append(CPPPATH=['#drivers/builtin_openssl2']) + SConscript("builtin_openssl2/SCsub"); + + SConscript('openssl/SCsub') + + if (env["png"]=="yes"): SConscript("png/SCsub"); if (env["jpg"]=="yes"): @@ -26,8 +37,6 @@ SConscript("pvr/SCsub"); SConscript("etc1/SCsub") if (env["builtin_zlib"]=="yes"): SConscript("builtin_zlib/SCsub"); -if (env["openssl"]=="builtin"): - SConscript("builtin_openssl2/SCsub"); SConscript("rtaudio/SCsub"); SConscript("nedmalloc/SCsub"); diff --git a/drivers/builtin_openssl2/SCsub b/drivers/builtin_openssl2/SCsub index 8c24a5a9c2b..38880030b1b 100644 --- a/drivers/builtin_openssl2/SCsub +++ b/drivers/builtin_openssl2/SCsub @@ -1,4 +1,5 @@ Import('env') +Import('env_ssl') openssl_sources = [ "nocpuid.c", @@ -642,17 +643,14 @@ openssl_sources = [ #env.drivers_sources+=openssl_sources -env_bossl = env.Clone() +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_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) +env_ssl.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"]) -env_bossl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"]) -env_bossl.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"]) -env_bossl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"]) -env_bossl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"]) -env_bossl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) -#env_bossl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) -env_bossl.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"]) - -env_bossl.add_source_files(env.drivers_sources,openssl_sources) +env_ssl.add_source_files(env.drivers_sources,openssl_sources) -Export('env_bossl') diff --git a/drivers/openssl/SCsub b/drivers/openssl/SCsub index 6d3e7e6732f..b7a84cd122f 100644 --- a/drivers/openssl/SCsub +++ b/drivers/openssl/SCsub @@ -1,6 +1,6 @@ +Import('env_ssl') Import('env') -env.add_source_files(env.drivers_sources,"*.cpp") -env.add_source_files(env.drivers_sources,"*.c") +env_ssl.add_source_files(env.drivers_sources,"*.cpp") +env_ssl.add_source_files(env.drivers_sources,"*.c") -Export('env')