aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2016-03-25 13:49:56 -0700
committerYing Wang <wangying@google.com>2016-03-25 13:49:56 -0700
commit3ee66b8d1a59b69545419a57d7c2721a587aef28 (patch)
tree1994c9e72108b87e54ed4b027b6a384eecaf73b6
parentb937fcf1c310758b28d2d19bb0e10c5f881365f9 (diff)
downloadjpeg-3ee66b8d1a59b69545419a57d7c2721a587aef28.tar.gz
Use arch-specific variables
This fixes x86+arm multilib build. Bug: 27526885 Change-Id: I06d11b33ed2fef027ff73dda9309b29d28dda6b6
-rw-r--r--Android.mk38
1 files changed, 16 insertions, 22 deletions
diff --git a/Android.mk b/Android.mk
index 672bcb3..8f838f9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -28,36 +28,30 @@ LOCAL_CFLAGS += -Wno-unused-parameter
# enable tile based decode
LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE
-ifeq ($(TARGET_ARCH),x86)
- LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT
- LOCAL_SRC_FILES += jidctintelsse.c
-endif
+LOCAL_CFLAGS_x86 += -DANDROID_INTELSSE2_IDCT
+LOCAL_SRC_FILES_x86 += jidctintelsse.c
LOCAL_SRC_FILES_arm64 += \
jsimd_arm64_neon.S \
jsimd_neon.c
-ifeq ($(strip $(TARGET_ARCH)),arm)
- ifeq ($(ARCH_ARM_HAVE_NEON),true)
- #use NEON accelerations
- LOCAL_CFLAGS += -DNV_ARM_NEON -D__ARM_HAVE_NEON
- LOCAL_SRC_FILES += \
- jsimd_arm_neon.S \
- jsimd_neon.c
- else
- # enable armv6 idct assembly
- LOCAL_CFLAGS += -DANDROID_ARMV6_IDCT
- endif
+ifeq ($(ARCH_ARM_HAVE_NEON),true)
+ #use NEON accelerations
+ LOCAL_CFLAGS_arm += -DNV_ARM_NEON -D__ARM_HAVE_NEON
+ LOCAL_SRC_FILES_arm += \
+ jsimd_arm_neon.S \
+ jsimd_neon.c
+else
+ # enable armv6 idct assembly
+ LOCAL_CFLAGS_arm += -DANDROID_ARMV6_IDCT
endif
# use mips assembler IDCT implementation if MIPS DSP-ASE is present
-ifeq ($(strip $(TARGET_ARCH)),mips)
- ifeq ($(strip $(ARCH_MIPS_HAS_DSP)),true)
- LOCAL_CFLAGS += -DANDROID_MIPS_IDCT
- LOCAL_SRC_FILES += \
- mips_jidctfst.c \
- mips_idct_le.S
- endif
+ifeq ($(strip $(ARCH_MIPS_HAS_DSP)),true)
+LOCAL_CFLAGS_mips += -DANDROID_MIPS_IDCT
+LOCAL_SRC_FILES_mips += \
+ mips_jidctfst.c \
+ mips_idct_le.S
endif
LOCAL_MODULE := libjpeg_static