blob: 5af2544019518fe4ba44a20fb40c9f7e3bd16050 [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 Venture1c8ee492019-03-28 11:43:45 -07009bin_PROGRAMS = \
Patrick Williams686df742016-09-02 17:52:59 -050010 ipmid
Matthew Barth3cff7ed2016-07-27 14:50:51 -050011
12ipmid_SOURCES = \
Vernon Mauery240b1862018-10-08 12:05:16 -070013 ipmid-new.cpp \
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053014 settings.cpp \
Vernon Mauery6a98fe72019-03-11 15:57:48 -070015 host-cmd-manager.cpp
Vernon Mauery240b1862018-10-08 12:05:16 -070016
Vernon Mauery02484842018-07-24 09:15:38 -070017libipmi20_BUILT_LIST = \
Tom Josepha9fbff42018-01-22 14:59:09 +053018 sensor-gen.cpp \
Tom Josephe19540e2019-02-04 14:06:58 +053019 inventory-sensor-gen.cpp \
Jaghathiswari Rankappagounder Natarajan9c118942019-02-12 13:22:55 -080020 fru-read-gen.cpp \
21 entity-gen.cpp
Tom Josepha9fbff42018-01-22 14:59:09 +053022
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050023BUILT_SOURCES = \
Patrick Venturec64f8022018-11-14 19:31:15 -080024 ipmiwhitelist.cpp \
25 $(libipmi20_BUILT_LIST)
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050026
Ratan Gupta28c2e732017-03-04 08:53:52 +053027CLEANFILES = $(BUILT_SOURCES)
Patrick Williams686df742016-09-02 17:52:59 -050028
Vernon Mauery1e3455a2018-11-30 13:10:54 -080029COMMON_CXX = \
30 -flto \
31 -Wno-psabi \
32 $(SYSTEMD_CFLAGS) \
33 $(libmapper_CFLAGS) \
34 $(SDBUSPLUS_CFLAGS) \
35 $(PHOSPHOR_LOGGING_CFLAGS) \
36 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturec64f8022018-11-14 19:31:15 -080037 -DBOOST_ERROR_CODE_HEADER_ONLY \
38 -DBOOST_SYSTEM_NO_DEPRECATED \
Vernon Mauerye7329c72018-10-08 12:05:16 -070039 -DBOOST_COROUTINES_NO_DEPRECATION_WARNING \
40 -DBOOST_ASIO_DISABLE_THREADS \
Patrick Venturec64f8022018-11-14 19:31:15 -080041 -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 \
Vernon Mauery240b1862018-10-08 12:05:16 -070046 user_channel/libchannellayer.la \
William A. Kennington III194375f2018-12-14 02:14:33 -080047 libipmid-host/libipmid-host.la
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050048ipmid_LDFLAGS = \
49 $(SYSTEMD_LIBS) \
50 $(libmapper_LIBS) \
51 $(LIBADD_DLOPEN) \
52 $(PHOSPHOR_LOGGING_LIBS) \
53 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053054 $(CRYPTO_LIBS) \
Vernon Mauery240b1862018-10-08 12:05:16 -070055 -lboost_coroutine \
Vernon Mauery28565ac2018-08-01 09:16:56 -070056 -lstdc++fs \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050057 -export-dynamic
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053058
Patrick Williams686df742016-09-02 17:52:59 -050059# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
60# selective list of symbols.
61
Patrick Williams686df742016-09-02 17:52:59 -050062ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
Patrick Williams37af7332016-09-02 21:21:42 -050063 $(SHELL) $^ > $@
Patrick Williams686df742016-09-02 17:52:59 -050064
Ratan Gupta28c2e732017-03-04 08:53:52 +053065sensor-gen.cpp:
66 $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp
67
Tom Josephd5899e72017-05-05 11:20:34 +053068inventory-sensor-gen.cpp:
69 $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp
70
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050071fru-read-gen.cpp:
72 $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
73
Jaghathiswari Rankappagounder Natarajan9c118942019-02-12 13:22:55 -080074entity-gen.cpp:
75 $(AM_V_GEN)@ENTITYGEN@ -o $(top_builddir) generate-cpp
76
William A. Kennington III785fb072018-12-10 15:27:20 -080077providers_LTLIBRARIES += libipmi20.la
Vernon Mauery02484842018-07-24 09:15:38 -070078libipmi20_la_SOURCES = \
Patrick Venture5794fcf2017-10-26 11:11:14 -070079 app/channel.cpp \
Patrick Venture5e6ac712017-10-25 12:16:19 -070080 app/watchdog.cpp \
William A. Kennington III52575252018-02-09 15:54:56 -080081 app/watchdog_service.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050082 apphandler.cpp \
Xo Wang069db2f2017-08-09 15:31:33 -070083 sys_info_param.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050084 sensorhandler.cpp \
85 storagehandler.cpp \
86 chassishandler.cpp \
87 dcmihandler.cpp \
88 ipmisensor.cpp \
89 storageaddsel.cpp \
90 transporthandler.cpp \
91 globalhandler.cpp \
Ratan Gupta28c2e732017-03-04 08:53:52 +053092 groupext.cpp \
Marri Devender Rao7d9157e2017-07-01 16:11:40 -050093 selutility.cpp \
Marri Devender Rao0acf0572017-07-03 12:25:47 -050094 ipmi_fru_info_area.cpp \
Dhruvaraj Subhashchandrane0af7202017-07-12 06:35:20 -050095 read_fru_data.cpp \
Tom Josepha9fbff42018-01-22 14:59:09 +053096 sensordatahandler.cpp \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -080097 user_channel/channelcommands.cpp \
Vernon Mauery02484842018-07-24 09:15:38 -070098 $(libipmi20_BUILT_LIST)
Ratan Gupta28c2e732017-03-04 08:53:52 +053099
Emily Shafferc07e72c2018-06-18 10:37:31 -0700100@CODE_COVERAGE_RULES@
101
102check_PROGRAMS =
103XFAIL_TESTS =
104
105TESTS = $(check_PROGRAMS)
106
William A. Kennington III194375f2018-12-14 02:14:33 -0800107libipmi20_la_LIBADD = \
108 libipmid/libipmid.la \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800109 user_channel/libchannellayer.la
Patrick Venturec64f8022018-11-14 19:31:15 -0800110libipmi20_la_LDFLAGS = \
111 $(SYSTEMD_LIBS) \
112 $(libmapper_LIBS) \
113 $(PHOSPHOR_LOGGING_LIBS) \
114 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
115 -lstdc++fs \
Vernon Mauery240b1862018-10-08 12:05:16 -0700116 -lboost_coroutine \
Patrick Venturec64f8022018-11-14 19:31:15 -0800117 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800118libipmi20_la_CXXFLAGS = $(COMMON_CXX)
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500119
William A. Kennington III343d0612018-12-10 15:56:24 -0800120providers_LTLIBRARIES += libusercmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800121libusercmds_la_LIBADD = \
122 libipmid/libipmid.la \
Richard Marian Thomaiyara4e09e42019-03-02 20:08:32 +0530123 user_channel/libuserlayer.la \
124 user_channel/libchannellayer.la
William A. Kennington III343d0612018-12-10 15:56:24 -0800125libusercmds_la_SOURCES = \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800126 user_channel/usercommands.cpp
William A. Kennington III343d0612018-12-10 15:56:24 -0800127libusercmds_la_LDFLAGS = \
128 $(PHOSPHOR_LOGGING_LIBS) \
Suryakanth Sekar90b00c72019-01-16 10:37:57 +0530129 $(libmapper_LIBS) \
William A. Kennington III343d0612018-12-10 15:56:24 -0800130 -version-info 0:0:0 -shared
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800131libusercmds_la_CXXFLAGS = $(COMMON_CXX)
William A. Kennington III343d0612018-12-10 15:56:24 -0800132
William A. Kennington III785fb072018-12-10 15:27:20 -0800133providers_LTLIBRARIES += libsysintfcmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800134libsysintfcmds_la_LIBADD = \
135 libipmid/libipmid.la \
136 libipmid-host/libipmid-host.la
Tom9e5232e2016-11-07 12:14:51 +0530137libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500138 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530139 host-interface.cpp
Patrick Venturec64f8022018-11-14 19:31:15 -0800140libsysintfcmds_la_LDFLAGS = \
141 $(SYSTEMD_LIBS) \
142 $(libmapper_LIBS) \
143 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
144 $(PHOSPHOR_LOGGING_LIBS) \
145 $(SDBUSPLUS_LIBS) \
146 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800147libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500148
Vernon Mauery783dc072018-10-08 12:05:20 -0700149libwhitelistdir = ${libdir}/ipmid-providers
150libwhitelist_LTLIBRARIES = libwhitelist.la
151libwhitelist_la_SOURCES = \
152 whitelist-filter.cpp
153libwhitelist_la_LDFLAGS = \
154 $(SYSTEMD_LIBS) \
155 $(libmapper_LIBS) \
156 $(PHOSPHOR_LOGGING_LIBS) \
157 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
158 -version-info 0:0:0 -shared
159libwhitelist_la_CXXFLAGS = $(COMMON_CXX)
160nodist_libwhitelist_la_SOURCES = ipmiwhitelist.cpp
161
Patrick Williams37af7332016-09-02 21:21:42 -0500162nobase_include_HEADERS = \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530163 user_channel/channel_layer.hpp \
William A. Kennington III194375f2018-12-14 02:14:33 -0800164 user_channel/user_layer.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500165
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530166# Forcing the build of self and then subdir
William A. Kennington III194375f2018-12-14 02:14:33 -0800167SUBDIRS = include libipmid libipmid-host user_channel . test softoff