blob: 974f338b035a6e2faedcb221ac531def82ea6366 [file] [log] [blame]
Patrick Venture540b64d2018-11-28 14:56:28 -08001ACLOCAL_AMFLAGS = -I m4
Patrick Ventureef3aead2018-09-12 08:53:29 -07002AM_DEFAULT_SOURCE_EXT = .cpp
3
Patrick Venturea2efc762019-03-06 13:23:42 -08004# Ignore system headers
5CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*'
6export CODE_COVERAGE_IGNORE_PATTERN
7
8CODE_COVERAGE_LCOV_SHOPTS = $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
9# Use our configuration file for lcov
10CODE_COVERAGE_LCOV_SHOPTS += --config-file $(abs_srcdir)/.lcovrc
11export CODE_COVERAGE_LCOV_SHOPTS
12
13CODE_COVERAGE_LCOV_OPTIONS = $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
14# Use our configuration file for lcov
15CODE_COVERAGE_LCOV_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
16export CODE_COVERAGE_LCOV_OPTIONS
17
18CODE_COVERAGE_LCOV_RMOPTS = $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
19# Use our configuration file for lcov
20CODE_COVERAGE_LCOV_RMOPTS += --config-file $(abs_srcdir)/.lcovrc
21export CODE_COVERAGE_LCOV_RMOPTS
22
23CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
24# Use our configuration file for genhtml
25CODE_COVERAGE_GENHTML_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
26# Don't generate the absolute path for each file in the HTML output
27CODE_COVERAGE_GENHTML_OPTIONS += --prefix $(abs_srcdir) --prefix $(abs_builddir)
28export CODE_COVERAGE_GENHTML_OPTIONS
29
William A. Kennington III374350d2019-03-15 14:14:07 -070030if AUTOCONF_CODE_COVERAGE_2019_01_06
31include $(top_srcdir)/aminclude_static.am
32clean-local: code-coverage-clean
33distclean-local: code-coverage-dist-clean
34else
35@CODE_COVERAGE_RULES@
36endif
37
Patrick Venture924bc382019-03-19 07:36:44 -070038noinst_LTLIBRARIES = libblobcmds_common.la
39libblobcmds_common_la_SOURCES = \
40 fs.cpp \
Patrick Venture904f24f2018-11-09 08:33:46 -080041 manager.cpp \
Patrick Venture924bc382019-03-19 07:36:44 -070042 ipmi.cpp \
Patrick Venture904f24f2018-11-09 08:33:46 -080043 process.cpp \
Patrick Venturec18e2b62018-11-21 14:19:28 -080044 utils.cpp \
Patrick Venture924bc382019-03-19 07:36:44 -070045 internal/sys.cpp
46libblobcmds_common_la_CXXFLAGS = \
47 $(SYSTEMD_CFLAGS) \
48 $(PHOSPHOR_LOGGING_CFLAGS) \
49 $(LIBIPMID_CFLAGS) \
50 $(CODE_COVERAGE_CXXFLAGS) \
51 $(IPMIBLOB_CFLAGS) \
52 -flto
53libblobcmds_common_la_LDFLAGS = \
54 $(SYSTEMD_LIBS) \
55 $(LIBADD_DLOPEN) \
56 $(PHOSPHOR_LOGGING_LIBS) \
57 $(LIBIPMID_LIBS) \
58 $(CODE_COVERAGE_LIBS) \
59 $(IPMIBLOB_LIBS) \
60 -lstdc++fs
61
62libblobcmdsdir = ${libdir}/ipmid-providers
63libblobcmds_LTLIBRARIES = libblobcmds.la
64libblobcmds_la_SOURCES = main.cpp
65libblobcmds_la_LIBADD = libblobcmds_common.la
Patrick Ventureef3aead2018-09-12 08:53:29 -070066
Patrick Venture904f24f2018-11-09 08:33:46 -080067libblobcmds_la_LDFLAGS = \
68 $(SYSTEMD_LIBS) \
69 $(LIBADD_DLOPEN) \
70 $(PHOSPHOR_LOGGING_LIBS) \
William A. Kennington IIIacebece2019-02-07 15:15:44 -080071 $(LIBIPMID_LIBS) \
Patrick Venturea2efc762019-03-06 13:23:42 -080072 $(CODE_COVERAGE_LIBS) \
Patrick Venturede8a16e2019-03-07 12:48:32 -080073 $(IPMIBLOB_LIBS) \
Patrick Venture904f24f2018-11-09 08:33:46 -080074 -lstdc++fs \
Patrick Venturedf209fa2018-11-13 16:11:17 -080075 -export-dynamic \
Patrick Venture904f24f2018-11-09 08:33:46 -080076 -version-info 0:0:0 -shared
Patrick Ventureef3aead2018-09-12 08:53:29 -070077
Patrick Venture904f24f2018-11-09 08:33:46 -080078libblobcmds_la_CXXFLAGS = \
79 $(SYSTEMD_CFLAGS) \
Patrick Venture45e428a2018-11-09 08:36:11 -080080 $(PHOSPHOR_LOGGING_CFLAGS) \
William A. Kennington IIIacebece2019-02-07 15:15:44 -080081 $(LIBIPMID_CFLAGS) \
Patrick Venturea2efc762019-03-06 13:23:42 -080082 $(CODE_COVERAGE_CXXFLAGS) \
Patrick Venturede8a16e2019-03-07 12:48:32 -080083 $(IPMIBLOB_CFLAGS) \
Patrick Venture45e428a2018-11-09 08:36:11 -080084 -flto
Patrick Ventureef3aead2018-09-12 08:53:29 -070085
Patrick Ventureaceb4ba2018-09-27 14:50:37 -070086nobase_include_HEADERS = \
Patrick Venturecd8dab42019-01-15 19:57:38 -080087 blobs-ipmid/blobs.hpp
Patrick Ventureaceb4ba2018-09-27 14:50:37 -070088
Patrick Venturee2255402018-10-03 11:12:53 -070089# Install the blob handlers in ipmid-providers so you can leverage
90# meta-phosphor/blob/master/classes/obmc-phosphor-ipmiprovider-symlink.bbclass
91# Which will create a symlink in ${D}/${libdir}/blob-ipmid/ pointing to the
92# library in ${D}/${libdir}/ipmid-providers/
93
Patrick Venture5100a382018-09-27 10:40:50 -070094# Always build but only installed if you add the item:
95# BLOBIPMI_PROVIDER_LIBRARY += "libexample.so"
Patrick Venturee2255402018-10-03 11:12:53 -070096libblobexampledir = ${libdir}/ipmid-providers
97libblobexample_LTLIBRARIES = libblobexample.la
98libblobexample_la_SOURCES = example/example.cpp
Patrick Venture904f24f2018-11-09 08:33:46 -080099libblobexample_la_LDFLAGS = \
100 $(PHOSPHOR_LOGGING_LIBS) \
Patrick Venturea2efc762019-03-06 13:23:42 -0800101 $(CODE_COVERAGE_LIBS) \
Patrick Venture904f24f2018-11-09 08:33:46 -0800102 -version-info 0:0:0 -shared
103libblobexample_la_CXXFLAGS = \
104 $(PHOSPHOR_LOGGING_CFLAGS) \
Patrick Venturea2efc762019-03-06 13:23:42 -0800105 $(CODE_COVERAGE_CXXFLAGS) \
Patrick Venture904f24f2018-11-09 08:33:46 -0800106 -flto
Patrick Venture5100a382018-09-27 10:40:50 -0700107
Patrick Ventureef3aead2018-09-12 08:53:29 -0700108SUBDIRS = . test