blob: f96d2cf8c4142d0ca391f6c561325e91ad7454c5 [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
Andrew Geissler184690d2016-11-03 08:06:31 -050017# Be sure to build elog-gen.hpp before compiling
18BUILT_SOURCES = elog-gen.hpp
19
20CLEANFILES=elog-gen.hpp
21
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050022# systemd required for journal interfaces
23logging_test_LDFLAGS = $(SYSTEMD_LIBS)
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060024phosphor_log_manager_LDFLAGS = $(SYSTEMD_LIBS)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050025
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060026ELOG_YAML ?= xyz/openbmc_project/Example/Elog.errors.yaml
27ELOG_MAKO ?= elog-gen-template.mako.hpp
28ELOG_YAML_DIR ?= tools/example/
29ELOG_TEMPLATE_DIR ?= tools/phosphor-logging/templates/
30REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
31 ${abs_srcdir}/$(ELOG_YAML_DIR)/$(ELOG_YAML)\
32 ${abs_srcdir}/${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)
Andrew Geissler184690d2016-11-03 08:06:31 -050033
34# Be sure to package up the required script, yaml, and mako template to
35# generate the header file
36EXTRA_DIST = $(REQ_FILES_TO_GEN)
37
38elog-gen.hpp: $(REQ_FILES_TO_GEN)
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060039 $(AM_V_at)${abs_srcdir}/tools/elog-gen.py -r ${abs_srcdir}/${ELOG_YAML_DIR} -t ${abs_srcdir}/${ELOG_TEMPLATE_DIR} -e $(ELOG_YAML) -m $(ELOG_MAKO) -o ${abs_srcdir}/elog-gen.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050040
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060041SUBDIRS = test