moved plugin global variable out of analyzer static library

The global variables created for each registered plugin will not be
initialized as expected when loaded in a static library. Instead, the
plugins are now built with the hw-diags executables instead if in the
static library.

Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: Ie0cab06ab44a54312061f4a15fce86f76eee4085
diff --git a/analyzer/meson.build b/analyzer/meson.build
index c849130..3d34630 100644
--- a/analyzer/meson.build
+++ b/analyzer/meson.build
@@ -27,7 +27,7 @@
 # Create static library.
 analyzer_lib = static_library(
     'analyzer_lib',
-    [ analyzer_src, plugins_src ],
+    [ analyzer_src ],
     include_directories : incdir,
     dependencies : analyzer_deps,
     cpp_args : [ package_args, test_arg ],
diff --git a/meson.build b/meson.build
index 096b4bc..deee608 100644
--- a/meson.build
+++ b/meson.build
@@ -128,13 +128,15 @@
 
 if not no_listener_mode.disabled()
   executable('openpower-hw-diags',
-              sources : [ 'main_nl.cpp', 'cli.cpp', buildinfo ],
+              sources : [ 'main_nl.cpp', 'cli.cpp', buildinfo, plugins_src ],
+              dependencies : [ libhei_dep ],
               link_with : hwdiags_libs,
               install : true)
 else
   executable('openpower-hw-diags',
-              sources : [ 'main.cpp', 'cli.cpp', 'listener.cpp', buildinfo ],
-              dependencies : [lrt, pthread],
+              sources : [ 'main.cpp', 'cli.cpp', 'listener.cpp', buildinfo,
+                          plugins_src ],
+              dependencies : [lrt, pthread, libhei_dep],
               link_with : hwdiags_libs,
               cpp_args : test_arg,
               install : true)