Add an option to exclude libuserlayer from host-ipmid

Change-Id: I8e14cfd3719c7fbef739f2aa01771bc4321ce290
Signed-off-by: Ofer Yehielli <ofery@google.com>
Tested: Enabled the exclude libuserlayer flag in
recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+EXTRA_OECONF_append_xxx = " --disable-libuserlayer"
+HOSTIPMI_PROVIDER_LIBRARY_remove_xxx = "libusercmds.so"
+NETIPMI_PROVIDER_LIBRARY_remove_xxx = "libusercmds.so"
Clean build and test that userlayer.so doesn't get included in the build
diff --git a/Makefile.am b/Makefile.am
index e7a35a8..dc3e91e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -123,6 +123,7 @@
 	-version-info 0:0:0 -shared
 libipmi20_la_CXXFLAGS = $(COMMON_CXX)
 
+if FEATURE_LIBUSERLAYER
 providers_LTLIBRARIES += libusercmds.la
 libusercmds_la_LIBADD = \
 	libipmid/libipmid.la \
@@ -135,6 +136,7 @@
 	$(libmapper_LIBS) \
 	-version-info 0:0:0 -shared
 libusercmds_la_CXXFLAGS = $(COMMON_CXX)
+endif
 
 providers_LTLIBRARIES += libsysintfcmds.la
 libsysintfcmds_la_LIBADD = \