blob: ac50cc9d5b1f7f79f0507d0c921347741cc66081 [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
Andrew Geissler184690d2016-11-03 08:06:31 -050011# Be sure to build elog-gen.hpp before compiling
12BUILT_SOURCES = elog-gen.hpp
13
14CLEANFILES=elog-gen.hpp
15
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050016# systemd required for journal interfaces
17logging_test_LDFLAGS = $(SYSTEMD_LIBS)
18
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060019ELOG_YAML ?= xyz/openbmc_project/Example/Elog.errors.yaml
20ELOG_MAKO ?= elog-gen-template.mako.hpp
21ELOG_YAML_DIR ?= tools/example/
22ELOG_TEMPLATE_DIR ?= tools/phosphor-logging/templates/
23REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
24 ${abs_srcdir}/$(ELOG_YAML_DIR)/$(ELOG_YAML)\
25 ${abs_srcdir}/${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)
Andrew Geissler184690d2016-11-03 08:06:31 -050026
27# Be sure to package up the required script, yaml, and mako template to
28# generate the header file
29EXTRA_DIST = $(REQ_FILES_TO_GEN)
30
31elog-gen.hpp: $(REQ_FILES_TO_GEN)
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060032 $(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 -050033
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060034SUBDIRS = test