summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/Makefile b/src/Makefile
index 1d5bbb83..8e598e5b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -157,24 +157,19 @@ endif
ifeq ($(PLATFORM),PLATFORM_ANDROID)
# Android architecture: ARM64
- # Starting at 2019 using ARM64 is mandatory for published apps
+ # Starting at 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 = 26
+ ANDROID_API_VERSION = 28
# Android required path variables
- # NOTE: Android NDK is just required to generate the standalone toolchain,
- # in case is not already provided
+ # 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_NDK = C:/android-ndk-r21
+ ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64
else
ANDROID_NDK = /usr/lib/android/ndk
- endif
-
- # Android standalone toolchain path
- ifeq ($(OS),Windows_NT)
- ANDROID_TOOLCHAIN = C:/android_toolchain_$(ANDROID_ARCH)_API$(ANDROID_API_VERSION)
- else
- ANDROID_TOOLCHAIN = /usr/lib/android/toolchain_$(ANDROID_ARCH)_API$(ANDROID_API_VERSION)
+ ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux
endif
ifeq ($(ANDROID_ARCH),ARM)
@@ -248,11 +243,11 @@ endif
ifeq ($(PLATFORM),PLATFORM_ANDROID)
# Android toolchain (must be provided for desired architecture and compiler)
ifeq ($(ANDROID_ARCH),ARM)
- CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-clang
+ CC = $(ANDROID_TOOLCHAIN)/bin/armv7a-linux-androideabi$(ANDROID_API_VERSION)-clang
AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar
endif
ifeq ($(ANDROID_ARCH),ARM64)
- CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang
+ CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android$(ANDROID_API_VERSION)-clang
AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar
endif
ifeq ($(ANDROID_ARCH),x86)
@@ -298,9 +293,13 @@ endif
ifeq ($(RAYLIB_BUILD_MODE),RELEASE)
ifeq ($(PLATFORM),PLATFORM_WEB)
CFLAGS += -Os
- else
+ endif
+ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
CFLAGS += -s -O1
endif
+ ifeq ($(PLATFORM),PLATFORM_ANDROID)
+ CFLAGS += -O2
+ endif
endif
# Additional flags for compiler (if desired)