1LOCAL_PATH:= $(call my-dir) 2include $(CLEAR_VARS) 3 4LOCAL_ARM_MODE := arm 5 6LOCAL_SRC_FILES := \ 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 15 16ifeq (,$(TARGET_BUILD_APPS)) 17# building against master 18# use ashmem as libjpeg decoder's backing store 19LOCAL_CFLAGS += -DUSE_ANDROID_ASHMEM 20LOCAL_SRC_FILES += \ 21 jmem-ashmem.c 22else 23# unbundled branch, built against NDK. 24LOCAL_SDK_VERSION := 17 25# the original android memory manager. 26# use sdcard as libjpeg decoder's backing store 27LOCAL_SRC_FILES += \ 28 jmem-android.c 29endif 30 31LOCAL_CFLAGS += -DAVOID_TABLES 32LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays 33#LOCAL_CFLAGS += -march=armv6j 34 35# enable tile based decode 36LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE 37 38ifeq ($(TARGET_ARCH_VARIANT),x86-atom) 39 LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT 40 LOCAL_SRC_FILES += jidctintelsse.c 41endif 42 43# enable armv6 idct assembly 44ifeq ($(strip $(TARGET_ARCH)),arm) 45 LOCAL_CFLAGS += -DANDROID_ARMV6_IDCT 46endif 47 48# use mips assembler IDCT implementation if MIPS DSP-ASE is present 49ifeq ($(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 56endif 57 58LOCAL_MODULE := libjpeg_static 59 60include $(BUILD_STATIC_LIBRARY) 61 62 63 64# Build shared library 65include $(CLEAR_VARS) 66 67LOCAL_MODULE := libjpeg 68 69LOCAL_MODULE_TAGS := optional 70 71LOCAL_WHOLE_STATIC_LIBRARIES = libjpeg_static 72 73ifeq (,$(TARGET_BUILD_APPS)) 74LOCAL_SHARED_LIBRARIES := \ 75 libcutils 76else 77# unbundled branch, built against NDK. 78LOCAL_SDK_VERSION := 17 79endif 80 81include $(BUILD_SHARED_LIBRARY) 82 83include $(CLEAR_VARS) 84LOCAL_ARM_MODE := arm 85LOCAL_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 87LOCAL_MODULE:= cjpeg 88LOCAL_MODULE_TAGS := eng 89LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg 90include $(BUILD_EXECUTABLE) 91 92include $(CLEAR_VARS) 93LOCAL_ARM_MODE := arm 94LOCAL_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 96LOCAL_MODULE:= djpeg 97LOCAL_MODULE_TAGS := eng 98LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg 99include $(BUILD_EXECUTABLE) 100