blob: ac8449ee5ade82cf106da1a86ea93ab0cf07a867 [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 \
105 user_channel/libuserlayer.la
Patrick Venturec64f8022018-11-14 19:31:15 -0800106libipmi20_la_LDFLAGS = \
107 $(SYSTEMD_LIBS) \
108 $(libmapper_LIBS) \
109 $(PHOSPHOR_LOGGING_LIBS) \
110 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
111 -lstdc++fs \
Patrick Venturec64f8022018-11-14 19:31:15 -0800112 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800113libipmi20_la_CXXFLAGS = $(COMMON_CXX)
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500114
William A. Kennington III343d0612018-12-10 15:56:24 -0800115providers_LTLIBRARIES += libusercmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800116libusercmds_la_LIBADD = \
117 libipmid/libipmid.la \
118 user_channel/libuserlayer.la
William A. Kennington III343d0612018-12-10 15:56:24 -0800119libusercmds_la_SOURCES = \
120 user_channel/usercommands.cpp \
121 user_channel/channelcommands.cpp
122libusercmds_la_LDFLAGS = \
123 $(PHOSPHOR_LOGGING_LIBS) \
124 $(LIBS) \
125 -version-info 0:0:0 -shared
126libusercmds_la_CXXFLAGS = \
127 $(PHOSPHOR_LOGGING_CFLAGS) \
128 -flto
129
William A. Kennington III785fb072018-12-10 15:27:20 -0800130providers_LTLIBRARIES += libsysintfcmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800131libsysintfcmds_la_LIBADD = \
132 libipmid/libipmid.la \
133 libipmid-host/libipmid-host.la
Tom9e5232e2016-11-07 12:14:51 +0530134libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500135 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530136 host-interface.cpp
Patrick Venturec64f8022018-11-14 19:31:15 -0800137libsysintfcmds_la_LDFLAGS = \
138 $(SYSTEMD_LIBS) \
139 $(libmapper_LIBS) \
140 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
141 $(PHOSPHOR_LOGGING_LIBS) \
142 $(SDBUSPLUS_LIBS) \
143 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800144libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500145
Patrick Williams37af7332016-09-02 21:21:42 -0500146nobase_include_HEADERS = \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530147 user_channel/channel_layer.hpp \
William A. Kennington III194375f2018-12-14 02:14:33 -0800148 user_channel/user_layer.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500149
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530150# Forcing the build of self and then subdir
William A. Kennington III194375f2018-12-14 02:14:33 -0800151SUBDIRS = include libipmid libipmid-host user_channel . test softoff