1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
8 # Define the common dependencies that contain all the actual
9 # Chromium functionality. This list gets pulled in below by
10 # the link of the actual chrome (or chromium) executable on
11 # Linux or Mac, and into chrome.dll on Windows.
12 # NOTE: Most new includes should go in the OS!="ios" condition below.
13 'chromium_browser_dependencies': [
16 '../sync/sync.gyp:sync',
18 'chromium_child_dependencies': [
20 '../sync/sync.gyp:sync',
22 'allocator_target': '../base/allocator/allocator.gyp:allocator',
23 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
24 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
27 'chromium_browser_dependencies': [
28 '../ppapi/ppapi_internal.gyp:ppapi_host',
30 'chromium_child_dependencies': [
35 '../content/content.gyp:content_gpu',
36 '../content/content.gyp:content_ppapi_plugin',
37 '../content/content.gyp:content_worker',
38 '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
41 ['enable_printing!=0', {
42 'chromium_browser_dependencies': [
43 '../printing/printing.gyp:printing',
47 'platform_locale_settings_grd':
48 'app/resources/locale_settings_win.grd',
50 ['enable_printing==1', {
51 'chromium_browser_dependencies': [
59 ['branding=="Chrome"', {
60 'platform_locale_settings_grd':
61 'app/resources/locale_settings_google_chromeos.grd',
62 }, { # branding!=Chrome
63 'platform_locale_settings_grd':
64 'app/resources/locale_settings_chromiumos.grd',
68 'platform_locale_settings_grd':
69 'app/resources/locale_settings_linux.grd',
73 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
74 'platform_locale_settings_grd':
75 'app/resources/locale_settings_linux.grd',
78 'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
79 'platform_locale_settings_grd':
80 'app/resources/locale_settings_mac.grd',
85 # Place some targets in gypi files to reduce contention on this file.
86 # By using an include, we keep everything in a single xcodeproj file.
87 # Note on Win64 targets: targets that end with win64 be used
88 # on 64-bit Windows only. Targets that end with nacl_win64 should be used
89 # by Native Client only.
90 # NOTE: Most new includes should go in the OS!="ios" condition below.
91 '../build/chrome_settings.gypi',
92 '../build/util/version.gypi',
93 '../build/win_precompile.gypi',
94 'chrome_browser.gypi',
95 'chrome_browser_ui.gypi',
97 'chrome_installer_util.gypi',
98 '../components/nacl/nacl_defines.gypi',
104 'chrome_browser_extensions.gypi',
105 'chrome_debugger.gypi',
108 'chrome_installer.gypi',
109 'chrome_plugin.gypi',
110 'chrome_renderer.gypi',
112 'chrome_tests_unit.gypi',
113 'chrome_utility.gypi',
114 'policy_templates.gypi',
118 'target_name': 'default_extensions',
124 'destination': '<(PRODUCT_DIR)/extensions',
126 'browser/extensions/default_extensions/external_extensions.json'
137 '../apps/app_shim/app_shim.gypi',
141 'target_name': 'helper_app',
142 'type': 'executable',
143 'variables': { 'enable_wexit_time_destructors': 1, },
144 'product_name': '<(mac_product_name) Helper',
148 'infoplist_strings_tool',
151 # chrome_exe_main_mac.cc's main() is the entry point for
152 # the "chrome" (browser app) target. All it does is jump
153 # to chrome_dll's ChromeMain. This is appropriate for
154 # helper processes too, because the logic to discriminate
155 # between process types at run time is actually directed
156 # by the --type command line argument processed by
157 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
158 # browser app will suffice for now.
159 'app/chrome_exe_main_mac.cc',
160 'app/helper-Info.plist',
162 # TODO(mark): Come up with a fancier way to do this. It should only
163 # be necessary to list helper-Info.plist once, not the three times it
165 'mac_bundle_resources!': [
166 'app/helper-Info.plist',
168 # TODO(mark): For now, don't put any resources into this app. Its
169 # resources directory will be a symbolic link to the browser app's
170 # resources directory.
171 'mac_bundle_resources/': [
175 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
176 'CHROMIUM_SHORT_NAME': '<(branding)',
177 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
178 'INFOPLIST_FILE': 'app/helper-Info.plist',
182 # The helper doesn't have real localizations, it just has
183 # empty .lproj directories, which is enough to convince Cocoa
184 # that anything running out of the helper .app supports those
186 'postbuild_name': 'Make Empty Localizations',
189 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
193 'tools/build/mac/make_locale_dirs.sh',
198 # The framework (chrome_dll) defines its load-time path
199 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
200 # (chrome). A different relative path needs to be used in
202 'postbuild_name': 'Fix Framework Link',
206 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
207 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
208 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
212 # Modify the Info.plist as needed. The script explains why this
213 # is needed. This is also done in the chrome and chrome_dll
214 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
215 # are used because Breakpad, Keystone, and SCM keys are
216 # never placed into the helper.
217 'postbuild_name': 'Tweak Info.plist',
218 'action': ['<(tweak_info_plist_path)',
224 # Make sure there isn't any Objective-C in the helper app's
226 'postbuild_name': 'Verify No Objective-C',
228 '../build/mac/verify_no_objc.sh',
233 ['mac_breakpad==1', {
235 # A real .dSYM is needed for dump_syms to operate on.
239 # With mac_real_dsym set, strip_from_xcode won't be used.
240 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
241 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
246 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
247 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
250 ['component=="shared_library"', {
252 'LD_RUNPATH_SEARCH_PATHS': [
253 # Get back from Chromium.app/Contents/Versions/V/
254 # Helper.app/Contents/MacOS
255 '@loader_path/../../../../../../..',
260 }, # target helper_app
262 # A library containing the actual code for the app mode app, shared
264 'target_name': 'app_mode_app_support',
265 'type': 'static_library',
266 'variables': { 'enable_wexit_time_destructors': 1, },
267 'product_name': 'app_mode_app_support',
269 '../base/base.gyp:base',
270 'common_constants.gyp:common_constants',
273 'common/mac/app_mode_chrome_locator.h',
274 'common/mac/app_mode_chrome_locator.mm',
275 'common/mac/app_mode_common.h',
276 'common/mac/app_mode_common.mm',
281 }, # target app_mode_app_support
283 # This produces the template for app mode loader bundles. It's a
284 # template in the sense that parts of it need to be "filled in" by
285 # Chrome before it can be executed.
286 'target_name': 'app_mode_app',
287 'type': 'executable',
289 'variables': { 'enable_wexit_time_destructors': 1, },
290 'product_name': 'app_mode_loader',
292 'app_mode_app_support',
293 'infoplist_strings_tool',
296 'app/app_mode_loader_mac.mm',
297 'app/app_mode-Info.plist',
304 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
305 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
308 'mac_bundle_resources!': [
309 'app/app_mode-Info.plist',
311 'mac_bundle_resources/': [
315 'INFOPLIST_FILE': 'app/app_mode-Info.plist',
316 'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
320 # Modify the Info.plist as needed. The script explains why this
321 # is needed. This is also done in the chrome and chrome_dll
322 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
323 # are used because Breakpad, Keystone, and SCM keys are
324 # never placed into the app mode loader.
325 'postbuild_name': 'Tweak Info.plist',
326 'action': ['<(tweak_info_plist_path)',
332 }, # target app_mode_app
334 # Convenience target to build a disk image.
335 'target_name': 'build_app_dmg',
336 # Don't place this in the 'all' list; most won't want it.
337 # In GYP, booleans are 0/1, not True/False.
338 'suppress_wildcard': 1,
344 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
345 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
348 # This duplicates the output path from build_app_dmg.
349 ['branding=="Chrome"', {
350 'dmg_name': 'GoogleChrome.dmg',
351 }, { # else: branding!="Chrome"
352 'dmg_name': 'Chromium.dmg',
359 '<(build_app_dmg_script_path)',
360 '<(pkg_dmg_script_path)',
361 '<(PRODUCT_DIR)/<(mac_product_name).app',
364 '<(PRODUCT_DIR)/<(dmg_name)',
366 'action_name': 'build_app_dmg',
367 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
372 # Dummy target to allow chrome to require plugin_carbon_interpose to
373 # build without actually linking to the resulting library.
374 'target_name': 'interpose_dependency_shim',
375 'type': 'executable',
376 'variables': { 'enable_wexit_time_destructors': 1, },
378 'plugin_carbon_interpose',
380 # In release, we end up with a strip step that is unhappy if there is
381 # no binary. Rather than check in a new file for this temporary hack,
382 # just generate a source file on the fly.
385 'action_name': 'generate_stub_main',
386 'process_outputs_as_sources': 1,
388 'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ],
391 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c'
397 # dylib for interposing Carbon calls in the plugin process.
398 'target_name': 'plugin_carbon_interpose',
399 'type': 'shared_library',
400 'variables': { 'enable_wexit_time_destructors': 1, },
401 # This target must not depend on static libraries, else the code in
402 # those libraries would appear twice in plugin processes: Once from
403 # Chromium Framework, and once from this dylib.
408 ['component=="shared_library"', {
410 '../content/content.gyp:content_plugin',
413 'LD_RUNPATH_SEARCH_PATHS': [
414 # Get back from Chromium.app/Contents/Versions/V
415 '@loader_path/../../../..',
421 '../content/plugin/plugin_carbon_interpose_mac.cc',
428 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
432 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
433 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
434 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
438 # The framework (chrome_dll) defines its load-time path
439 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
440 # (chrome). A different relative path needs to be used in
441 # plugin_carbon_interpose, which runs in the helper_app.
442 'postbuild_name': 'Fix Framework Link',
446 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
447 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
448 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
454 'target_name': 'infoplist_strings_tool',
455 'type': 'executable',
456 'variables': { 'enable_wexit_time_destructors': 1, },
458 'chrome_resources.gyp:chrome_strings',
459 '../base/base.gyp:base',
460 '../ui/base/ui_base.gyp:ui_base',
461 '../ui/gfx/gfx.gyp:gfx',
462 '../ui/gfx/gfx.gyp:gfx_geometry',
468 'tools/mac_helpers/infoplist_strings_util.mm',
476 'target_name': 'linux_symbols',
479 ['linux_dump_symbols==1', {
482 'action_name': 'dump_symbols',
484 '<(DEPTH)/build/linux/dump_app_syms',
485 '<(PRODUCT_DIR)/dump_syms',
486 '<(PRODUCT_DIR)/chrome',
489 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
491 'action': ['<(DEPTH)/build/linux/dump_app_syms',
492 '<(PRODUCT_DIR)/dump_syms',
493 '<(linux_strip_binary)',
494 '<(PRODUCT_DIR)/chrome',
496 'message': 'Dumping breakpad symbols to <(_outputs)',
497 'process_outputs_as_sources': 1,
502 '../breakpad/breakpad.gyp:dump_syms',
505 ['linux_strip_reliability_tests==1', {
508 'action_name': 'strip_reliability_tests',
510 '<(PRODUCT_DIR)/strip_reliability_tests.stamp',
515 'message': 'Stripping reliability tests',
526 # For historical reasons, chrome/chrome.sln has been the entry point
527 # for new Chrome developers. To assist development, include several
528 # core unittests that are otherwise only accessible side-by-side with
529 # chrome via all/all.sln.
530 'target_name': 'test_targets',
533 '../base/base.gyp:base_unittests',
534 '../content/content_shell_and_tests.gyp:content_browsertests',
535 '../content/content_shell_and_tests.gyp:content_shell',
536 '../content/content_shell_and_tests.gyp:content_unittests',
537 '../net/net.gyp:net_unittests',
538 '../ui/ui_unittests.gyp:ui_unittests',
542 'target_name': 'chrome_version_resources',
545 ['branding == "Chrome"', {
547 'branding_path': 'app/theme/google_chrome/BRANDING',
549 }, { # else branding!="Chrome"
551 'branding_path': 'app/theme/chromium/BRANDING',
556 'output_dir': 'chrome_version',
557 'template_input_path': 'app/chrome_version.rc.version',
559 'direct_dependent_settings': {
561 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
565 'app/chrome_exe.ver',
566 'app/chrome_dll.ver',
567 'app/nacl64_exe.ver',
571 'version_resource_rules.gypi',
575 'target_name': 'chrome_version_header',
577 'hard_dependency': 1,
580 'action_name': 'version_header',
583 '<(DEPTH)/build/util/LASTCHANGE',
586 ['branding == "Chrome"', {
588 'branding_path': 'app/theme/google_chrome/BRANDING',
590 }, { # else branding!="Chrome"
592 'branding_path': 'app/theme/chromium/BRANDING',
599 '<(lastchange_path)',
603 '<(SHARED_INTERMEDIATE_DIR)/version.h',
607 '<(version_py_path)',
608 '-f', '<(version_path)',
609 '-f', '<(branding_path)',
610 '-f', '<(lastchange_path)',
614 'message': 'Generating version header file: <@(_outputs)',
619 'target_name': 'crash_service',
620 'type': 'executable',
623 '../base/base.gyp:base',
624 '../chrome/common_constants.gyp:common_constants',
625 '../components/components.gyp:breakpad_crash_service',
631 'tools/crash_service/main.cc',
635 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
640 'target_name': 'sb_sigutil',
641 'type': 'executable',
643 '../base/base.gyp:base',
644 'safe_browsing_proto',
647 'browser/safe_browsing/binary_feature_extractor.h',
648 'browser/safe_browsing/binary_feature_extractor_win.cc',
649 'browser/safe_browsing/pe_image_reader_win.cc',
650 'browser/safe_browsing/pe_image_reader_win.h',
651 'tools/safe_browsing/sb_sigutil.cc',
656 'chrome_process_finder.gypi',
660 ['OS=="win" and target_arch=="ia32"',
663 'target_name': 'chrome_user32_delay_imports',
666 'lib_dir': '<(INTERMEDIATE_DIR)',
669 'chrome.user32.delay.imports'
672 '../build/win/importlibs/create_import_lib.gypi',
674 'direct_dependent_settings': {
677 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
678 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
684 'target_name': 'crash_service_win64',
685 'type': 'executable',
686 'product_name': 'crash_service64',
688 'installer_util_nacl_win64',
689 '../base/base.gyp:base_static_win64',
690 '../chrome/common_constants.gyp:common_constants_win64',
691 '../components/components.gyp:breakpad_crash_service_win64',
697 'tools/crash_service/main.cc',
698 '../content/public/common/content_switches.cc',
701 'COMPILE_CONTENT_STATICALLY',
705 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
710 'msvs_target_platform': 'x64',
715 ], # OS=="win" and target_arch=="ia32"
717 'includes': [ 'chrome_browser_chromeos.gypi' ],
723 'target_name': 'chrome_java',
726 'activity_type_ids_java',
727 'app_banner_metrics_ids_java',
728 'chrome_resources.gyp:chrome_strings',
729 'chrome_strings_grd',
730 'profile_sync_service_model_type_selection_java',
732 'toolbar_model_security_levels_java',
733 'tab_load_status_java',
734 '../base/base.gyp:base',
735 '../components/components.gyp:autofill_java',
736 '../components/components.gyp:dom_distiller_core_java',
737 '../components/components.gyp:gcm_driver_java',
738 '../components/components.gyp:navigation_interception_java',
739 '../components/components.gyp:sessions',
740 '../components/components.gyp:web_contents_delegate_android_java',
741 '../content/content.gyp:content_java',
742 '../printing/printing.gyp:printing_java',
743 '../sync/sync.gyp:sync_java',
744 '../third_party/guava/guava.gyp:guava_javalib',
745 '../ui/android/ui_android.gyp:ui_java',
748 'java_in_dir': '../chrome/android/java',
749 'has_java_resources': 1,
750 'R_package': 'org.chromium.chrome',
751 'R_package_relpath': 'org/chromium/chrome',
752 # Include xml string files generated from generated_resources.grd
753 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
754 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
757 '../build/java.gypi',
761 'target_name': 'chrome_strings_grd',
764 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
767 '../build/java_strings_grd.gypi',
772 'chrome_android.gypi',
775 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
776 'includes': [ 'policy.gypi', ],
778 ['enable_printing==1', {
781 'target_name': 'service',
782 'type': 'static_library',
783 'variables': { 'enable_wexit_time_destructors': 1, },
785 'chrome_resources.gyp:chrome_strings',
788 '../base/base.gyp:base',
789 '../components/components.gyp:cloud_devices_common',
790 '../google_apis/google_apis.gyp:google_apis',
791 '../jingle/jingle.gyp:notifier',
792 '../net/net.gyp:net',
793 '../printing/printing.gyp:printing',
794 '../skia/skia.gyp:skia',
795 '../third_party/libjingle/libjingle.gyp:libjingle',
798 'service/cloud_print/cdd_conversion_win.cc',
799 'service/cloud_print/cdd_conversion_win.h',
800 'service/cloud_print/cloud_print_auth.cc',
801 'service/cloud_print/cloud_print_auth.h',
802 'service/cloud_print/cloud_print_connector.cc',
803 'service/cloud_print/cloud_print_connector.h',
804 'service/cloud_print/cloud_print_proxy.cc',
805 'service/cloud_print/cloud_print_proxy.h',
806 'service/cloud_print/cloud_print_proxy_backend.cc',
807 'service/cloud_print/cloud_print_proxy_backend.h',
808 'service/cloud_print/cloud_print_service_helpers.cc',
809 'service/cloud_print/cloud_print_service_helpers.h',
810 'service/cloud_print/cloud_print_token_store.cc',
811 'service/cloud_print/cloud_print_token_store.h',
812 'service/cloud_print/cloud_print_url_fetcher.cc',
813 'service/cloud_print/cloud_print_url_fetcher.h',
814 'service/cloud_print/cloud_print_wipeout.cc',
815 'service/cloud_print/cloud_print_wipeout.h',
816 'service/cloud_print/connector_settings.cc',
817 'service/cloud_print/connector_settings.h',
818 'service/cloud_print/job_status_updater.cc',
819 'service/cloud_print/job_status_updater.h',
820 'service/cloud_print/print_system.cc',
821 'service/cloud_print/print_system.h',
822 'service/cloud_print/print_system_win.cc',
823 'service/cloud_print/printer_job_handler.cc',
824 'service/cloud_print/printer_job_handler.h',
825 'service/cloud_print/printer_job_queue_handler.cc',
826 'service/cloud_print/printer_job_queue_handler.h',
827 'service/net/service_url_request_context.cc',
828 'service/net/service_url_request_context.h',
829 'service/service_ipc_server.cc',
830 'service/service_ipc_server.h',
831 'service/service_main.cc',
832 'service/service_process.cc',
833 'service/service_process.h',
834 'service/service_process_prefs.cc',
835 'service/service_process_prefs.h',
836 'service/service_utility_process_host.cc',
837 'service/service_utility_process_host.h',
845 '../printing/printing.gyp:cups',
848 'service/cloud_print/print_system_cups.cc',
851 ['OS!="win" and use_cups!=1', {
853 'service/cloud_print/print_system_dummy.cc',