michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: EXPORTS += [ michael@0: 'DrawMode.h', michael@0: 'gfx2DGlue.h', michael@0: 'gfx3DMatrix.h', michael@0: 'gfxAlphaRecovery.h', michael@0: 'gfxASurface.h', michael@0: 'gfxBaseSharedMemorySurface.h', michael@0: 'gfxBlur.h', michael@0: 'gfxCachedTempSurface.h', michael@0: 'gfxColor.h', michael@0: 'gfxContext.h', michael@0: 'gfxDrawable.h', michael@0: 'gfxFailure.h', michael@0: 'gfxFont.h', michael@0: 'gfxFontConstants.h', michael@0: 'gfxFontFeatures.h', michael@0: 'gfxFontInfoLoader.h', michael@0: 'gfxFontTest.h', michael@0: 'gfxFontUtils.h', michael@0: 'gfxGradientCache.h', michael@0: 'gfxImageSurface.h', michael@0: 'gfxLineSegment.h', michael@0: 'gfxMathTable.h', michael@0: 'gfxMatrix.h', michael@0: 'gfxPath.h', michael@0: 'gfxPattern.h', michael@0: 'gfxPlatform.h', michael@0: 'gfxPoint.h', michael@0: 'gfxPoint3D.h', michael@0: 'gfxPointH3D.h', michael@0: 'gfxPrefs.h', michael@0: 'gfxQuad.h', michael@0: 'gfxQuaternion.h', michael@0: 'gfxRect.h', michael@0: 'gfxReusableImageSurfaceWrapper.h', michael@0: 'gfxReusableSharedImageSurfaceWrapper.h', michael@0: 'gfxReusableSurfaceWrapper.h', michael@0: 'gfxSharedImageSurface.h', michael@0: 'gfxSharedQuartzSurface.h', michael@0: 'gfxSkipChars.h', michael@0: 'gfxSVGGlyphs.h', michael@0: 'gfxTeeSurface.h', michael@0: 'gfxTypes.h', michael@0: 'gfxUserFontSet.h', michael@0: 'gfxUtils.h', michael@0: 'GraphicsFilter.h', michael@0: 'nsSurfaceTexture.h', michael@0: 'RoundedRect.h', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': michael@0: EXPORTS += [ michael@0: 'gfxAndroidPlatform.h', michael@0: 'gfxFT2FontBase.h', michael@0: 'gfxFT2Fonts.h', michael@0: 'gfxPDFSurface.h', michael@0: ] michael@0: SOURCES += [ michael@0: 'gfxAndroidPlatform.cpp', michael@0: 'gfxFT2FontBase.cpp', michael@0: 'gfxFT2FontList.cpp', michael@0: 'gfxFT2Fonts.cpp', michael@0: 'gfxFT2Utils.cpp', michael@0: 'gfxPDFSurface.cpp', michael@0: ] michael@0: elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': michael@0: EXPORTS += [ michael@0: 'gfxAndroidPlatform.h', michael@0: 'gfxFT2FontBase.h', michael@0: 'gfxFT2Fonts.h', michael@0: 'gfxPDFSurface.h', michael@0: ] michael@0: SOURCES += [ michael@0: 'gfxAndroidPlatform.cpp', michael@0: 'gfxFT2FontBase.cpp', michael@0: 'gfxFT2FontList.cpp', michael@0: 'gfxFT2Fonts.cpp', michael@0: 'gfxFT2Utils.cpp', michael@0: 'gfxPDFSurface.cpp', michael@0: ] michael@0: elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': michael@0: EXPORTS += [ michael@0: 'gfxPlatformMac.h', michael@0: 'gfxQuartzImageSurface.h', michael@0: 'gfxQuartzNativeDrawing.h', michael@0: 'gfxQuartzSurface.h', michael@0: ] michael@0: SOURCES += [ michael@0: 'gfxCoreTextShaper.cpp', michael@0: 'gfxMacFont.cpp', michael@0: 'gfxPlatformMac.cpp', michael@0: 'gfxQuartzImageSurface.cpp', michael@0: 'gfxQuartzNativeDrawing.cpp', michael@0: 'gfxQuartzSurface.cpp', michael@0: ] michael@0: elif CONFIG['MOZ_WIDGET_GTK']: michael@0: EXPORTS += [ michael@0: 'gfxFT2FontBase.h', michael@0: 'gfxGdkNativeRenderer.h', michael@0: 'gfxPangoFonts.h', michael@0: 'gfxPDFSurface.h', michael@0: 'gfxPlatformGtk.h', michael@0: 'gfxPSSurface.h', michael@0: ] michael@0: michael@0: SOURCES += [ michael@0: 'gfxFontconfigUtils.cpp', michael@0: 'gfxFT2FontBase.cpp', michael@0: 'gfxFT2Utils.cpp', michael@0: 'gfxGdkNativeRenderer.cpp', michael@0: 'gfxPangoFonts.cpp', michael@0: 'gfxPDFSurface.cpp', michael@0: 'gfxPlatformGtk.cpp', michael@0: 'gfxPSSurface.cpp', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_X11']: michael@0: EXPORTS += [ michael@0: 'gfxXlibNativeRenderer.h', michael@0: 'gfxXlibSurface.h', michael@0: ] michael@0: SOURCES += [ michael@0: 'gfxXlibNativeRenderer.cpp', michael@0: 'gfxXlibSurface.cpp', michael@0: ] michael@0: michael@0: elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': michael@0: EXPORTS += [ michael@0: 'gfxFT2FontBase.h', michael@0: 'gfxPangoFonts.h', michael@0: 'gfxPDFSurface.h', michael@0: 'gfxQPainterSurface.h', michael@0: 'gfxQtNativeRenderer.h', michael@0: 'gfxQtPlatform.h', michael@0: ] michael@0: SOURCES += [ michael@0: 'gfxFontconfigUtils.cpp', michael@0: 'gfxFT2FontBase.cpp', michael@0: 'gfxFT2Utils.cpp', michael@0: 'gfxPangoFonts.cpp', michael@0: 'gfxPDFSurface.cpp', michael@0: 'gfxQPainterSurface.cpp', michael@0: 'gfxQtPlatform.cpp', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_X11']: michael@0: EXPORTS += [ michael@0: 'gfxXlibSurface.h', michael@0: ] michael@0: SOURCES += [ michael@0: 'gfxQtNativeRenderer.cpp', michael@0: 'gfxXlibSurface.cpp', michael@0: ] michael@0: michael@0: elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': michael@0: EXPORTS += [ michael@0: 'gfxD2DSurface.h', michael@0: 'gfxDWriteFonts.h', michael@0: 'gfxGDIFont.h', michael@0: 'gfxGDIFontList.h', michael@0: 'gfxPDFSurface.h', michael@0: 'gfxPlatformFontList.h', michael@0: 'gfxWindowsNativeDrawing.h', michael@0: 'gfxWindowsPlatform.h', michael@0: 'gfxWindowsSurface.h', michael@0: ] michael@0: # gfxGDIFontList.cpp and gfxGDIShaper.cpp force NSPR logging, so they cannot be built in unified mode. michael@0: SOURCES += [ michael@0: 'gfxGDIFont.cpp', michael@0: 'gfxGDIFontList.cpp', michael@0: 'gfxGDIShaper.cpp', michael@0: 'gfxPDFSurface.cpp', michael@0: 'gfxUniscribeShaper.cpp', michael@0: 'gfxWindowsNativeDrawing.cpp', michael@0: 'gfxWindowsPlatform.cpp', michael@0: 'gfxWindowsSurface.cpp', michael@0: ] michael@0: if CONFIG['MOZ_ENABLE_DWRITE_FONT']: michael@0: # gfxDWriteFontList.cpp forces NSPR logging, so it cannot be built in unified mode. michael@0: SOURCES += [ michael@0: 'gfxD2DSurface.cpp', michael@0: 'gfxDWriteCommon.cpp', michael@0: 'gfxDWriteFontList.cpp', michael@0: 'gfxDWriteFonts.cpp', michael@0: 'gfxDWriteShaper.cpp', michael@0: 'gfxDWriteTextAnalysis.cpp', michael@0: ] michael@0: michael@0: # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp. michael@0: if CONFIG['INTEL_ARCHITECTURE']: michael@0: SOURCES += ['gfxAlphaRecoverySSE2.cpp'] michael@0: # The file uses SSE2 intrinsics, so it needs special compile flags on some michael@0: # compilers. michael@0: SOURCES['gfxAlphaRecoverySSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] michael@0: michael@0: SOURCES += [ michael@0: # Includes mac system header conflicting with point/size, michael@0: # and includes glxXlibSurface.h which drags in Xrender.h michael@0: 'gfxASurface.cpp', michael@0: # on X11, gfxDrawable.cpp includes X headers for an old workaround which michael@0: # we could consider removing soon (affects Ubuntus older than 10.04 LTS) michael@0: # which currently prevent it from joining UNIFIED_SOURCES. michael@0: 'gfxDrawable.cpp', michael@0: # Uses FORCE_PR_LOG michael@0: 'gfxFont.cpp', michael@0: # Uses FORCE_PR_LOG michael@0: 'gfxFontUtils.cpp', michael@0: # Includes mac system header conflicting with point/size, and also uses FORCE_PR_LOG michael@0: 'gfxPlatform.cpp', michael@0: # Uses FORCE_PR_LOG michael@0: 'gfxPlatformFontList.cpp', michael@0: 'gfxPrefs.cpp', michael@0: # Uses FORCE_PR_LOG michael@0: 'gfxUserFontSet.cpp', michael@0: ] michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'CJKCompatSVS.cpp', michael@0: 'gfx3DMatrix.cpp', michael@0: 'gfxAlphaRecovery.cpp', michael@0: 'gfxBaseSharedMemorySurface.cpp', michael@0: 'gfxBlur.cpp', michael@0: 'gfxCachedTempSurface.cpp', michael@0: 'gfxContext.cpp', michael@0: 'gfxFontFeatures.cpp', michael@0: 'gfxFontInfoLoader.cpp', michael@0: 'gfxFontMissingGlyphs.cpp', michael@0: 'gfxFontTest.cpp', michael@0: 'gfxGradientCache.cpp', michael@0: 'gfxGraphiteShaper.cpp', michael@0: 'gfxHarfBuzzShaper.cpp', michael@0: 'gfxImageSurface.cpp', michael@0: 'gfxMathTable.cpp', michael@0: 'gfxMatrix.cpp', michael@0: 'gfxPath.cpp', michael@0: 'gfxPattern.cpp', michael@0: 'gfxRect.cpp', michael@0: 'gfxReusableImageSurfaceWrapper.cpp', michael@0: 'gfxReusableSharedImageSurfaceWrapper.cpp', michael@0: 'gfxScriptItemizer.cpp', michael@0: 'gfxSkipChars.cpp', michael@0: 'gfxSVGGlyphs.cpp', michael@0: 'gfxTeeSurface.cpp', michael@0: 'gfxUtils.cpp', michael@0: 'nsSurfaceTexture.cpp', michael@0: 'nsUnicodeRange.cpp', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': michael@0: # gfxMacPlatformFontList.mm forces NSPR logging so it cannot be built in unified mode. michael@0: SOURCES += [ michael@0: 'gfxMacPlatformFontList.mm', michael@0: ] michael@0: michael@0: FAIL_ON_WARNINGS = not CONFIG['_MSC_VER'] michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: LIBRARY_NAME = 'thebes' michael@0: michael@0: include('/ipc/chromium/chromium-config.mozbuild') michael@0: michael@0: FINAL_LIBRARY = 'xul' michael@0: michael@0: GENERATED_FILES = [ michael@0: 'DeprecatedPremultiplyTables.h', michael@0: ] michael@0: michael@0: LOCAL_INCLUDES += [ michael@0: '/content/xml/document/src', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'): michael@0: DEFINES['MOZ_ENABLE_FREETYPE'] = True michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': michael@0: for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'): michael@0: if CONFIG[var]: michael@0: DEFINES[var] = True michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': michael@0: # This is set for "normal Android", that is, when Gecko is running on michael@0: # top of the android java runtime. michael@0: DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True michael@0: michael@0: DEFINES['GRAPHITE2_STATIC'] = True michael@0: michael@0: if CONFIG['OS_TARGET'] == 'WINNT': michael@0: DEFINES['OTS_DLL'] = True