Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 1 | # export these headers |
Saqib Khan | 2bb1519 | 2017-02-13 13:19:55 -0600 | [diff] [blame] | 2 | nobase_include_HEADERS = \ |
| 3 | phosphor-logging/log.hpp \ |
| 4 | phosphor-logging/elog.hpp \ |
| 5 | phosphor-logging/elog-errors-HostEvent.hpp |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 6 | |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 7 | # Generate this header, don't export in a distro |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame^] | 8 | nodist_include_HEADERS = \ |
| 9 | elog-gen.hpp \ |
| 10 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 11 | |
Adriana Kobylak | c20dae8 | 2017-02-15 13:44:16 -0600 | [diff] [blame] | 12 | libphosphor_logging_FILES = \ |
| 13 | elog.cpp |
| 14 | libphosphor_loggingdir = ${libdir} |
| 15 | libphosphor_logging_LTLIBRARIES = libphosphor_logging.la |
| 16 | libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES) |
| 17 | libphosphor_logging_la_LDFLAGS = \ |
| 18 | $(SYSTEMD_LIBS) \ |
| 19 | $(SDBUSPLUS_LIBS) \ |
| 20 | -version-info 1:0:0 -shared |
| 21 | libphosphor_logging_la_CXXFLAGS = \ |
| 22 | $(SDBUSPLUS_CFLAGS) |
| 23 | |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 24 | # Application test which runs in obmc env (qemu, real hardware) |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 25 | bin_PROGRAMS = logging-test |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 26 | logging_test_SOURCES = logging_test.cpp |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 27 | |
Adriana Kobylak | 8f7941e | 2016-11-14 14:46:23 -0600 | [diff] [blame] | 28 | sbin_PROGRAMS = phosphor-log-manager |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 29 | |
Adriana Kobylak | 8f7941e | 2016-11-14 14:46:23 -0600 | [diff] [blame] | 30 | phosphor_log_manager_SOURCES = \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame^] | 31 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp \ |
Adriana Kobylak | 8f7941e | 2016-11-14 14:46:23 -0600 | [diff] [blame] | 32 | log_manager.cpp \ |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 33 | log_manager_main.cpp \ |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 34 | elog_entry.cpp |
Adriana Kobylak | 8f7941e | 2016-11-14 14:46:23 -0600 | [diff] [blame] | 35 | |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 36 | # Be sure to build needed files before compiling |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame^] | 37 | BUILT_SOURCES = \ |
| 38 | elog-gen.hpp \ |
| 39 | elog-lookup.cpp \ |
| 40 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp \ |
| 41 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 42 | |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 43 | CLEANFILES = \ |
| 44 | elog-gen.hpp \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame^] | 45 | elog-lookup.cpp \ |
| 46 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp \ |
| 47 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 48 | |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 49 | # systemd required for journal interfaces |
Adriana Kobylak | 7d0692a | 2016-12-06 15:13:23 -0600 | [diff] [blame] | 50 | logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS) |
| 51 | logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS) |
Adriana Kobylak | 8692ac9 | 2017-02-09 13:54:59 -0600 | [diff] [blame] | 52 | phosphor_log_manager_LDFLAGS = \ |
| 53 | $(SYSTEMD_LIBS) \ |
| 54 | $(SDBUSPLUS_LIBS) \ |
| 55 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) |
| 56 | phosphor_log_manager_CXXFLAGS = \ |
| 57 | $(SYSTEMD_CFLAGS) \ |
| 58 | $(SDBUSPLUS_CFLAGS) \ |
| 59 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 60 | |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame^] | 61 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml xyz/openbmc_project/Logging/Internal/Manager/server.hpp |
| 62 | @mkdir -p `dirname $@` |
| 63 | $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Logging.Internal.Manager > $@ |
| 64 | |
| 65 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml |
| 66 | @mkdir -p `dirname $@` |
| 67 | $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header xyz.openbmc_project.Logging.Internal.Manager > $@ |
| 68 | |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 69 | ELOG_MAKO ?= elog-gen-template.mako.hpp |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 70 | LOOKUP_MAKO ?= elog-lookup-template.mako.cpp |
Deepak Kodihalli | 160d3e0 | 2017-01-17 04:25:22 -0600 | [diff] [blame] | 71 | ELOG_YAML_DIR ?= tools/example/xyz/openbmc_project/Example/ |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 72 | ELOG_TEMPLATE_DIR ?= tools/phosphor-logging/templates/ |
| 73 | REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\ |
| 74 | ${abs_srcdir}/$(ELOG_YAML_DIR)/$(ELOG_YAML)\ |
| 75 | ${abs_srcdir}/${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO) |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 76 | |
| 77 | # Be sure to package up the required script, yaml, and mako template to |
| 78 | # generate the header file |
| 79 | EXTRA_DIST = $(REQ_FILES_TO_GEN) |
| 80 | |
| 81 | elog-gen.hpp: $(REQ_FILES_TO_GEN) |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 82 | $(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 |
| 83 | elog-lookup.cpp: $(REQ_FILES_TO_GEN) |
| 84 | $(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 Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 85 | |
Brad Bishop | 9316b9a | 2017-02-10 14:21:37 -0500 | [diff] [blame] | 86 | pkgconfiglibdir = ${libdir}/pkgconfig |
| 87 | pkgconfiglib_DATA = phosphor-logging.pc |
| 88 | |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 89 | SUBDIRS = test |