From aa76985c0da1dab965b41c98e87db341c73e9538 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 11 May 2018 18:14:19 +0200 Subject: Review raylib version to 2.0 Review raylib_icon resource --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 8444ed57..67d7c8c2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -42,7 +42,7 @@ .PHONY: all clean install uninstall # Define required raylib variables -RAYLIB_VERSION = 1.9.7 +RAYLIB_VERSION = 2.0.0 RAYLIB_API_VERSION = 1 # See below for alternatives. -- cgit v1.2.3 From fb4265f64659a50a5a86f9f283e7468b7998c60f Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 17 May 2018 00:59:53 +0200 Subject: Reviewed Android pipeline Now defaults to Clang, ARM64 and API 21 --- release/libs/android/arm64-v8a/libraylib.a | Bin 0 -> 981332 bytes src/Makefile | 17 ++++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 release/libs/android/arm64-v8a/libraylib.a (limited to 'src/Makefile') diff --git a/release/libs/android/arm64-v8a/libraylib.a b/release/libs/android/arm64-v8a/libraylib.a new file mode 100644 index 00000000..0e252902 Binary files /dev/null and b/release/libs/android/arm64-v8a/libraylib.a differ diff --git a/src/Makefile b/src/Makefile index 67d7c8c2..582daf49 100644 --- a/src/Makefile +++ b/src/Makefile @@ -163,10 +163,10 @@ endif ifeq ($(PLATFORM),PLATFORM_ANDROID) # Android required path variables ANDROID_NDK = C:/android-ndk - ANDROID_TOOLCHAIN = C:/android_toolchain_arm_api16 + ANDROID_TOOLCHAIN = C:/android_toolchain_arm64_api21 # Android architecture: ARM or ARM64 - ANDROID_ARCH ?= ARM + ANDROID_ARCH ?= ARM64 endif # RAYLIB_RELEASE_PATH points to provided binaries or your immediate build of raylib. @@ -251,12 +251,11 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif ifeq ($(PLATFORM),PLATFORM_ANDROID) # Android toolchain (must be provided for desired architecture and compiler) - # NOTE: gcc compiler is being deprecated in Android NDK r16 ifeq ($(ANDROID_ARCH),ARM) - CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-gcc + CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-clang endif ifeq ($(ANDROID_ARCH),ARM64) - CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-gcc + CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang endif endif @@ -316,15 +315,15 @@ ifeq ($(PLATFORM),PLATFORM_WEB) CFLAGS += -s USE_GLFW=3 -s ASSERTIONS=1 --profiling endif ifeq ($(PLATFORM),PLATFORM_ANDROID) - # Compiler flags for arquitecture - CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 + # Compiler flags for arquitecture (only ARM, not ARM64) + #CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 # Compilation functions attributes options - CFLAGS += -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC + CFLAGS += -ffunction-sections -funwind-tables -fstack-protector-strong -fPIE -fPIC # Compiler options for the linker # -Werror=format-security CFLAGS += -Wa,--noexecstack -Wformat -no-canonical-prefixes # Preprocessor macro definitions - CFLAGS += -DANDROID -DPLATFORM_ANDROID -D__ANDROID_API__=16 + CFLAGS += -DANDROID -DPLATFORM_ANDROID -D__ANDROID_API__=21 endif # Define required compilation flags for raylib SHARED lib -- cgit v1.2.3 From 5cfbb53f6c837bef2ebfafd778b08840f2e33704 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 18 May 2018 16:04:18 +0200 Subject: Increase API version Please do this whenever necessary. And adapt it before releasing a new RC. The RC should already have the correct one. --- src/CMakeLists.txt | 2 +- src/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Makefile') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e8379ab0..458b9606 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,7 @@ project(raylib) include(GNUInstallDirs) set(PROJECT_VERSION 2.0.0) -set(API_VERSION 1) +set(API_VERSION 2) set(RAYLIB raylib) # Name of the generated library include("CMakeOptions.txt") diff --git a/src/Makefile b/src/Makefile index 582daf49..d327c2d1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,7 +43,7 @@ # Define required raylib variables RAYLIB_VERSION = 2.0.0 -RAYLIB_API_VERSION = 1 +RAYLIB_API_VERSION = 2 # See below for alternatives. RAYLIB_PATH = .. -- cgit v1.2.3 From 8e0cd51afb50bcc7b96fc0530c74dc7210b0138d Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sun, 20 May 2018 18:49:58 +0200 Subject: Support shared library building on Android --- release/libs/android/arm64-v8a/libraylib.a | Bin 981332 -> 982394 bytes release/libs/android/arm64-v8a/libraylib.so | Bin 0 -> 553384 bytes src/Makefile | 5 ++++- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 release/libs/android/arm64-v8a/libraylib.so (limited to 'src/Makefile') diff --git a/release/libs/android/arm64-v8a/libraylib.a b/release/libs/android/arm64-v8a/libraylib.a index 0e252902..76656402 100644 Binary files a/release/libs/android/arm64-v8a/libraylib.a and b/release/libs/android/arm64-v8a/libraylib.a differ diff --git a/release/libs/android/arm64-v8a/libraylib.so b/release/libs/android/arm64-v8a/libraylib.so new file mode 100644 index 00000000..04e53f03 Binary files /dev/null and b/release/libs/android/arm64-v8a/libraylib.so differ diff --git a/src/Makefile b/src/Makefile index d327c2d1..ae0265c9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -383,11 +383,13 @@ endif # Define linker options ifeq ($(PLATFORM),PLATFORM_ANDROID) LDFLAGS = -Wl,-soname,libraylib.$(API_VERSION).so -Wl,--exclude-libs,libatomic.a - LDFLAGS += -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings + LDFLAGS += -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings # Force linking of library module to define symbol LDFLAGS += -u ANativeActivity_onCreate # Library paths containing required libs LDFLAGS += -L. -Lsrc -L$(RAYLIB_RELEASE_PATH) + # Avoid unresolved symbol pointing to external main() + LDFLAGS += -Wl,-undefined,dynamic_lookup LDLIBS = -llog -landroid -lEGL -lGLESv2 -lOpenSLES -latomic -lc -lm endif @@ -473,6 +475,7 @@ else ifeq ($(PLATFORM),PLATFORM_ANDROID) $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/libraylib.$(RAYLIB_VERSION).so $(OBJS) $(LDFLAGS) $(LDLIBS) @echo "raylib shared library generated (libraylib.$(RAYLIB_VERSION).so)!" + # WARNING: symbolic links creation on Windows should be done using mklink command, no ln available cd $(RAYLIB_RELEASE_PATH) && ln -fs libraylib.$(RAYLIB_VERSION).so libraylib.$(RAYLIB_API_VERSION).so cd $(RAYLIB_RELEASE_PATH) && ln -fs libraylib.$(RAYLIB_VERSION).so libraylib.so endif -- cgit v1.2.3 From a752092055ca7c6c3d9d2b74d6ab212db14d0909 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sun, 20 May 2018 19:13:10 +0200 Subject: Removed 32bit arm Android library From 2019 64bit support will be mandatory to publish an Android app. Google plans to require that new apps target Oreo (API level 26) in August of 2018. --- release/libs/android/armeabi-v7a/libraylib.a | Bin 883994 -> 0 bytes release/libs/android/armeabi-v7a/libraylib.so | Bin 477808 -> 0 bytes src/Makefile | 15 ++------------- templates/advance_game/Makefile.Android | 24 ++++++++++++------------ templates/simple_game/Makefile.Android | 22 +++++++++++----------- templates/standard_game/Makefile.Android | 25 +++++++++++++------------ 6 files changed, 38 insertions(+), 48 deletions(-) delete mode 100644 release/libs/android/armeabi-v7a/libraylib.a delete mode 100644 release/libs/android/armeabi-v7a/libraylib.so (limited to 'src/Makefile') diff --git a/release/libs/android/armeabi-v7a/libraylib.a b/release/libs/android/armeabi-v7a/libraylib.a deleted file mode 100644 index 1e6a0088..00000000 Binary files a/release/libs/android/armeabi-v7a/libraylib.a and /dev/null differ diff --git a/release/libs/android/armeabi-v7a/libraylib.so b/release/libs/android/armeabi-v7a/libraylib.so deleted file mode 100644 index d90a30c5..00000000 Binary files a/release/libs/android/armeabi-v7a/libraylib.so and /dev/null differ diff --git a/src/Makefile b/src/Makefile index ae0265c9..f8219044 100644 --- a/src/Makefile +++ b/src/Makefile @@ -165,7 +165,8 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID) ANDROID_NDK = C:/android-ndk ANDROID_TOOLCHAIN = C:/android_toolchain_arm64_api21 - # Android architecture: ARM or ARM64 + # Android architecture: ARM64 + # Starting at 2019 using ARM64 is mandatory for published apps ANDROID_ARCH ?= ARM64 endif @@ -195,9 +196,6 @@ ifeq ($(PLATFORM),PLATFORM_WEB) RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/html5 endif ifeq ($(PLATFORM),PLATFORM_ANDROID) - ifeq ($(ANDROID_ARCH),ARM) - RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/android/armeabi-v7a - endif ifeq ($(ANDROID_ARCH),ARM64) RAYLIB_RELEASE_PATH = $(RAYLIB_PATH)/release/libs/android/arm64-v8a endif @@ -251,9 +249,6 @@ ifeq ($(PLATFORM),PLATFORM_WEB) 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 - endif ifeq ($(ANDROID_ARCH),ARM64) CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang endif @@ -272,9 +267,6 @@ endif # Android archiver (also depends on desired architecture) ifeq ($(PLATFORM),PLATFORM_ANDROID) - ifeq ($(ANDROID_ARCH),ARM) - AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar - endif ifeq ($(ANDROID_ARCH),ARM64) AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar endif @@ -430,9 +422,6 @@ all: raylib # NOTE: Android toolchain could already be provided generate_android_toolchain: ifeq ($(PLATFORM),PLATFORM_ANDROID) - ifeq ($(ANDROID_ARCH),ARM) - $(ANDROID_NDK)/build/tools/make-standalone-toolchain.sh --platform=android-9 --toolchain=arm-linux-androideabi-4.9 --use-llvm --install-dir=$(ANDROID_TOOLCHAIN) - endif ifeq ($(ANDROID_ARCH),ARM64) $(ANDROID_NDK)/build/tools/make-standalone-toolchain.sh --platform=android-21 --toolchain=aarch64-linux-androideabi-4.9 --use-llvm --install-dir=$(ANDROID_TOOLCHAIN) endif diff --git a/templates/advance_game/Makefile.Android b/templates/advance_game/Makefile.Android index f082ab23..af23f4a3 100644 --- a/templates/advance_game/Makefile.Android +++ b/templates/advance_game/Makefile.Android @@ -29,7 +29,7 @@ RAYLIB_PATH ?= ..\.. # NOTE: JAVA_HOME must be set to JDK ANDROID_HOME = C:/android-sdk ANDROID_NDK = C:/android-ndk -ANDROID_TOOLCHAIN = C:/android_toolchain_arm_api16 +ANDROID_TOOLCHAIN = C:/android_toolchain_arm64_api21 ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/26.0.2 ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools JAVA_HOME = C:/PROGRA~1/Java/jdk1.8.0_144 @@ -61,21 +61,21 @@ APP_KEYSTORE_PASS ?= raylib # Library type used for raylib: STATIC (.a) or SHARED (.so/.dll) RAYLIB_LIBTYPE ?= STATIC -RAYLIB_LIB_PATH = $(RAYLIB_PATH)\release\libs\android\armeabi-v7a +RAYLIB_LIB_PATH = $(RAYLIB_PATH)\release\libs\android\arm64-v8a # Shared libs must be added to APK if required # NOTE: Generated NativeLoader.java automatically load those libraries ifeq ($(RAYLIB_LIBTYPE),SHARED) - PROJECT_SHARED_LIBS = lib/armeabi-v7a/libraylib.so + PROJECT_SHARED_LIBS = lib/arm64-v8a/libraylib.so endif # Compiler and archiver # NOTE: GCC is being deprectated in Android NDK r16 -CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-gcc -AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar +CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang +AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar # Compiler flags for arquitecture -CFLAGS = -std=c99 -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 +CFLAGS = -std=c99 -march=arm64-v8a # Compilation functions attributes options CFLAGS += -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC # Compiler options for the linker @@ -92,7 +92,7 @@ LDFLAGS += -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl # Force linking of library module to define symbol LDFLAGS += -u ANativeActivity_onCreate # Library paths containing required libs -LDFLAGS += -L. -L$(PROJECT_BUILD_PATH)/obj -L$(PROJECT_BUILD_PATH)/lib/armeabi-v7a +LDFLAGS += -L. -L$(PROJECT_BUILD_PATH)/obj -L$(PROJECT_BUILD_PATH)/lib/arm64-v8a # Define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname @@ -127,7 +127,7 @@ create_temp_project_dirs: if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)\$(APP_PRODUCT_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)\$(APP_PRODUCT_NAME) if not exist $(PROJECT_BUILD_PATH)\lib mkdir $(PROJECT_BUILD_PATH)\lib - if not exist $(PROJECT_BUILD_PATH)\lib\armeabi-v7a mkdir $(PROJECT_BUILD_PATH)\lib\armeabi-v7a + if not exist $(PROJECT_BUILD_PATH)\lib\arm64-v8a mkdir $(PROJECT_BUILD_PATH)\lib\arm64-v8a if not exist $(PROJECT_BUILD_PATH)\bin mkdir $(PROJECT_BUILD_PATH)\bin if not exist $(PROJECT_BUILD_PATH)\res mkdir $(PROJECT_BUILD_PATH)\res if not exist $(PROJECT_BUILD_PATH)\res\drawable-ldpi mkdir $(PROJECT_BUILD_PATH)\res\drawable-ldpi @@ -147,10 +147,10 @@ endef # NOTE: If using shared libs they are loaded by generated NativeLoader.java copy_project_required_libs: ifeq ($(RAYLIB_LIBTYPE),SHARED) - copy /Y $(RAYLIB_LIB_PATH)\libraylib.so $(PROJECT_BUILD_PATH)\lib\armeabi-v7a\libraylib.so + copy /Y $(RAYLIB_LIB_PATH)\libraylib.so $(PROJECT_BUILD_PATH)\lib\arm64-v8a\libraylib.so endif ifeq ($(RAYLIB_LIBTYPE),STATIC) - copy /Y $(RAYLIB_LIB_PATH)\libraylib.a $(PROJECT_BUILD_PATH)\lib\armeabi-v7a\libraylib.a + copy /Y $(RAYLIB_LIB_PATH)\libraylib.a $(PROJECT_BUILD_PATH)\lib\arm64-v8a\libraylib.a endif # Copy project required resources: strings.xml, icon.png, assets @@ -219,7 +219,7 @@ compile_native_app_glue: # Compile project code into a shared library: lib/lib$(PROJECT_LIBRARY_NAME).so compile_project_code: $(OBJS) - $(CC) -o $(PROJECT_BUILD_PATH)/lib/armeabi-v7a/lib$(PROJECT_LIBRARY_NAME).so $(OBJS) -shared $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) + $(CC) -o $(PROJECT_BUILD_PATH)/lib/arm64-v8a/lib$(PROJECT_LIBRARY_NAME).so $(OBJS) -shared $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) # Compile all .c files required into object (.o) files # NOTE: Those files will be linked into a shared library @@ -240,7 +240,7 @@ compile_project_class_dex: # NOTE: Use -A resources to define additional directory in which to find raw asset files create_project_apk_package: $(ANDROID_BUILD_TOOLS)/aapt package -f -M $(PROJECT_BUILD_PATH)/AndroidManifest.xml -S $(PROJECT_BUILD_PATH)/res -A $(PROJECT_BUILD_PATH)/assets -I $(ANDROID_HOME)/platforms/android-16/android.jar -F $(PROJECT_BUILD_PATH)/bin/$(PROJECT_NAME).unsigned.apk $(PROJECT_BUILD_PATH)/bin - cd $(PROJECT_BUILD_PATH) && $(ANDROID_BUILD_TOOLS)/aapt add bin/$(PROJECT_NAME).unsigned.apk lib/armeabi-v7a/lib$(PROJECT_LIBRARY_NAME).so $(PROJECT_SHARED_LIBS) + cd $(PROJECT_BUILD_PATH) && $(ANDROID_BUILD_TOOLS)/aapt add bin/$(PROJECT_NAME).unsigned.apk lib/arm64-v8a/lib$(PROJECT_LIBRARY_NAME).so $(PROJECT_SHARED_LIBS) # Create signed APK package using generated Key: bin/$(PROJECT_NAME).signed.apk sign_project_apk_package: diff --git a/templates/simple_game/Makefile.Android b/templates/simple_game/Makefile.Android index f082ab23..e45293fd 100644 --- a/templates/simple_game/Makefile.Android +++ b/templates/simple_game/Makefile.Android @@ -29,7 +29,7 @@ RAYLIB_PATH ?= ..\.. # NOTE: JAVA_HOME must be set to JDK ANDROID_HOME = C:/android-sdk ANDROID_NDK = C:/android-ndk -ANDROID_TOOLCHAIN = C:/android_toolchain_arm_api16 +ANDROID_TOOLCHAIN = C:/android_toolchain_arm64_api21 ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/26.0.2 ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools JAVA_HOME = C:/PROGRA~1/Java/jdk1.8.0_144 @@ -61,21 +61,21 @@ APP_KEYSTORE_PASS ?= raylib # Library type used for raylib: STATIC (.a) or SHARED (.so/.dll) RAYLIB_LIBTYPE ?= STATIC -RAYLIB_LIB_PATH = $(RAYLIB_PATH)\release\libs\android\armeabi-v7a +RAYLIB_LIB_PATH = $(RAYLIB_PATH)\release\libs\android\arm64-v8a # Shared libs must be added to APK if required # NOTE: Generated NativeLoader.java automatically load those libraries ifeq ($(RAYLIB_LIBTYPE),SHARED) - PROJECT_SHARED_LIBS = lib/armeabi-v7a/libraylib.so + PROJECT_SHARED_LIBS = lib/arm64-v8a/libraylib.so endif # Compiler and archiver # NOTE: GCC is being deprectated in Android NDK r16 -CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-gcc -AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar +CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang +AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar # Compiler flags for arquitecture -CFLAGS = -std=c99 -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 +CFLAGS = -std=c99 -march=arm64-v8a # Compilation functions attributes options CFLAGS += -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC # Compiler options for the linker @@ -127,7 +127,7 @@ create_temp_project_dirs: if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)\$(APP_PRODUCT_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)\$(APP_PRODUCT_NAME) if not exist $(PROJECT_BUILD_PATH)\lib mkdir $(PROJECT_BUILD_PATH)\lib - if not exist $(PROJECT_BUILD_PATH)\lib\armeabi-v7a mkdir $(PROJECT_BUILD_PATH)\lib\armeabi-v7a + if not exist $(PROJECT_BUILD_PATH)\lib\arm64-v8a mkdir $(PROJECT_BUILD_PATH)\lib\arm64-v8a if not exist $(PROJECT_BUILD_PATH)\bin mkdir $(PROJECT_BUILD_PATH)\bin if not exist $(PROJECT_BUILD_PATH)\res mkdir $(PROJECT_BUILD_PATH)\res if not exist $(PROJECT_BUILD_PATH)\res\drawable-ldpi mkdir $(PROJECT_BUILD_PATH)\res\drawable-ldpi @@ -147,10 +147,10 @@ endef # NOTE: If using shared libs they are loaded by generated NativeLoader.java copy_project_required_libs: ifeq ($(RAYLIB_LIBTYPE),SHARED) - copy /Y $(RAYLIB_LIB_PATH)\libraylib.so $(PROJECT_BUILD_PATH)\lib\armeabi-v7a\libraylib.so + copy /Y $(RAYLIB_LIB_PATH)\libraylib.so $(PROJECT_BUILD_PATH)\lib\arm64-v8a\libraylib.so endif ifeq ($(RAYLIB_LIBTYPE),STATIC) - copy /Y $(RAYLIB_LIB_PATH)\libraylib.a $(PROJECT_BUILD_PATH)\lib\armeabi-v7a\libraylib.a + copy /Y $(RAYLIB_LIB_PATH)\libraylib.a $(PROJECT_BUILD_PATH)\lib\arm64-v8a\libraylib.a endif # Copy project required resources: strings.xml, icon.png, assets @@ -219,7 +219,7 @@ compile_native_app_glue: # Compile project code into a shared library: lib/lib$(PROJECT_LIBRARY_NAME).so compile_project_code: $(OBJS) - $(CC) -o $(PROJECT_BUILD_PATH)/lib/armeabi-v7a/lib$(PROJECT_LIBRARY_NAME).so $(OBJS) -shared $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) + $(CC) -o $(PROJECT_BUILD_PATH)/lib/arm64-v8a/lib$(PROJECT_LIBRARY_NAME).so $(OBJS) -shared $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) # Compile all .c files required into object (.o) files # NOTE: Those files will be linked into a shared library @@ -240,7 +240,7 @@ compile_project_class_dex: # NOTE: Use -A resources to define additional directory in which to find raw asset files create_project_apk_package: $(ANDROID_BUILD_TOOLS)/aapt package -f -M $(PROJECT_BUILD_PATH)/AndroidManifest.xml -S $(PROJECT_BUILD_PATH)/res -A $(PROJECT_BUILD_PATH)/assets -I $(ANDROID_HOME)/platforms/android-16/android.jar -F $(PROJECT_BUILD_PATH)/bin/$(PROJECT_NAME).unsigned.apk $(PROJECT_BUILD_PATH)/bin - cd $(PROJECT_BUILD_PATH) && $(ANDROID_BUILD_TOOLS)/aapt add bin/$(PROJECT_NAME).unsigned.apk lib/armeabi-v7a/lib$(PROJECT_LIBRARY_NAME).so $(PROJECT_SHARED_LIBS) + cd $(PROJECT_BUILD_PATH) && $(ANDROID_BUILD_TOOLS)/aapt add bin/$(PROJECT_NAME).unsigned.apk lib/arm64-v8a/lib$(PROJECT_LIBRARY_NAME).so $(PROJECT_SHARED_LIBS) # Create signed APK package using generated Key: bin/$(PROJECT_NAME).signed.apk sign_project_apk_package: diff --git a/templates/standard_game/Makefile.Android b/templates/standard_game/Makefile.Android index f082ab23..d9503a40 100644 --- a/templates/standard_game/Makefile.Android +++ b/templates/standard_game/Makefile.Android @@ -29,7 +29,7 @@ RAYLIB_PATH ?= ..\.. # NOTE: JAVA_HOME must be set to JDK ANDROID_HOME = C:/android-sdk ANDROID_NDK = C:/android-ndk -ANDROID_TOOLCHAIN = C:/android_toolchain_arm_api16 +ANDROID_TOOLCHAIN = C:/android_toolchain_arm64_api21 ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/26.0.2 ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools JAVA_HOME = C:/PROGRA~1/Java/jdk1.8.0_144 @@ -61,21 +61,22 @@ APP_KEYSTORE_PASS ?= raylib # Library type used for raylib: STATIC (.a) or SHARED (.so/.dll) RAYLIB_LIBTYPE ?= STATIC -RAYLIB_LIB_PATH = $(RAYLIB_PATH)\release\libs\android\armeabi-v7a +RAYLIB_LIB_PATH = $(RAYLIB_PATH)\release\libs\android\arm64-v8a # Shared libs must be added to APK if required # NOTE: Generated NativeLoader.java automatically load those libraries ifeq ($(RAYLIB_LIBTYPE),SHARED) - PROJECT_SHARED_LIBS = lib/armeabi-v7a/libraylib.so + PROJECT_SHARED_LIBS = lib/arm64-v8a/libraylib.so endif # Compiler and archiver # NOTE: GCC is being deprectated in Android NDK r16 -CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-gcc -AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar +CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang +AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar # Compiler flags for arquitecture -CFLAGS = -std=c99 -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 +#CFLAGS = -std=c99 -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 --> Old 32bit +CFLAGS = -std=c99 -march=arm64-v8a # Compilation functions attributes options CFLAGS += -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC # Compiler options for the linker @@ -92,7 +93,7 @@ LDFLAGS += -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl # Force linking of library module to define symbol LDFLAGS += -u ANativeActivity_onCreate # Library paths containing required libs -LDFLAGS += -L. -L$(PROJECT_BUILD_PATH)/obj -L$(PROJECT_BUILD_PATH)/lib/armeabi-v7a +LDFLAGS += -L. -L$(PROJECT_BUILD_PATH)/obj -L$(PROJECT_BUILD_PATH)/lib/arm64-v8a # Define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname @@ -127,7 +128,7 @@ create_temp_project_dirs: if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)\$(APP_PRODUCT_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)\$(APP_PRODUCT_NAME) if not exist $(PROJECT_BUILD_PATH)\lib mkdir $(PROJECT_BUILD_PATH)\lib - if not exist $(PROJECT_BUILD_PATH)\lib\armeabi-v7a mkdir $(PROJECT_BUILD_PATH)\lib\armeabi-v7a + if not exist $(PROJECT_BUILD_PATH)\lib\arm64-v8a mkdir $(PROJECT_BUILD_PATH)\lib\arm64-v8a if not exist $(PROJECT_BUILD_PATH)\bin mkdir $(PROJECT_BUILD_PATH)\bin if not exist $(PROJECT_BUILD_PATH)\res mkdir $(PROJECT_BUILD_PATH)\res if not exist $(PROJECT_BUILD_PATH)\res\drawable-ldpi mkdir $(PROJECT_BUILD_PATH)\res\drawable-ldpi @@ -147,10 +148,10 @@ endef # NOTE: If using shared libs they are loaded by generated NativeLoader.java copy_project_required_libs: ifeq ($(RAYLIB_LIBTYPE),SHARED) - copy /Y $(RAYLIB_LIB_PATH)\libraylib.so $(PROJECT_BUILD_PATH)\lib\armeabi-v7a\libraylib.so + copy /Y $(RAYLIB_LIB_PATH)\libraylib.so $(PROJECT_BUILD_PATH)\lib\arm64-v8a\libraylib.so endif ifeq ($(RAYLIB_LIBTYPE),STATIC) - copy /Y $(RAYLIB_LIB_PATH)\libraylib.a $(PROJECT_BUILD_PATH)\lib\armeabi-v7a\libraylib.a + copy /Y $(RAYLIB_LIB_PATH)\libraylib.a $(PROJECT_BUILD_PATH)\lib\arm64-v8a\libraylib.a endif # Copy project required resources: strings.xml, icon.png, assets @@ -219,7 +220,7 @@ compile_native_app_glue: # Compile project code into a shared library: lib/lib$(PROJECT_LIBRARY_NAME).so compile_project_code: $(OBJS) - $(CC) -o $(PROJECT_BUILD_PATH)/lib/armeabi-v7a/lib$(PROJECT_LIBRARY_NAME).so $(OBJS) -shared $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) + $(CC) -o $(PROJECT_BUILD_PATH)/lib/arm64-v8a/lib$(PROJECT_LIBRARY_NAME).so $(OBJS) -shared $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) # Compile all .c files required into object (.o) files # NOTE: Those files will be linked into a shared library @@ -240,7 +241,7 @@ compile_project_class_dex: # NOTE: Use -A resources to define additional directory in which to find raw asset files create_project_apk_package: $(ANDROID_BUILD_TOOLS)/aapt package -f -M $(PROJECT_BUILD_PATH)/AndroidManifest.xml -S $(PROJECT_BUILD_PATH)/res -A $(PROJECT_BUILD_PATH)/assets -I $(ANDROID_HOME)/platforms/android-16/android.jar -F $(PROJECT_BUILD_PATH)/bin/$(PROJECT_NAME).unsigned.apk $(PROJECT_BUILD_PATH)/bin - cd $(PROJECT_BUILD_PATH) && $(ANDROID_BUILD_TOOLS)/aapt add bin/$(PROJECT_NAME).unsigned.apk lib/armeabi-v7a/lib$(PROJECT_LIBRARY_NAME).so $(PROJECT_SHARED_LIBS) + cd $(PROJECT_BUILD_PATH) && $(ANDROID_BUILD_TOOLS)/aapt add bin/$(PROJECT_NAME).unsigned.apk lib/arm64-v8a/lib$(PROJECT_LIBRARY_NAME).so $(PROJECT_SHARED_LIBS) # Create signed APK package using generated Key: bin/$(PROJECT_NAME).signed.apk sign_project_apk_package: -- cgit v1.2.3