blob: e7a35a80599fd3b7f8405c7432ddfe34e50c1ad0 [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 \
Jaghathiswari Rankappagounder Natarajan9c118942019-02-12 13:22:55 -080028 fru-read-gen.cpp \
29 entity-gen.cpp
Tom Josepha9fbff42018-01-22 14:59:09 +053030
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050031BUILT_SOURCES = \
Patrick Venturec64f8022018-11-14 19:31:15 -080032 ipmiwhitelist.cpp \
33 $(libipmi20_BUILT_LIST)
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050034
Ratan Gupta28c2e732017-03-04 08:53:52 +053035CLEANFILES = $(BUILT_SOURCES)
Patrick Williams686df742016-09-02 17:52:59 -050036
Vernon Mauery1e3455a2018-11-30 13:10:54 -080037COMMON_CXX = \
38 -flto \
39 -Wno-psabi \
40 $(SYSTEMD_CFLAGS) \
41 $(libmapper_CFLAGS) \
42 $(SDBUSPLUS_CFLAGS) \
43 $(PHOSPHOR_LOGGING_CFLAGS) \
44 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturec64f8022018-11-14 19:31:15 -080045 -DBOOST_ERROR_CODE_HEADER_ONLY \
46 -DBOOST_SYSTEM_NO_DEPRECATED \
Vernon Mauerye7329c72018-10-08 12:05:16 -070047 -DBOOST_COROUTINES_NO_DEPRECATION_WARNING \
48 -DBOOST_ASIO_DISABLE_THREADS \
Patrick Venturec64f8022018-11-14 19:31:15 -080049 -DBOOST_ALL_NO_LIB
50
Vernon Mauery1e3455a2018-11-30 13:10:54 -080051ipmid_CXXFLAGS = $(COMMON_CXX)
William A. Kennington III194375f2018-12-14 02:14:33 -080052ipmid_LDADD = \
53 libipmid/libipmid.la \
Vernon Mauery240b1862018-10-08 12:05:16 -070054 user_channel/libchannellayer.la \
William A. Kennington III194375f2018-12-14 02:14:33 -080055 libipmid-host/libipmid-host.la
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050056ipmid_LDFLAGS = \
57 $(SYSTEMD_LIBS) \
58 $(libmapper_LIBS) \
59 $(LIBADD_DLOPEN) \
60 $(PHOSPHOR_LOGGING_LIBS) \
61 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053062 $(CRYPTO_LIBS) \
Vernon Mauery240b1862018-10-08 12:05:16 -070063 -lboost_coroutine \
Vernon Mauery28565ac2018-08-01 09:16:56 -070064 -lstdc++fs \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050065 -export-dynamic
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053066
Patrick Williams686df742016-09-02 17:52:59 -050067# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
68# selective list of symbols.
69
Patrick Williams686df742016-09-02 17:52:59 -050070ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
Patrick Williams37af7332016-09-02 21:21:42 -050071 $(SHELL) $^ > $@
Patrick Williams686df742016-09-02 17:52:59 -050072
Vernon Mauery5f7ac712019-04-30 11:19:08 -070073sensor-gen.cpp: scripts/writesensor.mako.cpp scripts/sensor_gen.py @SENSOR_YAML_GEN@
Ratan Gupta28c2e732017-03-04 08:53:52 +053074 $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp
75
Vernon Mauery5f7ac712019-04-30 11:19:08 -070076inventory-sensor-gen.cpp: scripts/inventorysensor.mako.cpp scripts/inventory-sensor.py @INVSENSOR_YAML_GEN@
Tom Josephd5899e72017-05-05 11:20:34 +053077 $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp
78
Vernon Mauery5f7ac712019-04-30 11:19:08 -070079fru-read-gen.cpp: scripts/readfru.mako.cpp scripts/fru_gen.py @FRU_YAML_GEN@
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050080 $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
81
Vernon Mauery5f7ac712019-04-30 11:19:08 -070082entity-gen.cpp: scripts/writeentity.mako.cpp scripts/entity_gen.py @ENTITY_YAML_GEN@
Jaghathiswari Rankappagounder Natarajan9c118942019-02-12 13:22:55 -080083 $(AM_V_GEN)@ENTITYGEN@ -o $(top_builddir) generate-cpp
84
William A. Kennington III785fb072018-12-10 15:27:20 -080085providers_LTLIBRARIES += libipmi20.la
Vernon Mauery02484842018-07-24 09:15:38 -070086libipmi20_la_SOURCES = \
Patrick Venture5794fcf2017-10-26 11:11:14 -070087 app/channel.cpp \
Patrick Venture5e6ac712017-10-25 12:16:19 -070088 app/watchdog.cpp \
William A. Kennington III52575252018-02-09 15:54:56 -080089 app/watchdog_service.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050090 apphandler.cpp \
Xo Wang069db2f2017-08-09 15:31:33 -070091 sys_info_param.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050092 sensorhandler.cpp \
93 storagehandler.cpp \
94 chassishandler.cpp \
95 dcmihandler.cpp \
96 ipmisensor.cpp \
97 storageaddsel.cpp \
98 transporthandler.cpp \
99 globalhandler.cpp \
Ratan Gupta28c2e732017-03-04 08:53:52 +0530100 groupext.cpp \
Marri Devender Rao7d9157e2017-07-01 16:11:40 -0500101 selutility.cpp \
Marri Devender Rao0acf0572017-07-03 12:25:47 -0500102 ipmi_fru_info_area.cpp \
Dhruvaraj Subhashchandrane0af7202017-07-12 06:35:20 -0500103 read_fru_data.cpp \
Tom Josepha9fbff42018-01-22 14:59:09 +0530104 sensordatahandler.cpp \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800105 user_channel/channelcommands.cpp \
Vernon Mauery02484842018-07-24 09:15:38 -0700106 $(libipmi20_BUILT_LIST)
Ratan Gupta28c2e732017-03-04 08:53:52 +0530107
Emily Shafferc07e72c2018-06-18 10:37:31 -0700108check_PROGRAMS =
109XFAIL_TESTS =
110
111TESTS = $(check_PROGRAMS)
112
William A. Kennington III194375f2018-12-14 02:14:33 -0800113libipmi20_la_LIBADD = \
114 libipmid/libipmid.la \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800115 user_channel/libchannellayer.la
Patrick Venturec64f8022018-11-14 19:31:15 -0800116libipmi20_la_LDFLAGS = \
117 $(SYSTEMD_LIBS) \
118 $(libmapper_LIBS) \
119 $(PHOSPHOR_LOGGING_LIBS) \
120 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
121 -lstdc++fs \
Vernon Mauery240b1862018-10-08 12:05:16 -0700122 -lboost_coroutine \
Patrick Venturec64f8022018-11-14 19:31:15 -0800123 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800124libipmi20_la_CXXFLAGS = $(COMMON_CXX)
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500125
William A. Kennington III343d0612018-12-10 15:56:24 -0800126providers_LTLIBRARIES += libusercmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800127libusercmds_la_LIBADD = \
128 libipmid/libipmid.la \
Richard Marian Thomaiyara4e09e42019-03-02 20:08:32 +0530129 user_channel/libuserlayer.la \
130 user_channel/libchannellayer.la
William A. Kennington III343d0612018-12-10 15:56:24 -0800131libusercmds_la_SOURCES = \
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800132 user_channel/usercommands.cpp
William A. Kennington III343d0612018-12-10 15:56:24 -0800133libusercmds_la_LDFLAGS = \
134 $(PHOSPHOR_LOGGING_LIBS) \
Suryakanth Sekar90b00c72019-01-16 10:37:57 +0530135 $(libmapper_LIBS) \
William A. Kennington III343d0612018-12-10 15:56:24 -0800136 -version-info 0:0:0 -shared
Vernon Mauery1bb0c7f2018-12-21 10:59:19 -0800137libusercmds_la_CXXFLAGS = $(COMMON_CXX)
William A. Kennington III343d0612018-12-10 15:56:24 -0800138
William A. Kennington III785fb072018-12-10 15:27:20 -0800139providers_LTLIBRARIES += libsysintfcmds.la
William A. Kennington III194375f2018-12-14 02:14:33 -0800140libsysintfcmds_la_LIBADD = \
141 libipmid/libipmid.la \
142 libipmid-host/libipmid-host.la
Tom9e5232e2016-11-07 12:14:51 +0530143libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500144 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530145 host-interface.cpp
Patrick Venturec64f8022018-11-14 19:31:15 -0800146libsysintfcmds_la_LDFLAGS = \
147 $(SYSTEMD_LIBS) \
148 $(libmapper_LIBS) \
149 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
150 $(PHOSPHOR_LOGGING_LIBS) \
151 $(SDBUSPLUS_LIBS) \
152 -version-info 0:0:0 -shared
Vernon Mauery1e3455a2018-11-30 13:10:54 -0800153libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500154
Vernon Mauery783dc072018-10-08 12:05:20 -0700155libwhitelistdir = ${libdir}/ipmid-providers
156libwhitelist_LTLIBRARIES = libwhitelist.la
157libwhitelist_la_SOURCES = \
158 whitelist-filter.cpp
159libwhitelist_la_LDFLAGS = \
160 $(SYSTEMD_LIBS) \
161 $(libmapper_LIBS) \
162 $(PHOSPHOR_LOGGING_LIBS) \
163 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
164 -version-info 0:0:0 -shared
165libwhitelist_la_CXXFLAGS = $(COMMON_CXX)
166nodist_libwhitelist_la_SOURCES = ipmiwhitelist.cpp
167
Patrick Williams37af7332016-09-02 21:21:42 -0500168nobase_include_HEADERS = \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530169 user_channel/channel_layer.hpp \
William A. Kennington III194375f2018-12-14 02:14:33 -0800170 user_channel/user_layer.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500171
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530172# Forcing the build of self and then subdir
William A. Kennington III194375f2018-12-14 02:14:33 -0800173SUBDIRS = include libipmid libipmid-host user_channel . test softoff