Reorganize directory structure

Moving to directory per-application layout.  This facilitates
building single applications which is useful in the Yocto build
environment since different applications satisfy different OpenBMC
build requirements.

A number of issues are also addressed:
 - All applications were pulling in libsystemd and the gdbus libs
    irrespective of whether or not they were needed.
 - gpio.o duplicated in every application - moved to libopenbmc_intf
 - Added install target

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/boardvpd/Makefile b/boardvpd/Makefile
new file mode 100644
index 0000000..e19c0db
--- /dev/null
+++ b/boardvpd/Makefile
@@ -0,0 +1,3 @@
+BINS=board_vpd
+include ../gdbus.mk
+include ../rules.mk
diff --git a/boardvpd/board_vpd_obj.c b/boardvpd/board_vpd_obj.c
new file mode 100644
index 0000000..b6c2119
--- /dev/null
+++ b/boardvpd/board_vpd_obj.c
@@ -0,0 +1,59 @@
+#include "interfaces/openbmc_intf.h"
+#include "openbmc.h"
+
+
+/* ------------------------------------------------------------------------- */
+
+gint
+main(gint argc, gchar *argv[])
+{
+	GMainLoop *loop;
+	GDBusConnection *c;
+	GDBusProxy *p;
+	GError *error;
+	GVariant *parm;
+
+	loop = g_main_loop_new(NULL, FALSE);
+
+	error = NULL;
+	c = g_bus_get_sync(DBUS_TYPE, NULL, &error);
+
+	error = NULL;
+	p = g_dbus_proxy_new_sync(c,
+			G_DBUS_PROXY_FLAGS_NONE,
+			NULL, /* GDBusInterfaceInfo* */
+			"org.openbmc.managers.Inventory", /* name */
+			"/org/openbmc/inventory/items/system/io_board", /* object path */
+			"org.openbmc.InventoryItem", /* interface name */
+			NULL, /* GCancellable */
+			&error);
+	g_assert_no_error(error);
+
+	//TODO: Read actual vpd
+	g_print("Reading VPD\n");
+	GVariantBuilder *b;
+	GVariant *dict;
+
+	b = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
+	g_variant_builder_add(b, "{sv}", "manufacturer", g_variant_new_string("ibm"));
+	g_variant_builder_add(b, "{sv}", "part_num", g_variant_new_string("3N0001"));
+	dict = g_variant_builder_end(b);
+
+	//proxy_call wants parm as an array
+	parm = g_variant_new("(v)",dict);
+
+	error = NULL;
+	g_dbus_proxy_call_sync(p,
+			"update",
+			parm,
+			G_DBUS_CALL_FLAGS_NONE,
+			-1,
+			NULL,
+			&error);
+	g_assert_no_error(error);
+
+	g_object_unref(p);
+	g_object_unref(c);
+	g_main_loop_unref(loop);
+	return 0;
+}