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 jmemnobs.c 15 16 LOCAL_SRC_FILES_arm += armv6_idct.S 17 18 # jsimd_arm_neon.S does not compile with clang. 19 LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as 20 21 ifneq (,$(TARGET_BUILD_APPS)) 22 # unbundled branch, built against NDK. 23 LOCAL_SDK_VERSION := 17 24 endif 25 26 LOCAL_CFLAGS += -DAVOID_TABLES 27 LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays 28 #LOCAL_CFLAGS += -march=armv6j 29 30 # enable tile based decode 31 LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE 32 33 ifeq ($(TARGET_ARCH),x86) 34 LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT 35 LOCAL_SRC_FILES += jidctintelsse.c 36 endif 37 38 ifeq ($(strip $(TARGET_ARCH)),arm) 39 ifeq ($(ARCH_ARM_HAVE_NEON),true) 40 #use NEON accelerations 41 LOCAL_CFLAGS += -DNV_ARM_NEON -D__ARM_HAVE_NEON 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 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 59 endif 60 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 83 84 include $(BUILD_SHARED_LIBRARY) 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) 103