The Android Open Source Project | 9f5d49a | 2009-03-03 19:30:03 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | include $(CLEAR_VARS) |
| 3 | |
| 4 | LOCAL_ARM_MODE := arm |
| 5 | |
| 6 | LOCAL_SRC_FILES := \ |
Angus Kong | 7fb4687 | 2013-02-25 16:13:09 -0800 | [diff] [blame] | 7 | jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ |
| 8 | jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ |
| 9 | jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ |
| 10 | jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ |
| 11 | jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ |
| 12 | jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ |
| 13 | jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ |
Matt Sarett | 7dbc644 | 2015-04-23 13:11:46 -0400 | [diff] [blame] | 14 | jquant2.c jutils.c jmemmgr.c jmemnobs.c |
Elliott Hughes | 4660f76 | 2014-12-03 17:20:46 -0800 | [diff] [blame] | 15 | |
| 16 | LOCAL_SRC_FILES_arm += armv6_idct.S |
Joseph Wen | 7b6961a | 2010-08-11 15:35:47 +0800 | [diff] [blame] | 17 | |
Chih-Hung Hsieh | 9f6aca3 | 2014-10-16 11:51:01 -0700 | [diff] [blame] | 18 | # jsimd_arm_neon.S does not compile with clang. |
| 19 | LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as |
| 20 | |
Sam Hasinoff | 9f3436c | 2015-06-10 15:34:57 -0700 | [diff] [blame] | 21 | ifneq (,$(TARGET_BUILD_APPS)) |
| 22 | # unbundled branch, built against NDK. |
| 23 | LOCAL_SDK_VERSION := 17 |
| 24 | endif |
| 25 | |
Angus Kong | 7fb4687 | 2013-02-25 16:13:09 -0800 | [diff] [blame] | 26 | LOCAL_CFLAGS += -DAVOID_TABLES |
The Android Open Source Project | 9f5d49a | 2009-03-03 19:30:03 -0800 | [diff] [blame] | 27 | LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays |
| 28 | #LOCAL_CFLAGS += -march=armv6j |
| 29 | |
Joseph Wen | 3147fbe | 2010-07-12 13:15:16 +0800 | [diff] [blame] | 30 | # enable tile based decode |
| 31 | LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE |
| 32 | |
Xun Sun | e08a211 | 2013-11-13 18:00:45 +0800 | [diff] [blame] | 33 | ifeq ($(TARGET_ARCH),x86) |
Raghu Gandham | 71ee859 | 2012-11-06 10:17:40 -0800 | [diff] [blame] | 34 | LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT |
| 35 | LOCAL_SRC_FILES += jidctintelsse.c |
| 36 | endif |
| 37 | |
Raghu Gandham | 71ee859 | 2012-11-06 10:17:40 -0800 | [diff] [blame] | 38 | ifeq ($(strip $(TARGET_ARCH)),arm) |
Prajakta Gudadhe | 6a3be8d | 2012-06-11 14:08:27 -0700 | [diff] [blame] | 39 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 40 | #use NEON accelerations |
Elliott Hughes | 4660f76 | 2014-12-03 17:20:46 -0800 | [diff] [blame] | 41 | LOCAL_CFLAGS += -DNV_ARM_NEON -D__ARM_HAVE_NEON |
Prajakta Gudadhe | 6a3be8d | 2012-06-11 14:08:27 -0700 | [diff] [blame] | 42 | LOCAL_SRC_FILES += \ |
| 43 | jsimd_arm_neon.S \ |
| 44 | jsimd_neon.c |
| 45 | else |
| 46 | # enable armv6 idct assembly |
| 47 | LOCAL_CFLAGS += -DANDROID_ARMV6_IDCT |
| 48 | endif |
Raghu Gandham | 71ee859 | 2012-11-06 10:17:40 -0800 | [diff] [blame] | 49 | endif |
| 50 | |
| 51 | # use mips assembler IDCT implementation if MIPS DSP-ASE is present |
| 52 | ifeq ($(strip $(TARGET_ARCH)),mips) |
| 53 | ifeq ($(strip $(ARCH_MIPS_HAS_DSP)),true) |
| 54 | LOCAL_CFLAGS += -DANDROID_MIPS_IDCT |
| 55 | LOCAL_SRC_FILES += \ |
| 56 | mips_jidctfst.c \ |
| 57 | mips_idct_le.S |
| 58 | endif |
tengfei.zhao | 6553d24 | 2012-07-04 15:50:59 +0800 | [diff] [blame] | 59 | endif |
Chia-chi Yeh | 4736a38 | 2010-12-10 18:11:00 +0800 | [diff] [blame] | 60 | |
Angus Kong | 7fb4687 | 2013-02-25 16:13:09 -0800 | [diff] [blame] | 61 | LOCAL_MODULE := libjpeg_static |
| 62 | |
| 63 | include $(BUILD_STATIC_LIBRARY) |
| 64 | |
| 65 | |
| 66 | |
| 67 | # Build shared library |
| 68 | include $(CLEAR_VARS) |
| 69 | |
| 70 | LOCAL_MODULE := libjpeg |
| 71 | |
| 72 | LOCAL_MODULE_TAGS := optional |
| 73 | |
| 74 | LOCAL_WHOLE_STATIC_LIBRARIES = libjpeg_static |
| 75 | |
| 76 | ifeq (,$(TARGET_BUILD_APPS)) |
| 77 | LOCAL_SHARED_LIBRARIES := \ |
| 78 | libcutils |
| 79 | else |
| 80 | # unbundled branch, built against NDK. |
| 81 | LOCAL_SDK_VERSION := 17 |
| 82 | endif |
The Android Open Source Project | 9f5d49a | 2009-03-03 19:30:03 -0800 | [diff] [blame] | 83 | |
Wei-Ta Chen | c4e357f | 2010-01-06 18:26:16 +0800 | [diff] [blame] | 84 | include $(BUILD_SHARED_LIBRARY) |
Raghu Gandham | 71ee859 | 2012-11-06 10:17:40 -0800 | [diff] [blame] | 85 | |
| 86 | include $(CLEAR_VARS) |
| 87 | LOCAL_ARM_MODE := arm |
| 88 | LOCAL_SRC_FILES := \ |
| 89 | cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h rdswitch.c cdjpeg.c rdtarga.c rdppm.c rdgif.c rdbmp.c |
| 90 | LOCAL_MODULE:= cjpeg |
| 91 | LOCAL_MODULE_TAGS := eng |
| 92 | LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg |
| 93 | include $(BUILD_EXECUTABLE) |
| 94 | |
| 95 | include $(CLEAR_VARS) |
| 96 | LOCAL_ARM_MODE := arm |
| 97 | LOCAL_SRC_FILES := \ |
| 98 | djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h cdjpeg.c wrppm.c wrgif.c wrbmp.c rdcolmap.c wrtarga.c |
| 99 | LOCAL_MODULE:= djpeg |
| 100 | LOCAL_MODULE_TAGS := eng |
| 101 | LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg |
| 102 | include $(BUILD_EXECUTABLE) |