|
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
|
2 # vim: set filetype=python: |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 EXPORTS += [ |
|
8 'DrawMode.h', |
|
9 'gfx2DGlue.h', |
|
10 'gfx3DMatrix.h', |
|
11 'gfxAlphaRecovery.h', |
|
12 'gfxASurface.h', |
|
13 'gfxBaseSharedMemorySurface.h', |
|
14 'gfxBlur.h', |
|
15 'gfxCachedTempSurface.h', |
|
16 'gfxColor.h', |
|
17 'gfxContext.h', |
|
18 'gfxDrawable.h', |
|
19 'gfxFailure.h', |
|
20 'gfxFont.h', |
|
21 'gfxFontConstants.h', |
|
22 'gfxFontFeatures.h', |
|
23 'gfxFontInfoLoader.h', |
|
24 'gfxFontTest.h', |
|
25 'gfxFontUtils.h', |
|
26 'gfxGradientCache.h', |
|
27 'gfxImageSurface.h', |
|
28 'gfxLineSegment.h', |
|
29 'gfxMathTable.h', |
|
30 'gfxMatrix.h', |
|
31 'gfxPath.h', |
|
32 'gfxPattern.h', |
|
33 'gfxPlatform.h', |
|
34 'gfxPoint.h', |
|
35 'gfxPoint3D.h', |
|
36 'gfxPointH3D.h', |
|
37 'gfxPrefs.h', |
|
38 'gfxQuad.h', |
|
39 'gfxQuaternion.h', |
|
40 'gfxRect.h', |
|
41 'gfxReusableImageSurfaceWrapper.h', |
|
42 'gfxReusableSharedImageSurfaceWrapper.h', |
|
43 'gfxReusableSurfaceWrapper.h', |
|
44 'gfxSharedImageSurface.h', |
|
45 'gfxSharedQuartzSurface.h', |
|
46 'gfxSkipChars.h', |
|
47 'gfxSVGGlyphs.h', |
|
48 'gfxTeeSurface.h', |
|
49 'gfxTypes.h', |
|
50 'gfxUserFontSet.h', |
|
51 'gfxUtils.h', |
|
52 'GraphicsFilter.h', |
|
53 'nsSurfaceTexture.h', |
|
54 'RoundedRect.h', |
|
55 ] |
|
56 |
|
57 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
|
58 EXPORTS += [ |
|
59 'gfxAndroidPlatform.h', |
|
60 'gfxFT2FontBase.h', |
|
61 'gfxFT2Fonts.h', |
|
62 'gfxPDFSurface.h', |
|
63 ] |
|
64 SOURCES += [ |
|
65 'gfxAndroidPlatform.cpp', |
|
66 'gfxFT2FontBase.cpp', |
|
67 'gfxFT2FontList.cpp', |
|
68 'gfxFT2Fonts.cpp', |
|
69 'gfxFT2Utils.cpp', |
|
70 'gfxPDFSurface.cpp', |
|
71 ] |
|
72 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
|
73 EXPORTS += [ |
|
74 'gfxAndroidPlatform.h', |
|
75 'gfxFT2FontBase.h', |
|
76 'gfxFT2Fonts.h', |
|
77 'gfxPDFSurface.h', |
|
78 ] |
|
79 SOURCES += [ |
|
80 'gfxAndroidPlatform.cpp', |
|
81 'gfxFT2FontBase.cpp', |
|
82 'gfxFT2FontList.cpp', |
|
83 'gfxFT2Fonts.cpp', |
|
84 'gfxFT2Utils.cpp', |
|
85 'gfxPDFSurface.cpp', |
|
86 ] |
|
87 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
88 EXPORTS += [ |
|
89 'gfxPlatformMac.h', |
|
90 'gfxQuartzImageSurface.h', |
|
91 'gfxQuartzNativeDrawing.h', |
|
92 'gfxQuartzSurface.h', |
|
93 ] |
|
94 SOURCES += [ |
|
95 'gfxCoreTextShaper.cpp', |
|
96 'gfxMacFont.cpp', |
|
97 'gfxPlatformMac.cpp', |
|
98 'gfxQuartzImageSurface.cpp', |
|
99 'gfxQuartzNativeDrawing.cpp', |
|
100 'gfxQuartzSurface.cpp', |
|
101 ] |
|
102 elif CONFIG['MOZ_WIDGET_GTK']: |
|
103 EXPORTS += [ |
|
104 'gfxFT2FontBase.h', |
|
105 'gfxGdkNativeRenderer.h', |
|
106 'gfxPangoFonts.h', |
|
107 'gfxPDFSurface.h', |
|
108 'gfxPlatformGtk.h', |
|
109 'gfxPSSurface.h', |
|
110 ] |
|
111 |
|
112 SOURCES += [ |
|
113 'gfxFontconfigUtils.cpp', |
|
114 'gfxFT2FontBase.cpp', |
|
115 'gfxFT2Utils.cpp', |
|
116 'gfxGdkNativeRenderer.cpp', |
|
117 'gfxPangoFonts.cpp', |
|
118 'gfxPDFSurface.cpp', |
|
119 'gfxPlatformGtk.cpp', |
|
120 'gfxPSSurface.cpp', |
|
121 ] |
|
122 |
|
123 if CONFIG['MOZ_X11']: |
|
124 EXPORTS += [ |
|
125 'gfxXlibNativeRenderer.h', |
|
126 'gfxXlibSurface.h', |
|
127 ] |
|
128 SOURCES += [ |
|
129 'gfxXlibNativeRenderer.cpp', |
|
130 'gfxXlibSurface.cpp', |
|
131 ] |
|
132 |
|
133 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': |
|
134 EXPORTS += [ |
|
135 'gfxFT2FontBase.h', |
|
136 'gfxPangoFonts.h', |
|
137 'gfxPDFSurface.h', |
|
138 'gfxQPainterSurface.h', |
|
139 'gfxQtNativeRenderer.h', |
|
140 'gfxQtPlatform.h', |
|
141 ] |
|
142 SOURCES += [ |
|
143 'gfxFontconfigUtils.cpp', |
|
144 'gfxFT2FontBase.cpp', |
|
145 'gfxFT2Utils.cpp', |
|
146 'gfxPangoFonts.cpp', |
|
147 'gfxPDFSurface.cpp', |
|
148 'gfxQPainterSurface.cpp', |
|
149 'gfxQtPlatform.cpp', |
|
150 ] |
|
151 |
|
152 if CONFIG['MOZ_X11']: |
|
153 EXPORTS += [ |
|
154 'gfxXlibSurface.h', |
|
155 ] |
|
156 SOURCES += [ |
|
157 'gfxQtNativeRenderer.cpp', |
|
158 'gfxXlibSurface.cpp', |
|
159 ] |
|
160 |
|
161 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
|
162 EXPORTS += [ |
|
163 'gfxD2DSurface.h', |
|
164 'gfxDWriteFonts.h', |
|
165 'gfxGDIFont.h', |
|
166 'gfxGDIFontList.h', |
|
167 'gfxPDFSurface.h', |
|
168 'gfxPlatformFontList.h', |
|
169 'gfxWindowsNativeDrawing.h', |
|
170 'gfxWindowsPlatform.h', |
|
171 'gfxWindowsSurface.h', |
|
172 ] |
|
173 # gfxGDIFontList.cpp and gfxGDIShaper.cpp force NSPR logging, so they cannot be built in unified mode. |
|
174 SOURCES += [ |
|
175 'gfxGDIFont.cpp', |
|
176 'gfxGDIFontList.cpp', |
|
177 'gfxGDIShaper.cpp', |
|
178 'gfxPDFSurface.cpp', |
|
179 'gfxUniscribeShaper.cpp', |
|
180 'gfxWindowsNativeDrawing.cpp', |
|
181 'gfxWindowsPlatform.cpp', |
|
182 'gfxWindowsSurface.cpp', |
|
183 ] |
|
184 if CONFIG['MOZ_ENABLE_DWRITE_FONT']: |
|
185 # gfxDWriteFontList.cpp forces NSPR logging, so it cannot be built in unified mode. |
|
186 SOURCES += [ |
|
187 'gfxD2DSurface.cpp', |
|
188 'gfxDWriteCommon.cpp', |
|
189 'gfxDWriteFontList.cpp', |
|
190 'gfxDWriteFonts.cpp', |
|
191 'gfxDWriteShaper.cpp', |
|
192 'gfxDWriteTextAnalysis.cpp', |
|
193 ] |
|
194 |
|
195 # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp. |
|
196 if CONFIG['INTEL_ARCHITECTURE']: |
|
197 SOURCES += ['gfxAlphaRecoverySSE2.cpp'] |
|
198 # The file uses SSE2 intrinsics, so it needs special compile flags on some |
|
199 # compilers. |
|
200 SOURCES['gfxAlphaRecoverySSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] |
|
201 |
|
202 SOURCES += [ |
|
203 # Includes mac system header conflicting with point/size, |
|
204 # and includes glxXlibSurface.h which drags in Xrender.h |
|
205 'gfxASurface.cpp', |
|
206 # on X11, gfxDrawable.cpp includes X headers for an old workaround which |
|
207 # we could consider removing soon (affects Ubuntus older than 10.04 LTS) |
|
208 # which currently prevent it from joining UNIFIED_SOURCES. |
|
209 'gfxDrawable.cpp', |
|
210 # Uses FORCE_PR_LOG |
|
211 'gfxFont.cpp', |
|
212 # Uses FORCE_PR_LOG |
|
213 'gfxFontUtils.cpp', |
|
214 # Includes mac system header conflicting with point/size, and also uses FORCE_PR_LOG |
|
215 'gfxPlatform.cpp', |
|
216 # Uses FORCE_PR_LOG |
|
217 'gfxPlatformFontList.cpp', |
|
218 'gfxPrefs.cpp', |
|
219 # Uses FORCE_PR_LOG |
|
220 'gfxUserFontSet.cpp', |
|
221 ] |
|
222 |
|
223 UNIFIED_SOURCES += [ |
|
224 'CJKCompatSVS.cpp', |
|
225 'gfx3DMatrix.cpp', |
|
226 'gfxAlphaRecovery.cpp', |
|
227 'gfxBaseSharedMemorySurface.cpp', |
|
228 'gfxBlur.cpp', |
|
229 'gfxCachedTempSurface.cpp', |
|
230 'gfxContext.cpp', |
|
231 'gfxFontFeatures.cpp', |
|
232 'gfxFontInfoLoader.cpp', |
|
233 'gfxFontMissingGlyphs.cpp', |
|
234 'gfxFontTest.cpp', |
|
235 'gfxGradientCache.cpp', |
|
236 'gfxGraphiteShaper.cpp', |
|
237 'gfxHarfBuzzShaper.cpp', |
|
238 'gfxImageSurface.cpp', |
|
239 'gfxMathTable.cpp', |
|
240 'gfxMatrix.cpp', |
|
241 'gfxPath.cpp', |
|
242 'gfxPattern.cpp', |
|
243 'gfxRect.cpp', |
|
244 'gfxReusableImageSurfaceWrapper.cpp', |
|
245 'gfxReusableSharedImageSurfaceWrapper.cpp', |
|
246 'gfxScriptItemizer.cpp', |
|
247 'gfxSkipChars.cpp', |
|
248 'gfxSVGGlyphs.cpp', |
|
249 'gfxTeeSurface.cpp', |
|
250 'gfxUtils.cpp', |
|
251 'nsSurfaceTexture.cpp', |
|
252 'nsUnicodeRange.cpp', |
|
253 ] |
|
254 |
|
255 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
256 # gfxMacPlatformFontList.mm forces NSPR logging so it cannot be built in unified mode. |
|
257 SOURCES += [ |
|
258 'gfxMacPlatformFontList.mm', |
|
259 ] |
|
260 |
|
261 FAIL_ON_WARNINGS = not CONFIG['_MSC_VER'] |
|
262 |
|
263 MSVC_ENABLE_PGO = True |
|
264 |
|
265 LIBRARY_NAME = 'thebes' |
|
266 |
|
267 include('/ipc/chromium/chromium-config.mozbuild') |
|
268 |
|
269 FINAL_LIBRARY = 'xul' |
|
270 |
|
271 GENERATED_FILES = [ |
|
272 'DeprecatedPremultiplyTables.h', |
|
273 ] |
|
274 |
|
275 LOCAL_INCLUDES += [ |
|
276 '/content/xml/document/src', |
|
277 ] |
|
278 |
|
279 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'): |
|
280 DEFINES['MOZ_ENABLE_FREETYPE'] = True |
|
281 |
|
282 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
|
283 for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'): |
|
284 if CONFIG[var]: |
|
285 DEFINES[var] = True |
|
286 |
|
287 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
|
288 # This is set for "normal Android", that is, when Gecko is running on |
|
289 # top of the android java runtime. |
|
290 DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True |
|
291 |
|
292 DEFINES['GRAPHITE2_STATIC'] = True |
|
293 |
|
294 if CONFIG['OS_TARGET'] == 'WINNT': |
|
295 DEFINES['OTS_DLL'] = True |