summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-16 19:46:24 -0700
committerPatrick Venture <venture@google.com>2018-10-17 10:50:33 -0700
commitd57cd016d8d531732d6943d6e1434ef1862607a0 (patch)
tree4d27b7d51693e7bce809c220aa8f4344d6c88efe
parentc9508db8d33f4394e7c632b2c5cd15febaa8bf5e (diff)
downloadipmi-fru-parser-d57cd016d8d531732d6943d6e1434ef1862607a0.zip
ipmi-fru-parser-d57cd016d8d531732d6943d6e1434ef1862607a0.tar.gz
build: add phosphor-logging library throughout
Add phosphor-logging flags throughout to enable dropping in logging calls. Change-Id: I6fdde8aebb6cdbacc8a779195bebdc112fb54d35 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--Makefile.am28
-rw-r--r--configure.ac2
2 files changed, 24 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 870583d..5862009 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,20 +6,36 @@ CLEANFILES=$(BUILT_SOURCES)
sbin_PROGRAMS = phosphor-read-eeprom
phosphor_read_eeprom_SOURCES = readeeprom.cpp argument.cpp
-phosphor_read_eeprom_LDFLAGS = $(SYSTEMD_LIBS) $(libmapper_LIBS)
-phosphor_read_eeprom_CXXFLAGS = $(SYSTEMD_CFLAGS) $(libmapper_CFLAGS)
+phosphor_read_eeprom_LDFLAGS = $(SYSTEMD_LIBS) \
+ $(libmapper_LIBS) \
+ $(PHOSPHOR_LOGGING_LIBS)
+phosphor_read_eeprom_CXXFLAGS = $(SYSTEMD_CFLAGS) \
+ $(libmapper_CFLAGS) \
+ $(PHOSPHOR_LOGGING_CFLAGS)
phosphor_read_eeprom_LDADD = libwritefrudata.la
lib_LTLIBRARIES = libwritefrudata.la
-libwritefrudata_la_SOURCES = frup.cpp fru-gen.cpp writefrudata.cpp extra-properties-gen.cpp
-libwritefrudata_la_LDFLAGS = $(SYSTEMD_LIBS) $(libmapper_LIBS) $(SDBUSPLUS_LIBS) -version-info 1:0:0 -shared
-libwritefrudata_la_CXXFLAGS = $(SYSTEMD_CFLAGS) $(libmapper_CFLAGS) $(SDBUSPLUS_CFLAGS)
+libwritefrudata_la_SOURCES = frup.cpp \
+ fru-gen.cpp \
+ writefrudata.cpp \
+ extra-properties-gen.cpp
+libwritefrudata_la_LDFLAGS = $(SYSTEMD_LIBS) \
+ $(libmapper_LIBS) \
+ $(SDBUSPLUS_LIBS) \
+ $(PHOSPHOR_LOGGING_LIBS) \
+ -version-info 1:0:0 -shared
+libwritefrudata_la_CXXFLAGS = $(SYSTEMD_CFLAGS) \
+ $(libmapper_CFLAGS) \
+ $(SDBUSPLUS_CFLAGS) \
+ $(PHOSPHOR_LOGGING_CFLAGS)
libstrgfnhandlerdir = ${libdir}/ipmid-providers
libstrgfnhandler_LTLIBRARIES = libstrgfnhandler.la
libstrgfnhandler_la_SOURCES = strgfnhandler.cpp
-libstrgfnhandler_la_LDFLAGS = -version-info 1:0:0 -shared
+libstrgfnhandler_la_LDFLAGS = $(PHOSPHOR_LOGGING_LIBS) \
+ -version-info 1:0:0 -shared
libstrgfnhandler_la_LIBADD = libwritefrudata.la
+libstrgfnhandler_la_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS)
fru-gen.cpp:
$(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
diff --git a/configure.ac b/configure.ac
index 035dbb3..ded5644 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,8 @@ AC_CHECK_LIB([mapper], [mapper_get_service],,\
PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\
[AC_MSG_ERROR([Requires sdbusplus package.])])
+PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
+ [AC_MSG_ERROR([The openbmc/phosphor-logging package is required])])
# Checks for header files.
AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd development package required])])
OpenPOWER on IntegriCloud