Clean LOVE Android.mk and rename/fix detection variables.

This commit is contained in:
Tae Hanazono
2019-07-02 11:15:16 +08:00
parent 0ebc4d9271
commit 2a23cbd16d
3 changed files with 7 additions and 15 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
NDK_R17 := $(shell python $(call my-dir)/detect_ndkrel.py $(NDK_ROOT)/source.properties 17)
ANDROID_21_OR_LATER := $(shell python $(call my-dir)/detect_androidapi.py $(NDK_ROOT)/source.properties 17)
IS_NDK_R17 := $(shell python $(call my-dir)/detect_ndkrel.py $(NDK_ROOT)/source.properties 17)
IS_ANDROID_21 := $(shell python $(call my-dir)/detect_androidapi.py $(TARGET_PLATFORM) 21)
include $(call all-subdir-makefiles)
+3 -11
View File
@@ -1,6 +1,4 @@
LOCAL_PATH:= $(call my-dir)
# libogg
include $(CLEAR_VARS)
LOCAL_MODULE := liblove
@@ -14,8 +12,8 @@ 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
ifeq ($(IS_ANDROID_21),yes)
# API21 defines socklen_t
LOCAL_CFLAGS += -DHAS_SOCKLEN_T=1
endif
@@ -27,10 +25,6 @@ LOCAL_C_INCLUDES := \
${LOCAL_PATH}/src/libraries/physfs \
${LOCAL_PATH}/src/libraries/glslang/glslang/Include \
${LOCAL_PATH}/../SDL2-2.0.9/include \
${LOCAL_PATH}/../jasper-1.900.1/src/libjasper/include \
${LOCAL_PATH}/../libmng-1.0.10/ \
${LOCAL_PATH}/../lcms2-2.5/include \
${LOCAL_PATH}/../tiff-3.9.5/libtiff \
${LOCAL_PATH}/../openal-soft-1.19.1/include \
${LOCAL_PATH}/../freetype2-android/include \
${LOCAL_PATH}/../freetype2-android/src \
@@ -116,10 +110,8 @@ LOCAL_SRC_FILES := \
$(wildcard ${LOCAL_PATH}/src/libraries/xxHash/*.c) \
))
LOCAL_CXXFLAGS := -std=c++0x
LOCAL_CXXFLAGS := -std=c++11
LOCAL_SHARED_LIBRARIES := libopenal libmpg123
LOCAL_STATIC_LIBRARIES := libvorbis libogg libtheora libmodplug libfreetype libluajit SDL2_static
# $(info liblove: include dirs $(LOCAL_C_INCLUDES))
+2 -2
View File
@@ -130,13 +130,13 @@ else ifneq (,$(findstring HAVE_NEON,${LOCAL_CFLAGS}))
endif
# NDK R17 Support library
ifeq ($(NDK_R17),yes)
ifeq ($(IS_NDK_R17),yes)
# Well, NDK r17 (is it?) defines all function regardless of API level
ifeq (,$(findstring HAVE_LOG2F,${LOCAL_CFLAGS}))
LOCAL_CFLAGS += -DHAVE_LOG2F
endif
# Also only link with android_support for older than 21
ifeq ($(ANDROID_21_OR_LATER),no)
ifeq ($(IS_ANDROID_21),no)
LOCAL_STATIC_LIBRARIES += android_support
endif
endif