build: add correct libsystemd dependency

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia6bb8d347f76ec3a6e8f8babe7da3e63cab907c0
diff --git a/Makefile.am b/Makefile.am
index 961aecf..dfa0eb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,8 @@
 	$(SDBUSPLUS_LIBS) \
 	-version-info 1:0:0 -shared
 libphosphor_logging_la_CXXFLAGS = \
-	$(SDBUSPLUS_CFLAGS)
+	$(SDBUSPLUS_CFLAGS) \
+	$(SYSTEMD_CFLAGS)
 
 # Application test which runs in obmc env (qemu, real hardware)
 bin_PROGRAMS = logging-test callout-test
@@ -63,8 +64,14 @@
 logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
 logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
 callout_test_LDADD = libphosphor_logging.la
-callout_test_LDFLAGS = $(SDBUSPLUS_LIBS) $(PHOSPHOR_DBUS_INTERFACES_LIBS)
-callout_test_CXXFLAGS = $(SDBUSPLUS_CFLAGS) $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
+callout_test_LDFLAGS = \
+		$(SDBUSPLUS_LIBS) \
+		$(SYSTEMD_LIBS) \
+		$(PHOSPHOR_DBUS_INTERFACES_LIBS)
+callout_test_CXXFLAGS = \
+		$(SDBUSPLUS_CFLAGS) \
+		$(SYSTEMD_CFLAGS) \
+		$(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
 phosphor_log_manager_LDFLAGS = \
 		$(SYSTEMD_LIBS) \
 		$(SDBUSPLUS_LIBS) \
diff --git a/phosphor-rsyslog-config/Makefile.am b/phosphor-rsyslog-config/Makefile.am
index 3a1aeff..e2890cc 100644
--- a/phosphor-rsyslog-config/Makefile.am
+++ b/phosphor-rsyslog-config/Makefile.am
@@ -15,9 +15,11 @@
 
 phosphor_rsyslog_conf_LDFLAGS = \
 	$(SDBUSPLUS_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(PHOSPHOR_DBUS_INTERFACES_LIBS)
 
 phosphor_rsyslog_conf_CXXFLAGS = \
 	$(SDBUSPLUS_CFLAGS) \
+	$(SYSTEMD_CFLAGS) \
 	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
 	-flto
diff --git a/test/Makefile.am b/test/Makefile.am
index 8484d62..6d249e2 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -19,7 +19,8 @@
 	$(GTEST_CPPFLAGS) \
 	$(AM_CPPFLAGS) \
 	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
-	$(SDBUSPLUS_CFLAGS)
+	$(SDBUSPLUS_CFLAGS) \
+	$(SYSTEMD_CFLAGS)
 
 test_cxxflags = \
 	$(PTHREAD_CFLAGS)
@@ -30,7 +31,8 @@
 	$(PTHREAD_LIBS) \
 	$(OESDK_TESTCASE_FLAGS) \
 	$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
-	$(SDBUSPLUS_LIBS)
+	$(SDBUSPLUS_LIBS) \
+	$(SYSTEMD_LIBS)
 
 test_ldadd = \
 	$(top_builddir)/elog_serialize.o \