aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorHugues Evrard <hevrard@users.noreply.github.com>2019-02-14 15:21:05 +0000
committerdan sinclair <dj2@everburning.com>2019-02-14 10:21:05 -0500
commitb053505276eb86fd23d17028f0c51d7a284d4a8f (patch)
treedb010c165f9617744639b84acdfa9de7238c278c /README.md
parent4aed92c264a953d96a87c113ad51659e009d1217 (diff)
downloadamber-b053505276eb86fd23d17028f0c51d7a284d4a8f.tar.gz
Add compilation scaffolding for plain Android executable (#285)
Diffstat (limited to 'README.md')
-rw-r--r--README.md27
1 files changed, 27 insertions, 0 deletions
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/<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