Browse Source

Modify LOVE Android.mk

There are two changes in here. First change is to tell Android build
system to use NEON instruction support. Slime already wrote a
NEON-optimized matrix multiplication function which is already in love main
source code (see link below for related commit)
https://bitbucket.org/rude/love/commits/e61734b33581a485743ea79b87d02f8aeb77693e

The problem is that not all ARMv7 devices do support NEON instruction, but
I don't even think if such device exist in 2018 (or even in 2019). ARM64
guarantee NEON instruction support, so it's all good for ARM64.

The second change is to define "HAVE_SOCKLEN_T=1" only when building ARM64.
This is needed because LuaSocket (or enet, I don't remember exactly)
redefines socklen_t and this cause compiler error.
Tae Hanazono 7 years ago
parent
commit
9a11b88572
1 changed files with 8 additions and 0 deletions
  1. 8 0
      love/src/jni/love/Android.mk

+ 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 \