2011-05-20 Kent Tamura <tkent@chromium.org>
[WebKit-https.git] / Source / WebCore / WebCore.gyp / WebCore.gyp
1 #
2 # Copyright (C) 2009 Google Inc. All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7 #
8 #     * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 #     * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
13 # distribution.
14 #     * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 {
32   'includes': [
33     # FIXME: Sense whether upstream or downstream build, and
34     # include the right features.gypi
35     '../../WebKit/chromium/features.gypi',
36     '../WebCore.gypi',
37   ],
38   # Location of the chromium src directory.
39   'conditions': [
40     ['inside_chromium_build==0', {
41       # Webkit is being built outside of the full chromium project.
42       'variables': {
43         'chromium_src_dir': '../../WebKit/chromium',
44         'libjpeg_gyp_path': '<(chromium_src_dir)/third_party/libjpeg_turbo/libjpeg.gyp',
45       },
46     },{
47       # WebKit is checked out in src/chromium/third_party/WebKit
48       'variables': {
49         'chromium_src_dir': '../../../../..',
50       },
51     }],
52     ['OS == "mac"', {
53       'targets': [
54         {
55           # On the Mac, libWebKitSystemInterface*.a is used to help WebCore
56           # interface with the system.  This library is supplied as a static
57           # library in binary format.  At present, it contains many global
58           # symbols not marked private_extern.  It should be considered an
59           # implementation detail of WebCore, and does not need these symbols
60           # to be exposed so widely.
61           #
62           # This target contains an action that cracks open the existing
63           # static library and rebuilds it with these global symbols
64           # transformed to private_extern.
65           'target_name': 'webkit_system_interface',
66           'type': 'static_library',
67           'variables': {
68             'adjusted_library_path':
69                 '<(PRODUCT_DIR)/libWebKitSystemInterfaceLeopardPrivateExtern.a',
70           },
71           'sources': [
72             # An empty source file is needed to convince Xcode to produce
73             # output for this target.  The resulting library won't actually
74             # contain anything.  The library at adjusted_library_path will,
75             # and that library is pushed to dependents of this target below.
76             'mac/Empty.cpp',
77           ],
78           'actions': [
79             {
80               'action_name': 'Adjust Visibility',
81               'inputs': [
82                 'mac/adjust_visibility.sh',
83                 '../../../WebKitLibraries/libWebKitSystemInterfaceLeopard.a',
84               ],
85               'outputs': [
86                 '<(adjusted_library_path)',
87               ],
88               'action': [
89                 '<@(_inputs)',
90                 '<@(_outputs)',
91                 '<(INTERMEDIATE_DIR)/adjust_visibility',  # work directory
92               ],
93             },
94           ],  # actions
95           'link_settings': {
96             'libraries': [
97               '<(adjusted_library_path)',
98             ],
99           },  # link_settings
100         },  # target webkit_system_interface
101       ],  # targets
102     }],  # condition OS == "mac"
103     ['OS!="win" and remove_webcore_debug_symbols==1', {
104       # Remove -g from all targets defined here.
105       'target_defaults': {
106         'cflags!': ['-g'],
107       },
108     }],
109     ['OS=="linux" and target_arch=="arm"', {
110       # Due to a bug in gcc arm, we get warnings about uninitialized timesNewRoman.unstatic.3258
111       # and colorTransparent.unstatic.4879.
112       'target_defaults': {
113         'cflags': ['-Wno-uninitialized'],
114       },
115     }],
116   ],  # conditions
117
118   'variables': {
119     # If set to 1, doesn't compile debug symbols into webcore reducing the
120     # size of the binary and increasing the speed of gdb.  gcc only.
121     'remove_webcore_debug_symbols%': 0,
122
123     # If set to 0, doesn't build SVG support, reducing the size of the
124     # binary and increasing the speed of gdb.
125     'enable_svg%': 1,
126
127     # Use v8 as default JavaScript engine. This makes sure that javascript_engine variable
128     # is set for both inside_chromium_build 0 and 1 cases.
129     'javascript_engine%': 'v8',
130
131     'webcore_include_dirs': [
132       '../',
133       '../..',
134       '../accessibility',
135       '../accessibility/chromium',
136       '../bindings',
137       '../bindings/generic',
138       '../bindings/v8',
139       '../bindings/v8/custom',
140       '../bindings/v8/specialization',
141       '../bridge',
142       '../bridge/jni',
143       '../bridge/jni/v8',
144       '../css',
145       '../dom',
146       '../dom/default',
147       '../editing',
148       '../fileapi',
149       '../history',
150       '../html',
151       '../html/canvas',
152       '../html/parser',
153       '../html/shadow',
154       '../inspector',
155       '../loader',
156       '../loader/appcache',
157       '../loader/archive',
158       '../loader/cache',
159       '../loader/icon',
160       '../mathml',
161       '../notifications',
162       '../page',
163       '../page/animation',
164       '../page/chromium',
165       '../platform',
166       '../platform/animation',
167       '../platform/audio',
168       '../platform/audio/chromium',
169       '../platform/chromium',
170       '../platform/graphics',
171       '../platform/graphics/chromium',
172       '../platform/graphics/filters',
173       '../platform/graphics/filters/arm',
174       '../platform/graphics/gpu',
175       '../platform/graphics/opentype',
176       '../platform/graphics/skia',
177       '../platform/graphics/transforms',
178       '../platform/image-decoders',
179       '../platform/image-decoders/bmp',
180       '../platform/image-decoders/gif',
181       '../platform/image-decoders/ico',
182       '../platform/image-decoders/jpeg',
183       '../platform/image-decoders/png',
184       '../platform/image-decoders/skia',
185       '../platform/image-decoders/xbm',
186       '../platform/image-decoders/webp',
187       '../platform/image-encoders/skia',
188       '../platform/leveldb',
189       '../platform/mock',
190       '../platform/network',
191       '../platform/network/chromium',
192       '../platform/sql',
193       '../platform/text',
194       '../platform/text/transcoder',
195       '../plugins',
196       '../plugins/chromium',
197       '../rendering',
198       '../rendering/style',
199       '../rendering/svg',
200       '../storage',
201       '../storage/chromium',
202       '../svg',
203       '../svg/animation',
204       '../svg/graphics',
205       '../svg/graphics/filters',
206       '../svg/properties',
207       '../../ThirdParty/glu',
208       '../webaudio',
209       '../websockets',
210       '../workers',
211       '../xml',
212     ],
213
214     'bindings_idl_files': [
215       '<@(webcore_bindings_idl_files)',
216     ],
217
218     'bindings_idl_files!': [
219       # Custom bindings in bindings/v8/custom exist for these.
220       '../dom/EventListener.idl',
221       '../dom/EventTarget.idl',
222       '../html/VoidCallback.idl',
223
224       # Bindings with custom Objective-C implementations.
225       '../page/AbstractView.idl',
226
227       # These bindings are excluded, as they're only used through inheritance and don't define constants that would need a constructor.
228       '../svg/ElementTimeControl.idl',
229       '../svg/SVGExternalResourcesRequired.idl',
230       '../svg/SVGFilterPrimitiveStandardAttributes.idl',
231       '../svg/SVGFitToViewBox.idl',
232
233       '../svg/SVGLangSpace.idl',
234       '../svg/SVGLocatable.idl',
235       '../svg/SVGStylable.idl',
236       '../svg/SVGTests.idl',
237       '../svg/SVGTransformable.idl',
238       '../svg/SVGViewSpec.idl',
239       '../svg/SVGZoomAndPan.idl',
240
241       # FIXME: I don't know why these are excluded, either.
242       # Someone (me?) should figure it out and add appropriate comments.
243       '../css/CSSUnknownRule.idl',
244     ],
245
246     'conditions': [
247       # TODO(maruel): Move it in its own project or generate it anyway?
248       ['enable_svg!=0', {
249         'bindings_idl_files': [
250           '<@(webcore_svg_bindings_idl_files)',
251         ],
252       }],
253       ['OS=="mac"', {
254         'webcore_include_dirs+': [
255           # platform/graphics/cg and cocoa need to come before
256           # platform/graphics/chromium so that the Mac build picks up the
257           # version of ImageBufferData.h in the cg directory and
258           # FontPlatformData.h in the cocoa directory.  The + prepends this
259           # directory to the list.
260           # FIXME: This shouldn't need to be prepended.
261           '../platform/graphics/cocoa',
262           '../platform/graphics/cg',
263         ],
264         'webcore_include_dirs': [
265           # FIXME: Eliminate dependency on platform/mac and related
266           # directories.
267           # FIXME: Eliminate dependency on platform/graphics/mac and
268           # related directories.
269           # platform/graphics/cg may need to stick around, though.
270           '../platform/audio/mac',
271           '../platform/cocoa',
272           '../platform/graphics/mac',
273           '../platform/mac',
274           '../platform/text/mac',
275         ],
276       }],
277       ['OS=="win"', {
278         'webcore_include_dirs': [
279           '../page/win',
280           '../platform/audio/win',
281           '../platform/graphics/win',
282           '../platform/text/win',
283           '../platform/win',
284         ],
285       },{
286         # enable -Wall and -Werror, just for Mac and Linux builds for now
287         # FIXME: Also enable this for Windows after verifying no warnings
288         'chromium_code': 1,
289       }],
290       ['OS=="win" and buildtype=="Official"', {
291         # On windows official release builds, we try to preserve symbol space.
292         'derived_sources_aggregate_files': [
293           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSourcesAll.cpp',
294         ],
295       },{
296         'derived_sources_aggregate_files': [
297           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources01.cpp',
298           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources02.cpp',
299           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources03.cpp',
300           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources04.cpp',
301           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources05.cpp',
302           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources06.cpp',
303           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources07.cpp',
304           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources08.cpp',
305           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources09.cpp',
306           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources10.cpp',
307           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources11.cpp',
308           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources12.cpp',
309           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources13.cpp',
310           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources14.cpp',
311           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources15.cpp',
312           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources16.cpp',
313           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources17.cpp',
314           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources18.cpp',
315           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources19.cpp',
316         ],
317       }],
318     ],
319   },
320   'targets': [
321     {
322       'target_name': 'inspector_idl',
323       'type': 'none',
324       'actions': [
325         {
326           'action_name': 'generateInspectorProtocolIDL',
327           'inputs': [
328             '../inspector/generate-inspector-idl',
329             '../inspector/Inspector.json',
330           ],
331           'outputs': [
332             '<(SHARED_INTERMEDIATE_DIR)/webcore/Inspector.idl',
333           ],
334           'variables': {
335             'generator_include_dirs': [
336             ],
337           },
338           'action': [
339             'python',
340             '../inspector/generate-inspector-idl',
341             '-o',
342             '<@(_outputs)',
343             '<@(_inputs)'
344           ],
345           'message': 'Generating Inspector protocol sources from Inspector.idl',
346         },
347       ]
348     },
349     {
350       'target_name': 'inspector_protocol_sources',
351       'type': 'none',
352       'dependencies': [
353         'inspector_idl'
354       ],
355       'actions': [
356         {
357           'action_name': 'generateInspectorProtocolSources',
358           # The second input item will be used as item name in vcproj.
359           # It is not possible to put Inspector.idl there because
360           # all idl files are marking as excluded by gyp generator.
361           'inputs': [
362             '../bindings/scripts/generate-bindings.pl',
363             '../inspector/CodeGeneratorInspector.pm',
364             '../bindings/scripts/CodeGenerator.pm',
365             '../bindings/scripts/IDLParser.pm',
366             '../bindings/scripts/IDLStructure.pm',
367             '<(SHARED_INTERMEDIATE_DIR)/webcore/Inspector.idl',
368           ],
369           'outputs': [
370             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
371             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js',
372             '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.h',
373             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorFrontend.cpp',
374             '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorFrontend.h',
375           ],
376           'variables': {
377             'generator_include_dirs': [
378             ],
379           },
380           'action': [
381             'python',
382             'scripts/rule_binding.py',
383             '<(SHARED_INTERMEDIATE_DIR)/webcore/Inspector.idl',
384             '<(SHARED_INTERMEDIATE_DIR)/webcore',
385             '<(SHARED_INTERMEDIATE_DIR)/webkit',
386             '--',
387             '<@(_inputs)',
388             '--',
389             '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT',
390             '--generator', 'Inspector',
391             '<@(generator_include_dirs)'
392           ],
393           'message': 'Generating Inspector protocol sources from Inspector.idl',
394         },
395       ]
396     },
397     {
398       'target_name': 'injected_script_source',
399       'type': 'none',
400       'actions': [
401         {
402           'action_name': 'generateInjectedScriptSource',
403           'inputs': [
404             '../inspector/InjectedScriptSource.js',
405           ],
406           'outputs': [
407             '<(SHARED_INTERMEDIATE_DIR)/webkit/InjectedScriptSource.h',
408           ],
409           'action': [
410             'perl',
411             '../inspector/xxd.pl',
412             'InjectedScriptSource_js',
413             '<@(_inputs)',
414             '<@(_outputs)'
415           ],
416           'message': 'Generating InjectedScriptSource.h from InjectedScriptSource.js',
417         },
418       ]
419     },
420     {
421       'target_name': 'debugger_script_source',
422       'type': 'none',
423       'actions': [
424         {
425           'action_name': 'generateDebuggerScriptSource',
426           'inputs': [
427             '../bindings/v8/DebuggerScript.js',
428           ],
429           'outputs': [
430             '<(SHARED_INTERMEDIATE_DIR)/webkit/DebuggerScriptSource.h',
431           ],
432           'action': [
433             'perl',
434             '../inspector/xxd.pl',
435             'DebuggerScriptSource_js',
436             '<@(_inputs)',
437             '<@(_outputs)'
438           ],
439           'message': 'Generating DebuggerScriptSource.h from DebuggerScript.js',
440         },
441       ]
442     },
443     {
444       'target_name': 'webcore_bindings_sources',
445       'type': 'none',
446       'hard_dependency': 1,
447       'sources': [
448         # bison rule
449         '../css/CSSGrammar.y',
450         '../xml/XPathGrammar.y',
451
452         # gperf rule
453         '../html/DocTypeStrings.gperf',
454         '../platform/ColorData.gperf',
455
456         # idl rules
457         '<@(bindings_idl_files)',
458       ],
459       'actions': [
460         # Actions to build derived sources.
461         {
462           'action_name': 'generateXMLViewerCSS',
463           'inputs': [
464             '../xml/XMLViewer.css',
465           ],
466           'outputs': [
467             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerCSS.h',
468           ],
469           'action': [
470             'perl',
471             '../inspector/xxd.pl',
472             'XMLViewer_css',
473             '<@(_inputs)',
474             '<@(_outputs)'
475           ],
476         },
477         {
478           'action_name': 'generateXMLViewerJS',
479           'inputs': [
480             '../xml/XMLViewer.js',
481           ],
482           'outputs': [
483             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerJS.h',
484           ],
485           'action': [
486             'perl',
487             '../inspector/xxd.pl',
488             'XMLViewer_js',
489             '<@(_inputs)',
490             '<@(_outputs)'
491           ],
492         },
493         {
494           'action_name': 'HTMLEntityTable',
495           'inputs': [
496             '../html/parser/HTMLEntityNames.in',
497           ],
498           'outputs': [
499             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp'
500           ],
501           'action': [
502             'python',
503             '../html/parser/create-html-entity-table',
504             '-o',
505             '<@(_outputs)',
506             '<@(_inputs)'
507           ],
508         },
509         {
510           'action_name': 'CSSPropertyNames',
511           'inputs': [
512             '../css/makeprop.pl',
513             '../css/CSSPropertyNames.in',
514           ],
515           'outputs': [
516             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
517             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.h',
518           ],
519           'action': [
520             'python',
521             'scripts/action_csspropertynames.py',
522             '<@(_outputs)',
523             '--',
524             '<@(_inputs)'
525           ],
526           'conditions': [
527             # TODO(maruel): Move it in its own project or generate it anyway?
528             ['enable_svg!=0', {
529               'inputs': [
530                 '../css/SVGCSSPropertyNames.in',
531               ],
532             }],
533           ],
534         },
535         {
536           'action_name': 'CSSValueKeywords',
537           'inputs': [
538             '../css/makevalues.pl',
539             '../css/CSSValueKeywords.in',
540           ],
541           'outputs': [
542             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
543             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h',
544           ],
545           'action': [
546             'python',
547             'scripts/action_cssvaluekeywords.py',
548             '<@(_outputs)',
549             '--',
550             '<@(_inputs)'
551           ],
552           'conditions': [
553             # TODO(maruel): Move it in its own project or generate it anyway?
554             ['enable_svg!=0', {
555               'inputs': [
556                 '../css/SVGCSSValueKeywords.in',
557               ],
558             }],
559           ],
560         },
561         {
562           'action_name': 'HTMLNames',
563           'inputs': [
564             '../dom/make_names.pl',
565             '../html/HTMLTagNames.in',
566             '../html/HTMLAttributeNames.in',
567           ],
568           'outputs': [
569             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
570             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.h',
571             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
572             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
573             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.h',
574           ],
575           'action': [
576             'python',
577             'scripts/action_makenames.py',
578             '<@(_outputs)',
579             '--',
580             '<@(_inputs)',
581             '--',
582             '--factory',
583             '--wrapperFactoryV8',
584             '--extraDefines', '<(feature_defines)'
585           ],
586         },
587         {
588           'action_name': 'SVGNames',
589           'inputs': [
590             '../dom/make_names.pl',
591             '../svg/svgtags.in',
592             '../svg/svgattrs.in',
593           ],
594           'outputs': [
595             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
596             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.h',
597             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
598             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.h',
599             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
600             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.h',
601           ],
602           'action': [
603             'python',
604             'scripts/action_makenames.py',
605             '<@(_outputs)',
606             '--',
607             '<@(_inputs)',
608             '--',
609             '--factory',
610             '--wrapperFactoryV8',
611             '--extraDefines', '<(feature_defines)'
612           ],
613         },
614         {
615           'action_name': 'MathMLNames',
616           'inputs': [
617             '../dom/make_names.pl',
618             '../mathml/mathtags.in',
619             '../mathml/mathattrs.in',
620           ],
621           'outputs': [
622             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
623             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.h',
624             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
625             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.h',
626           ],
627           'action': [
628             'python',
629             'scripts/action_makenames.py',
630             '<@(_outputs)',
631             '--',
632             '<@(_inputs)',
633             '--',
634             '--factory',
635             '--extraDefines', '<(feature_defines)'
636           ],
637         },
638         {
639           'action_name': 'UserAgentStyleSheets',
640           'variables': {
641             'scripts': [
642               '../css/make-css-file-arrays.pl',
643               '../bindings/scripts/preprocessor.pm',
644             ],
645             # The .css files are in the same order as ../DerivedSources.make.
646             'stylesheets': [
647               '../css/html.css',
648               '../css/quirks.css',
649               '../css/view-source.css',
650               '../css/themeChromiumLinux.css', # Chromium only.
651               '../css/themeChromiumSkia.css',  # Chromium only.
652               '../css/themeWin.css',
653               '../css/themeWinQuirks.css',
654               '../css/svg.css',
655               '../css/mathml.css',
656               '../css/mediaControls.css',
657               '../css/mediaControlsChromium.css',
658               '../css/fullscreen.css',
659               # Skip fullscreenQuickTime.
660             ],
661           },
662           'inputs': [
663             '<@(scripts)',
664             '<@(stylesheets)'
665           ],
666           'outputs': [
667             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
668             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
669           ],
670           'action': [
671             'python',
672             'scripts/action_useragentstylesheets.py',
673             '<@(_outputs)',
674             '<@(stylesheets)',
675             '--',
676             '<@(scripts)',
677             '--',
678             '--defines', '<(feature_defines)',
679           ],
680         },
681         {
682           'action_name': 'XLinkNames',
683           'inputs': [
684             '../dom/make_names.pl',
685             '../svg/xlinkattrs.in',
686           ],
687           'outputs': [
688             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
689             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.h',
690           ],
691           'action': [
692             'python',
693             'scripts/action_makenames.py',
694             '<@(_outputs)',
695             '--',
696             '<@(_inputs)',
697             '--',
698             '--extraDefines', '<(feature_defines)'
699           ],
700         },
701         {
702           'action_name': 'XMLNSNames',
703           'inputs': [
704             '../dom/make_names.pl',
705             '../xml/xmlnsattrs.in',
706           ],
707           'outputs': [
708             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
709             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.h',
710           ],
711           'action': [
712             'python',
713             'scripts/action_makenames.py',
714             '<@(_outputs)',
715             '--',
716             '<@(_inputs)',
717             '--',
718             '--extraDefines', '<(feature_defines)'
719           ],
720         },
721         {
722           'action_name': 'XMLNames',
723           'inputs': [
724             '../dom/make_names.pl',
725             '../xml/xmlattrs.in',
726           ],
727           'outputs': [
728             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
729             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.h',
730           ],
731           'action': [
732             'python',
733             'scripts/action_makenames.py',
734             '<@(_outputs)',
735             '--',
736             '<@(_inputs)',
737             '--',
738             '--extraDefines', '<(feature_defines)'
739           ],
740         },
741         {
742           'action_name': 'tokenizer',
743           'inputs': [
744             '../css/maketokenizer',
745             '../css/tokenizer.flex',
746           ],
747           'outputs': [
748             '<(SHARED_INTERMEDIATE_DIR)/webkit/tokenizer.cpp',
749           ],
750           'action': [
751             'python',
752             'scripts/action_maketokenizer.py',
753             '<@(_outputs)',
754             '--',
755             '<@(_inputs)'
756           ],
757         },
758         {
759           'action_name': 'derived_sources_all_in_one',
760           'variables': {
761             # Write sources into a file, so that the action command line won't
762             # exceed OS limites.
763             'idls_list_temp_file': '<|(idls_list_temp_file.tmp <@(bindings_idl_files))',
764           },
765           'inputs': [
766             'scripts/action_derivedsourcesallinone.py',
767             '<(idls_list_temp_file)',
768             '<!@(cat <(idls_list_temp_file))',
769           ],
770           'outputs': [
771             '<@(derived_sources_aggregate_files)',
772           ],
773           'action': [
774             'python',
775             'scripts/action_derivedsourcesallinone.py',
776             '<(idls_list_temp_file)',
777             '--',
778             '<@(derived_sources_aggregate_files)',
779           ],
780         },
781       ],
782       'rules': [
783         # Rules to build derived sources.
784         {
785           'rule_name': 'bison',
786           'extension': 'y',
787           'outputs': [
788             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
789             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).h'
790           ],
791           'action': [
792             'python',
793             'scripts/rule_bison.py',
794             '<(RULE_INPUT_PATH)',
795             '<(SHARED_INTERMEDIATE_DIR)/webkit'
796           ],
797         },
798         {
799           'rule_name': 'gperf',
800           'extension': 'gperf',
801           #
802           # gperf outputs are generated by WebCore/make-hash-tools.pl
803           #
804           'outputs': [
805             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
806           ],
807           'inputs': [
808             '../make-hash-tools.pl',
809           ],
810           'action': [
811             'perl',
812             '../make-hash-tools.pl',
813             '<(SHARED_INTERMEDIATE_DIR)/webkit',
814             '<(RULE_INPUT_PATH)',
815           ],
816         },
817         # Rule to build generated JavaScript (V8) bindings from .idl source.
818         {
819           'rule_name': 'binding',
820           'extension': 'idl',
821           'msvs_external_rule': 1,
822           'inputs': [
823             '../bindings/scripts/generate-bindings.pl',
824             '../bindings/scripts/CodeGenerator.pm',
825             '../bindings/scripts/CodeGeneratorV8.pm',
826             '../bindings/scripts/IDLParser.pm',
827             '../bindings/scripts/IDLStructure.pm',
828             '../bindings/scripts/preprocessor.pm',
829           ],
830           'outputs': [
831             # FIXME:  The .cpp file should be in webkit/bindings once
832             # we coax GYP into supporting it (see 'action' below).
833             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8<(RULE_INPUT_ROOT).cpp',
834             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).h',
835           ],
836           'variables': {
837             'generator_include_dirs': [
838               '--include', '../css',
839               '--include', '../dom',
840               '--include', '../fileapi',
841               '--include', '../html',
842               '--include', '../notifications',
843               '--include', '../page',
844               '--include', '../plugins',
845               '--include', '../storage',
846               '--include', '../svg',
847               '--include', '../webaudio',
848               '--include', '../websockets',
849               '--include', '../workers',
850               '--include', '../xml',
851             ],
852           },
853           # FIXME:  Note that we put the .cpp files in webcore/bindings
854           # but the .h files in webkit/bindings.  This is to work around
855           # the unfortunate fact that GYP strips duplicate arguments
856           # from lists.  When we have a better GYP way to suppress that
857           # behavior, change the output location.
858           'action': [
859             'python',
860             'scripts/rule_binding.py',
861             '<(RULE_INPUT_PATH)',
862             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
863             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
864             '--',
865             '<@(_inputs)',
866             '--',
867             '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT V8_BINDING',
868             '--generator', 'V8',
869             '<@(generator_include_dirs)'
870           ],
871           'message': 'Generating binding from <(RULE_INPUT_PATH)',
872         },
873       ],
874     },
875     {
876       'target_name': 'webcore_bindings',
877       'type': '<(library)',
878       'hard_dependency': 1,
879       'dependencies': [
880         'webcore_bindings_sources',
881         'inspector_protocol_sources',
882         'injected_script_source',
883         'debugger_script_source',
884         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
885         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
886         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
887         '<(chromium_src_dir)/skia/skia.gyp:skia',
888         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
889         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
890         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
891         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
892         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
893         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
894         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
895         '<(libjpeg_gyp_path):libjpeg',
896       ],
897       'include_dirs': [
898         '<(INTERMEDIATE_DIR)',
899         # FIXME:  Remove <(SHARED_INTERMEDIATE_DIR)/webcore when we
900         # can entice gyp into letting us put both the .cpp and .h
901         # files in the same output directory.
902         '<(SHARED_INTERMEDIATE_DIR)/webcore',
903         '<(SHARED_INTERMEDIATE_DIR)/webkit',
904         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
905         '<@(webcore_include_dirs)',
906       ],
907       'direct_dependent_settings': {
908         'include_dirs': [
909           '<(SHARED_INTERMEDIATE_DIR)/webkit',
910           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
911         ],
912       },
913       'sources': [
914         # These files include all the .cpp files generated from the .idl files
915         # in webcore_files.
916         '<@(derived_sources_aggregate_files)',
917
918         # Additional .cpp files for HashTools.h
919         '<(SHARED_INTERMEDIATE_DIR)/webkit/DocTypeStrings.cpp',
920         '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorData.cpp',
921         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
922         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
923
924         # Additional .cpp files from webcore_bindings_sources actions.
925         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
926         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
927         '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
928         '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
929         '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
930         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
931         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
932         '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
933         '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
934         '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
935
936         # Generated from HTMLEntityNames.in
937         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
938
939         # Additional .cpp files from the webcore_bindings_sources rules.
940         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.cpp',
941         '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
942
943         # Additional .cpp files from the webcore_inspector_sources list.
944         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorFrontend.cpp',
945         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
946       ],
947       'conditions': [
948         ['javascript_engine=="v8"', {
949           'dependencies': [
950             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
951           ],
952           'conditions': [
953             ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
954               'defines': [
955                 'USING_V8_SHARED',
956               ],
957             }],
958           ],
959         }],
960         # TODO(maruel): Move it in its own project or generate it anyway?
961         ['enable_svg!=0', {
962           'sources': [
963             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
964             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
965          ],
966         }],
967         ['OS=="mac"', {
968           'include_dirs': [
969             '../../../WebKitLibraries',
970           ],
971         }],
972         ['OS=="win"', {
973           'dependencies': [
974             '<(chromium_src_dir)/build/win/system.gyp:cygwin'
975           ],
976           'defines': [
977             'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
978             '__PRETTY_FUNCTION__=__FUNCTION__',
979           ],
980           # This is needed because Event.h in this directory is blocked
981           # by a system header on windows.
982           'include_dirs++': ['../dom'],
983           'direct_dependent_settings': {
984             'include_dirs+++': ['../dom'],
985           },
986         }],
987         ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
988           'include_dirs': [
989             '<(chromium_src_dir)/third_party/fftw/api',
990           ],
991         }],
992       ],
993     },
994     {
995       # We'll soon split libwebcore in multiple smaller libraries.
996       # webcore_prerequisites will be the 'base' target of every sub-target.
997       'target_name': 'webcore_prerequisites',
998       'type': 'none',
999       'dependencies': [
1000         'webcore_bindings',
1001         '../../ThirdParty/glu/glu.gyp:libtess',
1002         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1003         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1004         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1005         '<(chromium_src_dir)/skia/skia.gyp:skia',
1006         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1007         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1008         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1009         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1010         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1011         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1012         '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1013         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1014         '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_common',
1015         '<(libjpeg_gyp_path):libjpeg',
1016       ],
1017       'export_dependent_settings': [
1018         'webcore_bindings',
1019         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1020         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1021         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1022         '<(chromium_src_dir)/skia/skia.gyp:skia',
1023         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1024         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1025         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1026         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1027         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1028         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1029         '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1030         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1031         '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_common',
1032         '<(libjpeg_gyp_path):libjpeg',
1033       ],
1034       # This is needed for mac because of webkit_system_interface. It'd be nice
1035       # if this hard dependency could be split off the rest.
1036       'hard_dependency': 1,
1037       'direct_dependent_settings': {
1038         'defines': [
1039           'WEBCORE_NAVIGATOR_VENDOR="Google Inc."',
1040         ],
1041         'include_dirs': [
1042           '<(INTERMEDIATE_DIR)',
1043           '<@(webcore_include_dirs)',
1044           '<(chromium_src_dir)/gpu',
1045           '<(chromium_src_dir)/third_party/angle/include/GLSLANG',
1046         ],
1047         'mac_framework_dirs': [
1048           '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
1049         ],
1050         'msvs_disabled_warnings': [
1051           4138, 4244, 4291, 4305, 4344, 4355, 4521, 4099,
1052         ],
1053         'scons_line_length' : 1,
1054         'xcode_settings': {
1055           # Some Mac-specific parts of WebKit won't compile without having this
1056           # prefix header injected.
1057           # FIXME: make this a first-class setting.
1058           'GCC_PREFIX_HEADER': '../WebCorePrefix.h',
1059         },
1060       },
1061       'conditions': [
1062         ['javascript_engine=="v8"', {
1063           'dependencies': [
1064             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1065           ],
1066           'export_dependent_settings': [
1067             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1068           ],
1069           'conditions': [
1070             ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
1071               'direct_dependent_settings': {
1072                 'defines': [
1073                   'USING_V8_SHARED',
1074                 ],
1075               },
1076             }],
1077           ],
1078         }],
1079         ['use_accelerated_compositing==1', {
1080           'dependencies': [
1081             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1082           ],
1083           'export_dependent_settings': [
1084             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1085           ],
1086         }],
1087         ['OS=="linux" or OS=="freebsd"', {
1088           'dependencies': [
1089             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1090             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1091           ],
1092           'export_dependent_settings': [
1093             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1094             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1095           ],
1096           'direct_dependent_settings': {
1097             'cflags': [
1098               # WebCore does not work with strict aliasing enabled.
1099               # https://bugs.webkit.org/show_bug.cgi?id=25864
1100               '-fno-strict-aliasing',
1101             ],
1102           },
1103         }],
1104         ['OS=="linux"', {
1105           'direct_dependent_settings': {
1106             'defines': [
1107               # Mozilla on Linux effectively uses uname -sm, but when running
1108               # 32-bit x86 code on an x86_64 processor, it uses
1109               # "Linux i686 (x86_64)".  Matching that would require making a
1110               # run-time determination.
1111               'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
1112             ],
1113           },
1114         }],
1115         ['OS=="mac"', {
1116           'dependencies': [
1117             'webkit_system_interface',
1118           ],
1119           'export_dependent_settings': [
1120             'webkit_system_interface',
1121           ],
1122           'direct_dependent_settings': {
1123             'defines': [
1124               # Match Safari and Mozilla on Mac x86.
1125               'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
1126
1127               # Chromium's version of WebCore includes the following Objective-C
1128               # classes. The system-provided WebCore framework may also provide
1129               # these classes. Because of the nature of Objective-C binding
1130               # (dynamically at runtime), it's possible for the
1131               # Chromium-provided versions to interfere with the system-provided
1132               # versions.  This may happen when a system framework attempts to
1133               # use WebCore.framework, such as when converting an HTML-flavored
1134               # string to an NSAttributedString.  The solution is to force
1135               # Objective-C class names that would conflict to use alternate
1136               # names.
1137               #
1138               # This list will hopefully shrink but may also grow.  Its
1139               # performance is monitored by the "Check Objective-C Rename"
1140               # postbuild step, and any suspicious-looking symbols not handled
1141               # here or whitelisted in that step will cause a build failure.
1142               #
1143               # If this is unhandled, the console will receive log messages
1144               # such as:
1145               # com.google.Chrome[] objc[]: Class ScrollbarPrefsObserver is implemented in both .../Google Chrome.app/Contents/Versions/.../Google Chrome Helper.app/Contents/MacOS/../../../Google Chrome Framework.framework/Google Chrome Framework and /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore. One of the two will be used. Which one is undefined.
1146               'ScrollbarPrefsObserver=ChromiumWebCoreObjCScrollbarPrefsObserver',
1147               'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
1148               'WebFontCache=ChromiumWebCoreObjCWebFontCache',
1149             ],
1150             'include_dirs': [
1151               '../../../WebKitLibraries',
1152             ],
1153             'postbuilds': [
1154               {
1155                 # This step ensures that any Objective-C names that aren't
1156                 # redefined to be "safe" above will cause a build failure.
1157                 'postbuild_name': 'Check Objective-C Rename',
1158                 'variables': {
1159                   'class_whitelist_regex':
1160                       'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView',
1161                   'category_whitelist_regex':
1162                       'TCMInterposing',
1163                 },
1164                 'action': [
1165                   'mac/check_objc_rename.sh',
1166                   '<(class_whitelist_regex)',
1167                   '<(category_whitelist_regex)',
1168                 ],
1169               },
1170             ],
1171           },
1172         }],
1173         ['OS=="win"', {
1174           'dependencies': [
1175             '<(chromium_src_dir)/build/win/system.gyp:cygwin'
1176           ],
1177           'export_dependent_settings': [
1178             '<(chromium_src_dir)/build/win/system.gyp:cygwin'
1179           ],
1180           'direct_dependent_settings': {
1181             'defines': [
1182               # Match Safari and Mozilla on Windows.
1183               'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1184               '__PRETTY_FUNCTION__=__FUNCTION__',
1185             ],
1186             # This is needed because Event.h in this directory is blocked
1187             # by a system header on windows.
1188             'include_dirs++': ['../dom'],
1189           },
1190         }],
1191         ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
1192           # This directory needs to be on the include path for multiple sub-targets of webcore.
1193           'direct_dependent_settings': {
1194             'include_dirs': [
1195               '<(chromium_src_dir)/third_party/fftw/api',
1196             ],
1197           },
1198         }],
1199         ['(OS=="mac" or OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
1200           # This directory needs to be on the include path for multiple sub-targets of webcore.
1201           'direct_dependent_settings': {
1202             'include_dirs': [
1203               '<(chromium_src_dir)/third_party/ffmpeg/patched-ffmpeg-mt',
1204             ],
1205           },
1206           'dependencies': [
1207             '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1208           ],
1209         }],
1210         ['"ENABLE_LEVELDB=1" in feature_defines', {
1211           'dependencies': [
1212             '<(chromium_src_dir)/third_party/leveldb/leveldb.gyp:leveldb',
1213           ],
1214           'export_dependent_settings': [
1215             '<(chromium_src_dir)/third_party/leveldb/leveldb.gyp:leveldb',
1216           ],
1217         }],
1218       ],
1219     },
1220     {
1221       'target_name': 'webcore_html',
1222       'type': '<(library)',
1223       'dependencies': [
1224         'webcore_prerequisites',
1225       ],
1226       'sources': [
1227         '<@(webcore_privateheader_files)',
1228         '<@(webcore_files)',
1229       ],
1230       'sources/': [
1231         # Start by excluding everything then include html files only.
1232         ['exclude', '.*'],
1233         ['include', 'html/'],
1234
1235         ['exclude', 'AllInOne\\.cpp$'],
1236       ],
1237     },
1238     {
1239       'target_name': 'webcore_svg',
1240       'type': '<(library)',
1241       'dependencies': [
1242         'webcore_prerequisites',
1243       ],
1244       'sources': [
1245         '<@(webcore_privateheader_files)',
1246         '<@(webcore_files)',
1247       ],
1248       'sources/': [
1249         # Start by excluding everything then include svg files only. Note that
1250         # css/SVG* and bindings/v8/custom/V8SVG* are still built in
1251         # webcore_remaining.
1252         ['exclude', '.*'],
1253         ['include', 'svg/'],
1254         ['include', 'css/svg/'],
1255         ['include', 'rendering/style/SVG'],
1256         ['include', 'rendering/RenderSVG'],
1257         ['include', 'rendering/SVG'],
1258
1259         ['exclude', 'AllInOne\\.cpp$'],
1260       ],
1261     },
1262     {
1263       'target_name': 'webcore_platform',
1264       'type': '<(library)',
1265       'dependencies': [
1266         'webcore_prerequisites',
1267       ],
1268       # This is needed for mac because of webkit_system_interface. It'd be nice
1269       # if this hard dependency could be split off the rest.
1270       'hard_dependency': 1,
1271       'sources': [
1272         '<@(webcore_privateheader_files)',
1273         '<@(webcore_files)',
1274
1275         # For WebCoreSystemInterface, Mac-only.
1276         '../../WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
1277       ],
1278       'sources/': [
1279         ['exclude', '.*'],
1280         ['include', 'platform/'],
1281
1282         # FIXME: Figure out how to store these patterns in a variable.
1283         ['exclude', '(android|brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|haiku|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
1284         ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1285
1286         ['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
1287
1288         ['exclude', 'platform/LinkHash\\.cpp$'],
1289         ['exclude', 'platform/MIMETypeRegistry\\.cpp$'],
1290         ['exclude', 'platform/Theme\\.cpp$'],
1291         ['exclude', 'platform/graphics/ANGLEWebKitBridge\\.(cpp|h)$'],
1292         ['exclude', 'platform/image-encoders/JPEGImageEncoder\\.(cpp|h)$'],
1293         ['exclude', 'platform/image-encoders/PNGImageEncoder\\.(cpp|h)$'],
1294         ['exclude', 'platform/network/ResourceHandle\\.cpp$'],
1295         ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
1296         ['exclude', 'platform/text/LocalizedNumberNone\\.cpp$'],
1297         ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
1298       ],
1299       'conditions': [
1300         ['OS=="linux" or OS=="freebsd"', {
1301           'sources/': [
1302             # Cherry-pick files excluded by the broader regular expressions above.
1303             ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
1304             ['include', 'platform/graphics/chromium/ComplexTextControllerLinux\\.cpp$'],
1305             ['include', 'platform/graphics/chromium/FontCacheLinux\\.cpp$'],
1306             ['include', 'platform/graphics/chromium/FontLinux\\.cpp$'],
1307             ['include', 'platform/graphics/chromium/FontPlatformDataLinux\\.cpp$'],
1308             ['include', 'platform/graphics/chromium/SimpleFontDataLinux\\.cpp$'],
1309           ],
1310           'dependencies': [
1311             '<(chromium_src_dir)/third_party/harfbuzz/harfbuzz.gyp:harfbuzz',
1312           ],
1313         }],
1314         ['OS=="mac"', {
1315           # Necessary for Mac .mm stuff.
1316           'include_dirs': [
1317             '../../../WebKitLibraries',
1318           ],
1319           'dependencies': [
1320             'webkit_system_interface',
1321           ],
1322           'actions': [
1323             {
1324               # Allow framework-style #include of
1325               # <WebCore/WebCoreSystemInterface.h>.
1326               'action_name': 'WebCoreSystemInterface.h',
1327               'inputs': [
1328                 '../platform/mac/WebCoreSystemInterface.h',
1329               ],
1330               'outputs': [
1331                 '<(INTERMEDIATE_DIR)/WebCore/WebCoreSystemInterface.h',
1332               ],
1333               'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
1334             },
1335           ],
1336           'sources/': [
1337             # Additional files from the WebCore Mac build that are presently
1338             # used in the WebCore Chromium Mac build too.
1339
1340             # The Mac build is USE(CF) but does not use CFNetwork.
1341             ['include', 'CF\\.cpp$'],
1342             ['exclude', 'network/cf/'],
1343
1344             # The Mac build is PLATFORM_CG too.  platform/graphics/cg is the
1345             # only place that CG files we want to build are located, and not
1346             # all of them even have a CG suffix, so just add them by a
1347             # regexp matching their directory.
1348             ['include', 'platform/graphics/cg/[^/]*(?<!Win)?\\.(cpp|mm?)$'],
1349
1350             # Use native Mac font code from WebCore.
1351             ['include', 'platform/(graphics/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
1352             ['include', 'platform/graphics/mac/ComplexText[^/]*\\.(cpp|h)$'],
1353
1354             # We can use this for the fast Accelerate.framework FFT.
1355             ['include', 'platform/audio/mac/FFTFrameMac\\.cpp$'],
1356
1357             # Cherry-pick some files that can't be included by broader regexps.
1358             # Some of these are used instead of Chromium platform files, see
1359             # the specific exclusions in the "sources!" list below.
1360             ['include', 'rendering/RenderThemeMac\\.mm$'],
1361             ['include', 'platform/graphics/mac/ColorMac\\.mm$'],
1362             ['include', 'platform/graphics/mac/FloatPointMac\\.mm$'],
1363             ['include', 'platform/graphics/mac/FloatRectMac\\.mm$'],
1364             ['include', 'platform/graphics/mac/FloatSizeMac\\.mm$'],
1365             ['include', 'platform/graphics/mac/GlyphPageTreeNodeMac\\.cpp$'],
1366             ['include', 'platform/graphics/mac/GraphicsContextMac\\.mm$'],
1367             ['include', 'platform/graphics/mac/IntRectMac\\.mm$'],
1368             ['include', 'platform/mac/BlockExceptions\\.mm$'],
1369             ['include', 'platform/mac/KillRingMac\\.mm$'],
1370             ['include', 'platform/mac/LocalCurrentGraphicsContext\\.mm$'],
1371             ['include', 'platform/mac/PurgeableBufferMac\\.cpp$'],
1372             ['include', 'platform/mac/WebCoreSystemInterface\\.mm$'],
1373             ['include', 'platform/mac/WebCoreTextRenderer\\.mm$'],
1374             ['include', 'platform/text/mac/ShapeArabic\\.c$'],
1375             ['include', 'platform/text/mac/String(Impl)?Mac\\.mm$'],
1376             # Use USE_NEW_THEME on Mac.
1377             ['include', 'platform/Theme\\.cpp$'],
1378
1379             ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
1380
1381             # Chromium Mac does not use skia.
1382             ['exclude', 'platform/graphics/skia/[^/]*Skia\\.(cpp|h)$'],
1383
1384             # The Mac uses platform/mac/KillRingMac.mm instead of the dummy
1385             # implementation.
1386             ['exclude', 'platform/KillRingNone\\.cpp$'],
1387
1388             # The Mac currently uses FontCustomPlatformData.cpp from
1389             # platform/graphics/mac, included by regex above, instead.
1390             ['exclude', 'platform/graphics/skia/FontCustomPlatformData\\.cpp$'],
1391
1392             # The Mac currently uses ScrollbarThemeChromiumMac.mm, which is not
1393             # related to ScrollbarThemeChromium.cpp.
1394             ['exclude', 'platform/chromium/ScrollbarThemeChromium\\.cpp$'],
1395
1396             # The Mac currently uses ImageChromiumMac.mm from
1397             # platform/graphics/chromium, included by regex above, instead.
1398             ['exclude', 'platform/graphics/chromium/ImageChromium\\.cpp$'],
1399
1400             # The Mac does not use ImageSourceCG.cpp from platform/graphics/cg
1401             # even though it is included by regex above.
1402             ['exclude', 'platform/graphics/cg/ImageSourceCG\\.cpp$'],
1403             ['exclude', 'platform/graphics/cg/PDFDocumentImage\\.cpp$'],
1404
1405             # ImageDecoderSkia is not used on mac.  ImageDecoderCG is used instead.
1406             ['exclude', 'platform/image-decoders/skia/ImageDecoderSkia\\.cpp$'],
1407             ['include', 'platform/image-decoders/cg/ImageDecoderCG\\.cpp$'],
1408
1409             # Again, Skia is not used on Mac.
1410             ['exclude', 'platform/chromium/DragImageChromiumSkia\\.cpp$'],
1411           ],
1412         },{ # OS!="mac"
1413           'sources/': [
1414             # FIXME: We will eventually compile this too, but for now it's
1415             # only used on mac.
1416             ['exclude', 'platform/graphics/FontPlatformData\\.cpp$']
1417           ],
1418         }],
1419         ['OS!="linux" and OS!="freebsd"', {
1420           'sources/': [
1421             ['exclude', '(Gtk|Linux)\\.cpp$'],
1422             ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
1423             ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
1424           ],
1425         }],
1426         ['OS!="mac"', {
1427           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1428         }],
1429         ['OS!="win"', {
1430           'sources/': [
1431             ['exclude', 'Win\\.cpp$'],
1432             ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
1433           ],
1434         }],
1435         ['OS=="win"', {
1436           'sources/': [
1437             ['exclude', 'Posix\\.cpp$'],
1438
1439             # The Chromium Win currently uses GlyphPageTreeNodeChromiumWin.cpp from
1440             # platform/graphics/chromium, included by regex above, instead.
1441             ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
1442
1443             # SystemInfo.cpp is useful and we don't want to copy it.
1444             ['include', 'platform/win/SystemInfo\\.cpp$'],
1445           ],
1446         }],
1447       ],
1448     },
1449     {
1450       'target_name': 'webcore_rendering',
1451       'type': '<(library)',
1452       'dependencies': [
1453         'webcore_prerequisites',
1454       ],
1455       'sources': [
1456         '<@(webcore_privateheader_files)',
1457         '<@(webcore_files)',
1458       ],
1459       'sources/': [
1460         ['exclude', '.*'],
1461         ['include', 'rendering/'],
1462
1463         # FIXME: Figure out how to store these patterns in a variable.
1464         ['exclude', '(android|brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|haiku|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
1465         ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1466
1467         ['exclude', 'AllInOne\\.cpp$'],
1468
1469         # Exclude most of SVG except css and javascript bindings.
1470         ['exclude', 'rendering/style/SVG[^/]+.(cpp|h)$'],
1471         ['exclude', 'rendering/RenderSVG[^/]+.(cpp|h)$'],
1472         ['exclude', 'rendering/SVG[^/]+.(cpp|h)$'],
1473       ],
1474       'conditions': [
1475         ['OS=="win"', {
1476           'sources/': [
1477             ['exclude', 'Posix\\.cpp$'],
1478           ],
1479         }],
1480         ['OS=="mac"', {
1481           'sources/': [
1482             # RenderThemeChromiumSkia is not used on mac since RenderThemeChromiumMac
1483             # does not reference the Skia code that is used by Windows and Linux.
1484             ['exclude', 'rendering/RenderThemeChromiumSkia\\.cpp$'],
1485           ],
1486         }],
1487         ['(OS=="linux" or OS=="freebsd" or OS=="openbsd") and gcc_version==42', {
1488           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
1489           # warnings about uninitialized this.
1490           'cflags': ['-Wno-uninitialized'],
1491         }],
1492         ['OS!="linux" and OS!="freebsd"', {
1493           'sources/': [
1494             ['exclude', '(Gtk|Linux)\\.cpp$'],
1495           ],
1496         }],
1497         ['OS!="mac"', {
1498           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1499         }],
1500         ['OS!="win"', {
1501           'sources/': [
1502             ['exclude', 'Win\\.cpp$'],
1503           ],
1504         }],
1505       ],
1506     },
1507     {
1508       'target_name': 'webcore_remaining',
1509       'type': '<(library)',
1510       'dependencies': [
1511         'webcore_prerequisites',
1512       ],
1513       # This is needed for mac because of webkit_system_interface. It'd be nice
1514       # if this hard dependency could be split off the rest.
1515       'hard_dependency': 1,
1516       'sources': [
1517         '<@(webcore_privateheader_files)',
1518         '<@(webcore_files)',
1519       ],
1520       'sources/': [
1521         ['exclude', 'html/'],
1522         ['exclude', 'platform/'],
1523         ['exclude', 'rendering/'],
1524
1525         # Exclude most of bindings, except of the V8-related parts.
1526         ['exclude', 'bindings/[^/]+/'],
1527         ['include', 'bindings/generic/'],
1528         ['include', 'bindings/v8/'],
1529
1530         # Exclude most of bridge, except for the V8-related parts.
1531         ['exclude', 'bridge/'],
1532         ['include', 'bridge/jni/'],
1533         ['exclude', 'bridge/jni/[^/]+_jsobject\\.mm$'],
1534         ['exclude', 'bridge/jni/[^/]+_objc\\.mm$'],
1535         ['exclude', 'bridge/jni/jsc/'],
1536
1537         # FIXME: Figure out how to store these patterns in a variable.
1538         ['exclude', '(android|brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|haiku|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
1539         ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1540
1541         ['exclude', 'AllInOne\\.cpp$'],
1542
1543         ['exclude', 'dom/StaticStringList\\.cpp$'],
1544         ['exclude', 'dom/default/PlatformMessagePortChannel\\.(cpp|h)$'],
1545         ['exclude', 'fileapi/LocalFileSystem\\.cpp$'],
1546         ['exclude', 'inspector/InspectorFrontendClientLocal\\.cpp$'],
1547         ['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
1548         ['exclude', 'loader/UserStyleSheetLoader\\.cpp$'],
1549         ['exclude', 'loader/appcache/'],
1550         ['exclude', 'loader/archive/ArchiveFactory\\.cpp$'],
1551         ['exclude', 'loader/archive/cf/LegacyWebArchiveMac\\.mm$'],
1552         ['exclude', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
1553         ['exclude', 'loader/icon/IconDatabase\\.cpp$'],
1554         ['exclude', 'plugins/PluginDataNone\\.cpp$'],
1555         ['exclude', 'plugins/PluginDatabase\\.cpp$'],
1556         ['exclude', 'plugins/PluginMainThreadScheduler\\.cpp$'],
1557         ['exclude', 'plugins/PluginPackageNone\\.cpp$'],
1558         ['exclude', 'plugins/PluginPackage\\.cpp$'],
1559         ['exclude', 'plugins/PluginStream\\.cpp$'],
1560         ['exclude', 'plugins/PluginView\\.cpp$'],
1561         ['exclude', 'plugins/npapi\\.cpp$'],
1562         ['exclude', 'storage/DatabaseTrackerClient\\.h$'],
1563         ['exclude', 'storage/DatabaseTracker\\.cpp$'],
1564         ['exclude', 'storage/IDBFactoryBackendInterface\\.cpp$'],
1565         ['exclude', 'storage/IDBKeyPathBackendImpl\\.cpp$'],
1566         ['exclude', 'storage/OriginQuotaManager\\.(cpp|h)$'],
1567         ['exclude', 'storage/OriginUsageRecord\\.(cpp|h)$'],
1568         ['exclude', 'storage/SQLTransactionClient\\.cpp$'],
1569         ['exclude', 'storage/StorageEventDispatcher\\.cpp$'],
1570         ['exclude', 'storage/StorageNamespace\\.cpp$'],
1571         ['exclude', 'workers/DefaultSharedWorkerRepository\\.(cpp|h)$'],
1572
1573         ['include', 'loader/appcache/ApplicationCacheHost\.h$'],
1574         ['include', 'loader/appcache/DOMApplicationCache\.(cpp|h)$'],
1575       ],
1576       'link_settings': {
1577         'mac_bundle_resources': [
1578           '../Resources/aliasCursor.png',
1579           '../Resources/cellCursor.png',
1580           '../Resources/contextMenuCursor.png',
1581           '../Resources/copyCursor.png',
1582           '../Resources/crossHairCursor.png',
1583           '../Resources/eastResizeCursor.png',
1584           '../Resources/eastWestResizeCursor.png',
1585           '../Resources/helpCursor.png',
1586           '../Resources/linkCursor.png',
1587           '../Resources/missingImage.png',
1588           '../Resources/moveCursor.png',
1589           '../Resources/noDropCursor.png',
1590           '../Resources/noneCursor.png',
1591           '../Resources/northEastResizeCursor.png',
1592           '../Resources/northEastSouthWestResizeCursor.png',
1593           '../Resources/northResizeCursor.png',
1594           '../Resources/northSouthResizeCursor.png',
1595           '../Resources/northWestResizeCursor.png',
1596           '../Resources/northWestSouthEastResizeCursor.png',
1597           '../Resources/notAllowedCursor.png',
1598           '../Resources/progressCursor.png',
1599           '../Resources/southEastResizeCursor.png',
1600           '../Resources/southResizeCursor.png',
1601           '../Resources/southWestResizeCursor.png',
1602           '../Resources/verticalTextCursor.png',
1603           '../Resources/waitCursor.png',
1604           '../Resources/westResizeCursor.png',
1605           '../Resources/zoomInCursor.png',
1606           '../Resources/zoomOutCursor.png',
1607         ],
1608       },
1609       'conditions': [
1610         ['OS=="win"', {
1611           'sources/': [
1612             ['exclude', 'Posix\\.cpp$'],
1613             ['include', '/opentype/'],
1614             ['include', '/ScrollAnimatorWin\\.cpp$'],
1615             ['include', '/ScrollAnimatorWin\\.h$'],
1616             ['include', '/SkiaFontWin\\.cpp$'],
1617             ['include', '/TransparencyWin\\.cpp$'],
1618           ],
1619         }],
1620         ['(OS=="linux" or OS=="freebsd" or OS=="openbsd") and gcc_version==42', {
1621           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
1622           # warnings about uninitialized this.
1623           'cflags': ['-Wno-uninitialized'],
1624         }],
1625         ['OS!="linux" and OS!="freebsd"', {
1626           'sources/': [
1627             ['exclude', '(Gtk|Linux)\\.cpp$'],
1628           ],
1629         }],
1630         ['OS!="mac"', {
1631           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1632         }],
1633         ['OS!="win"', {
1634           'sources/': [
1635             ['exclude', 'Win\\.cpp$'],
1636             ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
1637           ],
1638         }],
1639         ['javascript_engine=="v8"', {
1640           'dependencies': [
1641             '<(chromium_src_dir)/v8/src/extensions/experimental/experimental.gyp:i18n_api',
1642           ],
1643         }],
1644       ],
1645     },
1646     {
1647       'target_name': 'webcore',
1648       'type': 'none',
1649       'dependencies': [
1650         'webcore_html',
1651         'webcore_platform',
1652         'webcore_remaining',
1653         'webcore_rendering',
1654         # Exported.
1655         'webcore_bindings',
1656         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1657         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1658         '<(chromium_src_dir)/skia/skia.gyp:skia',
1659         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1660       ],
1661       'export_dependent_settings': [
1662         'webcore_bindings',
1663         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1664         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1665         '<(chromium_src_dir)/skia/skia.gyp:skia',
1666         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1667       ],
1668       'direct_dependent_settings': {
1669         'include_dirs': [
1670           '<@(webcore_include_dirs)',
1671         ],
1672         'mac_framework_dirs': [
1673           '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
1674           '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
1675           '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
1676           '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
1677           '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
1678           '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
1679           '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
1680           '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
1681         ],
1682       },
1683       'conditions': [
1684         ['javascript_engine=="v8"', {
1685           'dependencies': [
1686             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1687           ],
1688           'export_dependent_settings': [
1689             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1690           ],
1691         }],
1692         ['OS=="mac"', {
1693           'direct_dependent_settings': {
1694             'include_dirs': [
1695               '../../../WebKitLibraries',
1696               '../../WebKit/mac/WebCoreSupport',
1697             ],
1698           },
1699         }],
1700         ['OS=="win"', {
1701           'direct_dependent_settings': {
1702             'include_dirs+++': ['../dom'],
1703           },
1704         }],
1705         ['OS=="linux" and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
1706           # FIXME: (kbr) figure out how to make these dependencies
1707           # work in a cross-platform way. Attempts to use
1708           # "link_settings" and "libraries" in conjunction with the
1709           # msvs-specific settings didn't work so far.
1710           'all_dependent_settings': {
1711             'ldflags': [
1712               # FIXME: (kbr) build the FFTW into PRODUCT_DIR using GYP.
1713               '-Lthird_party/fftw/.libs',
1714             ],
1715             'link_settings': {
1716               'libraries': [
1717                 '-lfftw3f'
1718               ],
1719             },
1720           },
1721         }],
1722         ['enable_svg!=0', {
1723           'dependencies': [
1724             'webcore_svg',
1725           ],
1726         }],
1727       ],
1728     },
1729   ],  # targets
1730 }