mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-29 18:29:18 -05:00
Updated Working for Android (markdown)
@ -34,7 +34,7 @@ To develop with raylib in C, we need to install the Android Native Development K
|
|||||||
|
|
||||||
## Compiling raylib source code
|
## Compiling raylib source code
|
||||||
|
|
||||||
To compile raylib sources, just navigate from command line to folder `raylib/src/` and execute `Makefile` with:
|
To compile raylib sources, just navigate from command line to directory `raylib/src/` and execute `Makefile` with:
|
||||||
|
|
||||||
mingw32-make PLATFORM=PLATFORM_ANDROID
|
mingw32-make PLATFORM=PLATFORM_ANDROID
|
||||||
|
|
||||||
@ -42,18 +42,19 @@ NOTE: libraylib.a will be generated in `raylib/src` directory by default.
|
|||||||
|
|
||||||
WARNING: Maybe your Android device uses a 64bit CPU but be careful, installed Android OS could still be 32bit, not allowing 64bit apps.
|
WARNING: Maybe your Android device uses a 64bit CPU but be careful, installed Android OS could still be 32bit, not allowing 64bit apps.
|
||||||
|
|
||||||
## Compiling a raylib game for Android (using an example project template)
|
## Compiling a raylib game for Android (using a [project template](https://github.com/raysan5/raylib-game-template))
|
||||||
|
|
||||||
_Step 1._ To build an APK, navigate to folder `raylib/template/simple_game/` and edit Makefile.Android. Replace these
|
_Step 1._ To build an APK, navigate to directory `raylib-game-template/src/` and edit `Makefile.Android`. Replace these
|
||||||
settings with yours where apropriate:
|
settings with yours where apropriate:
|
||||||
```
|
```
|
||||||
ANDROID_ARCH ?= ARM
|
ANDROID_ARCH ?= ARM
|
||||||
ANDROID_API_VERSION = 28
|
ANDROID_API_VERSION = 28
|
||||||
|
|
||||||
JAVA_HOME ?= C:/open-jdk
|
JAVA_HOME ?= C:/open-jdk
|
||||||
ANDROID_HOME = C:/android-sdk
|
ANDROID_HOME ?= C:/android-sdk
|
||||||
ANDROID_TOOLCHAIN = C:/android-ndk-r21/toolchains/llvm/prebuilt/windows-x86_64
|
ANDROID_NDK ?= C:/android-ndk
|
||||||
ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/29.0.3
|
ANDROID_TOOLCHAIN ?= $(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64
|
||||||
|
ANDROID_BUILD_TOOLS ?= $(ANDROID_HOME)/build-tools/29.0.3
|
||||||
ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools
|
ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools
|
||||||
```
|
```
|
||||||
Then build the apk with:
|
Then build the apk with:
|
||||||
@ -61,6 +62,7 @@ Then build the apk with:
|
|||||||
mingw32-make PLATFORM=PLATFORM_ANDROID
|
mingw32-make PLATFORM=PLATFORM_ANDROID
|
||||||
|
|
||||||
**WARNING: Make sure the MAKE tool to use is properly configured in the Makefile:**
|
**WARNING: Make sure the MAKE tool to use is properly configured in the Makefile:**
|
||||||
|
|
||||||
```make
|
```make
|
||||||
# Define default make program
|
# Define default make program
|
||||||
MAKE = make
|
MAKE = make
|
||||||
|
|||||||
Reference in New Issue
Block a user