2013-10-04 11:26:37 +02:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
|
|
|
WEBP_CFLAGS := -Wall -DANDROID -DHAVE_MALLOC_H -DHAVE_PTHREAD -DWEBP_USE_THREAD
|
|
|
|
|
|
|
|
ifeq ($(APP_OPTIM),release)
|
2014-02-08 05:31:44 +01:00
|
|
|
WEBP_CFLAGS += -finline-functions -ffast-math \
|
2013-11-14 02:04:31 +01:00
|
|
|
-ffunction-sections -fdata-sections
|
2014-02-08 05:31:44 +01:00
|
|
|
ifeq ($(findstring clang,$(NDK_TOOLCHAIN_VERSION)),)
|
|
|
|
WEBP_CFLAGS += -frename-registers -s
|
|
|
|
endif
|
2013-10-04 11:26:37 +02:00
|
|
|
endif
|
2010-09-30 15:34:38 +02:00
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
2013-10-04 11:26:37 +02:00
|
|
|
|
2014-05-14 08:32:43 +02:00
|
|
|
ifneq ($(findstring armeabi-v7a, $(TARGET_ARCH_ABI)),)
|
|
|
|
# Setting LOCAL_ARM_NEON will enable -mfpu=neon which may cause illegal
|
|
|
|
# instructions to be generated for armv7a code. Instead target the neon code
|
|
|
|
# specifically.
|
|
|
|
NEON := c.neon
|
|
|
|
else
|
|
|
|
NEON := c
|
|
|
|
endif
|
|
|
|
|
2010-09-30 15:34:38 +02:00
|
|
|
LOCAL_SRC_FILES := \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dec/alpha.c \
|
|
|
|
src/dec/buffer.c \
|
|
|
|
src/dec/frame.c \
|
|
|
|
src/dec/idec.c \
|
|
|
|
src/dec/io.c \
|
|
|
|
src/dec/quant.c \
|
|
|
|
src/dec/tree.c \
|
|
|
|
src/dec/vp8.c \
|
|
|
|
src/dec/vp8l.c \
|
|
|
|
src/dec/webp.c \
|
2014-05-26 18:05:03 +02:00
|
|
|
src/dsp/alpha_processing.c \
|
2014-08-21 19:26:18 +02:00
|
|
|
src/dsp/alpha_processing_mips_dsp_r2.c \
|
2014-08-26 05:55:28 +02:00
|
|
|
src/dsp/alpha_processing_sse2.c \
|
2014-11-20 16:53:05 +01:00
|
|
|
src/dsp/argb.c \
|
|
|
|
src/dsp/argb_mips_dsp_r2.c \
|
2015-01-05 13:44:58 +01:00
|
|
|
src/dsp/argb_sse2.c \
|
2015-02-07 11:13:26 +01:00
|
|
|
src/dsp/cost.c \
|
|
|
|
src/dsp/cost_mips32.c \
|
|
|
|
src/dsp/cost_mips_dsp_r2.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/cpu.c \
|
|
|
|
src/dsp/dec.c \
|
2014-02-14 04:32:21 +01:00
|
|
|
src/dsp/dec_clip_tables.c \
|
2013-12-25 12:16:01 +01:00
|
|
|
src/dsp/dec_mips32.c \
|
2014-09-02 14:03:13 +02:00
|
|
|
src/dsp/dec_mips_dsp_r2.c \
|
2014-05-14 08:32:43 +02:00
|
|
|
src/dsp/dec_neon.$(NEON) \
|
2012-04-20 21:07:03 +02:00
|
|
|
src/dsp/dec_sse2.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/enc.c \
|
2014-05-22 09:26:18 +02:00
|
|
|
src/dsp/enc_avx2.c \
|
2014-02-19 15:33:50 +01:00
|
|
|
src/dsp/enc_mips32.c \
|
2014-10-10 12:31:00 +02:00
|
|
|
src/dsp/enc_mips_dsp_r2.c \
|
2014-05-14 08:32:43 +02:00
|
|
|
src/dsp/enc_neon.$(NEON) \
|
2012-04-20 21:07:03 +02:00
|
|
|
src/dsp/enc_sse2.c \
|
2015-01-28 08:02:41 +01:00
|
|
|
src/dsp/filters.c \
|
2014-08-04 16:22:10 +02:00
|
|
|
src/dsp/filters_mips_dsp_r2.c \
|
2015-01-29 08:06:29 +01:00
|
|
|
src/dsp/filters_sse2.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/lossless.c \
|
2014-03-24 14:47:19 +01:00
|
|
|
src/dsp/lossless_mips32.c \
|
2014-09-02 16:34:52 +02:00
|
|
|
src/dsp/lossless_mips_dsp_r2.c \
|
2014-05-14 08:32:43 +02:00
|
|
|
src/dsp/lossless_neon.$(NEON) \
|
2014-03-27 21:43:21 +01:00
|
|
|
src/dsp/lossless_sse2.c \
|
2015-01-09 12:05:53 +01:00
|
|
|
src/dsp/rescaler.c \
|
|
|
|
src/dsp/rescaler_mips32.c \
|
|
|
|
src/dsp/rescaler_mips_dsp_r2.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/upsampling.c \
|
2014-08-15 11:00:32 +02:00
|
|
|
src/dsp/upsampling_mips_dsp_r2.c \
|
2014-05-14 08:32:43 +02:00
|
|
|
src/dsp/upsampling_neon.$(NEON) \
|
2012-04-20 21:07:03 +02:00
|
|
|
src/dsp/upsampling_sse2.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/yuv.c \
|
2014-06-07 21:35:47 +02:00
|
|
|
src/dsp/yuv_mips32.c \
|
2014-08-12 11:47:36 +02:00
|
|
|
src/dsp/yuv_mips_dsp_r2.c \
|
2014-06-06 08:49:59 +02:00
|
|
|
src/dsp/yuv_sse2.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/alpha.c \
|
|
|
|
src/enc/analysis.c \
|
2012-07-17 03:43:07 +02:00
|
|
|
src/enc/backward_references.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/config.c \
|
|
|
|
src/enc/cost.c \
|
|
|
|
src/enc/filter.c \
|
|
|
|
src/enc/frame.c \
|
2012-07-17 03:43:07 +02:00
|
|
|
src/enc/histogram.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/iterator.c \
|
2014-08-05 19:14:57 +02:00
|
|
|
src/enc/near_lossless.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/picture.c \
|
2014-07-14 11:04:14 +02:00
|
|
|
src/enc/picture_csp.c \
|
2014-07-12 18:13:33 +02:00
|
|
|
src/enc/picture_psnr.c \
|
|
|
|
src/enc/picture_rescale.c \
|
2014-07-14 11:04:14 +02:00
|
|
|
src/enc/picture_tools.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/quant.c \
|
|
|
|
src/enc/syntax.c \
|
2012-12-03 13:50:14 +01:00
|
|
|
src/enc/token.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/tree.c \
|
2012-07-17 03:43:07 +02:00
|
|
|
src/enc/vp8l.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/webpenc.c \
|
|
|
|
src/utils/bit_reader.c \
|
|
|
|
src/utils/bit_writer.c \
|
|
|
|
src/utils/color_cache.c \
|
|
|
|
src/utils/filters.c \
|
|
|
|
src/utils/huffman.c \
|
2012-07-17 03:43:07 +02:00
|
|
|
src/utils/huffman_encode.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/quant_levels.c \
|
2013-02-14 07:21:41 +01:00
|
|
|
src/utils/quant_levels_dec.c \
|
2013-10-30 10:00:33 +01:00
|
|
|
src/utils/random.c \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/rescaler.c \
|
|
|
|
src/utils/thread.c \
|
2012-08-01 01:56:39 +02:00
|
|
|
src/utils/utils.c \
|
2010-09-30 15:34:38 +02:00
|
|
|
|
2013-10-04 11:26:37 +02:00
|
|
|
LOCAL_CFLAGS := $(WEBP_CFLAGS)
|
2010-09-30 15:34:38 +02:00
|
|
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/src
|
|
|
|
|
2013-10-04 11:06:33 +02:00
|
|
|
# prefer arm over thumb mode for performance gains
|
|
|
|
LOCAL_ARM_MODE := arm
|
|
|
|
|
2012-05-04 21:34:53 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := cpufeatures
|
2012-04-20 21:07:03 +02:00
|
|
|
|
2013-10-04 11:06:33 +02:00
|
|
|
LOCAL_MODULE := webp
|
2010-09-30 15:34:38 +02:00
|
|
|
|
2014-06-18 08:30:20 +02:00
|
|
|
ifeq ($(ENABLE_SHARED),1)
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
else
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
endif
|
2012-05-04 21:34:53 +02:00
|
|
|
|
2014-06-18 08:33:10 +02:00
|
|
|
include $(LOCAL_PATH)/examples/Android.mk
|
2013-10-04 11:26:37 +02:00
|
|
|
|
2012-05-04 21:34:53 +02:00
|
|
|
$(call import-module,android/cpufeatures)
|