build: Minor cleanups

 - Touches up the proto dependency hierarchy to properly specify
   generated headers
 - Build the IPMI module as a shared_module to guarantee it is never
   static
 - Build the common library as possibly shared for dedepulication
   between the IPMI module and blobtool

Change-Id: Idbc72b8e124e744a7ccfd58c482813df645d41a1
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/meson.build b/src/meson.build
index ca4b091..94637a1 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,40 +1,32 @@
 binarystoreblob_pre = declare_dependency(
-  include_directories: [
-    include_directories('.'),
-    blobstore_includes,
-  ],
+  include_directories: blobstore_includes,
   dependencies: [
-    protobuf_dep,
-    ipmi_blob_dep,
-    phosphor_logging_dep,
+    dependency('phosphor-ipmi-blobs'),
+    dependency('phosphor-logging'),
     binaryblobproto_dep,
-  ]
-)
+  ])
 
-binarystoreblob_lib = static_library(
+binarystoreblob_lib = library(
   'binarystoreblob',
   'binarystore.cpp',
   'sys.cpp',
   'sys_file_impl.cpp',
   'handler.cpp',
-  src_pb,
   implicit_include_directories: false,
   dependencies: binarystoreblob_pre,
-)
+  install: true)
 
 binarystoreblob_dep = declare_dependency(
   link_with: binarystoreblob_lib,
-  dependencies: binarystoreblob_pre
-)
+  dependencies: binarystoreblob_pre)
 
-library(
+shared_module(
   'binarystore',
   'main.cpp',
   implicit_include_directories: false,
   dependencies: binarystoreblob_dep,
   install: true,
-  install_dir: get_option('libdir') / 'blob-ipmid'
-)
+  install_dir: get_option('libdir') / 'blob-ipmid')
 
 if not get_option('blobtool').disabled()
   executable(
@@ -42,6 +34,5 @@
     'blobtool.cpp',
     implicit_include_directories: false,
     dependencies: binarystoreblob_dep,
-    install: true
-  )
+    install: true)
 endif