Create libipmid and libipmid-host

This starts a transition to common ipmid libraries that providers can
link against. It will allow for a cleaner separation between common
ipmid functionality and daemon type specific code. This is needed so we
can resolve all of the symbols in the providers at link time instead of
discovering bad linkage by building and running a full ipmi daemon.

In future commits libraries will be packaged for libipmid and libipmid-host
which provide all of the symbols used by the current set of ipmid
providers.

This is the first step, it just separates and renames the headers.
Legacy symlinks are still kept around for compatability. It also adds
stub libraries so that external users can start linking as intended.

Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/Makefile.am b/Makefile.am
index 39f1344..ac8449e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,8 @@
 AM_DEFAULT_SOURCE_EXT = .cpp
 
+AM_CPPFLAGS = -I$(abs_srcdir) -I$(abs_srcdir)/include
+export AM_CPPFLAGS
+
 providersdir = ${libdir}/ipmid-providers
 providers_LTLIBRARIES =
 
@@ -38,6 +41,9 @@
 	-DBOOST_ALL_NO_LIB
 
 ipmid_CXXFLAGS = $(COMMON_CXX)
+ipmid_LDADD = \
+	libipmid/libipmid.la \
+	libipmid-host/libipmid-host.la
 ipmid_LDFLAGS = \
 	$(SYSTEMD_LIBS) \
 	$(libmapper_LIBS) \
@@ -94,7 +100,9 @@
 
 TESTS = $(check_PROGRAMS)
 
-libipmi20_la_LIBADD = user_channel/libuserlayer.la
+libipmi20_la_LIBADD = \
+	libipmid/libipmid.la \
+	user_channel/libuserlayer.la
 libipmi20_la_LDFLAGS = \
 	$(SYSTEMD_LIBS) \
 	$(libmapper_LIBS) \
@@ -105,7 +113,9 @@
 libipmi20_la_CXXFLAGS = $(COMMON_CXX)
 
 providers_LTLIBRARIES += libusercmds.la
-libusercmds_la_LIBADD = user_channel/libuserlayer.la
+libusercmds_la_LIBADD = \
+	libipmid/libipmid.la \
+	user_channel/libuserlayer.la
 libusercmds_la_SOURCES = \
 	user_channel/usercommands.cpp \
 	user_channel/channelcommands.cpp
@@ -118,6 +128,9 @@
 	-flto
 
 providers_LTLIBRARIES += libsysintfcmds.la
+libsysintfcmds_la_LIBADD = \
+	libipmid/libipmid.la \
+	libipmid-host/libipmid-host.la
 libsysintfcmds_la_SOURCES = \
 	systemintfcmds.cpp \
 	host-interface.cpp
@@ -131,14 +144,8 @@
 libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
 
 nobase_include_HEADERS = \
-	host-ipmid/iana.hpp \
-	user_channel/user_layer.hpp \
 	user_channel/channel_layer.hpp \
-	host-ipmid/ipmid-api.h \
-	host-ipmid/ipmid-host-cmd.hpp \
-	host-ipmid/ipmid-host-cmd-utils.hpp \
-	host-ipmid/oemopenbmc.hpp \
-	host-ipmid/oemrouter.hpp
+	user_channel/user_layer.hpp
 
 # Forcing the build of self and then subdir
-SUBDIRS = user_channel . test softoff
+SUBDIRS = include libipmid libipmid-host user_channel . test softoff