ipmid: move channel code from libuserlayer to libchannellayer

Separate the channel implementation from the user implementation. It is
possible to link only against the channel layer, but if code is using
the user layer, it is likely to need both user and channel code.

This makes it so that ipmid can support the notion of channels without
supporting users.

Change-Id: I3a7eb7c004e1c2f8aeb696180139cf68c2c4aac0
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/Makefile.am b/Makefile.am
index 20af6ed..bb7bdbf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -95,6 +95,7 @@
 	ipmi_fru_info_area.cpp \
 	read_fru_data.cpp \
 	sensordatahandler.cpp \
+	user_channel/channelcommands.cpp \
 	$(libipmi20_BUILT_LIST)
 
 @CODE_COVERAGE_RULES@
@@ -106,8 +107,7 @@
 
 libipmi20_la_LIBADD = \
 	libipmid/libipmid.la \
-	user_channel/libchannellayer.la \
-	user_channel/libuserlayer.la
+	user_channel/libchannellayer.la
 libipmi20_la_LDFLAGS = \
 	$(SYSTEMD_LIBS) \
 	$(libmapper_LIBS) \
@@ -122,15 +122,12 @@
 	libipmid/libipmid.la \
 	user_channel/libuserlayer.la
 libusercmds_la_SOURCES = \
-	user_channel/usercommands.cpp \
-	user_channel/channelcommands.cpp
+	user_channel/usercommands.cpp
 libusercmds_la_LDFLAGS = \
 	$(PHOSPHOR_LOGGING_LIBS) \
 	$(LIBS) \
 	-version-info 0:0:0 -shared
-libusercmds_la_CXXFLAGS = \
-	$(PHOSPHOR_LOGGING_CFLAGS) \
-	-flto
+libusercmds_la_CXXFLAGS = $(COMMON_CXX)
 
 providers_LTLIBRARIES += libsysintfcmds.la
 libsysintfcmds_la_LIBADD = \