Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 1 | # export these headers |
| 2 | include_HEADERS = log.hpp elog.hpp |
| 3 | |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 4 | # Generate this header, don't export in a distro |
| 5 | nodist_include_HEADERS = elog-gen.hpp |
| 6 | |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 7 | # Application test which runs in obmc env (qemu, real hardware) |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 8 | bin_PROGRAMS = logging-test |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 9 | logging_test_SOURCES = logging_test.cpp |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 10 | |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 11 | # Be sure to build elog-gen.hpp before compiling |
| 12 | BUILT_SOURCES = elog-gen.hpp |
| 13 | |
| 14 | CLEANFILES=elog-gen.hpp |
| 15 | |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 16 | # systemd required for journal interfaces |
| 17 | logging_test_LDFLAGS = $(SYSTEMD_LIBS) |
| 18 | |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 19 | ELOG_YAML ?= xyz/openbmc_project/Example/Elog.errors.yaml |
| 20 | ELOG_MAKO ?= elog-gen-template.mako.hpp |
| 21 | ELOG_YAML_DIR ?= tools/example/ |
| 22 | ELOG_TEMPLATE_DIR ?= tools/phosphor-logging/templates/ |
| 23 | REQ_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 Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 26 | |
| 27 | # Be sure to package up the required script, yaml, and mako template to |
| 28 | # generate the header file |
| 29 | EXTRA_DIST = $(REQ_FILES_TO_GEN) |
| 30 | |
| 31 | elog-gen.hpp: $(REQ_FILES_TO_GEN) |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 32 | $(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 Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 33 | |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 34 | SUBDIRS = test |