image manager: add inotify watch
Add an inotify watch to the known software image location.
Hook the inotify fd with sd-event, so that on callback, version d-bus
objects can be created based on the newly added software image.
Resolves openbmc/openbmc#1444.
Change-Id: I5c460f820c8d3a851b8ddc969f26d38870c36991
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 1e863d7..e4be065 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,19 +1,34 @@
AM_DEFAULT_SOURCE_EXT = .cpp
+# Build these headers, don't install them
+noinst_HEADERS = \
+ version_software_manager.hpp \
+ download_manager.hpp \
+ watch.hpp
+
sbin_PROGRAMS = \
phosphor-version-software-manager \
phosphor-download-manager
phosphor_version_software_manager_SOURCES = \
version_software_manager.cpp \
- image_manager_main.cpp
+ image_manager_main.cpp \
+ watch.cpp
phosphor_download_manager_SOURCES = \
download_manager.cpp \
download_manager_main.cpp
-generic_cxxflags = $(SYSTEMD_CFLAGS) $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) $(SDBUSPLUS_CFLAGS)
-generic_ldflags = $(SYSTEMD_LIBS) $(PHOSPHOR_DBUS_INTERFACES_LIBS) $(SDBUSPLUS_LIBS)
+generic_cxxflags = \
+ $(SYSTEMD_CFLAGS) \
+ $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
+ $(SDBUSPLUS_CFLAGS) \
+ $(PHOSPHOR_LOGGING_CFLAGS)
+generic_ldflags = \
+ $(SYSTEMD_LIBS) \
+ $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
+ $(SDBUSPLUS_LIBS) \
+ $(PHOSPHOR_LOGGING_LIBS)
phosphor_version_software_manager_CXXFLAGS = $(generic_cxxflags)
phosphor_version_software_manager_LDFLAGS = $(generic_ldflags)