From f910a84ea5bea7168398dfe88de0810ae67f805b Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 4 Oct 2013 11:06:33 +0200 Subject: [PATCH] Android.mk: update build flags - split out release specific flags - set LOCAL_ARM_MODE to arm Change-Id: I272855216583d6c8d0a4106e8b3fde46aa59dfa9 --- Android.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Android.mk b/Android.mk index b0bec4b4..0071b9da 100644 --- a/Android.mk +++ b/Android.mk @@ -54,11 +54,16 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := -Wall -DANDROID -DHAVE_MALLOC_H -DHAVE_PTHREAD \ -DWEBP_USE_THREAD \ - -finline-functions -frename-registers -ffast-math \ - -s -fomit-frame-pointer -Isrc/webp + +ifeq ($(APP_OPTIM),release) + LOCAL_CFLAGS += -finline-functions -frename-registers -ffast-math -s +endif LOCAL_C_INCLUDES += $(LOCAL_PATH)/src +# prefer arm over thumb mode for performance gains +LOCAL_ARM_MODE := arm + ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) # Setting LOCAL_ARM_NEON will enable -mfpu=neon which may cause illegal # instructions to be generated for armv7a code. Instead target the neon code @@ -69,7 +74,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) endif LOCAL_STATIC_LIBRARIES := cpufeatures -LOCAL_MODULE:= webp +LOCAL_MODULE := webp include $(BUILD_STATIC_LIBRARY)