blob: a1ce0f763f893a7065d4f2386656487805c90fac [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 \
Matt Sarett7dbc6442015-04-23 13:11:46 -040014 jquant2.c jutils.c jmemmgr.c jmemnobs.c
Elliott Hughes4660f762014-12-03 17:20:46 -080015
16LOCAL_SRC_FILES_arm += armv6_idct.S
Joseph Wen7b6961a2010-08-11 15:35:47 +080017
Chih-Hung Hsieh9f6aca32014-10-16 11:51:01 -070018# jsimd_arm_neon.S does not compile with clang.
19LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
20
Sam Hasinoff9f3436c2015-06-10 15:34:57 -070021ifneq (,$(TARGET_BUILD_APPS))
22# unbundled branch, built against NDK.
23LOCAL_SDK_VERSION := 17
24endif
25
Angus Kong7fb46872013-02-25 16:13:09 -080026LOCAL_CFLAGS += -DAVOID_TABLES
The Android Open Source Project9f5d49a2009-03-03 19:30:03 -080027LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
28#LOCAL_CFLAGS += -march=armv6j
29
Joseph Wen3147fbe2010-07-12 13:15:16 +080030# enable tile based decode
31LOCAL_CFLAGS += -DANDROID_TILE_BASED_DECODE
32
Xun Sune08a2112013-11-13 18:00:45 +080033ifeq ($(TARGET_ARCH),x86)
Raghu Gandham71ee8592012-11-06 10:17:40 -080034 LOCAL_CFLAGS += -DANDROID_INTELSSE2_IDCT
35 LOCAL_SRC_FILES += jidctintelsse.c
36endif
37
Raghu Gandham71ee8592012-11-06 10:17:40 -080038ifeq ($(strip $(TARGET_ARCH)),arm)
Prajakta Gudadhe6a3be8d2012-06-11 14:08:27 -070039 ifeq ($(ARCH_ARM_HAVE_NEON),true)
40 #use NEON accelerations
Elliott Hughes4660f762014-12-03 17:20:46 -080041 LOCAL_CFLAGS += -DNV_ARM_NEON -D__ARM_HAVE_NEON
Prajakta Gudadhe6a3be8d2012-06-11 14:08:27 -070042 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
Raghu Gandham71ee8592012-11-06 10:17:40 -080049endif
50
51# use mips assembler IDCT implementation if MIPS DSP-ASE is present
52ifeq ($(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
tengfei.zhao6553d242012-07-04 15:50:59 +080059endif
Chia-chi Yeh4736a382010-12-10 18:11:00 +080060
Angus Kong7fb46872013-02-25 16:13:09 -080061LOCAL_MODULE := libjpeg_static
62
63include $(BUILD_STATIC_LIBRARY)
64
65
66
67# Build shared library
68include $(CLEAR_VARS)
69
70LOCAL_MODULE := libjpeg
71
72LOCAL_MODULE_TAGS := optional
73
74LOCAL_WHOLE_STATIC_LIBRARIES = libjpeg_static
75
76ifeq (,$(TARGET_BUILD_APPS))
77LOCAL_SHARED_LIBRARIES := \
78 libcutils
79else
80# unbundled branch, built against NDK.
81LOCAL_SDK_VERSION := 17
82endif
The Android Open Source Project9f5d49a2009-03-03 19:30:03 -080083
Wei-Ta Chenc4e357f2010-01-06 18:26:16 +080084include $(BUILD_SHARED_LIBRARY)
Raghu Gandham71ee8592012-11-06 10:17:40 -080085
86include $(CLEAR_VARS)
87LOCAL_ARM_MODE := arm
88LOCAL_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
90LOCAL_MODULE:= cjpeg
91LOCAL_MODULE_TAGS := eng
92LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg
93include $(BUILD_EXECUTABLE)
94
95include $(CLEAR_VARS)
96LOCAL_ARM_MODE := arm
97LOCAL_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
99LOCAL_MODULE:= djpeg
100LOCAL_MODULE_TAGS := eng
101LOCAL_SHARED_LIBRARIES := libc libcutils libjpeg
102include $(BUILD_EXECUTABLE)