makefile: Remove hard coded assumption about library path for Android build

This commit is contained in:
Mark Pizzolato 2018-05-10 10:41:38 -07:00
parent a5a71edd30
commit c1894a7ddb

View file

@ -291,11 +291,11 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
OS_CCDEFS += -D__ANDROID_API__=$(shell getprop ro.build.version.sdk) OS_CCDEFS += -D__ANDROID_API__=$(shell getprop ro.build.version.sdk)
endif endif
ifneq (lib,$(findstring lib,$(UNSUPPORTED_BUILD))) ifneq (lib,$(findstring lib,$(UNSUPPORTED_BUILD)))
ifneq (,$(shell if $(TEST) -d /system/lib; then echo systemlib; fi)) ifeq (Android,$(shell uname -o))
LIBPATH += /system/lib ifneq (,$(shell if $(TEST) -d /system/lib; then echo systemlib; fi))
endif LIBPATH += /system/lib
ifneq (,$(shell if $(TEST) -d /data/data/com.termux/files/usr/lib; then echo termuxlib; fi)) endif
LIBPATH += /data/data/com.termux/files/usr/lib LIBPATH += $(LD_LIBRARY_PATH)
endif endif
ifeq (ldconfig,$(shell if $(TEST) -e /sbin/ldconfig; then echo ldconfig; fi)) ifeq (ldconfig,$(shell if $(TEST) -e /sbin/ldconfig; then echo ldconfig; fi))
LIBPATH := $(sort $(foreach lib,$(shell /sbin/ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib)))) LIBPATH := $(sort $(foreach lib,$(shell /sbin/ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib))))