Android.mk revision ccbb72b5e5240d9119ce42bdbb8f6877994b7de8
1BASE_PATH := $(call my-dir)
2LOCAL_PATH:= $(call my-dir)
3
4#############################################################
5#   build the skia+fretype+png+jpeg+zlib+gif library
6#
7
8include $(CLEAR_VARS)
9
10LOCAL_ARM_MODE := arm
11
12# need a flag to tell the C side when we're on devices with large memory
13# budgets (i.e. larger than the low-end devices that initially shipped)
14ifeq ($(ARCH_ARM_HAVE_VFP),true)
15    LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE
16endif
17
18ifneq ($(ARCH_ARM_HAVE_VFP),true)
19	LOCAL_CFLAGS += -DSK_SOFTWARE_FLOAT
20endif
21
22ifeq ($(ARCH_ARM_HAVE_NEON),true)
23	LOCAL_CFLAGS += -D__ARM_HAVE_NEON
24endif
25
26LOCAL_SRC_FILES:= \
27	src/core/Sk64.cpp \
28	src/core/SkBuffer.cpp \
29	src/core/SkChunkAlloc.cpp \
30	src/core/SkCordic.cpp \
31	src/core/SkDebug.cpp \
32	src/core/SkFloatBits.cpp \
33	src/core/SkPoint.cpp \
34	src/core/SkRect.cpp \
35	src/core/SkRegion.cpp \
36	src/core/SkString.cpp \
37	src/core/SkUtils.cpp \
38	src/core/SkFlate.cpp \
39	src/core/SkMallocPixelRef.cpp \
40	src/core/SkRegion_rects.cpp \
41	src/core/SkScalar.cpp \
42	src/ports/SkDebug_android.cpp \
43	src/effects/Sk1DPathEffect.cpp \
44	src/effects/Sk2DPathEffect.cpp \
45	src/effects/SkAvoidXfermode.cpp \
46	src/effects/SkBitmapCache.cpp \
47	src/effects/SkBlurDrawLooper.cpp \
48	src/effects/SkBlurMask.cpp \
49	src/effects/SkBlurMaskFilter.cpp \
50	src/effects/SkColorFilters.cpp \
51	src/effects/SkColorMatrixFilter.cpp \
52	src/effects/SkCornerPathEffect.cpp \
53	src/effects/SkDashPathEffect.cpp \
54	src/effects/SkDiscretePathEffect.cpp \
55	src/effects/SkEmbossMask.cpp \
56	src/effects/SkEmbossMaskFilter.cpp \
57	src/effects/SkGradientShader.cpp \
58	src/effects/SkGroupShape.cpp \
59	src/effects/SkLayerDrawLooper.cpp \
60	src/effects/SkLayerRasterizer.cpp \
61	src/effects/SkPaintFlagsDrawFilter.cpp \
62	src/effects/SkPixelXorXfermode.cpp \
63	src/effects/SkPorterDuff.cpp \
64	src/effects/SkRectShape.cpp \
65	src/effects/SkTableMaskFilter.cpp \
66	src/effects/SkTransparentShader.cpp \
67	src/images/bmpdecoderhelper.cpp \
68	src/images/SkFDStream.cpp \
69	src/images/SkFlipPixelRef.cpp \
70	src/images/SkImageDecoder.cpp \
71	src/images/SkImageDecoder_libbmp.cpp \
72	src/images/SkImageDecoder_libgif.cpp \
73	src/images/SkImageDecoder_libjpeg.cpp \
74	src/images/SkImageDecoder_libpng.cpp \
75	src/images/SkImageDecoder_libico.cpp \
76	src/images/SkImageDecoder_wbmp.cpp \
77	src/images/SkImageDecoder_libwebp.cpp \
78	src/images/SkImageEncoder.cpp \
79	src/images/SkImageRef.cpp \
80	src/images/SkImageRef_GlobalPool.cpp \
81	src/images/SkImageRefPool.cpp \
82	src/images/SkJpegUtility.cpp \
83	src/images/SkBitmapRegionDecoder.cpp \
84	src/images/SkMovie.cpp \
85	src/images/SkMovie_gif.cpp \
86	src/images/SkPageFlipper.cpp \
87	src/images/SkScaledBitmapSampler.cpp \
88	src/images/SkCreateRLEPixelRef.cpp \
89	src/images/SkImageDecoder_Factory.cpp \
90	src/images/SkImageEncoder_Factory.cpp \
91	src/ports/SkFontHost_android.cpp \
92	src/ports/SkFontHost_gamma.cpp \
93	src/ports/SkFontHost_FreeType.cpp \
94	src/ports/SkFontHost_tables.cpp \
95	src/ports/SkGlobals_global.cpp \
96	src/ports/SkImageRef_ashmem.cpp \
97	src/ports/SkOSFile_stdio.cpp \
98	src/ports/SkTime_Unix.cpp \
99	src/core/SkAlphaRuns.cpp \
100	src/core/SkBitmap.cpp \
101	src/core/SkBitmap_scroll.cpp \
102	src/core/SkBitmapProcShader.cpp \
103	src/core/SkBitmapProcState.cpp \
104	src/core/SkBitmapProcState_matrixProcs.cpp \
105	src/core/SkBitmapSampler.cpp \
106	src/core/SkBlitRow_D16.cpp \
107	src/core/SkBlitRow_D32.cpp \
108	src/core/SkBlitRow_D4444.cpp \
109	src/core/SkBlitter.cpp \
110	src/core/SkBlitter_4444.cpp \
111	src/core/SkBlitter_A1.cpp \
112	src/core/SkBlitter_A8.cpp \
113	src/core/SkBlitter_ARGB32.cpp \
114	src/core/SkBlitter_RGB16.cpp \
115	src/core/SkBlitter_Sprite.cpp \
116	src/core/SkCanvas.cpp \
117	src/core/SkClampRange.cpp \
118	src/core/SkClipStack.cpp \
119	src/core/SkColor.cpp \
120	src/core/SkColorFilter.cpp \
121	src/core/SkColorTable.cpp \
122	src/core/SkComposeShader.cpp \
123	src/core/SkCubicClipper.cpp \
124	src/core/SkDeque.cpp \
125	src/core/SkDevice.cpp \
126	src/core/SkDither.cpp \
127	src/core/SkDraw.cpp \
128	src/core/SkEdge.cpp \
129	src/core/SkEdgeBuilder.cpp \
130	src/core/SkEdgeClipper.cpp \
131	src/core/SkFilterProc.cpp \
132	src/core/SkFlattenable.cpp \
133	src/core/SkGeometry.cpp \
134	src/core/SkGlobals.cpp \
135	src/core/SkGlyphCache.cpp \
136	src/core/SkGraphics.cpp \
137	src/core/SkLineClipper.cpp \
138	src/core/SkMMapStream.cpp \
139	src/core/SkMask.cpp \
140	src/core/SkMaskFilter.cpp \
141	src/core/SkMath.cpp \
142	src/core/SkMatrix.cpp \
143	src/core/SkMemory_stdlib.cpp \
144	src/core/SkMetaData.cpp \
145	src/core/SkPackBits.cpp \
146	src/core/SkPaint.cpp \
147	src/core/SkPath.cpp \
148	src/core/SkPathEffect.cpp \
149	src/core/SkPathHeap.cpp \
150	src/core/SkPathMeasure.cpp \
151	src/core/SkPicture.cpp \
152	src/core/SkPictureFlat.cpp \
153	src/core/SkPicturePlayback.cpp \
154	src/core/SkPictureRecord.cpp \
155	src/core/SkPixelRef.cpp \
156	src/core/SkProcSpriteBlitter.cpp \
157	src/core/SkPtrRecorder.cpp \
158	src/core/SkQuadClipper.cpp \
159	src/core/SkRasterizer.cpp \
160	src/core/SkRefDict.cpp \
161	src/core/SkRegion_path.cpp \
162	src/core/SkScalerContext.cpp \
163	src/core/SkScan.cpp \
164	src/core/SkScan_AntiPath.cpp \
165	src/core/SkScan_Antihair.cpp \
166	src/core/SkScan_Hairline.cpp \
167	src/core/SkScan_Path.cpp \
168	src/core/SkShader.cpp \
169	src/core/SkShape.cpp \
170	src/core/SkSpriteBlitter_ARGB32.cpp \
171	src/core/SkSpriteBlitter_RGB16.cpp \
172	src/core/SkStream.cpp \
173	src/core/SkStroke.cpp \
174	src/core/SkStrokerPriv.cpp \
175	src/core/SkTSearch.cpp \
176	src/core/SkTypeface.cpp \
177	src/core/SkTypefaceCache.cpp \
178	src/core/SkUnPreMultiply.cpp \
179	src/core/SkXfermode.cpp \
180	src/core/SkWriter32.cpp \
181	src/utils/SkBoundaryPatch.cpp \
182	src/utils/SkCamera.cpp \
183	src/utils/SkDumpCanvas.cpp \
184	src/utils/SkInterpolator.cpp \
185	src/utils/SkLayer.cpp \
186	src/utils/SkOSFile.cpp \
187	src/utils/SkMeshUtils.cpp \
188	src/utils/SkNinePatch.cpp \
189	src/utils/SkParse.cpp \
190	src/utils/SkParsePath.cpp \
191	src/utils/SkProxyCanvas.cpp \
192	src/utils/SkUnitMappers.cpp
193
194ifeq ($(TARGET_ARCH),arm)
195
196ifeq ($(ARCH_ARM_HAVE_NEON),true)
197LOCAL_SRC_FILES += \
198	src/opts/memset16_neon.S \
199	src/opts/memset32_neon.S
200endif
201
202LOCAL_SRC_FILES += \
203	src/opts/SkBlitRow_opts_arm.cpp \
204	src/opts/SkBitmapProcState_opts_arm.cpp \
205	src/opts/opts_check_arm.cpp \
206	src/opts/memset.arm.S
207else
208LOCAL_SRC_FILES += \
209	src/opts/SkBlitRow_opts_none.cpp \
210	src/opts/SkBitmapProcState_opts_none.cpp
211endif
212
213# these are for emoji support, needed by webkit
214LOCAL_SRC_FILES += \
215	emoji/EmojiFont.cpp
216
217LOCAL_SHARED_LIBRARIES := \
218	libcutils \
219  libemoji \
220	libjpeg \
221	libutils \
222	libz
223
224LOCAL_STATIC_LIBRARIES := \
225	libft2 \
226	libpng \
227	libgif \
228	libwebp-decode
229
230LOCAL_C_INCLUDES += \
231	$(LOCAL_PATH)/src/core \
232	$(LOCAL_PATH)/include/core \
233	$(LOCAL_PATH)/include/effects \
234	$(LOCAL_PATH)/include/images \
235	$(LOCAL_PATH)/include/utils \
236	$(LOCAL_PATH)/include/xml \
237	external/freetype/include \
238	external/zlib \
239	external/libpng \
240	external/giflib \
241	external/jpeg \
242	external/webp/include \
243	frameworks/opt/emoji
244
245ifeq ($(NO_FALLBACK_FONT),true)
246	LOCAL_CFLAGS += -DNO_FALLBACK_FONT
247endif
248
249LOCAL_LDLIBS += -lpthread
250
251LOCAL_MODULE:= libskia
252
253include $(BUILD_SHARED_LIBRARY)
254
255#############################################################
256# Build the skia gpu (ganesh) library
257#
258
259include $(CLEAR_VARS)
260
261LOCAL_ARM_MODE := arm
262
263ifneq ($(ARCH_ARM_HAVE_VFP),true)
264       LOCAL_CFLAGS += -DSK_SOFTWARE_FLOAT
265endif
266
267ifeq ($(ARCH_ARM_HAVE_NEON),true)
268       LOCAL_CFLAGS += -D__ARM_HAVE_NEON
269endif
270
271LOCAL_SRC_FILES:= \
272  gpu/src/GrAllocPool.cpp \
273  gpu/src/GrAtlas.cpp \
274  gpu/src/GrClip.cpp \
275  gpu/src/GrContext.cpp \
276  gpu/src/GrCreatePathRenderer_none.cpp \
277  gpu/src/GrDrawTarget.cpp \
278  gpu/src/android/GrGLDefaultInterface_android.cpp \
279  gpu/src/GrGLIndexBuffer.cpp	\
280  gpu/src/GrGLInterface.cpp \
281  gpu/src/GrGLProgram.cpp \
282  gpu/src/GrGLTexture.cpp \
283  gpu/src/GrGLVertexBuffer.cpp \
284  gpu/src/GrGpu.cpp \
285  gpu/src/GrGpuGLFixed.cpp \
286  gpu/src/GrGpuFactory.cpp \
287  gpu/src/GrGLUtil.cpp \
288  gpu/src/GrGpuGL.cpp \
289  gpu/src/GrGpuGLShaders.cpp \
290  gpu/src/GrInOrderDrawBuffer.cpp \
291  gpu/src/GrMatrix.cpp \
292  gpu/src/GrMemory.cpp \
293  gpu/src/GrPath.cpp \
294  gpu/src/GrPathUtils.cpp \
295  gpu/src/GrRectanizer_fifo.cpp \
296  gpu/src/GrResource.cpp \
297  gpu/src/GrTexture.cpp \
298  gpu/src/GrTextureCache.cpp \
299  gpu/src/GrTextContext.cpp \
300  gpu/src/GrTextStrike.cpp \
301  gpu/src/GrBufferAllocPool.cpp\
302  gpu/src/GrPathRenderer.cpp \
303  gpu/src/GrStencil.cpp \
304  src/gpu/SkGpuCanvas.cpp	\
305  src/gpu/SkGpuDevice.cpp \
306  src/gpu/SkGr.cpp \
307  src/gpu/SkGrTexturePixelRef.cpp \
308  src/gpu/SkGrFontScaler.cpp \
309	src/gpu/GrPrintf_skia.cpp
310
311LOCAL_SHARED_LIBRARIES := \
312  libcutils \
313  libutils \
314  libskia \
315  libEGL \
316  libGLESv2
317
318LOCAL_C_INCLUDES += \
319  $(LOCAL_PATH)/gpu/include \
320  $(LOCAL_PATH)/gpu/src \
321  $(LOCAL_PATH)/include/core \
322  $(LOCAL_PATH)/include/gpu \
323  $(LOCAL_PATH)/src/core \
324  frameworks/base/opengl/include/GLES2
325
326LOCAL_LDLIBS += -lpthread
327
328LOCAL_MODULE:= libskiagpu
329LOCAL_MODULE_TAGS := optional
330
331include $(BUILD_STATIC_LIBRARY)
332
333#############################################################
334# Build the skia tools
335#
336
337# benchmark (timings)
338include $(BASE_PATH)/bench/Android.mk
339
340# golden-master (fidelity / regression test)
341include $(BASE_PATH)/gm/Android.mk
342
343# unit-tests
344include $(BASE_PATH)/tests/Android.mk
345