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: # libEGL depends on (links against!) libGLESv2! michael@0: if CONFIG['MOZ_ANGLE_RENDERER']: michael@0: DIRS += ['src/libGLESv2', 'src/libEGL'] michael@0: michael@0: EXPORTS.angle += [ michael@0: 'include/GLSLANG/ShaderLang.h', michael@0: 'include/KHR/khrplatform.h', michael@0: ] michael@0: michael@0: # WARNING: CPP_SOURCES seems very dependent on ordering. Grouping all of these michael@0: # CPP_SOURCES lines into one list may break webgl tests. michael@0: michael@0: # Target: 'preprocessor' michael@0: # src/compiler/preprocessor: michael@0: UNIFIED_SOURCES += ['src/compiler/preprocessor/' + src for src in [ michael@0: 'DiagnosticsBase.cpp', michael@0: 'DirectiveHandlerBase.cpp', michael@0: 'DirectiveParser.cpp', michael@0: 'ExpressionParser.cpp', michael@0: 'Input.cpp', michael@0: 'Lexer.cpp', michael@0: 'Macro.cpp', michael@0: 'MacroExpander.cpp', michael@0: 'Preprocessor.cpp', michael@0: 'Token.cpp', michael@0: 'Tokenizer.cpp', michael@0: ]] michael@0: michael@0: # Target: 'translator_common' michael@0: # Requires: 'preprocessor' michael@0: # src/compiler: michael@0: UNIFIED_SOURCES += ['src/compiler/' + src for src in [ michael@0: 'BuiltInFunctionEmulator.cpp', michael@0: 'Compiler.cpp', michael@0: 'compiler_debug.cpp', michael@0: 'CompilerUniform.cpp', michael@0: 'DetectCallDepth.cpp', michael@0: 'Diagnostics.cpp', michael@0: 'DirectiveHandler.cpp', michael@0: 'ForLoopUnroll.cpp', michael@0: 'InfoSink.cpp', michael@0: 'Initialize.cpp', michael@0: 'InitializeDll.cpp', michael@0: 'InitializeParseContext.cpp', michael@0: 'Intermediate.cpp', michael@0: 'intermOut.cpp', michael@0: 'IntermTraverse.cpp', michael@0: 'MapLongVariableNames.cpp', michael@0: 'parseConst.cpp', michael@0: 'ParseHelper.cpp', michael@0: 'PoolAlloc.cpp', michael@0: 'QualifierAlive.cpp', michael@0: 'RemoveTree.cpp', michael@0: 'SymbolTable.cpp', michael@0: 'util.cpp', michael@0: 'ValidateLimitations.cpp', michael@0: 'VariableInfo.cpp', michael@0: 'VariablePacker.cpp', michael@0: ]] michael@0: # The yacc source files need to be built separately. michael@0: SOURCES += ['src/compiler/' + src for src in [ michael@0: 'glslang_lex.cpp', michael@0: 'glslang_tab.cpp', michael@0: ]] michael@0: michael@0: # src/compiler/depgraph: michael@0: UNIFIED_SOURCES += ['src/compiler/depgraph/' + src for src in [ michael@0: 'DependencyGraph.cpp', michael@0: 'DependencyGraphBuilder.cpp', michael@0: 'DependencyGraphOutput.cpp', michael@0: 'DependencyGraphTraverse.cpp', michael@0: ]] michael@0: michael@0: # src/compiler/timing: michael@0: UNIFIED_SOURCES += ['src/compiler/timing/' + src for src in [ michael@0: 'RestrictFragmentShaderTiming.cpp', michael@0: 'RestrictVertexShaderTiming.cpp', michael@0: ]] michael@0: michael@0: # src/third_party/compiler: michael@0: UNIFIED_SOURCES += ['src/third_party/compiler/' + src for src in [ michael@0: 'ArrayBoundsClamper.cpp', michael@0: ]] michael@0: michael@0: # src/third_party/murmurhash: michael@0: UNIFIED_SOURCES += ['src/third_party/murmurhash/' + src for src in [ michael@0: 'MurmurHash3.cpp', michael@0: ]] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': michael@0: UNIFIED_SOURCES += [ michael@0: 'src/compiler/ossource_win.cpp', michael@0: ] michael@0: else: michael@0: UNIFIED_SOURCES += [ michael@0: 'src/compiler/ossource_posix.cpp', michael@0: ] michael@0: michael@0: # Target: 'translator_glsl' michael@0: # Requires: 'translator_common' michael@0: # src/compiler: michael@0: UNIFIED_SOURCES += ['src/compiler/' + src for src in [ michael@0: 'CodeGenGLSL.cpp', michael@0: 'OutputESSL.cpp', michael@0: 'OutputGLSL.cpp', michael@0: 'OutputGLSLBase.cpp', michael@0: 'ShaderLang.cpp', michael@0: 'TranslatorESSL.cpp', michael@0: 'TranslatorGLSL.cpp', michael@0: 'VersionGLSL.cpp', michael@0: ]] michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: LOCAL_INCLUDES += [ michael@0: 'include', michael@0: 'include/KHR', michael@0: 'src', michael@0: ] michael@0: michael@0: if CONFIG['GKMEDIAS_SHARED_LIBRARY']: michael@0: NO_VISIBILITY_FLAGS = True michael@0: michael@0: FINAL_LIBRARY = 'gkmedias' michael@0: michael@0: DEFINES['ANGLE_DISABLE_TRACE'] = True michael@0: DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1' michael@0: DEFINES['COMPILER_IMPLEMENTATION'] = True michael@0: michael@0: # Suppress warnings in third-party code. michael@0: if CONFIG['GNU_CXX']: michael@0: CXXFLAGS += [ michael@0: '-Wno-attributes', michael@0: '-Wno-sign-compare', michael@0: '-Wno-unknown-pragmas', michael@0: ] michael@0: if CONFIG['CLANG_CXX']: michael@0: CXXFLAGS += ['-Wno-unused-private-field']