blob: 7f24377351c965ee435150677bba3bcd28f1e47a [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 = \
Vernon Mauery240b1862018-10-08 12:05:16 -070013 ipmid-new.cpp \
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053014 settings.cpp \
15 host-cmd-manager.cpp \
Vernon Mauery240b1862018-10-08 12:05:16 -070016 utils.cpp
17
Vernon Mauery02484842018-07-24 09:15:38 -070018libipmi20_BUILT_LIST = \
Tom Josepha9fbff42018-01-22 14:59:09 +053019 sensor-gen.cpp \
Tom Josephe19540e2019-02-04 14:06:58 +053020 inventory-sensor-gen.cpp \
Jaghathiswari Rankappagounder Natarajan9c118942019-02-12 13:22:55 -080021 fru-read-gen.cpp \
22 entity-gen.cpp
Tom Josepha9fbff42018-01-22 14:59:09 +053023
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050024BUILT_SOURCES = \
Patrick Venturec64f8022018-11-14 19:31:15 -080025 ipmiwhitelist.cpp \
26 $(libipmi20_BUILT_LIST)
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050027
Ratan Gupta28c2e732017-03-04 08:53:52 +053028CLEANFILES = $(BUILT_SOURCES)
Patrick Williams686df742016-09-02 17:52:59 -050029
Vernon Mauery1e3455a2018-11-30 13:10:54 -080030COMMON_CXX = \
31 -flto \
32 -Wno-psabi \
33 $(SYSTEMD_CFLAGS) \
34 $(libmapper_CFLAGS) \
35 $(SDBUSPLUS_CFLAGS) \
36 $(PHOSPHOR_LOGGING_CFLAGS) \
37 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturec64f8022018-11-14 19:31:15 -080038 -DBOOST_ERROR_CODE_HEADER_ONLY \
39 -DBOOST_SYSTEM_NO_DEPRECATED \
Vernon Mauerye7329c72018-10-08 12:05:16 -070040 -DBOOST_COROUTINES_NO_DEPRECATION_WARNING \
41 -DBOOST_ASIO_DISABLE_THREADS \
Patrick Venturec64f8022018-11-14 19:31:15 -080042 -DBOOST_ALL_NO_LIB
43
Vernon Mauery1e3455a2018-11-30 13:10:54 -080044ipmid_CXXFLAGS = $(COMMON_CXX)
William A. Kennington III194375f2018-12-14 02:14:33 -080045ipmid_LDADD = \
46 libipmid/libipmid.la \
Vernon Mauery240b1862018-10-08 12:05:16 -070047 user_channel/libchannellayer.la \
William A. Kennington III194375f2018-12-14 02:14:33 -080048 libipmid-host/libipmid-host.la
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050049ipmid_LDFLAGS = \
50 $(SYSTEMD_LIBS) \
51 $(libmapper_LIBS) \
52 $(LIBADD_DLOPEN) \
53 $(PHOSPHOR_LOGGING_LIBS) \
54 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053055 $(CRYPTO_LIBS) \
Vernon Mauery240b1862018-10-08 12:05:16 -070056 -lboost_coroutine \
Vernon Mauery28565ac2018-08-01 09:16:56 -070057 -lstdc++fs \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050058 -export-dynamic
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053059
Patrick Williams686df742016-09-02 17:52:59 -050060# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
61# selective list of symbols.
62
Patrick Williams686df742016-09-02 17:52:59 -050063ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
Patrick Williams37af7332016-09-02 21:21:42 -050064 $(SHELL) $^ > $@
Patrick Williams686df742016-09-02 17:52:59 -050065
Ratan Gupta28c2e732017-03-04 08:53:52 +053066sensor-gen.cpp:
67 $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp
68
Tom Josephd5899e72017-05-05 11:20:34 +053069inventory-sensor-gen.cpp:
70 $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp
71
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050072fru-read-gen.cpp:
73 $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
74
Jaghathiswari Rankappagounder Natarajan9c118942019-02-12 13:22:55 -080075entity-gen.cpp:
76 $(AM_V_GEN)@ENTITYGEN@ -o $(top_builddir) generate-cpp
77
William A. Kennington III785fb072018-12-10 15:27:20 -080078providers_LTLIBRARIES += libipmi20.la
Vernon Mauery02484842018-07-24 09:15:38 -070079libipmi20_la_SOURCES = \
Patrick Venture5794fcf2017-10-26 11:11:14 -070080 app/channel.cpp \
Patrick Venture5e6ac712017-10-25 12:16:19 -070081 app/watchdog.cpp \
William A. Kennington III52575252018-02-09 15:54:56 -080082 app/watchdog_service.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050083 apphandler.cpp \
Xo Wang069db2f2017-08-09 15:31:33 -070084 sys_info_param.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050085 sensorhandler.cpp \
86 storagehandler.cpp \
87 chassishandler.cpp \
88 dcmihandler.cpp \
89 ipmisensor.cpp \
90 storageaddsel.cpp \
91 transporthandler.cpp \
92 globalhandler.cpp \
Ratan Gupta28c2e732017-03-04 08:53:52 +053093 groupext.cpp \
Tom Josephd5899e72017-05-05 11:20:34 +053094 utils.cpp \
Marri Devender Rao7d9157e2017-07-01 16:11:40 -050095 selutility.cpp \
Marri Devender Rao0acf0572017-07-03 12:25:47 -050096 ipmi_fru_info_area.cpp \
Dhruvaraj Subhashchandrane0af7202017-07-12 06:35:20 -050097 read_fru_data.cpp \
Tom Josepha9fbff42018-01-22 14:59:09 +053098 sensordatahandler.cpp \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -080099 user_channel/channelcommands.cpp \
Vernon Mauery02484842018-07-24 09:15:38 -0700100 $(libipmi20_BUILT_LIST)
Ratan Gupta28c2e732017-03-04 08:53:52 +0530101
Emily Shafferc07e72c2018-06-18 10:37:31 -0700102@CODE_COVERAGE_RULES@
103
104check_PROGRAMS =
105XFAIL_TESTS =
106
107TESTS = $(check_PROGRAMS)
108
William A. Kennington III194375f2018-12-14 02:14:33 -0800109libipmi20_la_LIBADD = \
110 libipmid/libipmid.la \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800111 user_channel/libchannellayer.la
Patrick Venturec64f8022018-11-14 19:31:15 -0800112libipmi20_la_LDFLAGS = \
113 $(SYSTEMD_LIBS) \
114 $(libmapper_LIBS) \
115 $(PHOSPHOR_LOGGING_LIBS) \
116 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
117 -lstdc++fs \
Vernon Mauery240b1862018-10-08 12:05:16 -0700118 -lboost_coroutine \
Patrick Venturec64f8022018-11-14 19:31:15 -0800119 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800120libipmi20_la_CXXFLAGS = $(COMMON_CXX)
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500121
William A. Kennington III343d0612018-12-10 15:56:24 -0800122providers_LTLIBRARIES += libusercmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800123libusercmds_la_LIBADD = \
124 libipmid/libipmid.la \
Richard Marian Thomaiyara4e09e42019-03-02 20:08:32 +0530125 user_channel/libuserlayer.la \
126 user_channel/libchannellayer.la
William A. Kennington III343d0612018-12-10 15:56:24 -0800127libusercmds_la_SOURCES = \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800128 user_channel/usercommands.cpp
William A. Kennington III343d0612018-12-10 15:56:24 -0800129libusercmds_la_LDFLAGS = \
130 $(PHOSPHOR_LOGGING_LIBS) \
131 $(LIBS) \
132 -version-info 0:0:0 -shared
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800133libusercmds_la_CXXFLAGS = $(COMMON_CXX)
William A. Kennington III343d0612018-12-10 15:56:24 -0800134
William A. Kennington III785fb072018-12-10 15:27:20 -0800135providers_LTLIBRARIES += libsysintfcmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800136libsysintfcmds_la_LIBADD = \
137 libipmid/libipmid.la \
138 libipmid-host/libipmid-host.la
Tom9e5232e2016-11-07 12:14:51 +0530139libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500140 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530141 host-interface.cpp
Patrick Venturec64f8022018-11-14 19:31:15 -0800142libsysintfcmds_la_LDFLAGS = \
143 $(SYSTEMD_LIBS) \
144 $(libmapper_LIBS) \
145 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
146 $(PHOSPHOR_LOGGING_LIBS) \
147 $(SDBUSPLUS_LIBS) \
148 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800149libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500150
Vernon Mauery783dc072018-10-08 12:05:20 -0700151libwhitelistdir = ${libdir}/ipmid-providers
152libwhitelist_LTLIBRARIES = libwhitelist.la
153libwhitelist_la_SOURCES = \
154 whitelist-filter.cpp
155libwhitelist_la_LDFLAGS = \
156 $(SYSTEMD_LIBS) \
157 $(libmapper_LIBS) \
158 $(PHOSPHOR_LOGGING_LIBS) \
159 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
160 -version-info 0:0:0 -shared
161libwhitelist_la_CXXFLAGS = $(COMMON_CXX)
162nodist_libwhitelist_la_SOURCES = ipmiwhitelist.cpp
163
Patrick Williams37af7332016-09-02 21:21:42 -0500164nobase_include_HEADERS = \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530165 user_channel/channel_layer.hpp \
William A. Kennington III194375f2018-12-14 02:14:33 -0800166 user_channel/user_layer.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500167
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530168# Forcing the build of self and then subdir
William A. Kennington III194375f2018-12-14 02:14:33 -0800169SUBDIRS = include libipmid libipmid-host user_channel . test softoff