X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=SConstruct;h=399676e5c401722ec4a399342e27d53d58393582;hb=907f89f943e0b56e3ab0cc066bd1dd9d80d823a5;hp=e223dd8c792efbb3148067cf689645b216a3e343;hpb=8b3eb3637cbe90fbabe70ec5667cce58cb7e368b;p=anna.git diff --git a/SConstruct b/SConstruct index e223dd8..399676e 100644 --- a/SConstruct +++ b/SConstruct @@ -64,6 +64,9 @@ env.Append (CPPPATH = [source_include, usr_local_include, usr_include ]) #env.Append (CCFLAGS = '-std=c++0x') # C++11 support: env.Append (CXXFLAGS = '-std=c++11') +# Shared libraries using static ones: +env.Append (CXXFLAGS = '-fPIC') +#env.Append (CXXFLAGS = '-export-dynamic') env.Append (LIBS = ['']) # scons -Q release=1 @@ -88,6 +91,10 @@ for source in sources: env.Default (libraries) +# User environment variables +env.Append (PROJECT_ROOT = current_directory) +env.Append (VARIANT_DIR = variant_dir) + # ## Run 'scons dynamic' to compile dynamic libraries # @@ -180,7 +187,11 @@ env.Alias('doc', env.Command('doc.dummy', [], 'cd docs/doxygen; doxygen')) # # See http://www.scons.org/wiki/InstallTargets and http://www.scons.org/doc/production/HTML/scons-user/c2938.html install_include = env.Install (target_usr_local_include, Glob("include/anna/*")) -install_lib = env.Install (target_usr_local_lib, Glob("source/*/" + variant + "/*.a")) +static_lib_files = 'source/*/' + variant + '/*.a' +dynamic_lib_files = 'source/*/' + variant + '/*.so' +files_grabbed = [Glob(e) for e in [static_lib_files, dynamic_lib_files]] + +install_lib = env.Install (target_usr_local_lib, files_grabbed) install_dynlib = env.Install (target_usr_local_lib, Glob("dynamic/launcher/default/" + variant + "/*.so")) install_example = env.Install (target_opt_bin, Glob("example/*/*/" + variant + "/example_*")) postinstall_example = env.Command('./example/postinstall.out', None, './example/postinstall.sh')