blob: 02583fea76a7b79fa1c536204ee58f060fc75726 [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 III5023aa92019-04-04 18:00:09 -07006if AUTOCONF_CODE_COVERAGE_2019_01_06
7include $(top_srcdir)/aminclude_static.am
8clean-local: code-coverage-clean
9distclean-local: code-coverage-dist-clean
10else
11@CODE_COVERAGE_RULES@
12endif
13
William A. Kennington III785fb072018-12-10 15:27:20 -080014providersdir = ${libdir}/ipmid-providers
15providers_LTLIBRARIES =
16
Patrick Venture1c8ee492019-03-28 11:43:45 -070017bin_PROGRAMS = \
Patrick Williams686df742016-09-02 17:52:59 -050018 ipmid
Matthew Barth3cff7ed2016-07-27 14:50:51 -050019
20ipmid_SOURCES = \
Vernon Mauery240b1862018-10-08 12:05:16 -070021 ipmid-new.cpp \
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053022 settings.cpp \
Vernon Mauery6a98fe72019-03-11 15:57:48 -070023 host-cmd-manager.cpp
Vernon Mauery240b1862018-10-08 12:05:16 -070024
Vernon Mauery02484842018-07-24 09:15:38 -070025libipmi20_BUILT_LIST = \
Tom Josepha9fbff42018-01-22 14:59:09 +053026 sensor-gen.cpp \
Tom Josephe19540e2019-02-04 14:06:58 +053027 inventory-sensor-gen.cpp \
Patrick Venture1ad9da82019-08-19 12:25:54 -070028 fru-read-gen.cpp
Tom Josepha9fbff42018-01-22 14:59:09 +053029
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050030BUILT_SOURCES = \
Patrick Venturec64f8022018-11-14 19:31:15 -080031 ipmiwhitelist.cpp \
32 $(libipmi20_BUILT_LIST)
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050033
Ratan Gupta28c2e732017-03-04 08:53:52 +053034CLEANFILES = $(BUILT_SOURCES)
Patrick Williams686df742016-09-02 17:52:59 -050035
Vernon Mauery1e3455a2018-11-30 13:10:54 -080036COMMON_CXX = \
37 -flto \
38 -Wno-psabi \
39 $(SYSTEMD_CFLAGS) \
40 $(libmapper_CFLAGS) \
41 $(SDBUSPLUS_CFLAGS) \
42 $(PHOSPHOR_LOGGING_CFLAGS) \
43 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturec64f8022018-11-14 19:31:15 -080044 -DBOOST_ERROR_CODE_HEADER_ONLY \
45 -DBOOST_SYSTEM_NO_DEPRECATED \
Vernon Mauerye7329c72018-10-08 12:05:16 -070046 -DBOOST_COROUTINES_NO_DEPRECATION_WARNING \
47 -DBOOST_ASIO_DISABLE_THREADS \
Patrick Venturec64f8022018-11-14 19:31:15 -080048 -DBOOST_ALL_NO_LIB
49
Vernon Mauery1e3455a2018-11-30 13:10:54 -080050ipmid_CXXFLAGS = $(COMMON_CXX)
William A. Kennington III194375f2018-12-14 02:14:33 -080051ipmid_LDADD = \
52 libipmid/libipmid.la \
Vernon Mauery240b1862018-10-08 12:05:16 -070053 user_channel/libchannellayer.la \
William A. Kennington III194375f2018-12-14 02:14:33 -080054 libipmid-host/libipmid-host.la
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050055ipmid_LDFLAGS = \
56 $(SYSTEMD_LIBS) \
57 $(libmapper_LIBS) \
58 $(LIBADD_DLOPEN) \
59 $(PHOSPHOR_LOGGING_LIBS) \
60 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053061 $(CRYPTO_LIBS) \
Vernon Mauery240b1862018-10-08 12:05:16 -070062 -lboost_coroutine \
Vernon Mauery28565ac2018-08-01 09:16:56 -070063 -lstdc++fs \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050064 -export-dynamic
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053065
Patrick Williams686df742016-09-02 17:52:59 -050066# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
67# selective list of symbols.
68
Patrick Williams686df742016-09-02 17:52:59 -050069ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
Patrick Williams37af7332016-09-02 21:21:42 -050070 $(SHELL) $^ > $@
Patrick Williams686df742016-09-02 17:52:59 -050071
Vernon Mauery5f7ac712019-04-30 11:19:08 -070072sensor-gen.cpp: scripts/writesensor.mako.cpp scripts/sensor_gen.py @SENSOR_YAML_GEN@
Ratan Gupta28c2e732017-03-04 08:53:52 +053073 $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp
74
Vernon Mauery5f7ac712019-04-30 11:19:08 -070075inventory-sensor-gen.cpp: scripts/inventorysensor.mako.cpp scripts/inventory-sensor.py @INVSENSOR_YAML_GEN@
Tom Josephd5899e72017-05-05 11:20:34 +053076 $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp
77
Vernon Mauery5f7ac712019-04-30 11:19:08 -070078fru-read-gen.cpp: scripts/readfru.mako.cpp scripts/fru_gen.py @FRU_YAML_GEN@
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050079 $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
80
William A. Kennington III785fb072018-12-10 15:27:20 -080081providers_LTLIBRARIES += libipmi20.la
Johnathan Manteyb87034e2019-09-16 10:50:50 -070082if FEATURE_TRANSPORT_OEM
83libipmi20_la_TRANSPORTOEM = transporthandler_oem.cpp
84else
85libipmi20_la_TRANSPORTOEM =
86endif
87
Vernon Mauery02484842018-07-24 09:15:38 -070088libipmi20_la_SOURCES = \
Patrick Venture5794fcf2017-10-26 11:11:14 -070089 app/channel.cpp \
Patrick Venture5e6ac712017-10-25 12:16:19 -070090 app/watchdog.cpp \
William A. Kennington III52575252018-02-09 15:54:56 -080091 app/watchdog_service.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050092 apphandler.cpp \
Xo Wang069db2f2017-08-09 15:31:33 -070093 sys_info_param.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050094 sensorhandler.cpp \
Patrick Venture02e32372019-08-16 10:50:18 -070095 entity_map_json.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050096 storagehandler.cpp \
97 chassishandler.cpp \
98 dcmihandler.cpp \
99 ipmisensor.cpp \
100 storageaddsel.cpp \
101 transporthandler.cpp \
102 globalhandler.cpp \
Ratan Gupta28c2e732017-03-04 08:53:52 +0530103 groupext.cpp \
Marri Devender Rao7d9157e2017-07-01 16:11:40 -0500104 selutility.cpp \
Marri Devender Rao0acf0572017-07-03 12:25:47 -0500105 ipmi_fru_info_area.cpp \
Dhruvaraj Subhashchandrane0af7202017-07-12 06:35:20 -0500106 read_fru_data.cpp \
Tom Josepha9fbff42018-01-22 14:59:09 +0530107 sensordatahandler.cpp \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800108 user_channel/channelcommands.cpp \
Johnathan Manteyb87034e2019-09-16 10:50:50 -0700109 $(libipmi20_la_TRANSPORTOEM) \
Vernon Mauery02484842018-07-24 09:15:38 -0700110 $(libipmi20_BUILT_LIST)
Ratan Gupta28c2e732017-03-04 08:53:52 +0530111
Emily Shafferc07e72c2018-06-18 10:37:31 -0700112check_PROGRAMS =
113XFAIL_TESTS =
114
115TESTS = $(check_PROGRAMS)
116
William A. Kennington III194375f2018-12-14 02:14:33 -0800117libipmi20_la_LIBADD = \
118 libipmid/libipmid.la \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800119 user_channel/libchannellayer.la
Patrick Venturec64f8022018-11-14 19:31:15 -0800120libipmi20_la_LDFLAGS = \
121 $(SYSTEMD_LIBS) \
122 $(libmapper_LIBS) \
123 $(PHOSPHOR_LOGGING_LIBS) \
124 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
125 -lstdc++fs \
Vernon Mauery240b1862018-10-08 12:05:16 -0700126 -lboost_coroutine \
Patrick Venturec64f8022018-11-14 19:31:15 -0800127 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800128libipmi20_la_CXXFLAGS = $(COMMON_CXX)
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500129
ofery61d8dcc2019-06-10 16:02:37 -0700130if FEATURE_LIBUSERLAYER
William A. Kennington III343d0612018-12-10 15:56:24 -0800131providers_LTLIBRARIES += libusercmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800132libusercmds_la_LIBADD = \
133 libipmid/libipmid.la \
Richard Marian Thomaiyara4e09e42019-03-02 20:08:32 +0530134 user_channel/libuserlayer.la \
135 user_channel/libchannellayer.la
William A. Kennington III343d0612018-12-10 15:56:24 -0800136libusercmds_la_SOURCES = \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800137 user_channel/usercommands.cpp
William A. Kennington III343d0612018-12-10 15:56:24 -0800138libusercmds_la_LDFLAGS = \
139 $(PHOSPHOR_LOGGING_LIBS) \
Suryakanth Sekar90b00c72019-01-16 10:37:57 +0530140 $(libmapper_LIBS) \
William A. Kennington III343d0612018-12-10 15:56:24 -0800141 -version-info 0:0:0 -shared
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800142libusercmds_la_CXXFLAGS = $(COMMON_CXX)
ofery61d8dcc2019-06-10 16:02:37 -0700143endif
William A. Kennington III343d0612018-12-10 15:56:24 -0800144
William A. Kennington III785fb072018-12-10 15:27:20 -0800145providers_LTLIBRARIES += libsysintfcmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800146libsysintfcmds_la_LIBADD = \
147 libipmid/libipmid.la \
148 libipmid-host/libipmid-host.la
Tom9e5232e2016-11-07 12:14:51 +0530149libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500150 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530151 host-interface.cpp
Patrick Venturec64f8022018-11-14 19:31:15 -0800152libsysintfcmds_la_LDFLAGS = \
153 $(SYSTEMD_LIBS) \
154 $(libmapper_LIBS) \
155 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
156 $(PHOSPHOR_LOGGING_LIBS) \
157 $(SDBUSPLUS_LIBS) \
158 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800159libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500160
Vernon Mauery783dc072018-10-08 12:05:20 -0700161libwhitelistdir = ${libdir}/ipmid-providers
162libwhitelist_LTLIBRARIES = libwhitelist.la
163libwhitelist_la_SOURCES = \
164 whitelist-filter.cpp
165libwhitelist_la_LDFLAGS = \
166 $(SYSTEMD_LIBS) \
167 $(libmapper_LIBS) \
168 $(PHOSPHOR_LOGGING_LIBS) \
169 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
170 -version-info 0:0:0 -shared
171libwhitelist_la_CXXFLAGS = $(COMMON_CXX)
172nodist_libwhitelist_la_SOURCES = ipmiwhitelist.cpp
173
Patrick Williams37af7332016-09-02 21:21:42 -0500174nobase_include_HEADERS = \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530175 user_channel/channel_layer.hpp \
William A. Kennington III194375f2018-12-14 02:14:33 -0800176 user_channel/user_layer.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500177
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530178# Forcing the build of self and then subdir
William A. Kennington III194375f2018-12-14 02:14:33 -0800179SUBDIRS = include libipmid libipmid-host user_channel . test softoff