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