summaryrefslogtreecommitdiffhomepage
path: root/examples/Makefile.Android
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-12-23 17:05:51 +0100
committerraysan5 <[email protected]>2020-12-23 17:05:51 +0100
commit7e459dc38ba9a6efc32e631943dd1aa509eb5827 (patch)
treedcedf2ce6bab859f8e7b338f3b7f1b950b91cc61 /examples/Makefile.Android
parentf8a2903cecf36b81f3290930252dd389313cff9d (diff)
downloadraylib-7e459dc38ba9a6efc32e631943dd1aa509eb5827.tar.gz
raylib-7e459dc38ba9a6efc32e631943dd1aa509eb5827.zip
Review Android Makefiles to required version
Diffstat (limited to 'examples/Makefile.Android')
-rw-r--r--examples/Makefile.Android33
1 files changed, 25 insertions, 8 deletions
diff --git a/examples/Makefile.Android b/examples/Makefile.Android
index ceca4c56..33903ae2 100644
--- a/examples/Makefile.Android
+++ b/examples/Makefile.Android
@@ -2,7 +2,7 @@
#
# raylib makefile for Android project (APK building)
#
-# Copyright (c) 2017 Ramon Santamaria (@raysan5)
+# Copyright (c) 2017-2020 Ramon Santamaria (@raysan5)
#
# This software is provided "as-is", without any express or implied warranty. In no event
# will the authors be held liable for any damages arising from the use of this software.
@@ -27,21 +27,38 @@ RAYLIB_PATH ?= ..\..
# Define Android architecture (armeabi-v7a, arm64-v8a, x86, x86-64) and API version
# Starting in 2019 using ARM64 is mandatory for published apps,
-# and minimum required target API is Android 9 (API level 28)
-ANDROID_ARCH ?= ARM
-ANDROID_API_VERSION = 28
+# Starting on August 2020, minimum required target API is Android 10 (API level 29)
+ANDROID_ARCH ?= ARM64
+ANDROID_API_VERSION = 29
+
+# Android required path variables
+# NOTE: Starting with Android NDK r21, no more toolchain generation is required, NDK is the toolchain on itself
+ifeq ($(OS),Windows_NT)
+ ANDROID_NDK = C:/android-ndk
+ ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64
+else
+ ANDROID_NDK ?= /usr/lib/android/ndk
+ ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64
+endif
+
ifeq ($(ANDROID_ARCH),ARM)
- ANDROID_ARCH_NAME = armeabi-v7a
+ ANDROID_ARCH_NAME = armeabi-v7a
endif
ifeq ($(ANDROID_ARCH),ARM64)
- ANDROID_ARCH_NAME = arm64-v8a
+ ANDROID_ARCH_NAME = arm64-v8a
+endif
+ifeq ($(ANDROID_ARCH),x86)
+ ANDROID_ARCH_NAME = i686
+endif
+ifeq ($(ANDROID_ARCH),x86_64)
+ ANDROID_ARCH_NAME = x86_64
endif
# Required path variables
# NOTE: JAVA_HOME must be set to JDK (using OpenJDK 13)
JAVA_HOME ?= C:/open-jdk
ANDROID_HOME = C:/android-sdk
-ANDROID_TOOLCHAIN = C:/android-ndk-r21/toolchains/llvm/prebuilt/windows-x86_64
+ANDROID_TOOLCHAIN = C:/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
@@ -288,7 +305,7 @@ logcat:
# Install and monitorize $(PROJECT_NAME).apk to default emulator/device
deploy:
- $(ANDROID_PLATFORM_TOOLS)/adb install -r $(PROJECT_NAME).apk
+ $(ANDROID_PLATFORM_TOOLS)/adb install $(PROJECT_NAME).apk
$(ANDROID_PLATFORM_TOOLS)/adb logcat -c
$(ANDROID_PLATFORM_TOOLS)/adb logcat raylib:V *:S