Backed out changeset b88172246b66 due to Win32 debug failures.
[mozilla-central.git] / gfx / thebes / Makefile.in
blobd3fedd9258f3a9f50837d5702d2f53c70176020d
2 DEPTH = ../..
3 topsrcdir = @top_srcdir@
4 srcdir = @srcdir@
5 VPATH = @srcdir@
7 include $(DEPTH)/config/autoconf.mk
9 MODULE = thebes
10 LIBRARY_NAME = thebes
11 LIBXUL_LIBRARY = 1
12 EXPORT_LIBRARY = 1
14 EXPORTS = \
15 gfx3DMatrix.h \
16 gfxASurface.h \
17 gfxAlphaRecovery.h \
18 gfxBlur.h \
19 gfxCachedTempSurface.h \
20 gfxColor.h \
21 gfxContext.h \
22 gfxDrawable.h \
23 gfxFont.h \
24 gfxFontConstants.h \
25 gfxFontUtils.h \
26 gfxFontTest.h \
27 gfxImageSurface.h \
28 gfxMatrix.h \
29 gfxPath.h \
30 gfxPattern.h \
31 gfxPlatform.h \
32 gfxPoint.h \
33 gfxRect.h \
34 gfxSkipChars.h \
35 gfxTeeSurface.h \
36 gfxTypes.h \
37 gfxTextRunCache.h \
38 gfxTextRunWordCache.h \
39 gfxUnicodeProperties.h \
40 gfxUtils.h \
41 gfxUserFontSet.h \
42 GLDefs.h \
43 GLContext.h \
44 GLContextSymbols.h \
45 GLContextProvider.h \
46 GLContextProviderImpl.h \
47 nsCoreAnimationSupport.h \
48 EGLUtils.h \
49 $(NULL)
51 ifdef MOZ_IPC
52 EXPORTS += \
53 gfxSharedImageSurface.h \
54 $(NULL)
55 endif
57 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
58 EXPORTS += \
59 gfxAndroidPlatform.h \
60 gfxFT2Fonts.h \
61 gfxFT2FontBase.h \
62 $(NULL)
63 endif
65 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
66 EXPORTS += \
67 gfxBeOSPlatform.h \
68 gfxBeOSSurface.h \
69 gfxFT2FontBase.h \
70 gfxPDFSurface.h \
71 gfxPangoFonts.h \
72 $(NULL)
73 endif
75 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
76 EXPORTS += \
77 gfxPlatformMac.h \
78 gfxQuartzSurface.h \
79 gfxQuartzImageSurface.h \
80 gfxQuartzPDFSurface.h \
81 gfxQuartzNativeDrawing.h \
82 $(NULL)
83 endif
85 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
86 EXPORTS += \
87 gfxFT2FontBase.h \
88 gfxGdkNativeRenderer.h \
89 gfxPDFSurface.h \
90 gfxPSSurface.h \
91 gfxPlatformGtk.h \
92 $(NULL)
94 ifdef MOZ_X11
95 EXPORTS += \
96 gfxXlibSurface.h \
97 gfxXlibNativeRenderer.h \
98 GLXLibrary.h \
99 $(NULL)
100 endif
102 ifdef MOZ_PANGO
103 EXPORTS += gfxPangoFonts.h
104 else
105 EXPORTS += gfxFT2Fonts.h
106 endif
108 ifdef MOZ_DFB
109 EXPORTS += gfxDirectFBSurface.h
110 endif
111 endif
113 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
114 EXPORTS += \
115 gfxOS2Fonts.h \
116 gfxOS2Platform.h \
117 gfxOS2Surface.h \
118 gfxPDFSurface.h \
119 $(NULL)
120 endif
122 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
123 EXPORTS += \
124 gfxFT2FontBase.h \
125 gfxQPainterSurface.h \
126 gfxQtNativeRenderer.h \
127 gfxQtPlatform.h \
128 gfxPDFSurface.h \
129 $(NULL)
131 ifdef MOZ_X11
132 EXPORTS += \
133 gfxXlibSurface.h \
134 GLXLibrary.h \
135 $(NULL)
136 endif
138 ifdef MOZ_PANGO
139 EXPORTS += gfxPangoFonts.h
140 else
141 EXPORTS += gfxFT2Fonts.h
142 endif
143 endif
145 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
146 EXPORTS += \
147 gfxPDFSurface.h \
148 gfxWindowsPlatform.h \
149 gfxWindowsSurface.h \
150 gfxWindowsNativeDrawing.h \
151 WGLLibrary.h \
152 $(NULL)
154 ifdef WINCE
155 EXPORTS += \
156 gfxFT2Fonts.h \
157 gfxFT2FontBase.h \
158 $(NULL)
159 else
160 EXPORTS += \
161 gfxDWriteFonts.h \
162 gfxD2DSurface.h \
163 $(NULL)
164 endif
165 endif
167 CPPSRCS = \
168 gfxASurface.cpp \
169 gfxAlphaRecovery.cpp \
170 gfxBlur.cpp \
171 gfxCachedTempSurface.cpp \
172 gfxContext.cpp \
173 gfxDrawable.cpp \
174 gfxImageSurface.cpp \
175 gfxFont.cpp \
176 gfxFontMissingGlyphs.cpp \
177 gfxFontTest.cpp \
178 gfxFontUtils.cpp \
179 gfxAtoms.cpp \
180 gfxMatrix.cpp \
181 gfxPath.cpp \
182 gfxPattern.cpp \
183 gfxPlatform.cpp \
184 gfxPlatformFontList.cpp \
185 gfxRect.cpp \
186 gfxSkipChars.cpp \
187 gfxTeeSurface.cpp \
188 gfxTextRunCache.cpp \
189 gfxTextRunWordCache.cpp \
190 gfxUserFontSet.cpp \
191 gfxUtils.cpp \
192 gfxUnicodeProperties.cpp \
193 gfxScriptItemizer.cpp \
194 gfxHarfBuzzShaper.cpp \
195 GLContext.cpp \
196 GLContextProviderOSMesa.cpp \
197 $(NULL)
199 # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp.
200 # The file uses SSE2 intrinsics, so it needs special compile flags on some
201 # compilers.
202 ifneq (,$(INTEL_ARCHITECTURE))
203 CPPSRCS += gfxAlphaRecoverySSE2.cpp
205 ifdef GNU_CC
206 gfxAlphaRecoverySSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
207 endif
209 ifdef SOLARIS_SUNPRO_CXX
210 gfxAlphaRecoverySSE2.$(OBJ_SUFFIX): OS_CXXFLAGS += -xarch=sse2 -xO4
211 endif
213 endif
215 ifdef MOZ_IPC
216 CPPSRCS += \
217 gfxSharedImageSurface.cpp \
218 $(NULL)
219 endif
221 SHARED_LIBRARY_LIBS += \
222 ../layers/$(LIB_PREFIX)layers.$(LIB_SUFFIX) \
223 $(NULL)
226 ifndef MOZ_ENABLE_LIBXUL
227 EXTRA_DSO_LIBS = gkgfx ycbcr
228 ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
229 CPPSRCS += gfxDllDeps.cpp
230 endif
231 endif
233 EXTRA_DSO_LDOPTS += \
234 $(MOZ_CAIRO_LIBS) \
235 $(LIBS_DIR) \
236 $(EXTRA_DSO_LIBS) \
237 $(MOZ_UNICHARUTIL_LIBS) \
238 $(XPCOM_LIBS) \
239 $(NSPR_LIBS) \
240 $(ZLIB_LIBS) \
241 $(QCMS_LIBS) \
242 $(MOZ_HARFBUZZ_LIBS) \
243 $(MOZ_OTS_LIBS) \
244 $(NULL)
246 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
247 CPPSRCS += gfxWindowsPlatform.cpp \
248 gfxWindowsSurface.cpp \
249 gfxWindowsNativeDrawing.cpp \
250 nsUnicodeRange.cpp \
251 $(NULL)
253 ifdef WINCE
254 CPPSRCS += gfxFT2Fonts.cpp \
255 gfxFT2FontBase.cpp \
256 gfxFT2Utils.cpp \
257 gfxFT2FontList.cpp \
258 $(NULL)
260 EXTRA_DSO_LDOPTS += $(FT2_LIBS)
262 OS_LIBS += $(call EXPAND_LIBNAME,ddraw)
263 else
264 ifdef MOZ_ENABLE_DWRITE_FONT
265 CPPSRCS += gfxDWriteFonts.cpp \
266 gfxDWriteShaper.cpp \
267 gfxDWriteTextAnalysis.cpp \
268 gfxDWriteCommon.cpp \
269 gfxD2DSurface.cpp \
270 gfxDWriteFontList.cpp \
271 $(NULL)
272 endif
273 CPPSRCS += gfxGDIFont.cpp \
274 gfxGDIFontList.cpp \
275 gfxGDIShaper.cpp \
276 gfxUniscribeShaper.cpp \
277 $(NULL)
278 _OS_LIBS = usp10 msimg32 ole32 version advapi32
279 endif
281 CPPSRCS += gfxPDFSurface.cpp
283 ifdef GNU_CXX
284 _OS_LIBS += uuid
285 endif
286 OS_LIBS += $(call EXPAND_LIBNAME,$(_OS_LIBS))
288 ifdef MOZ_ENABLE_D3D9_LAYER
289 DEFINES += -DMOZ_ENABLE_D3D9_LAYER
290 endif
292 ifdef MOZ_ENABLE_D3D10_LAYER
293 DEFINES += -DMOZ_ENABLE_D3D10_LAYER
294 endif
296 ACDEFINES += -UWIN32_LEAN_AND_MEAN
297 endif
299 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
300 EXPORTS += \
301 gfxPDFSurface.h \
302 $(NULL)
303 CPPSRCS += \
304 gfxAndroidPlatform.cpp \
305 gfxFT2Fonts.cpp \
306 gfxFT2FontBase.cpp \
307 gfxFT2Utils.cpp \
308 gfxFT2FontList.cpp \
309 gfxPDFSurface.cpp \
310 nsUnicodeRange.cpp \
311 $(NULL)
312 endif
314 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
315 CPPSRCS += gfxOS2Fonts.cpp \
316 gfxOS2Platform.cpp \
317 gfxOS2Surface.cpp \
318 nsUnicodeRange.cpp \
319 gfxFontconfigUtils.cpp \
320 $(NULL)
321 CPPSRCS += gfxPDFSurface.cpp
322 endif
324 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
326 ifdef MOZ_PANGO
327 CPPSRCS += gfxPangoFonts.cpp
328 else
329 CPPSRCS += gfxFT2Fonts.cpp
330 endif
332 ifdef MOZ_X11
333 CPPSRCS += gfxXlibSurface.cpp gfxXlibNativeRenderer.cpp
334 endif
336 CPPSRCS += gfxPlatformGtk.cpp gfxGdkNativeRenderer.cpp
337 CPPSRCS += gfxPDFSurface.cpp gfxPSSurface.cpp
338 CPPSRCS += gfxFontconfigUtils.cpp
339 CPPSRCS += gfxFT2FontBase.cpp
340 CPPSRCS += gfxFT2Utils.cpp
341 CPPSRCS += nsUnicodeRange.cpp
343 ifdef MOZ_DFB
344 CSRCS = cairo-gdk-utils.c
345 endif
347 EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) $(ZLIB_LIBS) $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS)
348 endif
350 ifdef MOZ_DFB
351 CPPSRCS += gfxDirectFBSurface.cpp
352 endif
354 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
355 CPPSRCS += gfxQtPlatform.cpp gfxQPainterSurface.cpp
356 CPPSRCS += gfxXlibSurface.cpp gfxQtNativeRenderer.cpp
357 ifdef MOZ_PANGO
358 CPPSRCS += gfxPangoFonts.cpp
359 else
360 CPPSRCS += gfxFT2Fonts.cpp
361 endif
362 CPPSRCS += gfxFT2FontBase.cpp
363 CPPSRCS += gfxFT2Utils.cpp
364 CPPSRCS += gfxFontconfigUtils.cpp
365 CPPSRCS += nsUnicodeRange.cpp
366 CPPSRCS += gfxPDFSurface.cpp
367 EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) $(ZLIB_LIBS) $(XLDFLAGS) $(XLIBS) $(CAIRO_FT_LIBS) $(XEXT_LIBS)
368 endif
370 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
371 CPPSRCS += gfxBeOSSurface.cpp gfxBeOSPlatform.cpp
372 CPPSRCS += gfxPangoFonts.cpp
373 CPPSRCS += gfxFT2FontBase.cpp
374 CPPSRCS += gfxFT2Utils.cpp
375 #CPPSRCS += gfxPDFSurface.cpp
376 CPPSRCS += gfxFontconfigUtils.cpp
377 CPPSRCS += nsUnicodeRange.cpp
378 EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) $(CAIRO_FT_LIBS) -lfontconfig
379 endif
381 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
382 CPPSRCS += \
383 gfxQuartzSurface.cpp \
384 gfxQuartzImageSurface.cpp \
385 gfxQuartzPDFSurface.cpp \
386 gfxPlatformMac.cpp \
387 gfxMacFont.cpp \
388 gfxCoreTextShaper.cpp \
389 $(NULL)
390 #CPPSRCS += gfxPDFSurface.cpp
391 CPPSRCS += nsUnicodeRange.cpp
392 CPPSRCS += gfxQuartzNativeDrawing.cpp
394 CMMSRCS = \
395 gfxMacPlatformFontList.mm \
396 nsCoreAnimationSupport.mm \
397 $(NULL)
399 # Always link with OpenGL/AGL
400 EXTRA_DSO_LDOPTS += -framework OpenGL -framework AGL -framework QuickTime -framework AppKit -framework QuartzCore
401 endif
403 CSRCS += woff.c
405 EXTRA_DSO_LDOPTS += $(TK_LIBS)
407 GL_PROVIDER = Null
409 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
410 ifndef WINCE
411 GL_PROVIDER = WGL
412 endif
413 endif
416 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
417 GL_PROVIDER = CGL
418 endif
420 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
421 ifdef MOZ_PLATFORM_MAEMO
422 GL_PROVIDER = EGL
423 else
424 GL_PROVIDER = GLX
425 endif
426 endif
428 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
429 ifdef MOZ_PLATFORM_MAEMO
430 GL_PROVIDER = EGL
431 else
432 GL_PROVIDER = GLX
433 endif
434 endif
436 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
437 GL_PROVIDER = EGL
438 endif
440 # Mac is a special snowflake
441 ifeq ($(GL_PROVIDER),CGL)
442 CMMSRCS += GLContextProvider$(GL_PROVIDER).mm
443 else
444 CPPSRCS += GLContextProvider$(GL_PROVIDER).cpp
445 endif
447 # Win32 is a special snowflake, for ANGLE
448 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
449 CPPSRCS += GLContextProviderEGL.cpp
450 endif
452 DEFINES += -DIMPL_THEBES -DWOFF_MOZILLA_CLIENT
454 include $(topsrcdir)/config/rules.mk
455 include $(topsrcdir)/ipc/chromium/chromium-config.mk
457 DEFINES := $(filter-out -DUNICODE,$(DEFINES))
459 CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
460 CFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
462 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
463 ifdef WINCE
464 CXXFLAGS += $(CAIRO_FT_CFLAGS)
465 endif
466 endif
468 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
469 CXXFLAGS += $(CAIRO_FT_CFLAGS)
470 endif
472 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
473 CXXFLAGS += $(MOZ_PANGO_CFLAGS)
474 endif
476 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
477 CXXFLAGS += $(CAIRO_FT_CFLAGS)
478 endif
480 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
481 CXXFLAGS += $(CAIRO_FT_CFLAGS)
482 endif
484 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
485 CXXFLAGS += $(CAIRO_FT_CFLAGS) $(MOZ_PANGO_CFLAGS)
486 endif