From a4e0b524687bcc036bb81a8211c7664bf5c081bb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 17 Aug 2018 18:58:56 +0200 Subject: [PATCH] configure.ac, Makefile.am: add variable ANDROID_ABI --- Makefile.am | 4 ++-- configure.ac | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 95f888ff9..c1cda5605 100644 --- a/Makefile.am +++ b/Makefile.am @@ -341,7 +341,7 @@ android/build/include/org_musicpd_Bridge.h: android/build/classes.dex BUILT_SOURCES = android/build/include/org_musicpd_Bridge.h -android/build/lib/armeabi-v7a/libmpd.so: libmpd.so +android/build/lib/$(ANDROID_ABI)/libmpd.so: libmpd.so mkdir -p $(@D) rm -f $@ $(STRIP) -o $@ $< @@ -351,7 +351,7 @@ android/build/res/drawable/icon.png: mpd.svg rsvg-convert --width=48 --height=48 $< -o $@ .DELETE_ON_ERROR: android/build/unsigned.apk -android/build/unsigned.apk: android/build/classes.dex android/build/resources.apk android/build/lib/armeabi-v7a/libmpd.so +android/build/unsigned.apk: android/build/classes.dex android/build/resources.apk android/build/lib/$(ANDROID_ABI)/libmpd.so cp android/build/resources.apk $@ cd $(dir $@) && zip -q -r $(notdir $@) classes.dex lib diff --git a/configure.ac b/configure.ac index 2e518df98..3fc74e768 100644 --- a/configure.ac +++ b/configure.ac @@ -186,6 +186,7 @@ AC_ARG_WITH([android-sdk], [Directory for Android SDK]), [], [with_android_sdk=no]) +android_abi="" if test x$host_is_android = xyes; then if test x$with_android_sdk = xno; then AC_MSG_ERROR([Android build requires option --with-android-sdk=DIR]) @@ -194,9 +195,12 @@ if test x$host_is_android = xyes; then if ! test -x $with_android_sdk/tools/android; then AC_MSG_ERROR([Android SDK not found in $with_android_sdk]) fi + + android_abi="armeabi-v7a" fi AC_SUBST(ANDROID_SDK, [$with_android_sdk]) +AC_SUBST(ANDROID_ABI, [$android_abi]) dnl --------------------------------------------------------------------------- dnl Language Checks