diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-06-21 23:33:04 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-06-21 23:33:04 +0000 |
commit | 35810a39194e002892cb6cc48dc9939bbadd1c61 (patch) | |
tree | d1169b95d63529e3a7943dccc4c5fee8ecae16ac | |
parent | 0141f11c240da93c012a9ed4bb35308d86d77454 (diff) | |
parent | 48a5ae8abb3c772824ce333518428c8a2f05dbe0 (diff) | |
download | libjpeg-turbo-35810a39194e002892cb6cc48dc9939bbadd1c61.tar.gz |
Add NDK versions of libjpeg am: 21f73d8ee6
am: 48a5ae8abb
Change-Id: I74b06fd922a290790d5e7c7840e0968a0493c352
-rw-r--r-- | Android.mk | 81 |
1 files changed, 80 insertions, 1 deletions
@@ -1,4 +1,5 @@ LOCAL_PATH:= $(call my-dir) + include $(CLEAR_VARS) # By default, the build system generates ARM target binaries in thumb mode, @@ -87,7 +88,85 @@ ifneq (,$(TARGET_BUILD_APPS)) LOCAL_SDK_VERSION := 17 endif -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) LOCAL_WHOLE_STATIC_LIBRARIES = libjpeg_static LOCAL_MODULE := libjpeg include $(BUILD_SHARED_LIBRARY) + + +# Build static library against the NDK +include $(CLEAR_VARS) + +# By default, the build system generates ARM target binaries in thumb mode, +# where each instruction is 16 bits wide. Defining this variable as arm +# forces the build system to generate object files in 32-bit arm mode. This +# is the same setting previously used by libjpeg. +# TODO (msarett): Run performance tests to determine whether arm mode is still +# preferred to thumb mode for libjpeg-turbo. +LOCAL_ARM_MODE := arm + +LOCAL_SRC_FILES := \ + jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jmemmgr.c \ + jmemnobs.c jquant1.c jquant2.c jutils.c + +# ARM v7 NEON +LOCAL_SRC_FILES_arm += simd/jsimd_arm_neon.S simd/jsimd_arm.c + +# If we are certain that the ARM v7 device has NEON (and there is no need for +# a runtime check), we can indicate that with a flag. +ifeq ($(strip $(TARGET_ARCH)),arm) + ifeq ($(ARCH_ARM_HAVE_NEON),true) + LOCAL_CFLAGS += -D__ARM_HAVE_NEON__ + endif +endif + +# ARM v8 64-bit NEON +LOCAL_SRC_FILES_arm64 += simd/jsimd_arm64_neon.S simd/jsimd_arm64.c + +# x86 MMX and SSE2 +LOCAL_SRC_FILES_x86 += \ + simd/jsimd_i386.c simd/jccolor-mmx.asm simd/jccolor-sse2.asm \ + simd/jcgray-mmx.asm simd/jcgray-sse2.asm simd/jcsample-mmx.asm \ + simd/jcsample-sse2.asm simd/jdcolor-mmx.asm simd/jdcolor-sse2.asm \ + simd/jdmerge-mmx.asm simd/jdmerge-sse2.asm simd/jdsample-mmx.asm \ + simd/jdsample-sse2.asm simd/jfdctflt-3dn.asm simd/jfdctflt-sse.asm \ + simd/jfdctfst-mmx.asm simd/jfdctfst-sse2.asm simd/jfdctint-mmx.asm \ + simd/jfdctint-sse2.asm simd/jidctflt-3dn.asm simd/jidctflt-sse2.asm \ + simd/jidctflt-sse.asm simd/jidctfst-mmx.asm simd/jidctfst-sse2.asm \ + simd/jidctint-mmx.asm simd/jidctint-sse2.asm simd/jidctred-mmx.asm \ + simd/jidctred-sse2.asm simd/jquant-3dn.asm simd/jquantf-sse2.asm \ + simd/jquanti-sse2.asm simd/jquant-mmx.asm simd/jquant-sse.asm \ + simd/jsimdcpu.asm +LOCAL_ASFLAGS_x86 += -DPIC -DELF +LOCAL_C_INCLUDES_x86 += $(LOCAL_PATH)/simd + +# x86-64 SSE2 +LOCAL_SRC_FILES_x86_64 += \ + simd/jsimd_x86_64.c simd/jccolor-sse2-64.asm simd/jcgray-sse2-64.asm \ + simd/jcsample-sse2-64.asm simd/jdcolor-sse2-64.asm \ + simd/jdmerge-sse2-64.asm simd/jdsample-sse2-64.asm \ + simd/jfdctflt-sse-64.asm simd/jfdctfst-sse2-64.asm \ + simd/jfdctint-sse2-64.asm simd/jidctflt-sse2-64.asm \ + simd/jidctfst-sse2-64.asm simd/jidctint-sse2-64.asm \ + simd/jidctred-sse2-64.asm simd/jquantf-sse2-64.asm \ + simd/jquanti-sse2-64.asm +LOCAL_ASFLAGS_x86_64 += -D__x86_64__ -DPIC -DELF +LOCAL_C_INCLUDES_x86_64 += $(LOCAL_PATH)/simd + +LOCAL_SRC_FILES_mips += jsimd_none.c +LOCAL_SRC_FILES_mips64 += jsimd_none.c + +LOCAL_CFLAGS += -O3 -fstrict-aliasing +LOCAL_CFLAGS += -Wno-unused-parameter +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) + +LOCAL_SDK_VERSION := 17 + +# Build as a static library. +LOCAL_MODULE := libjpeg_static_ndk +include $(BUILD_STATIC_LIBRARY) |