Create libphosphor-logging library
The commit function would be too big to hold on the
header file. Move it to a library and update the
phosphos-logging.pc file for users to link against it.
Add dependency to libsdbusplus as the commit interface
would make use of the transaction id support.
Change-Id: I237b15e35a633f1da9bf3401b5bf754154f132db
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index fa066a1..1e9d331 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,18 @@
# Generate this header, don't export in a distro
nodist_include_HEADERS = elog-gen.hpp
+libphosphor_logging_FILES = \
+ elog.cpp
+libphosphor_loggingdir = ${libdir}
+libphosphor_logging_LTLIBRARIES = libphosphor_logging.la
+libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES)
+libphosphor_logging_la_LDFLAGS = \
+ $(SYSTEMD_LIBS) \
+ $(SDBUSPLUS_LIBS) \
+ -version-info 1:0:0 -shared
+libphosphor_logging_la_CXXFLAGS = \
+ $(SDBUSPLUS_CFLAGS)
+
# Application test which runs in obmc env (qemu, real hardware)
bin_PROGRAMS = logging-test
logging_test_SOURCES = logging_test.cpp