blob: a5dfdabcf313968606a86270f29911fb66a47611 [file] [log] [blame]
Matthew Barth3cff7ed2016-07-27 14:50:51 -05001AM_DEFAULT_SOURCE_EXT = .cpp
2
Patrick Williams686df742016-09-02 17:52:59 -05003sbin_PROGRAMS = \
4 ipmid
Matthew Barth3cff7ed2016-07-27 14:50:51 -05005
6ipmid_SOURCES = \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -05007 ipmid.cpp \
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +05308 settings.cpp \
9 host-cmd-manager.cpp \
Peter Hanson4a589852017-06-07 17:40:45 -070010 utils.cpp \
11 oemrouter.cpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -050012nodist_ipmid_SOURCES = ipmiwhitelist.cpp
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050013
Vernon Mauery02484842018-07-24 09:15:38 -070014libipmi20_BUILT_LIST = \
Tom Josepha9fbff42018-01-22 14:59:09 +053015 sensor-gen.cpp \
16 inventory-sensor-gen.cpp \
17 fru-read-gen.cpp \
18 channel-gen.cpp
19
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050020BUILT_SOURCES = \
21 ipmiwhitelist.cpp \
Vernon Mauery02484842018-07-24 09:15:38 -070022 $(libipmi20_BUILT_LIST)
Tom Josepha9fbff42018-01-22 14:59:09 +053023
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050024
Ratan Gupta28c2e732017-03-04 08:53:52 +053025CLEANFILES = $(BUILT_SOURCES)
Patrick Williams686df742016-09-02 17:52:59 -050026
Vernon Mauery28565ac2018-08-01 09:16:56 -070027BOOST_CXX = -DBOOST_ERROR_CODE_HEADER_ONLY \
28 -DBOOST_SYSTEM_NO_DEPRECATED \
29 -DBOOST_ALL_NO_LIB
Matthew Barth3cff7ed2016-07-27 14:50:51 -050030#TODO - Make this path a configure option (bitbake parameter)
Vernon Mauery28565ac2018-08-01 09:16:56 -070031ipmid_CXXFLAGS = -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" \
32 $(BOOST_CXX) \
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053033 $(PHOSPHOR_LOGGING_CFLAGS) \
Andrew Geissler33f9fee2018-08-27 11:14:03 -050034 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
35 -flto
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050036ipmid_LDFLAGS = \
37 $(SYSTEMD_LIBS) \
38 $(libmapper_LIBS) \
39 $(LIBADD_DLOPEN) \
40 $(PHOSPHOR_LOGGING_LIBS) \
41 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Vernon Mauery28565ac2018-08-01 09:16:56 -070042 -lstdc++fs \
43 -pthread \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050044 -export-dynamic
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053045
Patrick Williams686df742016-09-02 17:52:59 -050046# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
47# selective list of symbols.
48
Patrick Williams686df742016-09-02 17:52:59 -050049ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
Patrick Williams37af7332016-09-02 21:21:42 -050050 $(SHELL) $^ > $@
Patrick Williams686df742016-09-02 17:52:59 -050051
Ratan Gupta28c2e732017-03-04 08:53:52 +053052sensor-gen.cpp:
53 $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp
54
Tom Josephd5899e72017-05-05 11:20:34 +053055inventory-sensor-gen.cpp:
56 $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp
57
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050058fru-read-gen.cpp:
59 $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
60
Patrick Venturec01edf22017-12-22 14:03:06 -080061channel-gen.cpp:
62 $(AM_V_GEN)@CHANNELGEN@ -o $(top_builddir) generate-cpp
63
Vernon Mauery02484842018-07-24 09:15:38 -070064libipmi20dir = ${libdir}/ipmid-providers
65libipmi20_LTLIBRARIES = libipmi20.la
66libipmi20_la_SOURCES = \
Patrick Venturec7c1c3c2017-11-15 14:29:18 -080067 net.cpp \
Patrick Venture5794fcf2017-10-26 11:11:14 -070068 app/channel.cpp \
Patrick Venture5e6ac712017-10-25 12:16:19 -070069 app/watchdog.cpp \
William A. Kennington III52575252018-02-09 15:54:56 -080070 app/watchdog_service.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050071 apphandler.cpp \
Xo Wang069db2f2017-08-09 15:31:33 -070072 sys_info_param.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050073 sensorhandler.cpp \
74 storagehandler.cpp \
75 chassishandler.cpp \
76 dcmihandler.cpp \
77 ipmisensor.cpp \
78 storageaddsel.cpp \
79 transporthandler.cpp \
80 globalhandler.cpp \
Ratan Gupta28c2e732017-03-04 08:53:52 +053081 groupext.cpp \
Tom Josephd5899e72017-05-05 11:20:34 +053082 utils.cpp \
Marri Devender Rao7d9157e2017-07-01 16:11:40 -050083 selutility.cpp \
Marri Devender Rao0acf0572017-07-03 12:25:47 -050084 ipmi_fru_info_area.cpp \
Dhruvaraj Subhashchandrane0af7202017-07-12 06:35:20 -050085 read_fru_data.cpp \
Tom Josepha9fbff42018-01-22 14:59:09 +053086 sensordatahandler.cpp \
Vernon Mauery02484842018-07-24 09:15:38 -070087 $(libipmi20_BUILT_LIST)
Ratan Gupta28c2e732017-03-04 08:53:52 +053088
Emily Shafferc07e72c2018-06-18 10:37:31 -070089@CODE_COVERAGE_RULES@
90
91check_PROGRAMS =
92XFAIL_TESTS =
93
94TESTS = $(check_PROGRAMS)
95
Vernon Mauery02484842018-07-24 09:15:38 -070096libipmi20_la_LDFLAGS = $(SYSTEMD_LIBS) $(libmapper_LIBS) \
97 $(PHOSPHOR_LOGGING_LIBS) $(PHOSPHOR_DBUS_INTERFACES_LIBS) -lstdc++fs \
98 -version-info 0:0:0 -shared
99libipmi20_la_CXXFLAGS = $(SYSTEMD_CFLAGS) $(libmapper_CFLAGS) \
Vernon Mauery28565ac2018-08-01 09:16:56 -0700100 $(BOOST_CXX) $(PHOSPHOR_LOGGING_CFLAGS) \
Andrew Geissler33f9fee2018-08-27 11:14:03 -0500101 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
102 -flto
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500103
Tom8485aa12016-11-22 16:46:50 +0530104libsysintfcmdsdir = ${libdir}/ipmid-providers
Tom9e5232e2016-11-07 12:14:51 +0530105libsysintfcmds_LTLIBRARIES = libsysintfcmds.la
106libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500107 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530108 host-interface.cpp
Andrew Geissler12866372017-03-21 22:58:28 -0500109libsysintfcmds_la_LDFLAGS = $(SYSTEMD_LIBS) \
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500110 $(libmapper_LIBS) \
111 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Andrew Geissler12866372017-03-21 22:58:28 -0500112 $(PHOSPHOR_LOGGING_LIBS) \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530113 $(SDBUSPLUS_LIBS) \
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500114 -version-info 0:0:0 -shared
Andrew Geissler12866372017-03-21 22:58:28 -0500115libsysintfcmds_la_CXXFLAGS = $(SYSTEMD_CFLAGS) \
Vernon Mauery28565ac2018-08-01 09:16:56 -0700116 $(BOOST_CXX) \
Andrew Geissler12866372017-03-21 22:58:28 -0500117 $(libmapper_CFLAGS) \
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500118 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530119 $(PHOSPHOR_LOGGING_CFLAGS) \
Andrew Geissler33f9fee2018-08-27 11:14:03 -0500120 $(SDBUSPLUS_CFLAGS) \
121 -flto
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500122
Patrick Williams37af7332016-09-02 21:21:42 -0500123nobase_include_HEADERS = \
Patrick Venturedd0459e2018-09-08 09:27:16 -0700124 host-ipmid/iana.hpp \
Vishwanatha Subbanna6e8979d2017-07-13 16:48:20 +0530125 host-ipmid/ipmid-api.h \
126 host-ipmid/ipmid-host-cmd.hpp \
Peter Hanson4a589852017-06-07 17:40:45 -0700127 host-ipmid/ipmid-host-cmd-utils.hpp \
128 host-ipmid/oemopenbmc.hpp \
129 host-ipmid/oemrouter.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500130
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530131# Forcing the build of self and then subdir
132SUBDIRS = . test softoff