Use mapper binding for busname queries
Prefer mapper queries to hardcoded busnames.
React to /org/openbmc/managers/system GetObjectById
API change.
Change-Id: I651b820622c3bff51c05365b811b41e73fde997c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/Makefile b/Makefile
index 937b393..23db1f5 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,10 @@
EXES += phosphor-read-eeprom
phosphor-read-eeprom_OBJS += readeeprom.o argument.o
+phosphor-read-eeprom_LDLIBS += mapper
phosphor-read-eeprom_EXTRA_LIBS += writefrudata
libstrgfnhandler.so_EXTRA_LIBS += writefrudata
+libwritefrudata.so_LDLIBS += mapper
libwritefrudata.so_NEEDED += libsystemd
phosphor-read-eeprom_NEEDED += libsystemd
@@ -29,7 +31,7 @@
define __BUILD_EXE
$1 : $$($1_OBJS) | $$(LIBS) $$(HOST_LIBS)
- $$(LINK.cpp) -o $$@ $$^ $(call __EXTRA_LIB_RESOLV,$(addprefix -l,$($1_EXTRA_LIBS))) -L. $(call __PKG_CONFIG,$($1_NEEDED),--libs)
+ $$(LINK.cpp) -o $$@ $$^ $(call __EXTRA_LIB_RESOLV,$(addprefix -l,$($1_EXTRA_LIBS))) -L. $(addprefix -l,$($1_LDLIBS)) $(call __PKG_CONFIG,$($1_NEEDED),--libs)
$(eval CXXFLAGS += $(call __PKG_CONFIG,$($1_NEEDED),--cflags))
@@ -40,7 +42,7 @@
define __BUILD_LIB
$1 : $$($1_OBJS) | $$(addsuffix .so,$$(addprefix lib,$$($1_EXTRA_LIBS)))
- $$(LINK.cpp) -fPIC -shared -Wl,-soname,$$@ -o $$(addsuffix .$($1_VERSION), $$@) $$^ $(call __EXTRA_LIB_RESOLV,$(addprefix -l,$($1_EXTRA_LIBS))) -L. $(call __PKG_CONFIG,$($1_NEEDED),--libs)
+ $$(LINK.cpp) -fPIC -shared -Wl,-soname,$$@ -o $$(addsuffix .$($1_VERSION), $$@) $$^ $(call __EXTRA_LIB_RESOLV,$(addprefix -l,$($1_EXTRA_LIBS))) -L. $(addprefix -l,$($1_LDLIBS)) $(call __PKG_CONFIG,$($1_NEEDED),--libs)
ln -sf $$(addsuffix .$($1_VERSION), $$@) $1
$(eval CXXFLAGS += $(call __PKG_CONFIG,$($1_NEEDED),--cflags))