From c7164490daba6791a9134e5b2cc7041c5f96c013 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 13 May 2014 23:32:43 -0700 Subject: [PATCH] Android.mk: always include *_neon.c in the build the inclusion of the files is harmless when NEON is not enabled and will allow them to be built with NEON for APP_ABI=arm64-v8a which currently does not use the '.neon' suffix Change-Id: I39377876b1b68822c38f4e2396da93c56145fc0f --- Android.mk | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Android.mk b/Android.mk index 99996599..1035c3e2 100644 --- a/Android.mk +++ b/Android.mk @@ -12,6 +12,15 @@ endif include $(CLEAR_VARS) +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 + LOCAL_SRC_FILES := \ src/dec/alpha.c \ src/dec/buffer.c \ @@ -27,15 +36,19 @@ LOCAL_SRC_FILES := \ src/dsp/dec.c \ src/dsp/dec_clip_tables.c \ src/dsp/dec_mips32.c \ + src/dsp/dec_neon.$(NEON) \ src/dsp/dec_sse2.c \ src/dsp/enc.c \ src/dsp/enc_mips32.c \ + src/dsp/enc_neon.$(NEON) \ src/dsp/enc_sse2.c \ src/dsp/lossless.c \ src/dsp/lossless_mips32.c \ + src/dsp/lossless_neon.$(NEON) \ src/dsp/lossless_sse2.c \ src/dsp/upsampling.c \ src/dsp/upsampling_mips32.c \ + src/dsp/upsampling_neon.$(NEON) \ src/dsp/upsampling_sse2.c \ src/dsp/yuv.c \ src/enc/alpha.c \ @@ -74,15 +87,6 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/src # prefer arm over thumb mode for performance gains LOCAL_ARM_MODE := arm -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. - LOCAL_SRC_FILES += src/dsp/dec_neon.c.neon - LOCAL_SRC_FILES += src/dsp/enc_neon.c.neon - LOCAL_SRC_FILES += src/dsp/lossless_neon.c.neon - LOCAL_SRC_FILES += src/dsp/upsampling_neon.c.neon -endif LOCAL_STATIC_LIBRARIES := cpufeatures LOCAL_MODULE := webp