From b053505276eb86fd23d17028f0c51d7a284d4a8f Mon Sep 17 00:00:00 2001 From: Hugues Evrard Date: Thu, 14 Feb 2019 15:21:05 +0000 Subject: Add compilation scaffolding for plain Android executable (#285) --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 4da1cd6..c8f155e 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,33 @@ ninja env variable for the KeyStore file path. * Run `./tools/build-amber-sample.sh [build output directory path]`. +#### Android plain executable + +It is possible to obtain a plain executable for Android, as opposed to an APK, +with the following: + +``` +./tools/update_build_version.py . samples/ third_party/ + +mkdir build +cd build +mkdir app +mkdir libs +${ANDROID_NDK_HOME}/ndk-build -C ../samples NDK_PROJECT_PATH=. NDK_LIBS_OUT=`pwd`/libs NDK_APP_OUT=`pwd`/app +``` + +The list of target ABIs can be configured in `samples/jni/Application.mk` by +editing the APP_ABI entry: + +``` +APP_ABI := arm64-v8a armeabi-v7a x86 x86_64 +``` + +The resulting executable will be produced as +`build/app/local//amber_ndk`. This executable can be run via the adb shell +on your device, e.g. under `/data/local/tmp` (`/sdcard` is generally not +suitable because it is mounted with a non-executable flag). + ### Optional Components Amber, by default, enables testing, SPIRV-Tools and Shaderc. Each of these can -- cgit v1.2.3