aboutsummaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-09-29 17:12:12 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitb2881fcabbc7507bb1d670e5233dd786ae597714 (patch)
tree52caaef4f140ad06897fa2affa673bc788a18c1b /SConscript
parent1914db71de52a9a8b608d83814098657e86b3bcc (diff)
downloadComputeLibrary-b2881fcabbc7507bb1d670e5233dd786ae597714.tar.gz
COMPMID-417 Updated build system to not combined objects of the different levels of library
Until now we had: core = core_obj arm_compute = core_obj + arm_compute_obj graph = core_obj + arm_compute_obj + graph_obj But if an application link against more than one of these libraries then bad things happen. Added version strings in the runtime library too (As it used to only be in Core objects) Updated doxygen for how to compile the examples Change-Id: I7aad6ecf75cfa8dca59f2ea093e13fb0314a3eb4 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/89743 Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript18
1 files changed, 10 insertions, 8 deletions
diff --git a/SConscript b/SConscript
index 15ef090289..79f6bf37fd 100644
--- a/SConscript
+++ b/SConscript
@@ -30,12 +30,12 @@ SONAME_VERSION="1.0.0"
Import('env')
Import('vars')
-def build_library(name, sources, static=False):
+def build_library(name, sources, static=False, libs=[]):
if static:
- obj = arm_compute_env.StaticLibrary(name, source=sources)
+ obj = arm_compute_env.StaticLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs)
else:
if env['set_soname']:
- obj = arm_compute_env.SharedLibrary(name, source=sources, SHLIBVERSION = SONAME_VERSION)
+ obj = arm_compute_env.SharedLibrary(name, source=sources, SHLIBVERSION = SONAME_VERSION, LIBS = arm_compute_env["LIBS"] + libs)
symlinks = []
# Manually delete symlinks or SCons will get confused:
@@ -51,7 +51,7 @@ def build_library(name, sources, static=False):
Default(clean)
Depends(obj, clean)
else:
- obj = arm_compute_env.SharedLibrary(name, source=sources)
+ obj = arm_compute_env.SharedLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs)
Default(obj)
return obj
@@ -191,11 +191,12 @@ if env['os'] != 'bare_metal' and not env['standalone']:
shared_runtime_objects = [arm_compute_env.SharedObject(f) for f in runtime_files]
static_runtime_objects = [arm_compute_env.StaticObject(f) for f in runtime_files]
-arm_compute_a = build_library('arm_compute-static', static_core_objects + static_runtime_objects, static=True)
+arm_compute_a = build_library('arm_compute-static', static_runtime_objects, static=True, libs = [ arm_compute_core_a ])
Export('arm_compute_a')
if env['os'] != 'bare_metal' and not env['standalone']:
- arm_compute_so = build_library('arm_compute', shared_core_objects + shared_runtime_objects, static=False)
+ arm_compute_so = build_library('arm_compute', shared_runtime_objects, static=False, libs = [ "arm_compute_core" ])
+ Depends(arm_compute_so, arm_compute_core_so)
Export('arm_compute_so')
if env['neon'] and env['opencl']:
@@ -208,10 +209,11 @@ if env['neon'] and env['opencl']:
shared_graph_objects = [arm_compute_env.SharedObject(f) for f in graph_files]
static_graph_objects = [arm_compute_env.StaticObject(f) for f in graph_files]
- arm_compute_graph_a = build_library('arm_compute_graph-static', static_core_objects + static_runtime_objects + static_graph_objects, static=True)
+ arm_compute_graph_a = build_library('arm_compute_graph-static', static_graph_objects, static=True, libs = [ arm_compute_a ])
Export('arm_compute_graph_a')
- arm_compute_graph_so = build_library('arm_compute_graph', shared_core_objects + shared_runtime_objects + shared_graph_objects, static=False)
+ arm_compute_graph_so = build_library('arm_compute_graph', shared_graph_objects, static=False, libs = [ "arm_compute", "arm_compute_core" ])
+ Depends( arm_compute_graph_so, arm_compute_so)
Export('arm_compute_graph_so')
graph_alias = arm_compute_env.Alias("arm_compute_graph", [arm_compute_graph_a, arm_compute_graph_so])