From 8697a3bcc80bad6ad8e2656a4698b466ba190216 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 24 Feb 2015 18:25:06 -0800 Subject: [PATCH] Android.mk: add webpdecoder{,_static} targets webpdecoder_static is reused to create libwebpdecoder.so and libwebp.{a,so} Change-Id: I940293cb755040c0ea45dc13f22624de8f355867 --- Android.mk | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/Android.mk b/Android.mk index 3abc1da4..bafab597 100644 --- a/Android.mk +++ b/Android.mk @@ -117,15 +117,14 @@ utils_enc_srcs := \ src/utils/quant_levels.c \ ################################################################################ -# libwebp +# libwebpdecoder include $(CLEAR_VARS) LOCAL_SRC_FILES := \ $(dec_srcs) \ - $(dsp_dec_srcs) $(dsp_enc_srcs) \ - $(enc_srcs) \ - $(utils_dec_srcs) $(utils_enc_srcs) \ + $(dsp_dec_srcs) \ + $(utils_dec_srcs) \ LOCAL_CFLAGS := $(WEBP_CFLAGS) LOCAL_C_INCLUDES += $(LOCAL_PATH)/src @@ -135,6 +134,38 @@ LOCAL_ARM_MODE := arm LOCAL_STATIC_LIBRARIES := cpufeatures +LOCAL_MODULE := webpdecoder_static + +include $(BUILD_STATIC_LIBRARY) + +ifeq ($(ENABLE_SHARED),1) +include $(CLEAR_VARS) + +LOCAL_WHOLE_STATIC_LIBRARIES := webpdecoder_static + +LOCAL_MODULE := webpdecoder + +include $(BUILD_SHARED_LIBRARY) +endif # ENABLE_SHARED=1 + +################################################################################ +# libwebp + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(dsp_enc_srcs) \ + $(enc_srcs) \ + $(utils_enc_srcs) \ + +LOCAL_CFLAGS := $(WEBP_CFLAGS) +LOCAL_C_INCLUDES += $(LOCAL_PATH)/src + +# prefer arm over thumb mode for performance gains +LOCAL_ARM_MODE := arm + +LOCAL_WHOLE_STATIC_LIBRARIES := webpdecoder_static + LOCAL_MODULE := webp ifeq ($(ENABLE_SHARED),1)