Explorar o código

Merged in AuahDark/love-android-sdl2/love11-arm64 (pull request #15)

Add ARM64 ABI support
Miku AuahDark %!s(int64=6) %!d(string=hai) anos
pai
achega
288f005d86

+ 5 - 1
love/build.gradle

@@ -21,7 +21,7 @@ android {
         ndk {
             // Specifies the ABI configurations of your native
             // libraries Gradle should build and package with your APK.
-            abiFilters 'armeabi-v7a'
+            abiFilters 'armeabi-v7a', 'arm64-v8a'
         }
     }
     buildTypes {
@@ -45,6 +45,10 @@ android {
     lintOptions {
         abortOnError false
     }
+    packagingOptions {
+        exclude 'lib/arm64-v8a/libSDL2.so'
+        exclude 'lib/armeabi-v7a/libSDL2.so'
+    }
 }
 
 dependencies {

BIN=BIN
love/src/jni/LuaJIT-2.1/android/arm64-v8a/libluajit.a


+ 8 - 0
love/src/jni/love/Android.mk

@@ -11,6 +11,14 @@ LOCAL_CFLAGS    := -fexceptions -g -Dlinux -Dunix \
 
 LOCAL_CPPFLAGS  := ${LOCAL_CFLAGS} 
 
+# I don't think there's armeabi-v7a device without NEON instructions in 2018
+LOCAL_ARM_NEON := true
+
+ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
+	# ARM64 does have socklen_t
+	LOCAL_CFLAGS += -DHAS_SOCKLEN_T=1
+endif
+
 LOCAL_C_INCLUDES  :=  \
 	${LOCAL_PATH}/src \
 	${LOCAL_PATH}/src/modules \

+ 5 - 0
love/src/jni/openal-soft-1.18.2/Android.mk

@@ -8,6 +8,11 @@ LOCAL_CFLAGS    := -DAL_ALEXT_PROTOTYPES -DAL_BUILD_LIBRARY -D_GNU_SOURCE=1 -D_P
 
 LOCAL_CPPFLAGS  := ${LOCAL_CFLAGS}
 
+ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
+	# ARM64 have log2f function
+	LOCAL_CFLAGS += -DHAVE_LOG2F
+endif
+
 LOCAL_C_INCLUDES  :=  \
 	${LOCAL_PATH}/include \
 	${LOCAL_PATH}/common \