diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-13 18:54:00 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-15 11:50:41 +0200 |
commit | da09c6131bcdace7e8e62c3dabc62890e9564c97 (patch) | |
tree | e279b0e14a93ff546ab5eb427eeb1c65c9befe6a /drivers/png | |
parent | 422196759f93df249db38619f136cabd5dcf42cd (diff) |
modules: Clone env in each module
This allows to pass include paths and flags only to a given thirdparty
library, thus preventing conflicts between their files (e.g. between
opus and openssl which both provide modes.h.
This also has the nice effect of making the compilation command smaller
for each module as it no longer related to all other modules, only the
final linking brings them together.
This however requires adding manually the ogg include path in opus
and vorbis when building against the builtin ogg, since it is no longer
in the global env.
Also simplified template 'thirdparty_<module>_sources' to
'thirdparty_sources'.
"Core" modules like cscript, gdscript, gridmap, ik and virtual_script
still use the main env_modules, but it could be changed if need be.
Diffstat (limited to 'drivers/png')
-rw-r--r-- | drivers/png/SCsub | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/png/SCsub b/drivers/png/SCsub index ea2324c0cf..1ab42a6db9 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -5,7 +5,7 @@ Import('env_drivers') if (env["libpng"] == "builtin"): thirdparty_dir = "#thirdparty/libpng/" - thirdparty_png_sources = [ + thirdparty_sources = [ thirdparty_dir + "png.c", thirdparty_dir + "pngerror.c", thirdparty_dir + "pngget.c", @@ -31,13 +31,13 @@ if (env["libpng"] == "builtin"): if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] #env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) - thirdparty_png_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) - thirdparty_png_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) + thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) + thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) else: env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) - #env_drivers.add_source_files(env.drivers_sources, thirdparty_png_sources) - env.drivers_sources += thirdparty_png_sources # Concatenation necessary for neon objects it seems? + #env_drivers.add_source_files(env.drivers_sources, thirdparty_sources) + env.drivers_sources += thirdparty_sources # Concatenation necessary for neon objects it seems? env_drivers.Append(CPPPATH = [thirdparty_dir]) |