Merge "Include the amr encoder shared library in all builds."
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index f5fd001..d0fc291 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -68,10 +68,8 @@
 @echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(1)]"
 $(hide) ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(1)))_objs;\
     mkdir -p $$ldir; \
-    filelist=; \
     for f in `$(TARGET_AR) t $(1)`; do \
         $(TARGET_AR) p $(1) $$f > $$ldir/$$f; \
-        filelist="$$filelist $$ldir/$$f"; \
     done ;
 
 endef
@@ -82,6 +80,12 @@
     $(call _darwin-extract-and-include-single-whole-static-lib, $(lib)))
 endef
 
+ifeq (,$(filter /%,$(HOST_OUT_SHARED_LIBRARIES)))
+ABP_HOST_OUT_SHARED_LIBRARIES := $(shell pwd)/$(HOST_OUT_SHARED_LIBRARIES)
+else
+ABP_HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT_SHARED_LIBRARIES)
+endif
+
 define transform-host-o-to-shared-lib-inner
 $(call darwin-extract-and-include-whole-static-libs)
 $(hide) $(PRIVATE_CXX) \
@@ -96,6 +100,7 @@
         $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
         $(PRIVATE_LDLIBS) \
         -o $@ \
+        -install_name $(ABP_HOST_OUT_SHARED_LIBRARIES)/$(notdir $@) \
         $(PRIVATE_LDFLAGS) \
         $(HOST_LIBGCC)
 endef