gfx/thebes/moz.build

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/thebes/moz.build	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,295 @@
     1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
     1.5 +# vim: set filetype=python:
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +EXPORTS += [
    1.11 +    'DrawMode.h',
    1.12 +    'gfx2DGlue.h',
    1.13 +    'gfx3DMatrix.h',
    1.14 +    'gfxAlphaRecovery.h',
    1.15 +    'gfxASurface.h',
    1.16 +    'gfxBaseSharedMemorySurface.h',
    1.17 +    'gfxBlur.h',
    1.18 +    'gfxCachedTempSurface.h',
    1.19 +    'gfxColor.h',
    1.20 +    'gfxContext.h',
    1.21 +    'gfxDrawable.h',
    1.22 +    'gfxFailure.h',
    1.23 +    'gfxFont.h',
    1.24 +    'gfxFontConstants.h',
    1.25 +    'gfxFontFeatures.h',
    1.26 +    'gfxFontInfoLoader.h',
    1.27 +    'gfxFontTest.h',
    1.28 +    'gfxFontUtils.h',
    1.29 +    'gfxGradientCache.h',
    1.30 +    'gfxImageSurface.h',
    1.31 +    'gfxLineSegment.h',
    1.32 +    'gfxMathTable.h',
    1.33 +    'gfxMatrix.h',
    1.34 +    'gfxPath.h',
    1.35 +    'gfxPattern.h',
    1.36 +    'gfxPlatform.h',
    1.37 +    'gfxPoint.h',
    1.38 +    'gfxPoint3D.h',
    1.39 +    'gfxPointH3D.h',
    1.40 +    'gfxPrefs.h',
    1.41 +    'gfxQuad.h',
    1.42 +    'gfxQuaternion.h',
    1.43 +    'gfxRect.h',
    1.44 +    'gfxReusableImageSurfaceWrapper.h',
    1.45 +    'gfxReusableSharedImageSurfaceWrapper.h',
    1.46 +    'gfxReusableSurfaceWrapper.h',
    1.47 +    'gfxSharedImageSurface.h',
    1.48 +    'gfxSharedQuartzSurface.h',
    1.49 +    'gfxSkipChars.h',
    1.50 +    'gfxSVGGlyphs.h',
    1.51 +    'gfxTeeSurface.h',
    1.52 +    'gfxTypes.h',
    1.53 +    'gfxUserFontSet.h',
    1.54 +    'gfxUtils.h',
    1.55 +    'GraphicsFilter.h',
    1.56 +    'nsSurfaceTexture.h',
    1.57 +    'RoundedRect.h',
    1.58 +]
    1.59 +
    1.60 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
    1.61 +    EXPORTS += [
    1.62 +        'gfxAndroidPlatform.h',
    1.63 +        'gfxFT2FontBase.h',
    1.64 +        'gfxFT2Fonts.h',
    1.65 +        'gfxPDFSurface.h',
    1.66 +    ]
    1.67 +    SOURCES += [
    1.68 +        'gfxAndroidPlatform.cpp',
    1.69 +        'gfxFT2FontBase.cpp',
    1.70 +        'gfxFT2FontList.cpp',
    1.71 +        'gfxFT2Fonts.cpp',
    1.72 +        'gfxFT2Utils.cpp',
    1.73 +        'gfxPDFSurface.cpp',
    1.74 +    ]
    1.75 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    1.76 +    EXPORTS += [
    1.77 +        'gfxAndroidPlatform.h',
    1.78 +        'gfxFT2FontBase.h',
    1.79 +        'gfxFT2Fonts.h',
    1.80 +        'gfxPDFSurface.h',
    1.81 +    ]
    1.82 +    SOURCES += [
    1.83 +        'gfxAndroidPlatform.cpp',
    1.84 +        'gfxFT2FontBase.cpp',
    1.85 +        'gfxFT2FontList.cpp',
    1.86 +        'gfxFT2Fonts.cpp',
    1.87 +        'gfxFT2Utils.cpp',
    1.88 +        'gfxPDFSurface.cpp',
    1.89 +    ]
    1.90 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    1.91 +    EXPORTS += [
    1.92 +        'gfxPlatformMac.h',
    1.93 +        'gfxQuartzImageSurface.h',
    1.94 +        'gfxQuartzNativeDrawing.h',
    1.95 +        'gfxQuartzSurface.h',
    1.96 +    ]
    1.97 +    SOURCES += [
    1.98 +        'gfxCoreTextShaper.cpp',
    1.99 +        'gfxMacFont.cpp',
   1.100 +        'gfxPlatformMac.cpp',
   1.101 +        'gfxQuartzImageSurface.cpp',
   1.102 +        'gfxQuartzNativeDrawing.cpp',
   1.103 +        'gfxQuartzSurface.cpp',
   1.104 +    ]
   1.105 +elif CONFIG['MOZ_WIDGET_GTK']:
   1.106 +    EXPORTS += [
   1.107 +        'gfxFT2FontBase.h',
   1.108 +        'gfxGdkNativeRenderer.h',
   1.109 +        'gfxPangoFonts.h',
   1.110 +        'gfxPDFSurface.h',
   1.111 +        'gfxPlatformGtk.h',
   1.112 +        'gfxPSSurface.h',
   1.113 +    ]
   1.114 +
   1.115 +    SOURCES += [
   1.116 +        'gfxFontconfigUtils.cpp',
   1.117 +        'gfxFT2FontBase.cpp',
   1.118 +        'gfxFT2Utils.cpp',
   1.119 +        'gfxGdkNativeRenderer.cpp',
   1.120 +        'gfxPangoFonts.cpp',
   1.121 +        'gfxPDFSurface.cpp',
   1.122 +        'gfxPlatformGtk.cpp',
   1.123 +        'gfxPSSurface.cpp',
   1.124 +    ]
   1.125 +
   1.126 +    if CONFIG['MOZ_X11']:
   1.127 +        EXPORTS += [
   1.128 +            'gfxXlibNativeRenderer.h',
   1.129 +            'gfxXlibSurface.h',
   1.130 +        ]
   1.131 +        SOURCES += [
   1.132 +            'gfxXlibNativeRenderer.cpp',
   1.133 +            'gfxXlibSurface.cpp',
   1.134 +        ]
   1.135 +
   1.136 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
   1.137 +    EXPORTS += [
   1.138 +        'gfxFT2FontBase.h',
   1.139 +        'gfxPangoFonts.h',
   1.140 +        'gfxPDFSurface.h',
   1.141 +        'gfxQPainterSurface.h',
   1.142 +        'gfxQtNativeRenderer.h',
   1.143 +        'gfxQtPlatform.h',
   1.144 +    ]
   1.145 +    SOURCES += [
   1.146 +        'gfxFontconfigUtils.cpp',
   1.147 +        'gfxFT2FontBase.cpp',
   1.148 +        'gfxFT2Utils.cpp',
   1.149 +        'gfxPangoFonts.cpp',
   1.150 +        'gfxPDFSurface.cpp',
   1.151 +        'gfxQPainterSurface.cpp',
   1.152 +        'gfxQtPlatform.cpp',
   1.153 +    ]
   1.154 +
   1.155 +    if CONFIG['MOZ_X11']:
   1.156 +        EXPORTS += [
   1.157 +            'gfxXlibSurface.h',
   1.158 +        ]
   1.159 +        SOURCES += [
   1.160 +            'gfxQtNativeRenderer.cpp',
   1.161 +            'gfxXlibSurface.cpp',
   1.162 +        ]
   1.163 +
   1.164 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
   1.165 +    EXPORTS += [
   1.166 +        'gfxD2DSurface.h',
   1.167 +        'gfxDWriteFonts.h',
   1.168 +        'gfxGDIFont.h',
   1.169 +        'gfxGDIFontList.h',
   1.170 +        'gfxPDFSurface.h',
   1.171 +        'gfxPlatformFontList.h',
   1.172 +        'gfxWindowsNativeDrawing.h',
   1.173 +        'gfxWindowsPlatform.h',
   1.174 +        'gfxWindowsSurface.h',
   1.175 +    ]
   1.176 +    # gfxGDIFontList.cpp and gfxGDIShaper.cpp force NSPR logging, so they cannot be built in unified mode.
   1.177 +    SOURCES += [
   1.178 +        'gfxGDIFont.cpp',
   1.179 +        'gfxGDIFontList.cpp',
   1.180 +        'gfxGDIShaper.cpp',
   1.181 +        'gfxPDFSurface.cpp',
   1.182 +        'gfxUniscribeShaper.cpp',
   1.183 +        'gfxWindowsNativeDrawing.cpp',
   1.184 +        'gfxWindowsPlatform.cpp',
   1.185 +        'gfxWindowsSurface.cpp',
   1.186 +    ]
   1.187 +    if CONFIG['MOZ_ENABLE_DWRITE_FONT']:
   1.188 +        # gfxDWriteFontList.cpp forces NSPR logging, so it cannot be built in unified mode.
   1.189 +        SOURCES += [
   1.190 +            'gfxD2DSurface.cpp',
   1.191 +            'gfxDWriteCommon.cpp',
   1.192 +            'gfxDWriteFontList.cpp',
   1.193 +            'gfxDWriteFonts.cpp',
   1.194 +            'gfxDWriteShaper.cpp',
   1.195 +            'gfxDWriteTextAnalysis.cpp',
   1.196 +        ]
   1.197 +
   1.198 +# Are we targeting x86 or x64?  If so, build gfxAlphaRecoverySSE2.cpp.
   1.199 +if CONFIG['INTEL_ARCHITECTURE']:
   1.200 +    SOURCES += ['gfxAlphaRecoverySSE2.cpp']
   1.201 +    # The file uses SSE2 intrinsics, so it needs special compile flags on some
   1.202 +    # compilers.
   1.203 +    SOURCES['gfxAlphaRecoverySSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
   1.204 +
   1.205 +SOURCES += [
   1.206 +    # Includes mac system header conflicting with point/size,
   1.207 +    # and includes glxXlibSurface.h which drags in Xrender.h
   1.208 +    'gfxASurface.cpp',
   1.209 +    # on X11, gfxDrawable.cpp includes X headers for an old workaround which
   1.210 +    # we could consider removing soon (affects Ubuntus older than 10.04 LTS)
   1.211 +    # which currently prevent it from joining UNIFIED_SOURCES.
   1.212 +    'gfxDrawable.cpp',
   1.213 +    # Uses FORCE_PR_LOG
   1.214 +    'gfxFont.cpp',
   1.215 +    # Uses FORCE_PR_LOG
   1.216 +    'gfxFontUtils.cpp',
   1.217 +    # Includes mac system header conflicting with point/size, and also uses FORCE_PR_LOG
   1.218 +    'gfxPlatform.cpp',
   1.219 +    # Uses FORCE_PR_LOG
   1.220 +    'gfxPlatformFontList.cpp',
   1.221 +    'gfxPrefs.cpp',
   1.222 +    # Uses FORCE_PR_LOG
   1.223 +    'gfxUserFontSet.cpp',
   1.224 +]
   1.225 +
   1.226 +UNIFIED_SOURCES += [
   1.227 +    'CJKCompatSVS.cpp',
   1.228 +    'gfx3DMatrix.cpp',
   1.229 +    'gfxAlphaRecovery.cpp',
   1.230 +    'gfxBaseSharedMemorySurface.cpp',
   1.231 +    'gfxBlur.cpp',
   1.232 +    'gfxCachedTempSurface.cpp',
   1.233 +    'gfxContext.cpp',
   1.234 +    'gfxFontFeatures.cpp',
   1.235 +    'gfxFontInfoLoader.cpp',
   1.236 +    'gfxFontMissingGlyphs.cpp',
   1.237 +    'gfxFontTest.cpp',
   1.238 +    'gfxGradientCache.cpp',
   1.239 +    'gfxGraphiteShaper.cpp',
   1.240 +    'gfxHarfBuzzShaper.cpp',
   1.241 +    'gfxImageSurface.cpp',
   1.242 +    'gfxMathTable.cpp',
   1.243 +    'gfxMatrix.cpp',
   1.244 +    'gfxPath.cpp',
   1.245 +    'gfxPattern.cpp',
   1.246 +    'gfxRect.cpp',
   1.247 +    'gfxReusableImageSurfaceWrapper.cpp',
   1.248 +    'gfxReusableSharedImageSurfaceWrapper.cpp',
   1.249 +    'gfxScriptItemizer.cpp',
   1.250 +    'gfxSkipChars.cpp',
   1.251 +    'gfxSVGGlyphs.cpp',
   1.252 +    'gfxTeeSurface.cpp',
   1.253 +    'gfxUtils.cpp',
   1.254 +    'nsSurfaceTexture.cpp',
   1.255 +    'nsUnicodeRange.cpp',
   1.256 +]
   1.257 +
   1.258 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
   1.259 +    # gfxMacPlatformFontList.mm forces NSPR logging so it cannot be built in unified mode.
   1.260 +    SOURCES += [
   1.261 +        'gfxMacPlatformFontList.mm',
   1.262 +    ]
   1.263 +
   1.264 +FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
   1.265 +
   1.266 +MSVC_ENABLE_PGO = True
   1.267 +
   1.268 +LIBRARY_NAME = 'thebes'
   1.269 +
   1.270 +include('/ipc/chromium/chromium-config.mozbuild')
   1.271 +
   1.272 +FINAL_LIBRARY = 'xul'
   1.273 +
   1.274 +GENERATED_FILES = [
   1.275 +    'DeprecatedPremultiplyTables.h',
   1.276 +]
   1.277 +
   1.278 +LOCAL_INCLUDES += [
   1.279 +    '/content/xml/document/src',
   1.280 +]
   1.281 +
   1.282 +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
   1.283 +    DEFINES['MOZ_ENABLE_FREETYPE'] = True
   1.284 +
   1.285 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
   1.286 +    for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'):
   1.287 +        if CONFIG[var]:
   1.288 +            DEFINES[var] = True
   1.289 +
   1.290 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
   1.291 +    # This is set for "normal Android", that is, when Gecko is running on
   1.292 +    # top of the android java runtime.
   1.293 +    DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True
   1.294 +
   1.295 +DEFINES['GRAPHITE2_STATIC'] = True
   1.296 +
   1.297 +if CONFIG['OS_TARGET'] == 'WINNT':
   1.298 +    DEFINES['OTS_DLL'] = True

mercurial