blob: 1b13af794d3e106d3918d76048d3b31ffa3d1d34 [file] [log] [blame]
Marri Devender Raodd508462017-09-20 04:17:58 -05001if !INSTALL_SCRIPTS
Andrew Geissler328889d2016-10-10 12:43:48 -05002# export these headers
Saqib Khan2bb15192017-02-13 13:19:55 -06003nobase_include_HEADERS = \
4 phosphor-logging/log.hpp \
Tom Joseph7a33ee42017-07-25 00:04:20 +05305 phosphor-logging/elog.hpp
Andrew Geissler328889d2016-10-10 12:43:48 -05006
Adriana Kobylak37734302017-03-01 12:47:38 -06007nobase_nodist_include_HEADERS = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -06008 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -06009 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050010
Adriana Kobylakc20dae82017-02-15 13:44:16 -060011libphosphor_logging_FILES = \
Deepak Kodihalli682326a2017-03-06 05:26:53 -060012 elog.cpp elog_meta.cpp
Adriana Kobylakc20dae82017-02-15 13:44:16 -060013libphosphor_loggingdir = ${libdir}
14libphosphor_logging_LTLIBRARIES = libphosphor_logging.la
15libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES)
16libphosphor_logging_la_LDFLAGS = \
17 $(SYSTEMD_LIBS) \
18 $(SDBUSPLUS_LIBS) \
19 -version-info 1:0:0 -shared
20libphosphor_logging_la_CXXFLAGS = \
21 $(SDBUSPLUS_CFLAGS)
22
Andrew Geissler328889d2016-10-10 12:43:48 -050023# Application test which runs in obmc env (qemu, real hardware)
Deepak Kodihalli739e9252017-03-05 23:23:50 -060024bin_PROGRAMS = logging-test callout-test
Andrew Geissler328889d2016-10-10 12:43:48 -050025logging_test_SOURCES = logging_test.cpp
Michael Tritze0eb1dd2017-02-19 20:57:46 -060026logging_test_LDADD = libphosphor_logging.la
Deepak Kodihalli739e9252017-03-05 23:23:50 -060027callout_test_SOURCES = callouts/callout_test.cpp
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050028
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060029sbin_PROGRAMS = phosphor-log-manager
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060030
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060031phosphor_log_manager_SOURCES = \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060032 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060033 log_manager.cpp \
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060034 log_manager_main.cpp \
Adriana Kobylakd722b3a2017-02-28 12:10:44 -060035 elog-lookup.cpp \
Deepak Kodihallib388da62017-02-27 00:47:12 -060036 elog_entry.cpp \
Deepak Kodihalli88826f82017-02-28 02:47:07 -060037 org.openbmc.Associations.cpp \
Deepak Kodihalli682326a2017-03-06 05:26:53 -060038 elog-process-metadata.cpp \
Deepak Kodihalli72654f12017-06-12 04:33:29 -050039 elog_meta.cpp \
40 elog_serialize.cpp
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060041
Adriana Kobylak7298dc22017-01-24 12:21:50 -060042# Be sure to build needed files before compiling
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060043BUILT_SOURCES = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060044 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060045 elog-lookup.cpp \
Deepak Kodihalli88826f82017-02-28 02:47:07 -060046 elog-process-metadata.cpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060047 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
Deepak Kodihallia3db0772017-03-02 09:15:51 -060048 xyz/openbmc_project/Logging/Internal/Manager/server.hpp \
49 callouts-gen.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050050
Adriana Kobylak7298dc22017-01-24 12:21:50 -060051CLEANFILES = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060052 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060053 elog-lookup.cpp \
Deepak Kodihalli88826f82017-02-28 02:47:07 -060054 elog-process-metadata.cpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060055 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
Deepak Kodihallia3db0772017-03-02 09:15:51 -060056 xyz/openbmc_project/Logging/Internal/Manager/server.hpp \
57 callouts-gen.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050058
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050059# systemd required for journal interfaces
Adriana Kobylak7d0692a2016-12-06 15:13:23 -060060logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
61logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
Deepak Kodihalli739e9252017-03-05 23:23:50 -060062callout_test_LDADD = libphosphor_logging.la
63callout_test_LDFLAGS = $(SDBUSPLUS_LIBS) $(PHOSPHOR_DBUS_INTERFACES_LIBS)
64callout_test_CXXFLAGS = $(SDBUSPLUS_CFLAGS) $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Adriana Kobylak8692ac92017-02-09 13:54:59 -060065phosphor_log_manager_LDFLAGS = \
66 $(SYSTEMD_LIBS) \
67 $(SDBUSPLUS_LIBS) \
Deepak Kodihalli72654f12017-06-12 04:33:29 -050068 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
69 -lstdc++fs
Adriana Kobylak8692ac92017-02-09 13:54:59 -060070phosphor_log_manager_CXXFLAGS = \
71 $(SYSTEMD_CFLAGS) \
72 $(SDBUSPLUS_CFLAGS) \
73 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050074
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060075xyz/openbmc_project/Logging/Internal/Manager/server.cpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml xyz/openbmc_project/Logging/Internal/Manager/server.hpp
76 @mkdir -p `dirname $@`
77 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Logging.Internal.Manager > $@
78
79xyz/openbmc_project/Logging/Internal/Manager/server.hpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml
80 @mkdir -p `dirname $@`
81 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header xyz.openbmc_project.Logging.Internal.Manager > $@
82
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060083ELOG_MAKO ?= elog-gen-template.mako.hpp
Adriana Kobylak7298dc22017-01-24 12:21:50 -060084LOOKUP_MAKO ?= elog-lookup-template.mako.cpp
Deepak Kodihalli88826f82017-02-28 02:47:07 -060085META_MAKO ?= elog-process-metadata.mako.cpp
Deepak Kodihallia3db0772017-03-02 09:15:51 -060086CALLOUTS_MAKO ?= callouts-gen.mako.hpp
Adriana Kobylakf4690732017-02-19 09:53:34 -060087ELOG_TEMPLATE_DIR ?= ${abs_srcdir}/tools/phosphor-logging/templates/
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060088REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
Deepak Kodihalli88826f82017-02-28 02:47:07 -060089 ${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)\
Deepak Kodihallia3db0772017-03-02 09:15:51 -060090 ${ELOG_TEMPLATE_DIR}/$(META_MAKO)\
91 ${abs_srcdir}/callouts/callouts.py\
92 ${abs_srcdir}/callouts/$(CALLOUTS_MAKO)
Andrew Geissler184690d2016-11-03 08:06:31 -050093
94# Be sure to package up the required script, yaml, and mako template to
95# generate the header file
96EXTRA_DIST = $(REQ_FILES_TO_GEN)
97
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060098phosphor-logging/elog-errors.hpp: $(REQ_FILES_TO_GEN)
99 @mkdir -p `dirname $@`
100 $(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 Kobylak7298dc22017-01-24 12:21:50 -0600101elog-lookup.cpp: $(REQ_FILES_TO_GEN)
Adriana Kobylakebd59fa2017-02-06 20:55:39 -0600102 $(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 Kodihalli88826f82017-02-28 02:47:07 -0600103elog-process-metadata.cpp: $(REQ_FILES_TO_GEN)
104 $(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 Kodihallia3db0772017-03-02 09:15:51 -0600105callouts-gen.hpp: $(REQ_FILES_TO_GEN)
106 $(AM_V_at)$(PYTHON) ${abs_srcdir}/callouts/callouts.py -i ${CALLOUTS_YAML}
Andrew Geissler184690d2016-11-03 08:06:31 -0500107
Brad Bishop9316b9a2017-02-10 14:21:37 -0500108pkgconfiglibdir = ${libdir}/pkgconfig
109pkgconfiglib_DATA = phosphor-logging.pc
110
Deepak Kodihallic4966192018-08-23 02:19:58 -0500111SUBDIRS = test phosphor-rsyslog-config
Marri Devender Raob0562c42017-10-12 23:55:08 -0500112endif
Marri Devender Raodd508462017-09-20 04:17:58 -0500113# Export elog-gen parser and mako script
114elogdir = ${datadir}/phosphor-logging/elog
115nobase_elog_DATA = \
116 tools/elog-gen.py \
117 tools/phosphor-logging/templates/elog-gen-template.mako.hpp