tools/pci: refactor PCI bridge

Use polymorphism to handle the differences between Aspeed and Nuvoton
PCI devices.

Add unit tests (now at 100% line coverage for tools/pci.cpp).

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I43e63ec5eb9fce5fb0fc74e0e69667dd13b7433f
diff --git a/tools/Makefile.am b/tools/Makefile.am
index f63a112..9c41e1b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -7,12 +7,20 @@
 	$(CODE_COVERAGE_CXXFLAGS)
 
 noinst_LTLIBRARIES = libupdater.la
-libupdater_la_LDFLAGS = -static $(CODE_COVERAGE_LIBS) $(IPMIBLOB_LIBS) $(PCIACCESS_LIBS)
+libupdater_la_LDFLAGS = \
+	-static \
+	$(CODE_COVERAGE_LIBS) \
+	$(FMT_LIBS) \
+	$(IPMIBLOB_LIBS) \
+	$(PCIACCESS_LIBS) \
+	$(STDPLUS_LIBS)
 libupdater_la_CXXFLAGS = \
 	-I$(top_srcdir) \
 	$(CODE_COVERAGE_CXXFLAGS) \
+	$(FMT_CFLAGS) \
 	$(IPMIBLOB_CFLAGS) \
-	$(PCIACCESS_CFLAGS)
+	$(PCIACCESS_CFLAGS) \
+	$(STDPLUS_CFLAGS)
 libupdater_la_SOURCES = \
 	updater.cpp \
 	handler.cpp \