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