diff options
author | Hugues Evrard <hevrard@users.noreply.github.com> | 2019-02-14 15:21:05 +0000 |
---|---|---|
committer | dan sinclair <dj2@everburning.com> | 2019-02-14 10:21:05 -0500 |
commit | b053505276eb86fd23d17028f0c51d7a284d4a8f (patch) | |
tree | db010c165f9617744639b84acdfa9de7238c278c /README.md | |
parent | 4aed92c264a953d96a87c113ad51659e009d1217 (diff) | |
download | amber-b053505276eb86fd23d17028f0c51d7a284d4a8f.tar.gz |
Add compilation scaffolding for plain Android executable (#285)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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/<abi>/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 |