blob: 59a08ccfbbfbf44f31bfe3b716c3fb3787b64474 [file] [log] [blame]
[email protected]2f80c312009-02-25 21:26:551# Copyright (c) 2009 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'variables': {
7 'chromium_code%': 0,
8 },
9 'target_defaults': {
10 # TODO(bradnelson): This should really be able to be either:
11 # CHROMIUM_BUILD or GOOGLE_CHROME_BUILD
12 'defines': ['CHROMIUM_BUILD'],
13 'default_configuration': 'Debug',
14 'configurations': {
15 'Debug': {
16 'conditions': [
17 [ 'OS=="mac"', {
18 'xcode_settings': {
19 'COPY_PHASE_STRIP': 'NO',
20 'GCC_OPTIMIZATION_LEVEL': '0',
21 }
22 }],
23 [ 'OS=="win"', {
24 'configuration_platform': 'Win32',
25 'msvs_configuration_attributes': {
26 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
27 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
28 'CharacterSet': '1',
29 },
30 'msvs_settings': {
31 'VCCLCompilerTool': {
32 'Optimization': '0',
33 'PreprocessorDefinitions': ['_DEBUG'],
34 'BasicRuntimeChecks': '3',
35 'RuntimeLibrary': '1',
36 },
37 'VCLinkerTool': {
38 'LinkIncremental': '1',
39 },
40 'VCResourceCompilerTool': {
41 'PreprocessorDefinitions': ['_DEBUG'],
42 },
43 },
44 }],
45 ],
46 },
47 'Release': {
48 'defines': [
49 'NDEBUG',
50 ],
51 'conditions': [
52 [ 'OS=="mac"', {
53 'xcode_settings': {
54 'DEAD_CODE_STRIPPING': 'YES',
55 }
56 }],
57 [ 'OS=="win"', {
58 'configuration_platform': 'Win32',
59 'msvs_props': ['release.vsprops'],
60 }],
61 ],
62 },
63 },
64 },
65 'conditions': [
66 ['OS=="mac"', {
67 'target_defaults': {
68 'xcode_settings': {
69 'ALWAYS_SEARCH_USER_PATHS': 'NO',
70 'GCC_C_LANGUAGE_STANDARD': 'c99',
71 'GCC_CW_ASM_SYNTAX': 'NO',
72 'GCC_DYNAMIC_NO_PIC': 'YES',
73 'GCC_ENABLE_PASCAL_STRINGS': 'NO',
74 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
75 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
76 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
77 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
78 'GCC_VERSION': '4.2',
79 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
80 'MACOSX_DEPLOYMENT_TARGET': '10.5',
81 'PREBINDING': 'NO',
82 'SDKROOT': 'macosx10.5',
83 'USE_HEADERMAP': 'NO',
84 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'],
85 },
86 'target_conditions': [
87 ['_type=="shared_library"', {
88 'xcode_settings': {'GCC_DYNAMIC_NO_PIC': 'NO'},
89 }],
90 ['_type!="static_library"', {
91 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
92 }],
[email protected]87fde4a2009-02-28 00:50:0893 ['_type=="application"', {
94 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
95 }],
[email protected]2f80c312009-02-25 21:26:5596 ['_type=="application" or _type=="executable"', {
97 'postbuilds': [
98 {
99 'variables': {
100 # Define strip_from_xcode in a variable ending in _path so
101 # that gyp understands it's a path and performs proper
102 # relativization during dict merging.
103 'strip_from_xcode_path': 'mac/strip_from_xcode',
104 },
105 'postbuild_name': 'Strip If Needed',
106 'action': ['<(strip_from_xcode_path)'],
107 },
108 ],
109 }],
110 ],
111 },
112 }],
113 ['OS=="win"', {
114 'target_defaults': {
115 'defines': [
116 '_WIN32_WINNT=0x0600',
117 'WINVER=0x0600',
118 'WIN32',
119 '_WINDOWS',
120 '_HAS_EXCEPTIONS=0',
121 'NOMINMAX',
122 '_CRT_RAND_S',
123 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
124 'WIN32_LEAN_AND_MEAN',
125 '_SECURE_ATL',
126 '_HAS_TR1=0',
127 ],
128 'include_dirs': [
129 '<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Include',
130 '$(VSInstallDir)/VC/atlmfc/include',
131 ],
132 'msvs_cygwin_dirs': ['../third_party/cygwin'],
133 'msvs_disabled_warnings': [4503, 4819],
134 'msvs_settings': {
135 'VCCLCompilerTool': {
136 'MinimalRebuild': 'false',
137 'ExceptionHandling': '0',
138 'BufferSecurityCheck': 'true',
139 'EnableFunctionLevelLinking': 'true',
140 'RuntimeTypeInfo': 'false',
141 'WarningLevel': '3',
142 'WarnAsError': 'true',
143 'DebugInformationFormat': '3',
144 },
145 'VCLibrarianTool': {
146 'AdditionalOptions': '/ignore:4221',
147 'OutputFile': '$(OutDir)\\lib\\$(ProjectName).lib',
148 'AdditionalLibraryDirectories':
149 '<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib',
150 },
151 'VCLinkerTool': {
152 'AdditionalOptions':
153 '/safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat',
154 'AdditionalDependencies': [
155 'wininet.lib',
156 'version.lib',
157 'msimg32.lib',
158 'ws2_32.lib',
159 'usp10.lib',
160 'psapi.lib',
161 ],
162 'AdditionalLibraryDirectories':
163 '<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib',
164 'DelayLoadDLLs': 'dwmapi.dll,uxtheme.dll',
165 'GenerateDebugInformation': 'true',
166 'MapFileName': '$(OutDir)\\$(TargetName).map',
167 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
168 'TargetMachine': '1',
169 'FixedBaseAddress': '1',
170 },
171 'VCMIDLTool': {
172 'GenerateStublessProxies': 'true',
173 'TypeLibraryName': '$(InputName).tlb',
174 'OutputDirectory': '$(IntDir)',
175 'HeaderFileName': '$(InputName).h',
176 'DLLDataFileName': 'dlldata.c',
177 'InterfaceIdentifierFileName': '$(InputName)_i.c',
178 'ProxyFileName': '$(InputName)_p.c',
179 },
180 'VCResourceCompilerTool': {
181 'Culture' : '1033',
182 'AdditionalIncludeDirectories': '<(DEPTH)',
183 },
184 },
185 },
186 }],
187 ['chromium_code==0', {
188 # This section must follow the other conditon sections above because
189 # external_code.gypi expects to be merged into those settings.
190 'includes': [
191 'external_code.gypi',
192 ],
193 }],
194 ],
195 'xcode_settings': {
196 # The Xcode generator will look for an xcode_settings section at the root
197 # of each dict and use it to apply settings on a file-wide basis. Most
198 # settings should not be here, they should be in target-specific
199 # xcode_settings sections, or better yet, should use non-Xcode-specific
200 # settings in target dicts. SYMROOT is a special case, because many other
201 # Xcode variables depend on it, including variables such as
202 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
203 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
204 # files to appear (when present) in the UI as actual files and not red
205 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
206 # and therefore SYMROOT, needs to be set at the project level.
207 #
208 # xcodebuild_gyp is a temporary name to avoid colliding with the xcodebuild
209 # directory used by the non-gyp Xcode build system. When the gyp-based
210 # Xcode build system replaces the older system, this should be changed to
211 # simply "xcodebuild" or some other suitable name.
212 'SYMROOT': '<(DEPTH)/xcodebuild_gyp',
213 },
214}