blob: f56fc374eda2608ccd3ce395cb2e5ea7d80a7f79 [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
Andrew Geissler184690d2016-11-03 08:06:31 -05007# Generate this header, don't export in a distro
Adriana Kobylak1a7508b2017-02-13 22:51:40 -06008nodist_include_HEADERS = \
9 elog-gen.hpp \
10 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050011
Adriana Kobylakc20dae82017-02-15 13:44:16 -060012libphosphor_logging_FILES = \
13 elog.cpp
14libphosphor_loggingdir = ${libdir}
15libphosphor_logging_LTLIBRARIES = libphosphor_logging.la
16libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES)
17libphosphor_logging_la_LDFLAGS = \
18 $(SYSTEMD_LIBS) \
19 $(SDBUSPLUS_LIBS) \
20 -version-info 1:0:0 -shared
21libphosphor_logging_la_CXXFLAGS = \
22 $(SDBUSPLUS_CFLAGS)
23
Andrew Geissler328889d2016-10-10 12:43:48 -050024# Application test which runs in obmc env (qemu, real hardware)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050025bin_PROGRAMS = logging-test
Andrew Geissler328889d2016-10-10 12:43:48 -050026logging_test_SOURCES = logging_test.cpp
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 \
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060034 elog_entry.cpp
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060035
Adriana Kobylak7298dc22017-01-24 12:21:50 -060036# Be sure to build needed files before compiling
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060037BUILT_SOURCES = \
38 elog-gen.hpp \
39 elog-lookup.cpp \
40 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
41 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050042
Adriana Kobylak7298dc22017-01-24 12:21:50 -060043CLEANFILES = \
44 elog-gen.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060045 elog-lookup.cpp \
46 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
47 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050048
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050049# systemd required for journal interfaces
Adriana Kobylak7d0692a2016-12-06 15:13:23 -060050logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
51logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
Adriana Kobylak8692ac92017-02-09 13:54:59 -060052phosphor_log_manager_LDFLAGS = \
53 $(SYSTEMD_LIBS) \
54 $(SDBUSPLUS_LIBS) \
55 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
56phosphor_log_manager_CXXFLAGS = \
57 $(SYSTEMD_CFLAGS) \
58 $(SDBUSPLUS_CFLAGS) \
59 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050060
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060061xyz/openbmc_project/Logging/Internal/Manager/server.cpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml xyz/openbmc_project/Logging/Internal/Manager/server.hpp
62 @mkdir -p `dirname $@`
63 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Logging.Internal.Manager > $@
64
65xyz/openbmc_project/Logging/Internal/Manager/server.hpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml
66 @mkdir -p `dirname $@`
67 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header xyz.openbmc_project.Logging.Internal.Manager > $@
68
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060069ELOG_MAKO ?= elog-gen-template.mako.hpp
Adriana Kobylak7298dc22017-01-24 12:21:50 -060070LOOKUP_MAKO ?= elog-lookup-template.mako.cpp
Deepak Kodihalli160d3e02017-01-17 04:25:22 -060071ELOG_YAML_DIR ?= tools/example/xyz/openbmc_project/Example/
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060072ELOG_TEMPLATE_DIR ?= tools/phosphor-logging/templates/
73REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
74 ${abs_srcdir}/$(ELOG_YAML_DIR)/$(ELOG_YAML)\
75 ${abs_srcdir}/${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)
Andrew Geissler184690d2016-11-03 08:06:31 -050076
77# Be sure to package up the required script, yaml, and mako template to
78# generate the header file
79EXTRA_DIST = $(REQ_FILES_TO_GEN)
80
81elog-gen.hpp: $(REQ_FILES_TO_GEN)
Adriana Kobylak7298dc22017-01-24 12:21:50 -060082 $(AM_V_at)$(PYTHON) ${abs_srcdir}/tools/elog-gen.py -y ${abs_srcdir}/${ELOG_YAML_DIR} -t ${abs_srcdir}/${ELOG_TEMPLATE_DIR} -m $(ELOG_MAKO) -o ${abs_srcdir}/elog-gen.hpp
83elog-lookup.cpp: $(REQ_FILES_TO_GEN)
84 $(AM_V_at)$(PYTHON) ${abs_srcdir}/tools/elog-gen.py -y ${abs_srcdir}/${ELOG_YAML_DIR} -t ${abs_srcdir}/${ELOG_TEMPLATE_DIR} -m $(LOOKUP_MAKO) -o ${abs_srcdir}/elog-lookup.cpp
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