blob: 49c54f0a9dfd8f97d539bf0145d563f8b1575b02 [file] [log] [blame]
# export these headers
include_HEADERS = log.hpp elog.hpp
# Generate this header, don't export in a distro
nodist_include_HEADERS = elog-gen.hpp
# Application test which runs in obmc env (qemu, real hardware)
bin_PROGRAMS = logging-test
logging_test_SOURCES = logging_test.cpp
sbin_PROGRAMS = phosphor-log-manager
phosphor_log_manager_SOURCES = \
xyz.openbmc_project.Logging.Internal.Manager.cpp \
log_manager.cpp \
log_manager_main.cpp
# Be sure to build elog-gen.hpp before compiling
BUILT_SOURCES = elog-gen.hpp
CLEANFILES=elog-gen.hpp
# systemd required for journal interfaces
logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
phosphor_log_manager_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
phosphor_log_manager_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
ELOG_MAKO ?= elog-gen-template.mako.hpp
ELOG_YAML_DIR ?= tools/example/xyz/openbmc_project/Example/
ELOG_TEMPLATE_DIR ?= tools/phosphor-logging/templates/
REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
${abs_srcdir}/$(ELOG_YAML_DIR)/$(ELOG_YAML)\
${abs_srcdir}/${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)
# Be sure to package up the required script, yaml, and mako template to
# generate the header file
EXTRA_DIST = $(REQ_FILES_TO_GEN)
elog-gen.hpp: $(REQ_FILES_TO_GEN)
$(AM_V_at)${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
SUBDIRS = test