# # Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # { 'includes': [ '../build/win/precompile.gypi', 'features.gypi', '../modules/modules.gypi', '../bindings/bindings.gypi', 'core.gypi', ], 'variables': { 'enable_wexit_time_destructors': 1, 'webcore_include_dirs': [ '../..', '..', '<(SHARED_INTERMEDIATE_DIR)/blink', '<(SHARED_INTERMEDIATE_DIR)/blink/bindings', ], 'conditions': [ ['OS=="android" and use_openmax_dl_fft!=0', { 'webcore_include_dirs': [ '<(DEPTH)/third_party/openmax_dl' ] }], ], }, # variables 'target_defaults': { 'variables': { 'optimize': 'max', }, }, 'targets': [ { 'target_name': 'inspector_protocol_sources', 'type': 'none', 'dependencies': [ 'generate_inspector_protocol_version' ], 'actions': [ { 'action_name': 'generateInspectorProtocolBackendSources', 'inputs': [ # The python script in action below. 'inspector/CodeGeneratorInspector.py', # The helper script imported by CodeGeneratorInspector.py. 'inspector/CodeGeneratorInspectorStrings.py', # Input file for the script. '../devtools/protocol.json', ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendDispatcher.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendDispatcher.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorFrontend.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorFrontend.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorTypeBuilder.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorTypeBuilder.h', ], 'variables': { 'generator_include_dirs': [ ], }, 'action': [ 'python', 'inspector/CodeGeneratorInspector.py', '../devtools/protocol.json', '--output_dir', '<(SHARED_INTERMEDIATE_DIR)/blink', ], 'message': 'Generating Inspector protocol backend sources from protocol.json', 'msvs_cygwin_shell': 1, }, ] }, { 'target_name': 'inspector_instrumentation_sources', 'type': 'none', 'dependencies': [], 'actions': [ { 'action_name': 'generateInspectorInstrumentation', 'inputs': [ # The python script in action below. 'inspector/CodeGeneratorInstrumentation.py', # Input file for the script. 'inspector/InspectorInstrumentation.idl', ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorCanvasInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorConsoleInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorDatabaseInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorOverridesInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InstrumentingAgentsInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationImpl.cpp', ], 'action': [ 'python', 'inspector/CodeGeneratorInstrumentation.py', 'inspector/InspectorInstrumentation.idl', '--output_dir', '<(SHARED_INTERMEDIATE_DIR)/blink', ], 'message': 'Generating Inspector instrumentation code from InspectorInstrumentation.idl', 'msvs_cygwin_shell': 1, } ] }, { 'target_name': 'generate_inspector_protocol_version', 'type': 'none', 'actions': [ { 'action_name': 'generateInspectorProtocolVersion', 'inputs': [ 'inspector/generate-inspector-protocol-version', '../devtools/protocol.json', ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorProtocolVersion.h', ], 'variables': { 'generator_include_dirs': [ ], }, 'action': [ 'python', 'inspector/generate-inspector-protocol-version', '-o', '<@(_outputs)', '<@(_inputs)' ], 'message': 'Validate inspector protocol for backwards compatibility and generate version file', } ] }, { 'target_name': 'inspector_overlay_page', 'type': 'none', 'variables': { 'input_file_path': 'inspector/InspectorOverlayPage.html', 'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorOverlayPage.h', 'character_array_name': 'InspectorOverlayPage_html', }, 'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ], }, { 'target_name': 'injected_canvas_script_source', 'type': 'none', 'variables': { 'input_file_path': 'inspector/InjectedScriptCanvasModuleSource.js', 'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InjectedScriptCanvasModuleSource.h', 'character_array_name': 'InjectedScriptCanvasModuleSource_js', }, 'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ], }, { 'target_name': 'injected_script_source', 'type': 'none', 'variables': { 'input_file_path': 'inspector/InjectedScriptSource.js', 'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InjectedScriptSource.h', 'character_array_name': 'InjectedScriptSource_js', }, 'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ], }, { 'target_name': 'debugger_script_source', 'type': 'none', 'variables': { 'input_file_path': '<(bindings_dir)/v8/DebuggerScript.js', 'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/DebuggerScriptSource.h', 'character_array_name': 'DebuggerScriptSource_js', }, 'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ], }, { 'target_name': 'webcore_derived', 'type': 'static_library', 'hard_dependency': 1, 'dependencies': [ 'webcore_prerequisites', '../bindings/derived_sources.gyp:bindings_derived_sources', 'core_derived_sources.gyp:make_derived_sources', 'inspector_overlay_page', 'inspector_protocol_sources', 'inspector_instrumentation_sources', 'injected_canvas_script_source', 'injected_script_source', 'debugger_script_source', '../wtf/wtf.gyp:wtf', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg', '<(DEPTH)/third_party/libpng/libpng.gyp:libpng', '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp', '<(DEPTH)/third_party/libxml/libxml.gyp:libxml', '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt', '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', '<(DEPTH)/third_party/qcms/qcms.gyp:qcms', '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', '<(DEPTH)/url/url.gyp:url_lib', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', '<(libjpeg_gyp_path):libjpeg', ], 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/blink', '<(SHARED_INTERMEDIATE_DIR)/blink/bindings', '<@(webcore_include_dirs)', # FIXME: Remove these once the bindings script generates qualified # includes for these correctly. (Sequences don't work yet.) '<(bindings_dir)/v8/custom', '../modules/mediastream', '../modules/speech', 'dom', 'html', 'html/shadow', 'inspector', 'page', 'svg', ], 'sources': [ # These files include all the .cpp files generated from the .idl files # in webcore_files. '<@(derived_sources_aggregate_files)', '<@(bindings_files)', # Additional .cpp files for HashTools.h '<(SHARED_INTERMEDIATE_DIR)/blink/ColorData.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/CSSPropertyNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/CSSValueKeywords.cpp', # Additional .cpp files from make_derived_sources actions. '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLElementFactory.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/FetchInitiatorTypeNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/CalendarPicker.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/ColorSuggestionPicker.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/Event.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/EventHeaders.h', '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.h', '<(SHARED_INTERMEDIATE_DIR)/blink/EventTargetHeaders.h', '<(SHARED_INTERMEDIATE_DIR)/blink/EventTargetInterfaces.h', '<(SHARED_INTERMEDIATE_DIR)/blink/PickerCommon.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/UserAgentStyleSheetsData.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/V8HTMLElementWrapperFactory.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/XLinkNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNSNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/SVGNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/MathMLNames.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/FontFamilyNames.cpp', # Generated from HTMLEntityNames.in '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLEntityTable.cpp', # Generated from RuntimeEnabledFeatures.in '<(SHARED_INTERMEDIATE_DIR)/blink/RuntimeEnabledFeatures.cpp', # Generated from CSSParser-in.cpp '<(SHARED_INTERMEDIATE_DIR)/blink/CSSParser.cpp', # Additional .cpp files from the make_derived_sources rules. '<(SHARED_INTERMEDIATE_DIR)/blink/CSSGrammar.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/XPathGrammar.cpp', # Additional .cpp files from the inspector_protocol_sources list. '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorFrontend.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendDispatcher.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorTypeBuilder.cpp', # Additional .cpp files from the inspector_instrumentation_sources list. '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorCanvasInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorConsoleInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorDatabaseInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorOverridesInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InstrumentingAgentsInl.h', '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationImpl.cpp', # Additional .cpp files for SVG. '<(SHARED_INTERMEDIATE_DIR)/blink/SVGElementFactory.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/V8SVGElementWrapperFactory.cpp', # Generated from make_style_shorthands.py '<(SHARED_INTERMEDIATE_DIR)/blink/StylePropertyShorthand.cpp', # Generated from make_style_builder.py '<(SHARED_INTERMEDIATE_DIR)/blink/StyleBuilder.cpp', '<(SHARED_INTERMEDIATE_DIR)/blink/StyleBuilderFunctions.cpp', ], 'conditions': [ ['OS=="win" and component=="shared_library"', { 'defines': [ 'USING_V8_SHARED', ], }], ['OS=="win"', { 'defines': [ 'WEBCORE_NAVIGATOR_PLATFORM="Win32"', '__PRETTY_FUNCTION__=__FUNCTION__', ], # In generated bindings code: 'switch contains default but no case'. # Disable c4267 warnings until we fix size_t to int truncations. 'msvs_disabled_warnings': [ 4065, 4267 ], }], ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', { 'cflags': [ '