From 6ff07ff55f404425177c398a5b49c28eefb27919 Mon Sep 17 00:00:00 2001 From: Geunsik Lim Date: Wed, 27 Feb 2019 14:22:53 +0900 Subject: [PATCH] Android/ARM64: Improve how to specify CPU architecture(ABI) This commit is to improve the writing style of the existing ABI (CPU architecture) with a method that is described at the documentation website of the Android NDK toolkit. * https://developer.android.com/ndk/guides Signed-off-by: Geunsik Lim --- jni/Android-app.mk | 5 ++++- jni/Android-nnstreamer.mk | 4 +++- jni/Application.mk | 8 +++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/jni/Android-app.mk b/jni/Android-app.mk index 1f45141..288ae83 100644 --- a/jni/Android-app.mk +++ b/jni/Android-app.mk @@ -17,7 +17,10 @@ LOCAL_PATH := $(call my-dir) # target#> ./{your-test-app} NNSTREAMER_VERSION := 0.1.1 -TARGET_ARCH_ABI := arm64-v8a + + +# Do not specify "TARGET_ARCH_ABI" in this file. If you want to append additional architecture, +# Please append an architecture name behind "APP_ABI" in Application.mk file. ifeq ($(TARGET_ARCH_ABI),armeabi) GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)/arm diff --git a/jni/Android-nnstreamer.mk b/jni/Android-nnstreamer.mk index ec7b0c1..99f7957 100644 --- a/jni/Android-nnstreamer.mk +++ b/jni/Android-nnstreamer.mk @@ -28,7 +28,9 @@ LOCAL_PATH := $(call my-dir) # NNSTREAMER_VERSION := 0.1.1 -TARGET_ARCH_ABI := arm64-v8a + +# Do not specify "TARGET_ARCH_ABI" in this file. If you want to append additional architecture, +# Please append an architecture name behind "APP_ABI" in Application.mk file. ifeq ($(TARGET_ARCH_ABI),armeabi) GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)/arm diff --git a/jni/Application.mk b/jni/Application.mk index 7276163..7a630a3 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -1,8 +1,14 @@ +# @note About Android NDK # Android NDK r12b supports API level as following: # - From 8 (Fryoyo, 2.2) to 24 (Nougat, 7.0) # - https://developer.android.com/ndk/guides/stable_apis#a24 +# +# @note About Application ABI +# If you want to generate a binary file for all architectures, please append additional architech name +# such as "arm64-v8a armeabi-v7a x86 x86_64" as following: +# APP_ABI = armeabi armeabi-v7a arm64-v8a x86 x86_64 -LIBCXX_USE_GABIXX := true APP_ABI := arm64-v8a +LIBCXX_USE_GABIXX := true APP_STL := c++_shared APP_PLATFORM := android-24 -- 2.7.4