Index: source/libvpx/build/make/Makefile |
=================================================================== |
--- source/libvpx/build/make/Makefile (revision 172621) |
+++ source/libvpx/build/make/Makefile (working copy) |
@@ -253,10 +253,25 @@ |
$(if $(quiet),@echo " [LD] $$@") |
$(qexec)$$(LD) -shared $$(LDFLAGS) \ |
-Wl,--no-undefined -Wl,-soname,$$(SONAME) \ |
- -Wl,--version-script,$$(SO_VERSION_SCRIPT) -o $$@ \ |
- $$(filter %.o,$$?) $$(extralibs) |
+ -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \ |
+ $$(filter %.o,$$^) $$(extralibs) |
endef |
+define dl_template |
+# Not using a pattern rule here because we don't want to generate empty |
+# archives when they are listed as a dependency in files not responsible |
+# for creating them. |
+$(1): |
+ $(if $(quiet),@echo " [LD] $$@") |
+ $(qexec)$$(LD) -dynamiclib $$(LDFLAGS) \ |
+ -exported_symbols_list $$(EXPORTS_FILE) \ |
+ -Wl,-headerpad_max_install_names,-compatibility_version,1.0,-current_version,$$(VERSION_MAJOR) \ |
+ -o $$@ \ |
+ $$(filter %.o,$$^) $$(extralibs) |
+endef |
+ |
+ |
+ |
define lipo_lib_template |
$(1): $(addsuffix /$(1),$(FAT_ARCHS)) |
$(if $(quiet),@echo " [LIPO] $$@") |
@@ -321,6 +336,7 @@ |
@touch $@ |
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) |
$(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) |
+$(foreach lib,$(filter %$(VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) |
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS) |
ifeq ($(MAKECMDGOALS),dist) |