Merge changes Ic697660c,I27285521

* changes:
  Android.mk: add a dwebp target
  Android.mk: update build flags
This commit is contained in:
James Zern 2013-10-04 05:02:13 -07:00 committed by Gerrit Code Review
commit 4df0c89e24

View File

@ -1,6 +1,13 @@
LOCAL_PATH:= $(call my-dir) LOCAL_PATH := $(call my-dir)
WEBP_CFLAGS := -Wall -DANDROID -DHAVE_MALLOC_H -DHAVE_PTHREAD -DWEBP_USE_THREAD
ifeq ($(APP_OPTIM),release)
WEBP_CFLAGS += -finline-functions -frename-registers -ffast-math -s
endif
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
src/dec/alpha.c \ src/dec/alpha.c \
src/dec/buffer.c \ src/dec/buffer.c \
@ -52,13 +59,12 @@ LOCAL_SRC_FILES := \
src/utils/thread.c \ src/utils/thread.c \
src/utils/utils.c \ src/utils/utils.c \
LOCAL_CFLAGS := -Wall -DANDROID -DHAVE_MALLOC_H -DHAVE_PTHREAD \ LOCAL_CFLAGS := $(WEBP_CFLAGS)
-DWEBP_USE_THREAD \
-finline-functions -frename-registers -ffast-math \
-s -fomit-frame-pointer -Isrc/webp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/src LOCAL_C_INCLUDES += $(LOCAL_PATH)/src
# prefer arm over thumb mode for performance gains
LOCAL_ARM_MODE := arm
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
# Setting LOCAL_ARM_NEON will enable -mfpu=neon which may cause illegal # Setting LOCAL_ARM_NEON will enable -mfpu=neon which may cause illegal
# instructions to be generated for armv7a code. Instead target the neon code # instructions to be generated for armv7a code. Instead target the neon code
@ -69,8 +75,22 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
endif endif
LOCAL_STATIC_LIBRARIES := cpufeatures LOCAL_STATIC_LIBRARIES := cpufeatures
LOCAL_MODULE:= webp LOCAL_MODULE := webp
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
examples/dwebp.c \
examples/example_util.c \
LOCAL_CFLAGS := $(WEBP_CFLAGS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/src
LOCAL_STATIC_LIBRARIES := webp
LOCAL_MODULE := dwebp
include $(BUILD_EXECUTABLE)
$(call import-module,android/cpufeatures) $(call import-module,android/cpufeatures)