summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-11-05 17:32:00 +1100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-11-12 04:13:14 +0000
commit4ae518fc5a5fbc8f61b61bc1ba54e028e4c0f3eb (patch)
tree234db2056b539999c3cfb4d82dac24fcdfd042cb /data
parentbaf4d75b4378ff0d93f3639495f8486b741d0059 (diff)
ndk-build: Use the value of the old_library field for the static library
Fixes cases where there is no static library to link to (e.g. libc++_shared.so) or the possibility that the static library is different from the .la file name.
Diffstat (limited to 'data')
-rw-r--r--data/ndk-build/tools.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/data/ndk-build/tools.mk b/data/ndk-build/tools.mk
index 7f1a836d..88c8dff4 100644
--- a/data/ndk-build/tools.mk
+++ b/data/ndk-build/tools.mk
@@ -156,7 +156,12 @@ libtool-parse-file = \
$(call __libtool_log, parsing file $1)\
$(if $(call libtool-lib-processed,$2),\
$(call __libtool_log, library $2 already parsed),\
- $(eval __libtool_libs.$2.STATIC_LIB := $(patsubst %.la,%.a,$1))\
+ $(eval __libtool_libs.$2.old_lib := $(call libtool-get-old-library,$1)) \
+ $(eval __libtool_libs.$2.base_dir := $(dir $1)) \
+ $(if $(strip $(__libtool_libs.$2.old_lib)), \
+ $(eval __libtool_libs.$2.STATIC_LIB := $(__libtool_libs.$2.base_dir)$(__libtool_libs.$2.old_lib)),\
+ $(eval __libtool_libs.$2.STATIC_LIB := $(empty))\
+ ) \
$(eval __libtool_libs.$2.DYN_LIB := -l$2)\
$(eval __tmpvar.$2.dep_libs := $(call libtool-get-dependency-libs,$1))\
$(eval __tmpvar.$2.dep_libs := $(call libtool-replace-prefixes,$(__tmpvar.$2.dep_libs)))\
@@ -261,6 +266,9 @@ libtool-get-search-paths = \
libtool-get-dependency-libs = \
$(shell $(SED) -n "s/^dependency_libs='\(.*\)'/\1/p" $1)
+libtool-get-old-library = \
+ $(shell $(SED) -n "s/^old_library='\(.*\)'/\1/p" $1)
+
libtool-replace-prefixes = \
$(subst $(BUILD_PREFIX),$(GSTREAMER_ROOT),$1 )