blob: 7623ce5bc2e19605b661f82c90fc8c9afeb70210 [file] [log] [blame]
Andrew Geissler328889d2016-10-10 12:43:48 -05001# export these headers
Saqib Khan2bb15192017-02-13 13:19:55 -06002nobase_include_HEADERS = \
3 phosphor-logging/log.hpp \
4 phosphor-logging/elog.hpp \
5 phosphor-logging/elog-errors-HostEvent.hpp
Andrew Geissler328889d2016-10-10 12:43:48 -05006
Adriana Kobylak37734302017-03-01 12:47:38 -06007nobase_nodist_include_HEADERS = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -06008 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -06009 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050010
Adriana Kobylakc20dae82017-02-15 13:44:16 -060011libphosphor_logging_FILES = \
12 elog.cpp
13libphosphor_loggingdir = ${libdir}
14libphosphor_logging_LTLIBRARIES = libphosphor_logging.la
15libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES)
16libphosphor_logging_la_LDFLAGS = \
17 $(SYSTEMD_LIBS) \
18 $(SDBUSPLUS_LIBS) \
19 -version-info 1:0:0 -shared
20libphosphor_logging_la_CXXFLAGS = \
21 $(SDBUSPLUS_CFLAGS)
22
Andrew Geissler328889d2016-10-10 12:43:48 -050023# Application test which runs in obmc env (qemu, real hardware)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050024bin_PROGRAMS = logging-test
Andrew Geissler328889d2016-10-10 12:43:48 -050025logging_test_SOURCES = logging_test.cpp
Michael Tritze0eb1dd2017-02-19 20:57:46 -060026logging_test_LDADD = libphosphor_logging.la
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050027
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060028sbin_PROGRAMS = phosphor-log-manager
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060029
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060030phosphor_log_manager_SOURCES = \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060031 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060032 log_manager.cpp \
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060033 log_manager_main.cpp \
Deepak Kodihallib388da62017-02-27 00:47:12 -060034 elog_entry.cpp \
35 org.openbmc.Associations.cpp
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060036
Adriana Kobylak7298dc22017-01-24 12:21:50 -060037# Be sure to build needed files before compiling
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060038BUILT_SOURCES = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060039 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060040 elog-lookup.cpp \
41 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
42 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050043
Adriana Kobylak7298dc22017-01-24 12:21:50 -060044CLEANFILES = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060045 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060046 elog-lookup.cpp \
47 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
48 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050049
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050050# systemd required for journal interfaces
Adriana Kobylak7d0692a2016-12-06 15:13:23 -060051logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
52logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
Adriana Kobylak8692ac92017-02-09 13:54:59 -060053phosphor_log_manager_LDFLAGS = \
54 $(SYSTEMD_LIBS) \
55 $(SDBUSPLUS_LIBS) \
56 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
57phosphor_log_manager_CXXFLAGS = \
58 $(SYSTEMD_CFLAGS) \
59 $(SDBUSPLUS_CFLAGS) \
60 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050061
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060062xyz/openbmc_project/Logging/Internal/Manager/server.cpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml xyz/openbmc_project/Logging/Internal/Manager/server.hpp
63 @mkdir -p `dirname $@`
64 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Logging.Internal.Manager > $@
65
66xyz/openbmc_project/Logging/Internal/Manager/server.hpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml
67 @mkdir -p `dirname $@`
68 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header xyz.openbmc_project.Logging.Internal.Manager > $@
69
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060070ELOG_MAKO ?= elog-gen-template.mako.hpp
Adriana Kobylak7298dc22017-01-24 12:21:50 -060071LOOKUP_MAKO ?= elog-lookup-template.mako.cpp
Adriana Kobylakf4690732017-02-19 09:53:34 -060072ELOG_TEMPLATE_DIR ?= ${abs_srcdir}/tools/phosphor-logging/templates/
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060073REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
Adriana Kobylakf4690732017-02-19 09:53:34 -060074 ${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)
Andrew Geissler184690d2016-11-03 08:06:31 -050075
76# Be sure to package up the required script, yaml, and mako template to
77# generate the header file
78EXTRA_DIST = $(REQ_FILES_TO_GEN)
79
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060080phosphor-logging/elog-errors.hpp: $(REQ_FILES_TO_GEN)
81 @mkdir -p `dirname $@`
82 $(AM_V_at)$(PYTHON) ${abs_srcdir}/tools/elog-gen.py -y ${YAML_DIR} -u ${YAML_DIR_TEST} -t ${ELOG_TEMPLATE_DIR} -m $(ELOG_MAKO) -o $@
Adriana Kobylak7298dc22017-01-24 12:21:50 -060083elog-lookup.cpp: $(REQ_FILES_TO_GEN)
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060084 $(AM_V_at)$(PYTHON) ${abs_srcdir}/tools/elog-gen.py -y ${YAML_DIR} -u ${YAML_DIR_TEST} -t ${ELOG_TEMPLATE_DIR} -m $(LOOKUP_MAKO) -o $@
Andrew Geissler184690d2016-11-03 08:06:31 -050085
Brad Bishop9316b9a2017-02-10 14:21:37 -050086pkgconfiglibdir = ${libdir}/pkgconfig
87pkgconfiglib_DATA = phosphor-logging.pc
88
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060089SUBDIRS = test