blob: 8487a74b90d3724d9f9155ce2b300608b3cbfb3e [file] [log] [blame]
Andrew Geissler328889d2016-10-10 12:43:48 -05001# export these headers
2include_HEADERS = log.hpp elog.hpp
3
Andrew Geissler184690d2016-11-03 08:06:31 -05004# Generate this header, don't export in a distro
5nodist_include_HEADERS = elog-gen.hpp
6
Andrew Geissler328889d2016-10-10 12:43:48 -05007# Application test which runs in obmc env (qemu, real hardware)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -05008bin_PROGRAMS = logging-test
Andrew Geissler328889d2016-10-10 12:43:48 -05009logging_test_SOURCES = logging_test.cpp
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050010
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060011sbin_PROGRAMS = phosphor-log-manager
12phosphor_log_manager_SOURCES = \
13 xyz.openbmc_project.Logging.Internal.Manager.cpp \
14 log_manager.cpp \
15 log_manager_main.cpp
16
Adriana Kobylak7298dc22017-01-24 12:21:50 -060017# Be sure to build needed files before compiling
18BUILT_SOURCES = elog-gen.hpp elog-lookup.cpp
Andrew Geissler184690d2016-11-03 08:06:31 -050019
Adriana Kobylak7298dc22017-01-24 12:21:50 -060020CLEANFILES = \
21 elog-gen.hpp \
22 elog-lookup.cpp
Andrew Geissler184690d2016-11-03 08:06:31 -050023
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050024# systemd required for journal interfaces
Adriana Kobylak7d0692a2016-12-06 15:13:23 -060025logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
26logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
27phosphor_log_manager_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
28phosphor_log_manager_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050029
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060030ELOG_MAKO ?= elog-gen-template.mako.hpp
Adriana Kobylak7298dc22017-01-24 12:21:50 -060031LOOKUP_MAKO ?= elog-lookup-template.mako.cpp
Deepak Kodihalli160d3e02017-01-17 04:25:22 -060032ELOG_YAML_DIR ?= tools/example/xyz/openbmc_project/Example/
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060033ELOG_TEMPLATE_DIR ?= tools/phosphor-logging/templates/
34REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
35 ${abs_srcdir}/$(ELOG_YAML_DIR)/$(ELOG_YAML)\
36 ${abs_srcdir}/${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)
Andrew Geissler184690d2016-11-03 08:06:31 -050037
38# Be sure to package up the required script, yaml, and mako template to
39# generate the header file
40EXTRA_DIST = $(REQ_FILES_TO_GEN)
41
42elog-gen.hpp: $(REQ_FILES_TO_GEN)
Adriana Kobylak7298dc22017-01-24 12:21:50 -060043 $(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
44elog-lookup.cpp: $(REQ_FILES_TO_GEN)
45 $(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 -050046
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060047SUBDIRS = test