blob: 6e78c74c2f22f4a00b60981f1620c3d0754f220d [file] [log] [blame]
The Android Open Source Project9f5d49a2009-03-03 19:30:03 -08001LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_ARM_MODE := arm
5
6LOCAL_SRC_FILES := \
Angus Kong7fb46872013-02-25 16:13:09 -08007 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 Wen7b6961a2010-08-11 15:35:47 +080015
Angus Kongb98230c2013-02-06 18:25:46 -080016ifeq (,$(TARGET_BUILD_APPS))
17# building against master
Joseph Wen7b6961a2010-08-11 15:35:47 +080018# use ashmem as libjpeg decoder's backing store
19LOCAL_CFLAGS += -DUSE_ANDROID_ASHMEM
20LOCAL_SRC_FILES += \
Angus Kong7fb46872013-02-25 16:13:09 -080021 jmem-ashmem.c
Angus Kongb98230c2013-02-06 18:25:46 -080022else
23# unbundled branch, built against NDK.
24LOCAL_SDK_VERSION := 17
Joseph Wen7b6961a2010-08-11 15:35:47 +080025# the original android memory manager.
26# use sdcard as libjpeg decoder's backing store
Angus Kongb98230c2013-02-06 18:25:46 -080027LOCAL_SRC_FILES += \
Angus Kong7fb46872013-02-25 16:13:09 -080028 jmem-android.c
Angus Kongb98230c2013-02-06 18:25:46 -080029endif
Joseph Wen7b6961a2010-08-11 15:35:47 +080030
Angus Kong7fb46872013-02-25 16:13:09 -080031LOCAL_CFLAGS += -DAVOID_TABLES
The Android Open Source Project9f5d49a2009-03-03 19:30:03 -080032LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
33#LOCAL_CFLAGS += -march=armv6j
34
Joseph Wen3147fbe2010-07-12 13:15:16 +080035# enable tile based decode
36LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE
37
tengfei.zhao6553d242012-07-04 15:50:59 +080038ifeq ($(TARGET_ARCH_VARIANT),x86-atom)
Raghu Gandham71ee8592012-11-06 10:17:40 -080039 LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT
40 LOCAL_SRC_FILES += jidctintelsse.c
41endif
42
Raghu Gandham71ee8592012-11-06 10:17:40 -080043ifeq ($(strip $(TARGET_ARCH)),arm)
Prajakta Gudadhe6a3be8d2012-06-11 14:08:27 -070044 ifeq ($(ARCH_ARM_HAVE_NEON),true)
45 #use NEON accelerations
46 LOCAL_CFLAGS += -DNV_ARM_NEON
47 LOCAL_SRC_FILES += \
48 jsimd_arm_neon.S \
49 jsimd_neon.c
50 else
51 # enable armv6 idct assembly
52 LOCAL_CFLAGS += -DANDROID_ARMV6_IDCT
53 endif
Raghu Gandham71ee8592012-11-06 10:17:40 -080054endif
55
56# use mips assembler IDCT implementation if MIPS DSP-ASE is present
57ifeq ($(strip $(TARGET_ARCH)),mips)
58 ifeq ($(strip $(ARCH_MIPS_HAS_DSP)),true)
59 LOCAL_CFLAGS += -DANDROID_MIPS_IDCT
60 LOCAL_SRC_FILES += \
61 mips_jidctfst.c \
62 mips_idct_le.S
63 endif
tengfei.zhao6553d242012-07-04 15:50:59 +080064endif
Chia-chi Yeh4736a382010-12-10 18:11:00 +080065
Angus Kong7fb46872013-02-25 16:13:09 -080066LOCAL_MODULE := libjpeg_static
67
68include $(BUILD_STATIC_LIBRARY)
69
70
71
72# Build shared library
73include $(CLEAR_VARS)
74
75LOCAL_MODULE := libjpeg
76
77LOCAL_MODULE_TAGS := optional
78
79LOCAL_WHOLE_STATIC_LIBRARIES = libjpeg_static
80
81ifeq (,$(TARGET_BUILD_APPS))
82LOCAL_SHARED_LIBRARIES := \
83 libcutils
84else
85# unbundled branch, built against NDK.
86LOCAL_SDK_VERSION := 17
87endif
The Android Open Source Project9f5d49a2009-03-03 19:30:03 -080088
Wei-Ta Chenc4e357f2010-01-06 18:26:16 +080089include $(BUILD_SHARED_LIBRARY)
Raghu Gandham71ee8592012-11-06 10:17:40 -080090
91include $(CLEAR_VARS)
92LOCAL_ARM_MODE := arm
93LOCAL_SRC_FILES := \
94 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
95LOCAL_MODULE:= cjpeg
96LOCAL_MODULE_TAGS := eng
97LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg
98include $(BUILD_EXECUTABLE)
99
100include $(CLEAR_VARS)
101LOCAL_ARM_MODE := arm
102LOCAL_SRC_FILES := \
103 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
104LOCAL_MODULE:= djpeg
105LOCAL_MODULE_TAGS := eng
106LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg
107include $(BUILD_EXECUTABLE)