COMPMID-363 Add Graph library support

Change-Id: Ie841419bf65d0e06bdfe0bdd2d8d4e0bb3631e54
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87931
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
diff --git a/SConscript b/SConscript
index d9ee169..00c366e 100644
--- a/SConscript
+++ b/SConscript
@@ -192,6 +192,25 @@
     arm_compute_so = build_library('arm_compute', shared_core_objects + shared_runtime_objects, static=False)
     Export('arm_compute_so')
 
+if env['neon'] and env['opencl']:
+    graph_files = Glob('src/graph/*.cpp')
+    graph_files += Glob('src/graph/nodes/*.cpp')
+
+    graph_files += Glob('src/graph/CL/*.cpp')
+    graph_files += Glob('src/graph/NEON/*.cpp')
+
+    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)
+    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)
+    Export('arm_compute_graph_so')
+
+    graph_alias = arm_compute_env.Alias("arm_compute_graph", [arm_compute_graph_a, arm_compute_graph_so])
+    Default(graph_alias)
+
 if env['standalone']:
     alias = arm_compute_env.Alias("arm_compute", [arm_compute_a])
 else: