From c1894a7ddb3b80b711c32a16809a8c80f83e42b2 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 10 May 2018 10:41:38 -0700 Subject: [PATCH] makefile: Remove hard coded assumption about library path for Android build --- makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/makefile b/makefile index 813b8ac8..e6b96b78 100644 --- a/makefile +++ b/makefile @@ -291,11 +291,11 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) OS_CCDEFS += -D__ANDROID_API__=$(shell getprop ro.build.version.sdk) endif ifneq (lib,$(findstring lib,$(UNSUPPORTED_BUILD))) - ifneq (,$(shell if $(TEST) -d /system/lib; then echo systemlib; fi)) - LIBPATH += /system/lib - endif - ifneq (,$(shell if $(TEST) -d /data/data/com.termux/files/usr/lib; then echo termuxlib; fi)) - LIBPATH += /data/data/com.termux/files/usr/lib + ifeq (Android,$(shell uname -o)) + ifneq (,$(shell if $(TEST) -d /system/lib; then echo systemlib; fi)) + LIBPATH += /system/lib + endif + LIBPATH += $(LD_LIBRARY_PATH) endif 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))))