Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 1 | if AUTOCONF_CODE_COVERAGE_2019_01_06 |
| 2 | include $(top_srcdir)/Makefile.am.include |
| 3 | include $(top_srcdir)/aminclude_static.am |
| 4 | clean-local: code-coverage-clean |
| 5 | distclean-local: code-coverage-dist-clean |
| 6 | else |
| 7 | @CODE_COVERAGE_RULES@ |
| 8 | endif |
| 9 | |
| 10 | AM_LIBS = $(CODE_COVERAGE_LIBS) |
| 11 | AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) -UNDEBUG $(GTEST_CPPFLAGS) |
| 12 | AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) |
| 13 | AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) |
| 14 | AM_LDFLAGS = $(GMOCK_LIBS) -lgmock_main \ |
| 15 | $(GTEST_LIBS) $(OESDK_TESTCASE_FLAGS) $(PTHREAD_LIBS) $(SDBUSPLUS_LIBS) |
| 16 | |
Marri Devender Rao | dd50846 | 2017-09-20 04:17:58 -0500 | [diff] [blame] | 17 | if !INSTALL_SCRIPTS |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 18 | # export these headers |
Saqib Khan | 2bb1519 | 2017-02-13 13:19:55 -0600 | [diff] [blame] | 19 | nobase_include_HEADERS = \ |
| 20 | phosphor-logging/log.hpp \ |
Patrick Venture | 59a6b1f | 2018-08-29 11:41:01 -0700 | [diff] [blame] | 21 | phosphor-logging/elog.hpp \ |
| 22 | phosphor-logging/sdjournal.hpp \ |
| 23 | phosphor-logging/test/sdjournal_mock.hpp |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 24 | |
Adriana Kobylak | 3773430 | 2017-03-01 12:47:38 -0600 | [diff] [blame] | 25 | nobase_nodist_include_HEADERS = \ |
Adriana Kobylak | ebd59fa | 2017-02-06 20:55:39 -0600 | [diff] [blame] | 26 | phosphor-logging/elog-errors.hpp \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 27 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 28 | |
Adriana Kobylak | c20dae8 | 2017-02-15 13:44:16 -0600 | [diff] [blame] | 29 | libphosphor_logging_FILES = \ |
Patrick Venture | 59a6b1f | 2018-08-29 11:41:01 -0700 | [diff] [blame] | 30 | elog.cpp elog_meta.cpp sdjournal.cpp |
Adriana Kobylak | c20dae8 | 2017-02-15 13:44:16 -0600 | [diff] [blame] | 31 | libphosphor_loggingdir = ${libdir} |
| 32 | libphosphor_logging_LTLIBRARIES = libphosphor_logging.la |
| 33 | libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES) |
| 34 | libphosphor_logging_la_LDFLAGS = \ |
| 35 | $(SYSTEMD_LIBS) \ |
| 36 | $(SDBUSPLUS_LIBS) \ |
| 37 | -version-info 1:0:0 -shared |
| 38 | libphosphor_logging_la_CXXFLAGS = \ |
Patrick Williams | 81a91e3 | 2020-05-28 14:39:28 -0500 | [diff] [blame] | 39 | $(SDBUSPLUS_CFLAGS) \ |
| 40 | $(SYSTEMD_CFLAGS) |
Adriana Kobylak | c20dae8 | 2017-02-15 13:44:16 -0600 | [diff] [blame] | 41 | |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 42 | # Application test which runs in obmc env (qemu, real hardware) |
Deepak Kodihalli | 739e925 | 2017-03-05 23:23:50 -0600 | [diff] [blame] | 43 | bin_PROGRAMS = logging-test callout-test |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 44 | logging_test_SOURCES = logging_test.cpp |
Michael Tritz | e0eb1dd | 2017-02-19 20:57:46 -0600 | [diff] [blame] | 45 | logging_test_LDADD = libphosphor_logging.la |
Deepak Kodihalli | 739e925 | 2017-03-05 23:23:50 -0600 | [diff] [blame] | 46 | callout_test_SOURCES = callouts/callout_test.cpp |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 47 | |
Patrick Venture | e731044 | 2019-03-28 13:52:13 -0700 | [diff] [blame] | 48 | bin_PROGRAMS += phosphor-log-manager |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 49 | |
Adriana Kobylak | 8f7941e | 2016-11-14 14:46:23 -0600 | [diff] [blame] | 50 | phosphor_log_manager_SOURCES = \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 51 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp \ |
Adriana Kobylak | 8f7941e | 2016-11-14 14:46:23 -0600 | [diff] [blame] | 52 | log_manager.cpp \ |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 53 | log_manager_main.cpp \ |
Adriana Kobylak | d722b3a | 2017-02-28 12:10:44 -0600 | [diff] [blame] | 54 | elog-lookup.cpp \ |
Deepak Kodihalli | b388da6 | 2017-02-27 00:47:12 -0600 | [diff] [blame] | 55 | elog_entry.cpp \ |
Deepak Kodihalli | 682326a | 2017-03-06 05:26:53 -0600 | [diff] [blame] | 56 | elog-process-metadata.cpp \ |
Deepak Kodihalli | 72654f1 | 2017-06-12 04:33:29 -0500 | [diff] [blame] | 57 | elog_meta.cpp \ |
Patrick Venture | 59a6b1f | 2018-08-29 11:41:01 -0700 | [diff] [blame] | 58 | elog_serialize.cpp \ |
Matt Spinler | 99c2b40 | 2019-05-23 14:29:16 -0500 | [diff] [blame] | 59 | sdjournal.cpp \ |
Matt Spinler | f61f292 | 2020-06-23 11:32:49 -0500 | [diff] [blame] | 60 | extensions.cpp \ |
| 61 | util.cpp |
Adriana Kobylak | 8f7941e | 2016-11-14 14:46:23 -0600 | [diff] [blame] | 62 | |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 63 | # Be sure to build needed files before compiling |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 64 | BUILT_SOURCES = \ |
Adriana Kobylak | ebd59fa | 2017-02-06 20:55:39 -0600 | [diff] [blame] | 65 | phosphor-logging/elog-errors.hpp \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 66 | elog-lookup.cpp \ |
Deepak Kodihalli | 88826f8 | 2017-02-28 02:47:07 -0600 | [diff] [blame] | 67 | elog-process-metadata.cpp \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 68 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp \ |
Deepak Kodihalli | a3db077 | 2017-03-02 09:15:51 -0600 | [diff] [blame] | 69 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp \ |
| 70 | callouts-gen.hpp |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 71 | |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 72 | CLEANFILES = \ |
Adriana Kobylak | ebd59fa | 2017-02-06 20:55:39 -0600 | [diff] [blame] | 73 | phosphor-logging/elog-errors.hpp \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 74 | elog-lookup.cpp \ |
Deepak Kodihalli | 88826f8 | 2017-02-28 02:47:07 -0600 | [diff] [blame] | 75 | elog-process-metadata.cpp \ |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 76 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp \ |
Deepak Kodihalli | a3db077 | 2017-03-02 09:15:51 -0600 | [diff] [blame] | 77 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp \ |
| 78 | callouts-gen.hpp |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 79 | |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 80 | # systemd required for journal interfaces |
Adriana Kobylak | 7d0692a | 2016-12-06 15:13:23 -0600 | [diff] [blame] | 81 | logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS) |
| 82 | logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS) |
Deepak Kodihalli | 739e925 | 2017-03-05 23:23:50 -0600 | [diff] [blame] | 83 | callout_test_LDADD = libphosphor_logging.la |
Patrick Williams | 81a91e3 | 2020-05-28 14:39:28 -0500 | [diff] [blame] | 84 | callout_test_LDFLAGS = \ |
| 85 | $(SDBUSPLUS_LIBS) \ |
| 86 | $(SYSTEMD_LIBS) \ |
| 87 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) |
| 88 | callout_test_CXXFLAGS = \ |
| 89 | $(SDBUSPLUS_CFLAGS) \ |
| 90 | $(SYSTEMD_CFLAGS) \ |
| 91 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) |
Adriana Kobylak | 8692ac9 | 2017-02-09 13:54:59 -0600 | [diff] [blame] | 92 | phosphor_log_manager_LDFLAGS = \ |
| 93 | $(SYSTEMD_LIBS) \ |
| 94 | $(SDBUSPLUS_LIBS) \ |
Deepak Kodihalli | 72654f1 | 2017-06-12 04:33:29 -0500 | [diff] [blame] | 95 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
Matt Spinler | 8ebfd31 | 2019-06-03 12:43:59 -0500 | [diff] [blame] | 96 | $(SDEVENTPLUS_LIBS) \ |
Deepak Kodihalli | 72654f1 | 2017-06-12 04:33:29 -0500 | [diff] [blame] | 97 | -lstdc++fs |
Adriana Kobylak | 8692ac9 | 2017-02-09 13:54:59 -0600 | [diff] [blame] | 98 | phosphor_log_manager_CXXFLAGS = \ |
| 99 | $(SYSTEMD_CFLAGS) \ |
| 100 | $(SDBUSPLUS_CFLAGS) \ |
Matt Spinler | 8ebfd31 | 2019-06-03 12:43:59 -0500 | [diff] [blame] | 101 | $(SDEVENTPLUS_CFLAGS) \ |
Adriana Kobylak | 8692ac9 | 2017-02-09 13:54:59 -0600 | [diff] [blame] | 102 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) |
Adriana Kobylak | f855c3e | 2016-09-29 20:48:08 -0500 | [diff] [blame] | 103 | |
Matt Spinler | 99c2b40 | 2019-05-23 14:29:16 -0500 | [diff] [blame] | 104 | |
| 105 | include extensions/extensions.mk |
| 106 | |
| 107 | |
Adriana Kobylak | 1a7508b | 2017-02-13 22:51:40 -0600 | [diff] [blame] | 108 | xyz/openbmc_project/Logging/Internal/Manager/server.cpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml xyz/openbmc_project/Logging/Internal/Manager/server.hpp |
| 109 | @mkdir -p `dirname $@` |
| 110 | $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Logging.Internal.Manager > $@ |
| 111 | |
| 112 | xyz/openbmc_project/Logging/Internal/Manager/server.hpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml |
| 113 | @mkdir -p `dirname $@` |
| 114 | $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header xyz.openbmc_project.Logging.Internal.Manager > $@ |
| 115 | |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 116 | ELOG_MAKO ?= elog-gen-template.mako.hpp |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 117 | LOOKUP_MAKO ?= elog-lookup-template.mako.cpp |
Deepak Kodihalli | 88826f8 | 2017-02-28 02:47:07 -0600 | [diff] [blame] | 118 | META_MAKO ?= elog-process-metadata.mako.cpp |
Deepak Kodihalli | a3db077 | 2017-03-02 09:15:51 -0600 | [diff] [blame] | 119 | CALLOUTS_MAKO ?= callouts-gen.mako.hpp |
Adriana Kobylak | f469073 | 2017-02-19 09:53:34 -0600 | [diff] [blame] | 120 | ELOG_TEMPLATE_DIR ?= ${abs_srcdir}/tools/phosphor-logging/templates/ |
Andrew Geissler | f1f2cfa | 2016-11-21 15:16:45 -0600 | [diff] [blame] | 121 | REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\ |
Deepak Kodihalli | 88826f8 | 2017-02-28 02:47:07 -0600 | [diff] [blame] | 122 | ${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)\ |
Matthew Barth | c19ea65 | 2019-08-12 15:18:57 -0500 | [diff] [blame] | 123 | ${ELOG_TEMPLATE_DIR}/$(LOOKUP_MAKO)\ |
Deepak Kodihalli | a3db077 | 2017-03-02 09:15:51 -0600 | [diff] [blame] | 124 | ${ELOG_TEMPLATE_DIR}/$(META_MAKO)\ |
| 125 | ${abs_srcdir}/callouts/callouts.py\ |
| 126 | ${abs_srcdir}/callouts/$(CALLOUTS_MAKO) |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 127 | |
| 128 | # Be sure to package up the required script, yaml, and mako template to |
| 129 | # generate the header file |
| 130 | EXTRA_DIST = $(REQ_FILES_TO_GEN) |
| 131 | |
Adriana Kobylak | ebd59fa | 2017-02-06 20:55:39 -0600 | [diff] [blame] | 132 | phosphor-logging/elog-errors.hpp: $(REQ_FILES_TO_GEN) |
| 133 | @mkdir -p `dirname $@` |
| 134 | $(AM_V_at)$(PYTHON) ${abs_srcdir}/tools/elog-gen.py -y ${YAML_DIR} -u ${YAML_DIR_TEST} -t ${ELOG_TEMPLATE_DIR} -m $(ELOG_MAKO) -o $@ |
Adriana Kobylak | 7298dc2 | 2017-01-24 12:21:50 -0600 | [diff] [blame] | 135 | elog-lookup.cpp: $(REQ_FILES_TO_GEN) |
Adriana Kobylak | ebd59fa | 2017-02-06 20:55:39 -0600 | [diff] [blame] | 136 | $(AM_V_at)$(PYTHON) ${abs_srcdir}/tools/elog-gen.py -y ${YAML_DIR} -u ${YAML_DIR_TEST} -t ${ELOG_TEMPLATE_DIR} -m $(LOOKUP_MAKO) -o $@ |
Deepak Kodihalli | 88826f8 | 2017-02-28 02:47:07 -0600 | [diff] [blame] | 137 | elog-process-metadata.cpp: $(REQ_FILES_TO_GEN) |
| 138 | $(AM_V_at)$(PYTHON) ${abs_srcdir}/tools/elog-gen.py -y ${YAML_DIR} -u ${YAML_DIR_TEST} -t ${ELOG_TEMPLATE_DIR} -m $(META_MAKO) -o $@ |
Deepak Kodihalli | a3db077 | 2017-03-02 09:15:51 -0600 | [diff] [blame] | 139 | callouts-gen.hpp: $(REQ_FILES_TO_GEN) |
| 140 | $(AM_V_at)$(PYTHON) ${abs_srcdir}/callouts/callouts.py -i ${CALLOUTS_YAML} |
Andrew Geissler | 184690d | 2016-11-03 08:06:31 -0500 | [diff] [blame] | 141 | |
Brad Bishop | 9316b9a | 2017-02-10 14:21:37 -0500 | [diff] [blame] | 142 | pkgconfiglibdir = ${libdir}/pkgconfig |
| 143 | pkgconfiglib_DATA = phosphor-logging.pc |
| 144 | |
Deepak Kodihalli | c496619 | 2018-08-23 02:19:58 -0500 | [diff] [blame] | 145 | SUBDIRS = test phosphor-rsyslog-config |
Marri Devender Rao | b0562c4 | 2017-10-12 23:55:08 -0500 | [diff] [blame] | 146 | endif |
Marri Devender Rao | dd50846 | 2017-09-20 04:17:58 -0500 | [diff] [blame] | 147 | # Export elog-gen parser and mako script |
| 148 | elogdir = ${datadir}/phosphor-logging/elog |
| 149 | nobase_elog_DATA = \ |
| 150 | tools/elog-gen.py \ |
| 151 | tools/phosphor-logging/templates/elog-gen-template.mako.hpp |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 152 | |
| 153 | # check_PROGRAMS = |
| 154 | # XFAIL_TESTS = |
| 155 | # TESTS = $(check_PROGRAMS) |