forked from defer/android_external_jpeg-turbo
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathAndroid.mk
280 lines (175 loc) · 7.57 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# Makefile for libjpeg-turbo
ifneq ($(TARGET_SIMULATOR),true)
##################################################
### simd ###
##################################################
LOCAL_PATH := $(my-dir)
include $(CLEAR_VARS)
# Set ANDROID_JPEG_USE_VENUM to true to enable VeNum optimizations
ANDROID_JPEG_USE_VENUM := true
# Disable VeNum optimizations if they are not supported on the build target
#ifneq ($(ARCH_ARM_HAVE_VFP),true)
#ANDROID_JPEG_USE_VENUM := false
#else
#ifneq ($(ARCH_ARM_HAVE_NEON),true)
#ANDROID_JPEG_USE_VENUM := false
#endif
#endif
# From autoconf-generated Makefile
EXTRA_DIST = simd/nasm_lt.sh simd/jcclrmmx.asm simd/jcclrss2.asm simd/jdclrmmx.asm simd/jdclrss2.asm \
simd/jdmrgmmx.asm simd/jdmrgss2.asm simd/jcclrss2-64.asm simd/jdclrss2-64.asm \
simd/jdmrgss2-64.asm simd/CMakeLists.txt
libsimd_SOURCES_DIST = simd/jsimd_arm_neon.S \
asm/armv7//jdcolor-armv7.S asm/armv7/jdidct-armv7.S \
simd/jsimd_arm.c
# or jsimd_none.c
LOCAL_SRC_FILES := $(libsimd_SOURCES_DIST)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/simd \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID_JPEG_USE_VENUM
AM_CFLAGS := -march=armv7-a -mfpu=neon
AM_CCASFLAGS := -march=armv7-a -mfpu=neon
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := libsimd
include $(BUILD_STATIC_LIBRARY)
######################################################
### libjpeg.so ##
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
libjpeg_SOURCES_DIST = jcapimin.c jcapistd.c jccoefct.c jccolor.c \
jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \
jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \
jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c \
jaricom.c jcarith.c jdarith.c \
turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c \
turbojpeg-mapfile
#possible adds jmem-android.c jmemnobs.c jmemmgr.c jmem-ashmem.c
LOCAL_SRC_FILES:= $(libjpeg_SOURCES_DIST)
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_STATIC_LIBRARIES := libsimd
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DAVOID_TABLES -O3 -fstrict-aliasing -fprefetch-loop-arrays -DANDROID \
-DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT -DANDROID_JPEG_USE_VENUM
#-DANDROID_TILE_BASED_DECODE -DUSE_ANDROID_ASHMEM
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_STATIC_LIBRARY)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := libjpeg
include $(BUILD_SHARED_LIBRARY)
######################################################
### cjpeg ###
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
cjpeg_SOURCES = cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
rdppm.c rdswitch.c rdtarga.c
LOCAL_SRC_FILES:= $(cjpeg_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED \
-DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := cjpeg
include $(BUILD_EXECUTABLE)
######################################################
### djpeg ###
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
djpeg_SOURCES = cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
wrbmp.c wrgif.c wrppm.c wrtarga.c
LOCAL_SRC_FILES:= $(djpeg_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED \
-DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := djpeg
include $(BUILD_EXECUTABLE)
######################################################
### jpegtran ###
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c
LOCAL_SRC_FILES:= $(jpegtran_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := jpegtran
include $(BUILD_EXECUTABLE)
######################################################
### tjunittest ###
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
tjunittest_SOURCES = tjunittest.c tjutil.c
LOCAL_SRC_FILES:= $(tjunittest_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := tjunittest
include $(BUILD_EXECUTABLE)
######################################################
### tjbench ###
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
tjbench_SOURCES = tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c \
wrbmp.c wrppm.c
LOCAL_SRC_FILES:= $(tjbench_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DBMP_SUPPORTED -DPPM_SUPPORTED \
-DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := tjbench
include $(BUILD_EXECUTABLE)
######################################################
### rdjpgcom ###
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
rdjpgcom_SOURCES = rdjpgcom.c
LOCAL_SRC_FILES:= $(rdjpgcom_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := rdjpgcom
include $(BUILD_EXECUTABLE)
######################################################
### wrjpgcom ###
######################################################
include $(CLEAR_VARS)
# From autoconf-generated Makefile
wrjpgcom_SOURCES = wrjpgcom.c
LOCAL_SRC_FILES:= $(wrjpgcom_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := wrjpgcom
include $(BUILD_EXECUTABLE)
endif # TARGET_SIMULATOR != true