From 7a1eef55d3141f8e3ee51a5478ea1a0f53c1a927 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 28 May 2017 23:02:18 +0200 Subject: [PATCH] Updated Compile for Android (markdown) --- Compile-for-Android.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Compile-for-Android.md b/Compile-for-Android.md index 32de5b7..bad0a38 100644 --- a/Compile-for-Android.md +++ b/Compile-for-Android.md @@ -16,7 +16,7 @@ _Step 2._ Create the following environment variables with the correct paths: ANDROID_SDK_TOOLS = C:\android-sdk\platform-tools ANDROID_NDK_ROOT = C:\android-ndk - ANT_HOME = C:\apache-ant-1.9.6 + ANT_HOME = C:\apache-ant _Step 3._ Make sure latest Android Platform Tools and desired SDKs are installed, use SDK Manager tool: @@ -24,14 +24,16 @@ _Step 3._ Make sure latest Android Platform Tools and desired SDKs are installed ### Compiling raylib source code -Navigate from command line to folder `raylib/src_android/` and type: +To compile raylib src it's required to install a [custom ndk standalone toolchain](https://developer.android.com/ndk/guides/standalone_toolchain.html). - %ANDROID_NDK_ROOT%\ndk-build +After that, just navigate from command line to folder `raylib/src/` and execute Makefile with: -NOTE: libraylib.a will be generated in folder `raylib/src_android/obj/local/armeabi/`, it must be copied -to Android project; if using `raylib/template_android` project, copy it to `raylib/template_android/jni/libs/`. + mingw32-make PLATFORM=PLATFORM_ANDROID -You can also use Notepad++ prepared script for raylib source compilation. Just open Notepad++, open `raylib/src_android/jni/Android.mk` and execute Notepad++ script: `raylib_source_compile_android`. +**Remember to setup `ANDROID_TOOLCHAIN` property properly in the Makefile!** + +NOTE: libraylib.a will be generated in folder `raylib/release/android/armeabi-v7a/`, it must be copied +to Android project; if using `raylib/template_android` project, copy it to `raylib/template_android/jni/libs/`. ### Compiling raylib game for Android (using project template)