1LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_ARM_MODE := arm
5
6LOCAL_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 jidctred.c jquant1.c \
14	jquant2.c jutils.c jmemmgr.c \
15	jmem-android.c
16
17# the assembler is only for the ARM version, don't break the Linux sim
18ifneq ($(TARGET_ARCH),arm)
19ANDROID_JPEG_NO_ASSEMBLER := true
20endif
21
22# temp fix until we understand why this broke cnn.com
23#ANDROID_JPEG_NO_ASSEMBLER := true
24
25ifeq ($(strip $(ANDROID_JPEG_NO_ASSEMBLER)),true)
26LOCAL_SRC_FILES += jidctint.c jidctfst.c
27else
28LOCAL_SRC_FILES += jidctint.c jidctfst.S
29endif
30
31LOCAL_CFLAGS += -DAVOID_TABLES 
32LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
33#LOCAL_CFLAGS += -march=armv6j
34
35LOCAL_MODULE:= libjpeg
36
37include $(BUILD_SHARED_LIBRARY)
38