Upgrade DevTools WebSocket server implementation from Hybi10 to Hybi17.
[chromium-blink-merge.git] / content / content.gyp
blobbe3f85c6732549852aff9865435fbe45d12feb6e
1 # Copyright (c) 2011 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.
6   'variables': {
7     'chromium_code': 1,  # Use higher warning level.
8     'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)',
9   },
10   'includes': [
11     '../build/win_precompile.gypi',
12     'content_shell.gypi',
13     'content_tests.gypi',
14   ],
15   'target_defaults': {
16     'defines': ['CONTENT_IMPLEMENTATION'],
17   },
18   'conditions': [
19    # In component mode, we build all of content as a single DLL.
20    # However, in the static mode, we need to build content as multiple
21    # targets in order to prevent dependencies from getting introduced
22    # upstream unnecessarily (e.g., content_renderer depends on allocator
23    # and chrome_exe depends on content_common but we don't want
24    # chrome_exe to have to depend on allocator).
25    # TODO(dpranke): Uncomment: ['component == "static_library"', {
26    ['1 == 1', {
27      'targets': [
28       {'target_name': 'content',
29        'type': 'none',
30        'dependencies': [
31         'content_app',
32         'content_browser',
33         'content_common',
34         'content_gpu',
35         'content_plugin',
36         'content_ppapi_plugin',
37         'content_renderer',
38         'content_utility',
39         'content_worker',
40        ],
41       },
42       {'target_name': 'content_app',
43        'type': 'static_library',
44        'includes': [
45           'content_app.gypi',
46         ],
47        'dependencies': [
48           'content_common',
49         ],
50       },
51       {'target_name': 'content_browser',
52        'type': 'static_library',
53        'includes': [
54           'content_browser.gypi',
55         ],
56        'dependencies': [
57           'content_common',
58         ],
59       },
60       {'target_name': 'content_common',
61        'type': 'static_library',
62        'includes': [
63           'content_common.gypi',
64         ],
65       },
66       {'target_name': 'content_gpu',
67        'type': 'static_library',
68        'includes': [
69           'content_gpu.gypi',
70         ],
71        'dependencies': [
72           'content_common',
73         ],
74       },
75       {'target_name': 'content_plugin',
76        'type': 'static_library',
77        'includes': [
78           'content_plugin.gypi',
79         ],
80        'dependencies': [
81           'content_common',
82         ],
83       },
84       {'target_name': 'content_ppapi_plugin',
85        'type': 'static_library',
86        'includes': [
87           'content_ppapi_plugin.gypi',
88         ],
89       },
90       {'target_name': 'content_renderer',
91        'type': 'static_library',
92        'includes': [
93           'content_renderer.gypi',
94         ],
95        'dependencies': [
96           'content_common',
97         ],
98       },
99       {'target_name': 'content_utility',
100        'type': 'static_library',
101        'includes': [
102           'content_utility.gypi',
103         ],
104        'dependencies': [
105           'content_common',
106         ],
107       },
108       {'target_name': 'content_worker',
109        'type': 'static_library',
110        'includes': [
111           'content_worker.gypi',
112        ],
113        'dependencies': [
114           'content_common',
115         ],
116       },
117      ],
118      'conditions': [
119        ['OS=="mac"', {
120          'targets': [
121            {
122              'target_name': 'closure_blocks_leopard_compat',
123              'defines!': ['CONTENT_IMPLEMENTATION'],
124              'conditions': [
125                ['mac_sdk == "10.5"', {
126                  'type': 'shared_library',
127                  'product_name': 'closure_blocks_leopard_compat_stub',
128                  'variables': {
129                    # This target controls stripping directly. See below.
130                    'mac_strip': 0,
131                  },
132                  'sources': [
133                    'browser/mac/closure_blocks_leopard_compat.S',
134                  ],
135                  'xcode_settings': {
136                    # These values are taken from libSystem.dylib in the 10.5
137                    # SDK. Setting LD_DYLIB_INSTALL_NAME causes anything linked
138                    # against this stub library to look for the symbols it
139                    # provides in the real libSystem at runtime. When using ld
140                    # from Xcode 4 or later (ld64-123.2 and up), giving two
141                    # libraries with the same "install name" to the linker will
142                    # cause it to print "ld: warning: dylibs with same install
143                    # name". This is harmless, and ld will behave as intended
144                    # here.
145                    #
146                    # The real library's compatibility version is used, and the
147                    # value of the current version from the SDK is used to make
148                    # it appear as though anything linked against this stub was
149                    # linked against the real thing.
150                    'LD_DYLIB_INSTALL_NAME': '/usr/lib/libSystem.B.dylib',
151                    'DYLIB_COMPATIBILITY_VERSION': '1.0.0',
152                    'DYLIB_CURRENT_VERSION': '111.1.4',
154                    # Turn on stripping (yes, even in debug mode), and add the -c
155                    # flag. This is what produces a stub library (MH_DYLIB_STUB)
156                    # as opposed to a dylib (MH_DYLIB). MH_DYLIB_STUB files
157                    # contain symbol tables and everything else needed for
158                    # linking, but are stripped of section contents. This is the
159                    # same way that the stub libraries in Mac OS X SDKs are
160                    # created. dyld will refuse to load a stub library, so this
161                    # provides some insurance in case anyone tries to load the
162                    # stub at runtime.
163                    'DEPLOYMENT_POSTPROCESSING': 'YES',
164                    'STRIP_STYLE': 'non-global',
165                    'STRIPFLAGS': '-c',
166                  },
167                }, {  # else: mac_sdk != "10.5"
168                  # When using the 10.6 SDK or newer, the necessary definitions
169                  # are already present in libSystem.dylib. There is no need to
170                  # build a stub dylib to provide these symbols at link time.
171                  # This target is still useful to cause those symbols to be
172                  # treated as weak imports in dependents, who still must
173                  # #include closure_blocks_leopard_compat.h to get weak imports.
174                  'type': 'none',
175                }],
176              ],
177            },
178          ],
179        }],
180       ],
181     },
182     { # component != static_library
183      'target_defaults': {
184      },
185      'targets': [
186       {'target_name': 'content',
187        'type': 'shared_library',
188        'includes': [
189         'content_app.gypi',
190         'content_browser.gypi',
191         'content_common.gypi',
192         'content_gpu.gypi',
193         'content_plugin.gypi',
194         'content_ppapi_plugin.gypi',
195         'content_renderer.gypi',
196         'content_utility.gypi',
197         'content_worker.gypi',
198        ],
199       },
200       {'target_name': 'content_app',
201        'type': 'none',
202        'dependencies': ['content', 'content_browser'],
203       },
204       {'target_name': 'content_browser',
205        'type': 'none',
206        'dependencies': ['content'],
207       },
208       {'target_name': 'content_common',
209        'type': 'none',
210        'dependencies': ['content'],
211       },
212       {'target_name': 'content_gpu',
213        'type': 'none',
214        'dependencies': ['content'],
215       },
216       {'target_name': 'content_plugin',
217        'type': 'none',
218        'dependencies': ['content'],
219       },
220       {'target_name': 'content_ppapi_plugin',
221        'type': 'none',
222        'dependencies': ['content'],
223       },
224       {'target_name': 'content_renderer',
225        'type': 'none',
226        'dependencies': ['content'],
227       },
228       {'target_name': 'content_utility',
229        'type': 'none',
230        'dependencies': ['content'],
231       },
232       {'target_name': 'content_worker',
233        'type': 'none',
234        'dependencies': ['content'],
235       },
236      ],
237     },
238    ],
239   ],