blob: 9bf6d4ea568b13c5ec78be822c933f01af2b4063 [file] [log] [blame]
Matthew Barth3cff7ed2016-07-27 14:50:51 -05001AM_DEFAULT_SOURCE_EXT = .cpp
2
William A. Kennington III194375f2018-12-14 02:14:33 -08003AM_CPPFLAGS = -I$(abs_srcdir) -I$(abs_srcdir)/include
4export AM_CPPFLAGS
5
William A. Kennington III785fb072018-12-10 15:27:20 -08006providersdir = ${libdir}/ipmid-providers
7providers_LTLIBRARIES =
8
Patrick Williams686df742016-09-02 17:52:59 -05009sbin_PROGRAMS = \
10 ipmid
Matthew Barth3cff7ed2016-07-27 14:50:51 -050011
12ipmid_SOURCES = \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050013 ipmid.cpp \
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053014 settings.cpp \
15 host-cmd-manager.cpp \
Peter Hanson4a589852017-06-07 17:40:45 -070016 utils.cpp \
17 oemrouter.cpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -050018nodist_ipmid_SOURCES = ipmiwhitelist.cpp
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050019
Vernon Mauery02484842018-07-24 09:15:38 -070020libipmi20_BUILT_LIST = \
Tom Josepha9fbff42018-01-22 14:59:09 +053021 sensor-gen.cpp \
Tom Josephe19540e2019-02-04 14:06:58 +053022 inventory-sensor-gen.cpp \
Johnathan Mantey41ac5052018-12-13 13:47:21 -080023 fru-read-gen.cpp
Tom Josepha9fbff42018-01-22 14:59:09 +053024
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050025BUILT_SOURCES = \
Patrick Venturec64f8022018-11-14 19:31:15 -080026 ipmiwhitelist.cpp \
27 $(libipmi20_BUILT_LIST)
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050028
Ratan Gupta28c2e732017-03-04 08:53:52 +053029CLEANFILES = $(BUILT_SOURCES)
Patrick Williams686df742016-09-02 17:52:59 -050030
Vernon Mauery1e3455a2018-11-30 13:10:54 -080031COMMON_CXX = \
32 -flto \
33 -Wno-psabi \
34 $(SYSTEMD_CFLAGS) \
35 $(libmapper_CFLAGS) \
36 $(SDBUSPLUS_CFLAGS) \
37 $(PHOSPHOR_LOGGING_CFLAGS) \
38 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturec64f8022018-11-14 19:31:15 -080039 -DBOOST_ERROR_CODE_HEADER_ONLY \
40 -DBOOST_SYSTEM_NO_DEPRECATED \
41 -DBOOST_ALL_NO_LIB
42
Vernon Mauery1e3455a2018-11-30 13:10:54 -080043ipmid_CXXFLAGS = $(COMMON_CXX)
William A. Kennington III194375f2018-12-14 02:14:33 -080044ipmid_LDADD = \
45 libipmid/libipmid.la \
46 libipmid-host/libipmid-host.la
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050047ipmid_LDFLAGS = \
48 $(SYSTEMD_LIBS) \
49 $(libmapper_LIBS) \
50 $(LIBADD_DLOPEN) \
51 $(PHOSPHOR_LOGGING_LIBS) \
52 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053053 $(CRYPTO_LIBS) \
Vernon Mauery28565ac2018-08-01 09:16:56 -070054 -lstdc++fs \
55 -pthread \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050056 -export-dynamic
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053057
Patrick Williams686df742016-09-02 17:52:59 -050058# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
59# selective list of symbols.
60
Patrick Williams686df742016-09-02 17:52:59 -050061ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
Patrick Williams37af7332016-09-02 21:21:42 -050062 $(SHELL) $^ > $@
Patrick Williams686df742016-09-02 17:52:59 -050063
Ratan Gupta28c2e732017-03-04 08:53:52 +053064sensor-gen.cpp:
65 $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp
66
Tom Josephd5899e72017-05-05 11:20:34 +053067inventory-sensor-gen.cpp:
68 $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp
69
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050070fru-read-gen.cpp:
71 $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
72
William A. Kennington III785fb072018-12-10 15:27:20 -080073providers_LTLIBRARIES += libipmi20.la
Vernon Mauery02484842018-07-24 09:15:38 -070074libipmi20_la_SOURCES = \
Patrick Venture5794fcf2017-10-26 11:11:14 -070075 app/channel.cpp \
Patrick Venture5e6ac712017-10-25 12:16:19 -070076 app/watchdog.cpp \
William A. Kennington III52575252018-02-09 15:54:56 -080077 app/watchdog_service.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050078 apphandler.cpp \
Xo Wang069db2f2017-08-09 15:31:33 -070079 sys_info_param.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050080 sensorhandler.cpp \
81 storagehandler.cpp \
82 chassishandler.cpp \
83 dcmihandler.cpp \
84 ipmisensor.cpp \
85 storageaddsel.cpp \
86 transporthandler.cpp \
87 globalhandler.cpp \
Ratan Gupta28c2e732017-03-04 08:53:52 +053088 groupext.cpp \
Tom Josephd5899e72017-05-05 11:20:34 +053089 utils.cpp \
Marri Devender Rao7d9157e2017-07-01 16:11:40 -050090 selutility.cpp \
Marri Devender Rao0acf0572017-07-03 12:25:47 -050091 ipmi_fru_info_area.cpp \
Dhruvaraj Subhashchandrane0af7202017-07-12 06:35:20 -050092 read_fru_data.cpp \
Tom Josepha9fbff42018-01-22 14:59:09 +053093 sensordatahandler.cpp \
Vernon Mauery02484842018-07-24 09:15:38 -070094 $(libipmi20_BUILT_LIST)
Ratan Gupta28c2e732017-03-04 08:53:52 +053095
Emily Shafferc07e72c2018-06-18 10:37:31 -070096@CODE_COVERAGE_RULES@
97
98check_PROGRAMS =
99XFAIL_TESTS =
100
101TESTS = $(check_PROGRAMS)
102
William A. Kennington III194375f2018-12-14 02:14:33 -0800103libipmi20_la_LIBADD = \
104 libipmid/libipmid.la \
Vernon Mauery997a7a02019-02-01 13:34:13 -0800105 user_channel/libchannellayer.la \
William A. Kennington III194375f2018-12-14 02:14:33 -0800106 user_channel/libuserlayer.la
Patrick Venturec64f8022018-11-14 19:31:15 -0800107libipmi20_la_LDFLAGS = \
108 $(SYSTEMD_LIBS) \
109 $(libmapper_LIBS) \
110 $(PHOSPHOR_LOGGING_LIBS) \
111 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
112 -lstdc++fs \
Patrick Venturec64f8022018-11-14 19:31:15 -0800113 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800114libipmi20_la_CXXFLAGS = $(COMMON_CXX)
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500115
William A. Kennington III343d0612018-12-10 15:56:24 -0800116providers_LTLIBRARIES += libusercmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800117libusercmds_la_LIBADD = \
118 libipmid/libipmid.la \
119 user_channel/libuserlayer.la
William A. Kennington III343d0612018-12-10 15:56:24 -0800120libusercmds_la_SOURCES = \
121 user_channel/usercommands.cpp \
122 user_channel/channelcommands.cpp
123libusercmds_la_LDFLAGS = \
124 $(PHOSPHOR_LOGGING_LIBS) \
125 $(LIBS) \
126 -version-info 0:0:0 -shared
127libusercmds_la_CXXFLAGS = \
128 $(PHOSPHOR_LOGGING_CFLAGS) \
129 -flto
130
William A. Kennington III785fb072018-12-10 15:27:20 -0800131providers_LTLIBRARIES += libsysintfcmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800132libsysintfcmds_la_LIBADD = \
133 libipmid/libipmid.la \
134 libipmid-host/libipmid-host.la
Tom9e5232e2016-11-07 12:14:51 +0530135libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500136 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530137 host-interface.cpp
Patrick Venturec64f8022018-11-14 19:31:15 -0800138libsysintfcmds_la_LDFLAGS = \
139 $(SYSTEMD_LIBS) \
140 $(libmapper_LIBS) \
141 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
142 $(PHOSPHOR_LOGGING_LIBS) \
143 $(SDBUSPLUS_LIBS) \
144 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800145libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500146
Patrick Williams37af7332016-09-02 21:21:42 -0500147nobase_include_HEADERS = \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530148 user_channel/channel_layer.hpp \
William A. Kennington III194375f2018-12-14 02:14:33 -0800149 user_channel/user_layer.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500150
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530151# Forcing the build of self and then subdir
William A. Kennington III194375f2018-12-14 02:14:33 -0800152SUBDIRS = include libipmid libipmid-host user_channel . test softoff