1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/angle/build/common.gypi Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,190 @@ 1.4 +# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. 1.5 +# Use of this source code is governed by a BSD-style license that can be 1.6 +# found in the LICENSE file. 1.7 + 1.8 +{ 1.9 + 'variables': { 1.10 + 'component%': 'static_library', 1.11 + # angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp. 1.12 + # angle_code is set to 0 for test code, sample code, and third party code. 1.13 + # When angle_code is 1, we build with additional warning flags on Mac and Linux. 1.14 + 'angle_code%': 0, 1.15 + 'gcc_or_clang_warnings': [ 1.16 + '-Wall', 1.17 + '-Wchar-subscripts', 1.18 + '-Werror', 1.19 + '-Wextra', 1.20 + '-Wformat=2', 1.21 + '-Winit-self', 1.22 + '-Wno-sign-compare', 1.23 + '-Wno-unused-function', 1.24 + '-Wno-unused-parameter', 1.25 + '-Wno-unknown-pragmas', 1.26 + '-Wpacked', 1.27 + '-Wpointer-arith', 1.28 + '-Wundef', 1.29 + '-Wwrite-strings', 1.30 + ], 1.31 + }, 1.32 + 'target_defaults': { 1.33 + 'default_configuration': 'Debug', 1.34 + 'variables': { 1.35 + 'warn_as_error%': 1, 1.36 + }, 1.37 + 'target_conditions': [ 1.38 + ['warn_as_error == 1', { 1.39 + 'msvs_settings': { 1.40 + 'VCCLCompilerTool': { 1.41 + 'WarnAsError': 'true', 1.42 + }, 1.43 + }, 1.44 + }], 1.45 + ], 1.46 + 'configurations': { 1.47 + 'Common': { 1.48 + 'abstract': 1, 1.49 + 'msvs_configuration_attributes': { 1.50 + 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', 1.51 + 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', 1.52 + 'CharacterSet': '1', # UNICODE 1.53 + }, 1.54 + 'msvs_configuration_platform': 'Win32', 1.55 + 'msvs_settings': { 1.56 + 'VCCLCompilerTool': { 1.57 + 'BufferSecurityCheck': 'true', 1.58 + 'DebugInformationFormat': '3', 1.59 + # TODO(alokp): Disable exceptions before integrating with chromium. 1.60 + #'ExceptionHandling': '0', 1.61 + 'EnableFunctionLevelLinking': 'true', 1.62 + 'MinimalRebuild': 'false', 1.63 + 'PreprocessorDefinitions': [ 1.64 + '_CRT_SECURE_NO_DEPRECATE', 1.65 + '_HAS_EXCEPTIONS=0', 1.66 + '_WIN32_WINNT=0x0600', 1.67 + '_WINDOWS', 1.68 + 'NOMINMAX', 1.69 + 'WIN32', 1.70 + 'WIN32_LEAN_AND_MEAN', 1.71 + 'WINVER=0x0600', 1.72 + ], 1.73 + 'RuntimeTypeInfo': 'false', 1.74 + 'WarningLevel': '4', 1.75 + 'DisableSpecificWarnings': [4100, 4127, 4189, 4239, 4244, 4245, 4512, 4702], 1.76 + }, 1.77 + 'VCLinkerTool': { 1.78 + 'FixedBaseAddress': '1', 1.79 + 'GenerateDebugInformation': 'true', 1.80 + 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', 1.81 + 'MapFileName': '$(OutDir)\\$(TargetName).map', 1.82 + # Most of the executables we'll ever create are tests 1.83 + # and utilities with console output. 1.84 + 'SubSystem': '1', # /SUBSYSTEM:CONSOLE 1.85 + 'AdditionalLibraryDirectories': [ 1.86 + '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86', 1.87 + ], 1.88 + }, 1.89 + 'VCLibrarianTool': { 1.90 + 'AdditionalLibraryDirectories': [ 1.91 + '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86', 1.92 + ], 1.93 + }, 1.94 + 'VCResourceCompilerTool': { 1.95 + 'Culture': '1033', 1.96 + }, 1.97 + }, 1.98 + 'msvs_system_include_dirs': [ 1.99 + '$(ProgramFiles)/Windows Kits/8.0/Include/shared', 1.100 + '$(ProgramFiles)/Windows Kits/8.0/Include/um', 1.101 + ], 1.102 + }, # Common 1.103 + 'Debug': { 1.104 + 'inherit_from': ['Common'], 1.105 + 'msvs_settings': { 1.106 + 'VCCLCompilerTool': { 1.107 + 'Optimization': '0', # /Od 1.108 + 'PreprocessorDefinitions': ['_DEBUG'], 1.109 + 'BasicRuntimeChecks': '3', 1.110 + 'RuntimeLibrary': '1', # /MTd (debug static) 1.111 + }, 1.112 + 'VCLinkerTool': { 1.113 + 'LinkIncremental': '2', 1.114 + }, 1.115 + }, 1.116 + 'xcode_settings': { 1.117 + 'COPY_PHASE_STRIP': 'NO', 1.118 + 'GCC_OPTIMIZATION_LEVEL': '0', 1.119 + }, 1.120 + }, # Debug 1.121 + 'Release': { 1.122 + 'inherit_from': ['Common'], 1.123 + 'msvs_settings': { 1.124 + 'VCCLCompilerTool': { 1.125 + 'Optimization': '2', # /Os 1.126 + 'PreprocessorDefinitions': ['NDEBUG'], 1.127 + 'RuntimeLibrary': '0', # /MT (static) 1.128 + }, 1.129 + 'VCLinkerTool': { 1.130 + 'LinkIncremental': '1', 1.131 + }, 1.132 + }, 1.133 + }, # Release 1.134 + }, # configurations 1.135 + 'conditions': [ 1.136 + ['component=="shared_library"', { 1.137 + 'defines': ['COMPONENT_BUILD'], 1.138 + }], 1.139 + ], 1.140 + }, # target_defaults 1.141 + 'conditions': [ 1.142 + ['OS=="win"', { 1.143 + 'target_defaults': { 1.144 + 'msvs_cygwin_dirs': ['../third_party/cygwin'], 1.145 + }, 1.146 + }], 1.147 + ['OS!="win" and OS!="mac"', { 1.148 + 'target_defaults': { 1.149 + 'cflags': [ 1.150 + '-pthread', 1.151 + '-fno-exceptions', 1.152 + ], 1.153 + 'ldflags': [ 1.154 + '-pthread', 1.155 + ], 1.156 + 'configurations': { 1.157 + 'Debug': { 1.158 + 'variables': { 1.159 + 'debug_optimize%': '0', 1.160 + }, 1.161 + 'defines': [ 1.162 + '_DEBUG', 1.163 + ], 1.164 + 'cflags': [ 1.165 + '-O>(debug_optimize)', 1.166 + '-g', 1.167 + ], 1.168 + } 1.169 + }, 1.170 + }, 1.171 + }], 1.172 + ['angle_code==1', { 1.173 + 'target_defaults': { 1.174 + 'conditions': [ 1.175 + ['OS=="mac"', { 1.176 + 'xcode_settings': { 1.177 + 'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)'] 1.178 + }, 1.179 + }], 1.180 + ['OS!="win" and OS!="mac"', { 1.181 + 'cflags': ['<@(gcc_or_clang_warnings)'] 1.182 + }], 1.183 + ] 1.184 + } 1.185 + }], 1.186 + ], 1.187 +} 1.188 + 1.189 +# Local Variables: 1.190 +# tab-width:2 1.191 +# indent-tabs-mode:nil 1.192 +# End: 1.193 +# vim: set expandtab tabstop=2 shiftwidth=2: