1 LOCAL_PATH:= $(call my-dir) 2 include $(CLEAR_VARS) 3 4 LOCAL_ARM_MODE := arm 5 6 LOCAL_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 16 ifeq (,$(TARGET_BUILD_APPS)) 17 # building against master 18 # use ashmem as libjpeg decoder's backing store 19 LOCAL_CFLAGS += -DUSE_ANDROID_ASHMEM 20 LOCAL_SRC_FILES += \ 21 jmem-ashmem.c 22 else 23 # unbundled branch, built against NDK. 24 LOCAL_SDK_VERSION := 17 25 # the original android memory manager. 26 # use sdcard as libjpeg decoder's backing store 27 LOCAL_SRC_FILES += \ 28 jmem-android.c 29 endif 30 31 LOCAL_CFLAGS += -DAVOID_TABLES 32 LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays 33 #LOCAL_CFLAGS += -march=armv6j 34 35 # enable tile based decode 36 LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE 37 38 ifeq ($(TARGET_ARCH_VARIANT),x86-atom) 39 LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT 40 LOCAL_SRC_FILES += jidctintelsse.c 41 endif 42 43 # enable armv6 idct assembly 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 56 endif 57 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 80 81 include $(BUILD_SHARED_LIBRARY) 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) 100