blob: c9ce2fffbd99a895060916aeb96a905f2828568b [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 = \
Patrick Venturec64f8022018-11-14 19:31:15 -080021 ipmiwhitelist.cpp \
22 $(libipmi20_BUILT_LIST)
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050023
Ratan Gupta28c2e732017-03-04 08:53:52 +053024CLEANFILES = $(BUILT_SOURCES)
Patrick Williams686df742016-09-02 17:52:59 -050025
Patrick Venturec64f8022018-11-14 19:31:15 -080026BOOST_CXX = \
27 -DBOOST_ERROR_CODE_HEADER_ONLY \
28 -DBOOST_SYSTEM_NO_DEPRECATED \
29 -DBOOST_ALL_NO_LIB
30
Patrick Venture15e95f22018-11-14 19:25:08 -080031ipmid_CXXFLAGS = \
Patrick Venturec64f8022018-11-14 19:31:15 -080032 $(BOOST_CXX) \
33 $(PHOSPHOR_LOGGING_CFLAGS) \
34 $(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) \
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053042 $(CRYPTO_LIBS) \
Vernon Mauery28565ac2018-08-01 09:16:56 -070043 -lstdc++fs \
44 -pthread \
Deepak Kodihalli18aa0442017-07-21 07:07:09 -050045 -export-dynamic
Vishwanatha Subbannaac149a92017-07-11 18:16:50 +053046
Patrick Williams686df742016-09-02 17:52:59 -050047# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
48# selective list of symbols.
49
Patrick Williams686df742016-09-02 17:52:59 -050050ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
Patrick Williams37af7332016-09-02 21:21:42 -050051 $(SHELL) $^ > $@
Patrick Williams686df742016-09-02 17:52:59 -050052
Ratan Gupta28c2e732017-03-04 08:53:52 +053053sensor-gen.cpp:
54 $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp
55
Tom Josephd5899e72017-05-05 11:20:34 +053056inventory-sensor-gen.cpp:
57 $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp
58
Marri Devender Raoa62bacc2017-06-04 23:40:16 -050059fru-read-gen.cpp:
60 $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
61
Patrick Venturec01edf22017-12-22 14:03:06 -080062channel-gen.cpp:
63 $(AM_V_GEN)@CHANNELGEN@ -o $(top_builddir) generate-cpp
64
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053065libuserlayerdir = ${libdir}
66libuserlayer_LTLIBRARIES = libuserlayer.la
67libuserlayer_la_SOURCES = \
68 user_channel/user_layer.cpp \
Richard Marian Thomaiyar5a6b6362018-03-12 23:42:34 +053069 user_channel/user_mgmt.cpp \
AppaRao Puli071f3f22018-05-24 16:45:30 +053070 user_channel/passwd_mgr.cpp \
71 user_channel/channel_mgmt.cpp \
72 user_channel/channel_layer.cpp
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053073
Patrick Venturec64f8022018-11-14 19:31:15 -080074libuserlayer_la_LDFLAGS = \
75 $(SYSTEMD_LIBS) \
76 $(libmapper_LIBS) \
77 $(PHOSPHOR_LOGGING_LIBS) \
78 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
79 -lstdc++fs \
80 $(LIBPAM) $(LIBCRYPT) -lpam_misc -lssl \
81 -version-info 0:0:0 -shared
82libuserlayer_la_CXXFLAGS = \
83 $(SYSTEMD_CFLAGS) \
84 $(libmapper_CFLAGS) \
85 $(PHOSPHOR_LOGGING_CFLAGS) \
86 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
87
Vernon Mauery02484842018-07-24 09:15:38 -070088libipmi20dir = ${libdir}/ipmid-providers
89libipmi20_LTLIBRARIES = libipmi20.la
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +053090libipmi20_la_DEPENDENCIES = libuserlayer.la
Vernon Mauery02484842018-07-24 09:15:38 -070091libipmi20_la_SOURCES = \
Patrick Venturec7c1c3c2017-11-15 14:29:18 -080092 net.cpp \
Patrick Venture5794fcf2017-10-26 11:11:14 -070093 app/channel.cpp \
Patrick Venture5e6ac712017-10-25 12:16:19 -070094 app/watchdog.cpp \
William A. Kennington III52575252018-02-09 15:54:56 -080095 app/watchdog_service.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050096 apphandler.cpp \
Xo Wang069db2f2017-08-09 15:31:33 -070097 sys_info_param.cpp \
Matthew Barth3cff7ed2016-07-27 14:50:51 -050098 sensorhandler.cpp \
99 storagehandler.cpp \
100 chassishandler.cpp \
101 dcmihandler.cpp \
102 ipmisensor.cpp \
103 storageaddsel.cpp \
104 transporthandler.cpp \
105 globalhandler.cpp \
Ratan Gupta28c2e732017-03-04 08:53:52 +0530106 groupext.cpp \
Tom Josephd5899e72017-05-05 11:20:34 +0530107 utils.cpp \
Marri Devender Rao7d9157e2017-07-01 16:11:40 -0500108 selutility.cpp \
Marri Devender Rao0acf0572017-07-03 12:25:47 -0500109 ipmi_fru_info_area.cpp \
Dhruvaraj Subhashchandrane0af7202017-07-12 06:35:20 -0500110 read_fru_data.cpp \
Tom Josepha9fbff42018-01-22 14:59:09 +0530111 sensordatahandler.cpp \
Richard Marian Thomaiyar5a6b6362018-03-12 23:42:34 +0530112 user_channel/usercommands.cpp \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530113 user_channel/channelcommands.cpp \
Vernon Mauery02484842018-07-24 09:15:38 -0700114 $(libipmi20_BUILT_LIST)
Ratan Gupta28c2e732017-03-04 08:53:52 +0530115
Emily Shafferc07e72c2018-06-18 10:37:31 -0700116@CODE_COVERAGE_RULES@
117
118check_PROGRAMS =
119XFAIL_TESTS =
120
121TESTS = $(check_PROGRAMS)
122
Patrick Venturec64f8022018-11-14 19:31:15 -0800123libipmi20_la_LDFLAGS = \
124 $(SYSTEMD_LIBS) \
125 $(libmapper_LIBS) \
126 $(PHOSPHOR_LOGGING_LIBS) \
127 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
128 -lstdc++fs \
129 -luserlayer \
130 -version-info 0:0:0 -shared
131libipmi20_la_CXXFLAGS = \
132 $(SYSTEMD_CFLAGS) \
133 $(libmapper_CFLAGS) \
134 $(BOOST_CXX) \
135 $(PHOSPHOR_LOGGING_CFLAGS) \
Andrew Geissler33f9fee2018-08-27 11:14:03 -0500136 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
137 -flto
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500138
Tom8485aa12016-11-22 16:46:50 +0530139libsysintfcmdsdir = ${libdir}/ipmid-providers
Tom9e5232e2016-11-07 12:14:51 +0530140libsysintfcmds_LTLIBRARIES = libsysintfcmds.la
141libsysintfcmds_la_SOURCES = \
Andrew Geissler12866372017-03-21 22:58:28 -0500142 systemintfcmds.cpp \
Vishwanatha Subbanna3eb117a2017-07-12 16:13:49 +0530143 host-interface.cpp
Patrick Venturec64f8022018-11-14 19:31:15 -0800144libsysintfcmds_la_LDFLAGS = \
145 $(SYSTEMD_LIBS) \
146 $(libmapper_LIBS) \
147 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
148 $(PHOSPHOR_LOGGING_LIBS) \
149 $(SDBUSPLUS_LIBS) \
150 -version-info 0:0:0 -shared
151libsysintfcmds_la_CXXFLAGS = \
152 $(SYSTEMD_CFLAGS) \
153 $(BOOST_CXX) \
154 $(libmapper_CFLAGS) \
155 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
156 $(PHOSPHOR_LOGGING_CFLAGS) \
157 $(SDBUSPLUS_CFLAGS) \
158 -flto
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -0500159
Patrick Williams37af7332016-09-02 21:21:42 -0500160nobase_include_HEADERS = \
Patrick Venturedd0459e2018-09-08 09:27:16 -0700161 host-ipmid/iana.hpp \
Richard Marian Thomaiyar4654d992018-04-19 05:38:37 +0530162 user_channel/user_layer.hpp \
AppaRao Puli071f3f22018-05-24 16:45:30 +0530163 user_channel/channel_layer.hpp \
Vishwanatha Subbanna6e8979d2017-07-13 16:48:20 +0530164 host-ipmid/ipmid-api.h \
165 host-ipmid/ipmid-host-cmd.hpp \
Peter Hanson4a589852017-06-07 17:40:45 -0700166 host-ipmid/ipmid-host-cmd-utils.hpp \
167 host-ipmid/oemopenbmc.hpp \
168 host-ipmid/oemrouter.hpp
Matthew Barth3cff7ed2016-07-27 14:50:51 -0500169
Vishwanatha Subbanna506aa0f2017-01-24 14:58:25 +0530170# Forcing the build of self and then subdir
171SUBDIRS = . test softoff