blob: 5bb0657252cb97a40e5fba8b9d6c5955252ba4c5 [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
Chia-chi Yeh4736a382010-12-10 18:11:00 +080043# enable armv6 idct assembly
Raghu Gandham71ee8592012-11-06 10:17:40 -080044ifeq ($(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
tengfei.zhao6553d242012-07-04 15:50:59 +080056endif
Chia-chi Yeh4736a382010-12-10 18:11:00 +080057
Angus Kong7fb46872013-02-25 16:13:09 -080058LOCAL_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
The Android Open Source Project9f5d49a2009-03-03 19:30:03 -080080
Wei-Ta Chenc4e357f2010-01-06 18:26:16 +080081include $(BUILD_SHARED_LIBRARY)
Raghu Gandham71ee8592012-11-06 10:17:40 -080082
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)