Add class to monitor for unit failures

This class has an analyze() method that will
check the state of a unit, and then stop or start
a target unit if the state is failed.

The units and the action are passed in via the constructor.

Change-Id: Ibc8e54b8371d2261eb55cce5825c5cee6d214bab
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/fail-monitor/Makefile.am b/fail-monitor/Makefile.am
index 1976be1..6c5c5b2 100644
--- a/fail-monitor/Makefile.am
+++ b/fail-monitor/Makefile.am
@@ -1,7 +1,15 @@
 AM_DEFAULT_SOURCE_EXT = .cpp
+AM_CPPFLAGS = -I$(top_srcdir)
 
 sbin_PROGRAMS = \
 	phosphor-unit-failure-monitor
 
 phosphor_unit_failure_monitor_SOURCES = \
-	main.cpp
+	main.cpp \
+	monitor.cpp
+
+phosphor_unit_failure_monitor_LDADD = \
+	$(PHOSPHOR_LOGGING_LIBS)
+
+phosphor_unit_failure_monitor_CXXFLAGS = \
+	$(PHOSPHOR_LOGGING_CFLAGS)