blob: 1e2106ecf846061e05496866f2556dc2afad5108 [file] [log] [blame]
Andrew Geissler328889d2016-10-10 12:43:48 -05001# export these headers
Saqib Khan2bb15192017-02-13 13:19:55 -06002nobase_include_HEADERS = \
3 phosphor-logging/log.hpp \
Tom Joseph7a33ee42017-07-25 00:04:20 +05304 phosphor-logging/elog.hpp
Andrew Geissler328889d2016-10-10 12:43:48 -05005
Adriana Kobylak37734302017-03-01 12:47:38 -06006nobase_nodist_include_HEADERS = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -06007 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -06008 xyz/openbmc_project/Logging/Internal/Manager/server.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -05009
Adriana Kobylakc20dae82017-02-15 13:44:16 -060010libphosphor_logging_FILES = \
Deepak Kodihalli682326a2017-03-06 05:26:53 -060011 elog.cpp elog_meta.cpp
Adriana Kobylakc20dae82017-02-15 13:44:16 -060012libphosphor_loggingdir = ${libdir}
13libphosphor_logging_LTLIBRARIES = libphosphor_logging.la
14libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES)
15libphosphor_logging_la_LDFLAGS = \
16 $(SYSTEMD_LIBS) \
17 $(SDBUSPLUS_LIBS) \
18 -version-info 1:0:0 -shared
19libphosphor_logging_la_CXXFLAGS = \
20 $(SDBUSPLUS_CFLAGS)
21
Andrew Geissler328889d2016-10-10 12:43:48 -050022# Application test which runs in obmc env (qemu, real hardware)
Deepak Kodihalli739e9252017-03-05 23:23:50 -060023bin_PROGRAMS = logging-test callout-test
Andrew Geissler328889d2016-10-10 12:43:48 -050024logging_test_SOURCES = logging_test.cpp
Michael Tritze0eb1dd2017-02-19 20:57:46 -060025logging_test_LDADD = libphosphor_logging.la
Deepak Kodihalli739e9252017-03-05 23:23:50 -060026callout_test_SOURCES = callouts/callout_test.cpp
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050027
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060028sbin_PROGRAMS = phosphor-log-manager
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060029
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060030phosphor_log_manager_SOURCES = \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060031 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060032 log_manager.cpp \
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060033 log_manager_main.cpp \
Adriana Kobylakd722b3a2017-02-28 12:10:44 -060034 elog-lookup.cpp \
Deepak Kodihallib388da62017-02-27 00:47:12 -060035 elog_entry.cpp \
Deepak Kodihalli88826f82017-02-28 02:47:07 -060036 org.openbmc.Associations.cpp \
Deepak Kodihalli682326a2017-03-06 05:26:53 -060037 elog-process-metadata.cpp \
Deepak Kodihalli72654f12017-06-12 04:33:29 -050038 elog_meta.cpp \
39 elog_serialize.cpp
Adriana Kobylak8f7941e2016-11-14 14:46:23 -060040
Adriana Kobylak7298dc22017-01-24 12:21:50 -060041# Be sure to build needed files before compiling
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060042BUILT_SOURCES = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060043 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060044 elog-lookup.cpp \
Deepak Kodihalli88826f82017-02-28 02:47:07 -060045 elog-process-metadata.cpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060046 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
Deepak Kodihallia3db0772017-03-02 09:15:51 -060047 xyz/openbmc_project/Logging/Internal/Manager/server.hpp \
48 callouts-gen.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050049
Adriana Kobylak7298dc22017-01-24 12:21:50 -060050CLEANFILES = \
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060051 phosphor-logging/elog-errors.hpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060052 elog-lookup.cpp \
Deepak Kodihalli88826f82017-02-28 02:47:07 -060053 elog-process-metadata.cpp \
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060054 xyz/openbmc_project/Logging/Internal/Manager/server.cpp \
Deepak Kodihallia3db0772017-03-02 09:15:51 -060055 xyz/openbmc_project/Logging/Internal/Manager/server.hpp \
56 callouts-gen.hpp
Andrew Geissler184690d2016-11-03 08:06:31 -050057
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050058# systemd required for journal interfaces
Adriana Kobylak7d0692a2016-12-06 15:13:23 -060059logging_test_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS)
60logging_test_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS)
Deepak Kodihalli739e9252017-03-05 23:23:50 -060061callout_test_LDADD = libphosphor_logging.la
62callout_test_LDFLAGS = $(SDBUSPLUS_LIBS) $(PHOSPHOR_DBUS_INTERFACES_LIBS)
63callout_test_CXXFLAGS = $(SDBUSPLUS_CFLAGS) $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Adriana Kobylak8692ac92017-02-09 13:54:59 -060064phosphor_log_manager_LDFLAGS = \
65 $(SYSTEMD_LIBS) \
66 $(SDBUSPLUS_LIBS) \
Deepak Kodihalli72654f12017-06-12 04:33:29 -050067 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
68 -lstdc++fs
Adriana Kobylak8692ac92017-02-09 13:54:59 -060069phosphor_log_manager_CXXFLAGS = \
70 $(SYSTEMD_CFLAGS) \
71 $(SDBUSPLUS_CFLAGS) \
72 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Adriana Kobylakf855c3e2016-09-29 20:48:08 -050073
Adriana Kobylak1a7508b2017-02-13 22:51:40 -060074xyz/openbmc_project/Logging/Internal/Manager/server.cpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml xyz/openbmc_project/Logging/Internal/Manager/server.hpp
75 @mkdir -p `dirname $@`
76 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Logging.Internal.Manager > $@
77
78xyz/openbmc_project/Logging/Internal/Manager/server.hpp: xyz/openbmc_project/Logging/Internal/Manager.interface.yaml
79 @mkdir -p `dirname $@`
80 $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header xyz.openbmc_project.Logging.Internal.Manager > $@
81
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060082ELOG_MAKO ?= elog-gen-template.mako.hpp
Adriana Kobylak7298dc22017-01-24 12:21:50 -060083LOOKUP_MAKO ?= elog-lookup-template.mako.cpp
Deepak Kodihalli88826f82017-02-28 02:47:07 -060084META_MAKO ?= elog-process-metadata.mako.cpp
Deepak Kodihallia3db0772017-03-02 09:15:51 -060085CALLOUTS_MAKO ?= callouts-gen.mako.hpp
Adriana Kobylakf4690732017-02-19 09:53:34 -060086ELOG_TEMPLATE_DIR ?= ${abs_srcdir}/tools/phosphor-logging/templates/
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -060087REQ_FILES_TO_GEN ?= ${abs_srcdir}/tools/elog-gen.py\
Deepak Kodihalli88826f82017-02-28 02:47:07 -060088 ${ELOG_TEMPLATE_DIR}/$(ELOG_MAKO)\
Deepak Kodihallia3db0772017-03-02 09:15:51 -060089 ${ELOG_TEMPLATE_DIR}/$(META_MAKO)\
90 ${abs_srcdir}/callouts/callouts.py\
91 ${abs_srcdir}/callouts/$(CALLOUTS_MAKO)
Andrew Geissler184690d2016-11-03 08:06:31 -050092
93# Be sure to package up the required script, yaml, and mako template to
94# generate the header file
95EXTRA_DIST = $(REQ_FILES_TO_GEN)
96
Adriana Kobylakebd59fa2017-02-06 20:55:39 -060097phosphor-logging/elog-errors.hpp: $(REQ_FILES_TO_GEN)
98 @mkdir -p `dirname $@`
99 $(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 -0600100elog-lookup.cpp: $(REQ_FILES_TO_GEN)
Adriana Kobylakebd59fa2017-02-06 20:55:39 -0600101 $(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 -0600102elog-process-metadata.cpp: $(REQ_FILES_TO_GEN)
103 $(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 -0600104callouts-gen.hpp: $(REQ_FILES_TO_GEN)
105 $(AM_V_at)$(PYTHON) ${abs_srcdir}/callouts/callouts.py -i ${CALLOUTS_YAML}
Andrew Geissler184690d2016-11-03 08:06:31 -0500106
Brad Bishop9316b9a2017-02-10 14:21:37 -0500107pkgconfiglibdir = ${libdir}/pkgconfig
108pkgconfiglib_DATA = phosphor-logging.pc
109
Andrew Geisslerf1f2cfa2016-11-21 15:16:45 -0600110SUBDIRS = test