about summary refs log tree commit diff
path: root/extra-lib.mk
diff options
context:
space:
mode:
Diffstat (limited to 'extra-lib.mk')
-rw-r--r--extra-lib.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/extra-lib.mk b/extra-lib.mk
index 0b79d4a459..87d4fa3863 100644
--- a/extra-lib.mk
+++ b/extra-lib.mk
@@ -49,7 +49,12 @@ endef
 object-suffixes-left = $(object-suffixes-$(lib))
 include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib)))
 
+ifeq ($(versioning),yes)
 # Add the version script to the dependencies of the shared library.
-$(objpfx)$(lib).so: $(firstword $(wildcard $($(lib)-map) $(lib).map $(..)$(lib).map))
+$(objpfx)$(lib).so: $(firstword $($(lib)-map) \
+				$(addprefix $(common-objpfx), \
+					    $(filter $(lib).map, \
+						     $(version-maps))))
+endif
 
 endif