summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-12-10 15:27:20 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-12-13 16:56:14 +0000
commit785fb071999c16a8d786e3d01406ece22bf46b0c (patch)
tree1222a83f66b0962f36e56d482c80172f1c2aee89
parent2723f38f75233368d3ec346c9527f6736e9b801e (diff)
downloadphosphor-host-ipmid-785fb071999c16a8d786e3d01406ece22bf46b0c.tar.gz
phosphor-host-ipmid-785fb071999c16a8d786e3d01406ece22bf46b0c.zip
make: Build user_channel separately
We need to make sure that libuserlayer is installed before libipmi20 tries to install + relink. Otherwise the relink will fail causing the build to sometimes fail. We can only guarantee this ordering safely by using automake SUBDIRS since they are guaranteed to be executed in order. Change-Id: I6488eecb504f72273e97cfcf336e5bbd816c4137 Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r--Makefile.am37
-rw-r--r--configure.ac2
-rw-r--r--user_channel/Makefile.am20
3 files changed, 28 insertions, 31 deletions
diff --git a/Makefile.am b/Makefile.am
index e053550..6ced8fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,8 @@
AM_DEFAULT_SOURCE_EXT = .cpp
+providersdir = ${libdir}/ipmid-providers
+providers_LTLIBRARIES =
+
sbin_PROGRAMS = \
ipmid
@@ -62,32 +65,8 @@ fru-read-gen.cpp:
channel-gen.cpp:
$(AM_V_GEN)@CHANNELGEN@ -o $(top_builddir) generate-cpp
-libuserlayerdir = ${libdir}
-libuserlayer_LTLIBRARIES = libuserlayer.la
-libuserlayer_la_SOURCES = \
- user_channel/user_layer.cpp \
- user_channel/user_mgmt.cpp \
- user_channel/passwd_mgr.cpp \
- user_channel/channel_mgmt.cpp \
- user_channel/channel_layer.cpp
-
-libuserlayer_la_LDFLAGS = \
- $(SYSTEMD_LIBS) \
- $(libmapper_LIBS) \
- $(PHOSPHOR_LOGGING_LIBS) \
- $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
- -lstdc++fs \
- $(CRYPTO_LIBS) \
- -version-info 0:0:0 -shared
-libuserlayer_la_CXXFLAGS = \
- $(SYSTEMD_CFLAGS) \
- $(libmapper_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
-
-libipmi20dir = ${libdir}/ipmid-providers
-libipmi20_LTLIBRARIES = libipmi20.la
-libipmi20_la_DEPENDENCIES = libuserlayer.la
+providers_LTLIBRARIES += libipmi20.la
+libipmi20_la_LIBADD = user_channel/libuserlayer.la
libipmi20_la_SOURCES = \
net.cpp \
app/channel.cpp \
@@ -127,7 +106,6 @@ libipmi20_la_LDFLAGS = \
$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
$(LIBS) \
-lstdc++fs \
- -luserlayer \
-version-info 0:0:0 -shared
libipmi20_la_CXXFLAGS = \
$(SYSTEMD_CFLAGS) \
@@ -137,8 +115,7 @@ libipmi20_la_CXXFLAGS = \
$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
-flto
-libsysintfcmdsdir = ${libdir}/ipmid-providers
-libsysintfcmds_LTLIBRARIES = libsysintfcmds.la
+providers_LTLIBRARIES += libsysintfcmds.la
libsysintfcmds_la_SOURCES = \
systemintfcmds.cpp \
host-interface.cpp
@@ -169,4 +146,4 @@ nobase_include_HEADERS = \
host-ipmid/oemrouter.hpp
# Forcing the build of self and then subdir
-SUBDIRS = . test softoff
+SUBDIRS = user_channel . test softoff
diff --git a/configure.ac b/configure.ac
index 407c109..8d5e6dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,5 +167,5 @@ AS_IF([test "x$HOST_IPMI_LIB_PATH" == "x"], [HOST_IPMI_LIB_PATH="/usr/lib/host-i
AC_DEFINE_UNQUOTED([HOST_IPMI_LIB_PATH], ["$HOST_IPMI_LIB_PATH"], [The file path to search for libraries.])
# Create configured output
-AC_CONFIG_FILES([Makefile test/Makefile softoff/Makefile])
+AC_CONFIG_FILES([Makefile test/Makefile softoff/Makefile user_channel/Makefile])
AC_OUTPUT
diff --git a/user_channel/Makefile.am b/user_channel/Makefile.am
new file mode 100644
index 0000000..0b62ada
--- /dev/null
+++ b/user_channel/Makefile.am
@@ -0,0 +1,20 @@
+lib_LTLIBRARIES = libuserlayer.la
+libuserlayer_la_SOURCES = \
+ user_layer.cpp \
+ user_mgmt.cpp \
+ passwd_mgr.cpp \
+ channel_mgmt.cpp \
+ channel_layer.cpp
+libuserlayer_la_LDFLAGS = \
+ $(SYSTEMD_LIBS) \
+ $(libmapper_LIBS) \
+ $(PHOSPHOR_LOGGING_LIBS) \
+ $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
+ -lstdc++fs \
+ $(CRYPTO_LIBS) \
+ -version-info 0:0:0 -shared
+libuserlayer_la_CXXFLAGS = \
+ $(SYSTEMD_CFLAGS) \
+ $(libmapper_CFLAGS) \
+ $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
OpenPOWER on IntegriCloud