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 \ |
| 14 | jquant2.c jutils.c jmemmgr.c armv6_idct.S |
Joseph Wen | 7b6961a | 2010-08-11 15:35:47 +0800 | [diff] [blame] | 15 | |
Angus Kong | b98230c | 2013-02-06 18:25:46 -0800 | [diff] [blame] | 16 | ifeq (,$(TARGET_BUILD_APPS)) |
| 17 | # building against master |
Joseph Wen | 7b6961a | 2010-08-11 15:35:47 +0800 | [diff] [blame] | 18 | # use ashmem as libjpeg decoder's backing store |
| 19 | LOCAL_CFLAGS += -DUSE_ANDROID_ASHMEM |
| 20 | LOCAL_SRC_FILES += \ |
Angus Kong | 7fb4687 | 2013-02-25 16:13:09 -0800 | [diff] [blame] | 21 | jmem-ashmem.c |
Angus Kong | b98230c | 2013-02-06 18:25:46 -0800 | [diff] [blame] | 22 | else |
| 23 | # unbundled branch, built against NDK. |
| 24 | LOCAL_SDK_VERSION := 17 |
Joseph Wen | 7b6961a | 2010-08-11 15:35:47 +0800 | [diff] [blame] | 25 | # the original android memory manager. |
| 26 | # use sdcard as libjpeg decoder's backing store |
Angus Kong | b98230c | 2013-02-06 18:25:46 -0800 | [diff] [blame] | 27 | LOCAL_SRC_FILES += \ |
Angus Kong | 7fb4687 | 2013-02-25 16:13:09 -0800 | [diff] [blame] | 28 | jmem-android.c |
Angus Kong | b98230c | 2013-02-06 18:25:46 -0800 | [diff] [blame] | 29 | endif |
Joseph Wen | 7b6961a | 2010-08-11 15:35:47 +0800 | [diff] [blame] | 30 | |
Angus Kong | 7fb4687 | 2013-02-25 16:13:09 -0800 | [diff] [blame] | 31 | LOCAL_CFLAGS += -DAVOID_TABLES |
The Android Open Source Project | 9f5d49a | 2009-03-03 19:30:03 -0800 | [diff] [blame] | 32 | LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays |
| 33 | #LOCAL_CFLAGS += -march=armv6j |
| 34 | |
Joseph Wen | 3147fbe | 2010-07-12 13:15:16 +0800 | [diff] [blame] | 35 | # enable tile based decode |
| 36 | LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE |
| 37 | |
tengfei.zhao | 6553d24 | 2012-07-04 15:50:59 +0800 | [diff] [blame] | 38 | ifeq ($(TARGET_ARCH_VARIANT),x86-atom) |
Raghu Gandham | 71ee859 | 2012-11-06 10:17:40 -0800 | [diff] [blame] | 39 | LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT |
| 40 | LOCAL_SRC_FILES += jidctintelsse.c |
| 41 | endif |
| 42 | |
Chia-chi Yeh | 4736a38 | 2010-12-10 18:11:00 +0800 | [diff] [blame] | 43 | # enable armv6 idct assembly |
Raghu Gandham | 71ee859 | 2012-11-06 10:17:40 -0800 | [diff] [blame] | 44 | ifeq ($(strip $(TARGET_ARCH)),arm) |
| 45 | LOCAL_CFLAGS += -DANDROID_ARMV6_IDCT |
| 46 | endif |
| 47 | |
| 48 | # use mips assembler IDCT implementation if MIPS DSP-ASE is present |
| 49 | ifeq ($(strip $(TARGET_ARCH)),mips) |
| 50 | ifeq ($(strip $(ARCH_MIPS_HAS_DSP)),true) |
| 51 | LOCAL_CFLAGS += -DANDROID_MIPS_IDCT |
| 52 | LOCAL_SRC_FILES += \ |
| 53 | mips_jidctfst.c \ |
| 54 | mips_idct_le.S |
| 55 | endif |
tengfei.zhao | 6553d24 | 2012-07-04 15:50:59 +0800 | [diff] [blame] | 56 | endif |
Chia-chi Yeh | 4736a38 | 2010-12-10 18:11:00 +0800 | [diff] [blame] | 57 | |
Angus Kong | 7fb4687 | 2013-02-25 16:13:09 -0800 | [diff] [blame] | 58 | LOCAL_MODULE := libjpeg_static |
| 59 | |
| 60 | include $(BUILD_STATIC_LIBRARY) |
| 61 | |
| 62 | |
| 63 | |
| 64 | # Build shared library |
| 65 | include $(CLEAR_VARS) |
| 66 | |
| 67 | LOCAL_MODULE := libjpeg |
| 68 | |
| 69 | LOCAL_MODULE_TAGS := optional |
| 70 | |
| 71 | LOCAL_WHOLE_STATIC_LIBRARIES = libjpeg_static |
| 72 | |
| 73 | ifeq (,$(TARGET_BUILD_APPS)) |
| 74 | LOCAL_SHARED_LIBRARIES := \ |
| 75 | libcutils |
| 76 | else |
| 77 | # unbundled branch, built against NDK. |
| 78 | LOCAL_SDK_VERSION := 17 |
| 79 | endif |
The Android Open Source Project | 9f5d49a | 2009-03-03 19:30:03 -0800 | [diff] [blame] | 80 | |
Wei-Ta Chen | c4e357f | 2010-01-06 18:26:16 +0800 | [diff] [blame] | 81 | include $(BUILD_SHARED_LIBRARY) |
Raghu Gandham | 71ee859 | 2012-11-06 10:17:40 -0800 | [diff] [blame] | 82 | |
| 83 | include $(CLEAR_VARS) |
| 84 | LOCAL_ARM_MODE := arm |
| 85 | LOCAL_SRC_FILES := \ |
| 86 | 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 |
| 87 | LOCAL_MODULE:= cjpeg |
| 88 | LOCAL_MODULE_TAGS := eng |
| 89 | LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg |
| 90 | include $(BUILD_EXECUTABLE) |
| 91 | |
| 92 | include $(CLEAR_VARS) |
| 93 | LOCAL_ARM_MODE := arm |
| 94 | LOCAL_SRC_FILES := \ |
| 95 | 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 |
| 96 | LOCAL_MODULE:= djpeg |
| 97 | LOCAL_MODULE_TAGS := eng |
| 98 | LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg |
| 99 | include $(BUILD_EXECUTABLE) |