From eb84c7fe965d57edd395ab07bfd6bc3a3f92926c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Sun, 10 Sep 2023 21:26:20 +0100
Subject: [PATCH] docs: build information for Android

---
 frontends/libretro/README.md | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/frontends/libretro/README.md b/frontends/libretro/README.md
index bcf317a0..b234824d 100644
--- a/frontends/libretro/README.md
+++ b/frontends/libretro/README.md
@@ -5,3 +5,30 @@
 ```bash
 cargo build
 ```
+
+### Android
+
+Configure `NDK_HOME` environment variable to point to your Android NDK directory and then create local toolchain replicas in the root project directory using:
+
+```bash
+mkdir -p ndk
+${NDK_HOME}/build/tools/make_standalone_toolchain.py --api 26 --arch arm64 --install-dir ndk/arm64
+${NDK_HOME}/build/tools/make_standalone_toolchain.py --api 26 --arch arm --install-dir ndk/arm
+${NDK_HOME}/build/tools/make_standalone_toolchain.py --api 26 --arch x86 --install-dir ndk/x86
+```
+
+To install the Rust targets for Android using rustup run:
+
+```bash
+rustup target add aarch64-linux-android
+rustup target add armv7-linux-androideabi
+rustup target add i686-linux-android
+```
+
+Then you're ready to build Boytacean's libretro core using the following commands (for release builds):
+
+```bash
+cargo build --target=aarch64-linux-android --release
+cargo build --target=armv7-linux-androideabi --release
+cargo build --target=i686-linux-android --release
+```
-- 
GitLab