Call gen-fan-detect-defs script during build

Change-Id: Ie7b9109f097490401c2f4d75f278afad6926d18b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 05a883d..e6df71c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,14 @@
 	fan_enclosure.cpp \
 	tach_sensor.cpp \
 	tach_detect.cpp
+nodist_phosphor_fan_presence_tach_SOURCES = \
+	fan_detect_defs.cpp
 
 phosphor_fan_presence_tach_LDFLAGS = $(SDBUSPLUS_LIBS)
 phosphor_fan_presence_tach_CXXFLAGS = $(SDBUSPLUS_CFLAGS)
+
+BUILT_SOURCES = fan_detect_defs.cpp
+CLEANFILES = fan_detect_defs.cpp
+
+fan_detect_defs.cpp: ${srcdir}/gen-fan-detect-defs.py
+	$(AM_V_GEN)$(GEN_FAN_DETECT_DEFS) > $@