summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-09-20 19:49:55 -0700
committerPatrick Venture <venture@google.com>2018-09-20 19:51:58 -0700
commit9f044415a21272b554fa7594ade21927154afcb0 (patch)
treef7f54fb2401c3cac3f8009b04b9963e372d368ef
parent02c9e040325e0775dc2016d92b06a1cbbd4181b4 (diff)
downloadphosphor-pid-control-9f044415a21272b554fa7594ade21927154afcb0.tar.gz
phosphor-pid-control-9f044415a21272b554fa7594ade21927154afcb0.zip
build: configureDbus replacing linked objects
The external references to the configurations are provided by the dbusconfiguration.cpp. Make including this configured. Tested: Now platform without dbus configuration properly configures zone. Change-Id: I97646141aa5672afaadd5346152dfbb07557b2d9 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--Makefile.am5
-rw-r--r--main.cpp8
2 files changed, 10 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 05e8ce9..a0c64c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,7 +43,6 @@ libswampd_la_SOURCES = \
dbus/util.cpp \
dbus/dbuspassive.cpp \
dbus/dbusactiveread.cpp \
- dbus/dbusconfiguration.cpp \
dbus/dbuswrite.cpp \
sysfs/sysfsread.cpp \
sysfs/sysfswrite.cpp \
@@ -68,6 +67,10 @@ libswampd_la_SOURCES = \
experiments/drive.cpp \
$(BUILT_SOURCES)
+if CONFIGURE_DBUS
+libswampd_la_SOURCES += dbus/dbusconfiguration.cpp
+endif
+
libmanualcmdsdir = ${libdir}/ipmid-providers
libmanualcmds_LTLIBRARIES = libmanualcmds.la
libmanualcmds_la_SOURCES = \
diff --git a/main.cpp b/main.cpp
index 91e555f..e2672e4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -17,7 +17,6 @@
#include "config.h"
#include "conf.hpp"
-#include "dbus/dbusconfiguration.hpp"
#include "interfaces.hpp"
#include "pid/builder.hpp"
#include "pid/builderconfig.hpp"
@@ -42,6 +41,10 @@
#include <unordered_map>
#include <vector>
+#if CONFIGURE_DBUS
+#include "dbus/dbusconfiguration.hpp"
+#endif
+
/* The YAML converted sensor list. */
extern std::map<std::string, struct sensor> SensorConfig;
/* The YAML converted PID list. */
@@ -84,10 +87,11 @@ int main(int argc, char* argv[])
}
auto ModeControlBus = sdbusplus::bus::new_default();
- if (configureDbus)
+#if CONFIGURE_DBUS
{
dbus_configuration::init(ModeControlBus);
}
+#endif
SensorManager mgmr;
std::unordered_map<int64_t, std::unique_ptr<PIDZone>> zones;
OpenPOWER on IntegriCloud