• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4{
5  'variables': {
6    'chromium_code': 1,
7
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': [
14      'common',
15      'browser',
16      '../sync/sync.gyp:sync',
17    ],
18    'chromium_child_dependencies': [
19      'common',
20      '../sync/sync.gyp:sync',
21    ],
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',
25    'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'],
26    'conditions': [
27      ['OS!="ios"', {
28        'chromium_browser_dependencies': [
29          '../ppapi/ppapi_internal.gyp:ppapi_host',
30        ],
31        'chromium_child_dependencies': [
32          'debugger',
33          'plugin',
34          'renderer',
35          'utility',
36          '../content/content.gyp:content_gpu',
37          '../content/content.gyp:content_ppapi_plugin',
38          '../content/content.gyp:content_worker',
39          '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
40        ],
41      }],
42      ['enable_printing!=0', {
43        'chromium_browser_dependencies': [
44          '../printing/printing.gyp:printing',
45        ],
46      }],
47      ['OS=="win"', {
48        'platform_locale_settings_grd':
49            'app/resources/locale_settings_win.grd',
50      },],
51      ['enable_printing==1', {
52        'chromium_browser_dependencies': [
53          'service',
54        ],
55      }],
56      ['OS=="linux"', {
57        'conditions': [
58          ['chromeos==1', {
59            'conditions': [
60              ['branding=="Chrome"', {
61                'platform_locale_settings_grd':
62                    'app/resources/locale_settings_google_chromeos.grd',
63              }, {  # branding!=Chrome
64                'platform_locale_settings_grd':
65                    'app/resources/locale_settings_chromiumos.grd',
66              }],
67            ]
68          }, {  # chromeos==0
69            'platform_locale_settings_grd':
70                'app/resources/locale_settings_linux.grd',
71          }],
72        ],
73      },],
74      ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
75        'platform_locale_settings_grd':
76            'app/resources/locale_settings_linux.grd',
77      },],
78      ['OS=="mac"', {
79        'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
80        'platform_locale_settings_grd':
81            'app/resources/locale_settings_mac.grd',
82      }],  # OS=="mac"
83    ],  # conditions
84  },  # variables
85  'includes': [
86    # Place some targets in gypi files to reduce contention on this file.
87    # By using an include, we keep everything in a single xcodeproj file.
88    # Note on Win64 targets: targets that end with win64 be used
89    # on 64-bit Windows only. Targets that end with nacl_win64 should be used
90    # by Native Client only.
91    # NOTE: Most new includes should go in the OS!="ios" condition below.
92    '../build/chrome_settings.gypi',
93    '../build/win_precompile.gypi',
94    'chrome_browser.gypi',
95    'chrome_browser_ui.gypi',
96    'chrome_common.gypi',
97    'chrome_installer_util.gypi',
98    'version.gypi',
99    '../components/nacl/nacl_defines.gypi',
100  ],
101  'conditions': [
102    ['OS!="ios"', {
103      'includes': [
104        'chrome_browser_extensions.gypi',
105        'chrome_dll.gypi',
106        'chrome_exe.gypi',
107        'chrome_installer.gypi',
108        'chrome_renderer.gypi',
109        'chrome_tests.gypi',
110        'chrome_tests_unit.gypi',
111        'policy_templates.gypi',
112        '../apps/apps.gypi',
113      ],
114      'targets': [
115        {
116          'target_name': 'default_extensions',
117          'type': 'none',
118          'conditions': [
119            ['OS=="win"', {
120              'copies': [
121                {
122                  'destination': '<(PRODUCT_DIR)/extensions',
123                  'files': [
124                    'browser/extensions/default_extensions/external_extensions.json'
125                  ]
126                }
127              ],
128            }]
129          ],
130        },
131        {
132          'target_name': 'debugger',
133          'type': 'static_library',
134          'variables': { 'enable_wexit_time_destructors': 1, },
135          'dependencies': [
136            'chrome_resources.gyp:chrome_extra_resources',
137            'chrome_resources.gyp:chrome_resources',
138            'chrome_resources.gyp:chrome_strings',
139            'chrome_resources.gyp:theme_resources',
140            'common/extensions/api/api.gyp:api',
141            '../base/base.gyp:base',
142            '../content/content.gyp:content_browser',
143            '../net/net.gyp:http_server',
144            '../net/net.gyp:net',
145            '../skia/skia.gyp:skia',
146            '../third_party/icu/icu.gyp:icui18n',
147            '../third_party/icu/icu.gyp:icuuc',
148            '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
149            '../third_party/libusb/libusb.gyp:libusb',
150          ],
151          'include_dirs': [
152            '..',
153          ],
154          'sources': [
155            'browser/devtools/adb/android_rsa.cc',
156            'browser/devtools/adb/android_rsa.h',
157            'browser/devtools/adb/android_usb_device.cc',
158            'browser/devtools/adb/android_usb_device.h',
159            'browser/devtools/adb/android_usb_socket.cc',
160            'browser/devtools/adb/android_usb_socket.h',
161            'browser/devtools/adb_client_socket.cc',
162            'browser/devtools/adb_client_socket.h',
163            'browser/devtools/adb_web_socket.cc',
164            'browser/devtools/adb_web_socket.h',
165            'browser/devtools/android_device.cc',
166            'browser/devtools/android_device.h',
167            'browser/devtools/browser_list_tabcontents_provider.cc',
168            'browser/devtools/browser_list_tabcontents_provider.h',
169            'browser/devtools/devtools_adb_bridge.cc',
170            'browser/devtools/devtools_adb_bridge.h',
171            'browser/devtools/devtools_embedder_message_dispatcher.cc',
172            'browser/devtools/devtools_embedder_message_dispatcher.h',
173            'browser/devtools/devtools_file_helper.cc',
174            'browser/devtools/devtools_file_helper.h',
175            'browser/devtools/devtools_file_system_indexer.cc',
176            'browser/devtools/devtools_file_system_indexer.h',
177            'browser/devtools/devtools_protocol.cc',
178            'browser/devtools/devtools_protocol.h',
179            'browser/devtools/devtools_target_impl.cc',
180            'browser/devtools/devtools_target_impl.h',
181            'browser/devtools/devtools_targets_ui.cc',
182            'browser/devtools/devtools_targets_ui.h',
183            'browser/devtools/devtools_toggle_action.cc',
184            'browser/devtools/devtools_toggle_action.h',
185            'browser/devtools/devtools_window.cc',
186            'browser/devtools/devtools_window.h',
187            'browser/devtools/port_forwarding_controller.cc',
188            'browser/devtools/port_forwarding_controller.h',
189            'browser/devtools/refcounted_adb_thread.cc',
190            'browser/devtools/refcounted_adb_thread.h',
191            'browser/devtools/remote_debugging_server.cc',
192            'browser/devtools/remote_debugging_server.h',
193          ],
194          'conditions': [
195            ['toolkit_uses_gtk == 1', {
196              'dependencies': [
197                '../build/linux/system.gyp:gtk',
198              ],
199            }],
200            ['OS=="android"', {
201              'dependencies!': [
202                '../third_party/libusb/libusb.gyp:libusb',
203              ],
204              'sources!': [
205                'browser/devtools/adb/android_rsa.cc',
206                'browser/devtools/browser_list_tabcontents_provider.cc',
207                'browser/devtools/devtools_file_system_indexer.cc',
208                'browser/devtools/devtools_target_impl.cc',
209                'browser/devtools/devtools_window.cc',
210                'browser/devtools/remote_debugging_server.cc',
211              ],
212            }],
213            ['debug_devtools==1', {
214              'defines': [
215                'DEBUG_DEVTOOLS=1',
216               ],
217            }],
218          ],
219          # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
220          'msvs_disabled_warnings': [ 4267, ],
221        },
222        {
223          'target_name': 'plugin',
224          'type': 'static_library',
225          'variables': { 'enable_wexit_time_destructors': 1, },
226          'dependencies': [
227            'chrome_resources.gyp:chrome_strings',
228            '../base/base.gyp:base',
229            '../content/content.gyp:content_plugin',
230          ],
231          'sources': [
232            'plugin/chrome_content_plugin_client.cc',
233            'plugin/chrome_content_plugin_client.h',
234          ],
235          'include_dirs': [
236            '..',
237            '<(grit_out_dir)',
238          ],
239        },
240        {
241          'target_name': 'utility',
242          'type': 'static_library',
243          'variables': { 'enable_wexit_time_destructors': 1, },
244          'dependencies': [
245            'common/extensions/api/api.gyp:api',
246            '../base/base.gyp:base',
247            '../content/content.gyp:content_utility',
248            '../media/media.gyp:media',
249            '../skia/skia.gyp:skia',
250            '../third_party/libxml/libxml.gyp:libxml',
251            'common',
252            '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
253            '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
254          ],
255          'sources': [
256            'utility/chrome_content_utility_client.cc',
257            'utility/chrome_content_utility_client.h',
258            'utility/cloud_print/bitmap_image.cc',
259            'utility/cloud_print/bitmap_image.h',
260            'utility/cloud_print/pwg_encoder.cc',
261            'utility/cloud_print/pwg_encoder.h',
262            'utility/extensions/unpacker.cc',
263            'utility/extensions/unpacker.h',
264            'utility/importer/bookmark_html_reader.cc',
265            'utility/importer/bookmark_html_reader.h',
266            'utility/importer/bookmarks_file_importer.cc',
267            'utility/importer/bookmarks_file_importer.h',
268            'utility/importer/external_process_importer_bridge.cc',
269            'utility/importer/external_process_importer_bridge.h',
270            'utility/importer/favicon_reencode.cc',
271            'utility/importer/favicon_reencode.h',
272            'utility/importer/firefox_importer.cc',
273            'utility/importer/firefox_importer.h',
274            'utility/importer/firefox_importer_unittest_messages_internal.h',
275            'utility/importer/firefox_importer_unittest_utils.h',
276            'utility/importer/firefox_importer_unittest_utils_mac.cc',
277            'utility/importer/ie_importer_win.cc',
278            'utility/importer/ie_importer_win.h',
279            'utility/importer/importer.cc',
280            'utility/importer/importer.h',
281            'utility/importer/importer_creator.cc',
282            'utility/importer/importer_creator.h',
283            'utility/importer/nss_decryptor.cc',
284            'utility/importer/nss_decryptor.h',
285            'utility/importer/nss_decryptor_mac.h',
286            'utility/importer/nss_decryptor_mac.mm',
287            'utility/importer/nss_decryptor_win.cc',
288            'utility/importer/nss_decryptor_win.h',
289            'utility/importer/safari_importer.h',
290            'utility/importer/safari_importer.mm',
291            'utility/media_galleries/itunes_pref_parser_win.cc',
292            'utility/media_galleries/itunes_pref_parser_win.h',
293            'utility/media_galleries/media_metadata_parser.cc',
294            'utility/media_galleries/media_metadata_parser.h',
295            'utility/profile_import_handler.cc',
296            'utility/profile_import_handler.h',
297            'utility/utility_message_handler.h',
298            'utility/web_resource_unpacker.cc',
299            'utility/web_resource_unpacker.h',
300          ],
301          'include_dirs': [
302            '..',
303            '<(grit_out_dir)',
304          ],
305          'conditions': [
306            ['toolkit_uses_gtk == 1', {
307              'dependencies': [
308                '../build/linux/system.gyp:gtk',
309              ],
310            }],
311            ['OS=="win" or OS=="mac"', {
312              'sources': [
313                'utility/media_galleries/iapps_xml_utils.cc',
314                'utility/media_galleries/iapps_xml_utils.h',
315                'utility/media_galleries/itunes_library_parser.cc',
316                'utility/media_galleries/itunes_library_parser.h',
317                'utility/media_galleries/picasa_album_table_reader.cc',
318                'utility/media_galleries/picasa_album_table_reader.h',
319                'utility/media_galleries/picasa_albums_indexer.cc',
320                'utility/media_galleries/picasa_albums_indexer.h',
321                'utility/media_galleries/pmp_column_reader.cc',
322                'utility/media_galleries/pmp_column_reader.h',
323              ],
324            }],
325            ['OS=="mac"', {
326              'sources': [
327                'utility/media_galleries/iphoto_library_parser.cc',
328                'utility/media_galleries/iphoto_library_parser.h',
329              ],
330            }],
331            ['use_openssl==1', {
332              'sources!': [
333                'utility/importer/nss_decryptor.cc',
334              ]
335            }],
336            ['OS!="win" and OS!="mac" and use_openssl==0', {
337              'dependencies': [
338                '../crypto/crypto.gyp:crypto',
339              ],
340              'sources': [
341                'utility/importer/nss_decryptor_system_nss.cc',
342                'utility/importer/nss_decryptor_system_nss.h',
343              ],
344            }],
345            ['OS=="android"', {
346              'sources/': [
347                ['exclude', '^utility/importer/'],
348                ['exclude', '^utility/media_galleries/'],
349                ['exclude', '^utility/profile_import_handler\.cc'],
350              ],
351            }],
352            ['enable_mdns == 1', {
353              'sources': [
354                'utility/local_discovery/service_discovery_client_impl.cc',
355                'utility/local_discovery/service_discovery_client_impl.h',
356                'utility/local_discovery/service_discovery_message_handler.cc',
357                'utility/local_discovery/service_discovery_message_handler.h',
358              ]
359            }],
360          ],
361          # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
362          'msvs_disabled_warnings': [ 4267, ],
363        },
364      ],
365    }],  # OS!="ios"
366    ['OS=="mac"', {
367      'includes': [
368        '../apps/app_shim/app_shim.gypi',
369      ],
370      'targets': [
371        {
372          'target_name': 'helper_app',
373          'type': 'executable',
374          'variables': { 'enable_wexit_time_destructors': 1, },
375          'product_name': '<(mac_product_name) Helper',
376          'mac_bundle': 1,
377          'dependencies': [
378            'chrome_dll',
379            'infoplist_strings_tool',
380          ],
381          'sources': [
382            # chrome_exe_main_mac.cc's main() is the entry point for
383            # the "chrome" (browser app) target.  All it does is jump
384            # to chrome_dll's ChromeMain.  This is appropriate for
385            # helper processes too, because the logic to discriminate
386            # between process types at run time is actually directed
387            # by the --type command line argument processed by
388            # ChromeMain.  Sharing chrome_exe_main_mac.cc with the
389            # browser app will suffice for now.
390            'app/chrome_exe_main_mac.cc',
391            'app/helper-Info.plist',
392          ],
393          # TODO(mark): Come up with a fancier way to do this.  It should only
394          # be necessary to list helper-Info.plist once, not the three times it
395          # is listed here.
396          'mac_bundle_resources!': [
397            'app/helper-Info.plist',
398          ],
399          # TODO(mark): For now, don't put any resources into this app.  Its
400          # resources directory will be a symbolic link to the browser app's
401          # resources directory.
402          'mac_bundle_resources/': [
403            ['exclude', '.*'],
404          ],
405          'xcode_settings': {
406            'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
407            'CHROMIUM_SHORT_NAME': '<(branding)',
408            'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
409            'INFOPLIST_FILE': 'app/helper-Info.plist',
410          },
411          'postbuilds': [
412            {
413              # The helper doesn't have real localizations, it just has
414              # empty .lproj directories, which is enough to convince Cocoa
415              # that anything running out of the helper .app supports those
416              # languages.
417              'postbuild_name': 'Make Empty Localizations',
418              'variables': {
419                'locale_dirs': [
420                  '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
421                ],
422              },
423              'action': [
424                'tools/build/mac/make_locale_dirs.sh',
425                '<@(locale_dirs)',
426              ],
427            },
428            {
429              # The framework (chrome_dll) defines its load-time path
430              # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
431              # (chrome).  A different relative path needs to be used in
432              # helper_app.
433              'postbuild_name': 'Fix Framework Link',
434              'action': [
435                'install_name_tool',
436                '-change',
437                '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
438                '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
439                '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
440              ],
441            },
442            {
443              # Modify the Info.plist as needed.  The script explains why this
444              # is needed.  This is also done in the chrome and chrome_dll
445              # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
446              # are used because Breakpad, Keystone, and SCM keys are
447              # never placed into the helper.
448              'postbuild_name': 'Tweak Info.plist',
449              'action': ['<(tweak_info_plist_path)',
450                         '--breakpad=0',
451                         '--keystone=0',
452                         '--scm=0'],
453            },
454            {
455              # Make sure there isn't any Objective-C in the helper app's
456              # executable.
457              'postbuild_name': 'Verify No Objective-C',
458              'action': [
459                '../build/mac/verify_no_objc.sh',
460              ],
461            },
462          ],
463          'conditions': [
464            ['mac_breakpad==1', {
465              'variables': {
466                # A real .dSYM is needed for dump_syms to operate on.
467                'mac_real_dsym': 1,
468              },
469              'xcode_settings': {
470                # With mac_real_dsym set, strip_from_xcode won't be used.
471                # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
472                'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
473              },
474            }],
475            ['asan==1', {
476              'xcode_settings': {
477                # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
478                'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
479              },
480            }],
481            ['component=="shared_library"', {
482              'xcode_settings': {
483                'LD_RUNPATH_SEARCH_PATHS': [
484                  # Get back from Chromium.app/Contents/Versions/V/
485                  #                                    Helper.app/Contents/MacOS
486                  '@loader_path/../../../../../../..',
487                ],
488              },
489            }],
490          ],
491        },  # target helper_app
492        {
493          # A library containing the actual code for the app mode app, shared
494          # by unit tests.
495          'target_name': 'app_mode_app_support',
496          'type': 'static_library',
497          'variables': { 'enable_wexit_time_destructors': 1, },
498          'product_name': 'app_mode_app_support',
499          'dependencies': [
500            '../base/base.gyp:base',
501            'common_constants.gyp:common_constants',
502          ],
503          'sources': [
504            'common/mac/app_mode_chrome_locator.h',
505            'common/mac/app_mode_chrome_locator.mm',
506            'common/mac/app_mode_common.h',
507            'common/mac/app_mode_common.mm',
508          ],
509          'include_dirs': [
510            '..',
511          ],
512        },  # target app_mode_app_support
513        {
514          # This produces the template for app mode loader bundles. It's a
515          # template in the sense that parts of it need to be "filled in" by
516          # Chrome before it can be executed.
517          'target_name': 'app_mode_app',
518          'type': 'executable',
519          'mac_bundle' : 1,
520          'variables': { 'enable_wexit_time_destructors': 1, },
521          'product_name': 'app_mode_loader',
522          'dependencies': [
523            'app_mode_app_support',
524            'infoplist_strings_tool',
525          ],
526          'sources': [
527            'app/app_mode_loader_mac.mm',
528            'app/app_mode-Info.plist',
529          ],
530          'include_dirs': [
531            '..',
532          ],
533          'link_settings': {
534            'libraries': [
535              '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
536              '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
537            ],
538          },
539          'mac_bundle_resources!': [
540            'app/app_mode-Info.plist',
541          ],
542          'mac_bundle_resources/': [
543            ['exclude', '.*'],
544          ],
545          'xcode_settings': {
546            'INFOPLIST_FILE': 'app/app_mode-Info.plist',
547            'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
548          },
549          'postbuilds' : [
550            {
551              # Modify the Info.plist as needed.  The script explains why this
552              # is needed.  This is also done in the chrome and chrome_dll
553              # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
554              # are used because Breakpad, Keystone, and SCM keys are
555              # never placed into the app mode loader.
556              'postbuild_name': 'Tweak Info.plist',
557              'action': ['<(tweak_info_plist_path)',
558                         '--breakpad=0',
559                         '--keystone=0',
560                         '--scm=0'],
561            },
562          ],
563        },  # target app_mode_app
564        {
565          # Convenience target to build a disk image.
566          'target_name': 'build_app_dmg',
567          # Don't place this in the 'all' list; most won't want it.
568          # In GYP, booleans are 0/1, not True/False.
569          'suppress_wildcard': 1,
570          'type': 'none',
571          'dependencies': [
572            'chrome',
573          ],
574          'variables': {
575            'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
576            'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
577
578            'conditions': [
579              # This duplicates the output path from build_app_dmg.
580              ['branding=="Chrome"', {
581                'dmg_name': 'GoogleChrome.dmg',
582              }, { # else: branding!="Chrome"
583                'dmg_name': 'Chromium.dmg',
584              }],
585            ],
586          },
587          'actions': [
588            {
589              'inputs': [
590                '<(build_app_dmg_script_path)',
591                '<(pkg_dmg_script_path)',
592                '<(PRODUCT_DIR)/<(mac_product_name).app',
593              ],
594              'outputs': [
595                '<(PRODUCT_DIR)/<(dmg_name)',
596              ],
597              'action_name': 'build_app_dmg',
598              'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
599            },
600          ],  # 'actions'
601        },
602        {
603          # Dummy target to allow chrome to require plugin_carbon_interpose to
604          # build without actually linking to the resulting library.
605          'target_name': 'interpose_dependency_shim',
606          'type': 'executable',
607          'variables': { 'enable_wexit_time_destructors': 1, },
608          'dependencies': [
609            'plugin_carbon_interpose',
610          ],
611          # In release, we end up with a strip step that is unhappy if there is
612          # no binary. Rather than check in a new file for this temporary hack,
613          # just generate a source file on the fly.
614          'actions': [
615            {
616              'action_name': 'generate_stub_main',
617              'process_outputs_as_sources': 1,
618              'inputs': [],
619              'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ],
620              'action': [
621                'bash', '-c',
622                'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c'
623              ],
624            },
625          ],
626        },
627        {
628          # dylib for interposing Carbon calls in the plugin process.
629          'target_name': 'plugin_carbon_interpose',
630          'type': 'shared_library',
631          'variables': { 'enable_wexit_time_destructors': 1, },
632          # This target must not depend on static libraries, else the code in
633          # those libraries would appear twice in plugin processes: Once from
634          # Chromium Framework, and once from this dylib.
635          'dependencies': [
636            'chrome_dll',
637          ],
638          'conditions': [
639            ['component=="shared_library"', {
640              'dependencies': [
641                '../content/content.gyp:content_plugin',
642                '../webkit/glue/webkit_glue.gyp:glue',
643              ],
644              'xcode_settings': {
645                'LD_RUNPATH_SEARCH_PATHS': [
646                  # Get back from Chromium.app/Contents/Versions/V
647                  '@loader_path/../../../..',
648                ],
649              },
650            }],
651          ],
652          'sources': [
653            '../content/plugin/plugin_carbon_interpose_mac.cc',
654          ],
655          'include_dirs': [
656            '..',
657          ],
658          'link_settings': {
659            'libraries': [
660              '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
661            ],
662          },
663          'xcode_settings': {
664            'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
665            'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
666            'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
667          },
668          'postbuilds': [
669            {
670              # The framework (chrome_dll) defines its load-time path
671              # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
672              # (chrome).  A different relative path needs to be used in
673              # plugin_carbon_interpose, which runs in the helper_app.
674              'postbuild_name': 'Fix Framework Link',
675              'action': [
676                'install_name_tool',
677                '-change',
678                '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
679                '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
680                '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
681              ],
682            },
683          ],
684        },
685        {
686          'target_name': 'infoplist_strings_tool',
687          'type': 'executable',
688          'variables': { 'enable_wexit_time_destructors': 1, },
689          'dependencies': [
690            'chrome_resources.gyp:chrome_strings',
691            '../base/base.gyp:base',
692            '../ui/gfx/gfx.gyp:gfx',
693            '../ui/ui.gyp:ui',
694          ],
695          'include_dirs': [
696            '<(grit_out_dir)',
697          ],
698          'sources': [
699            'tools/mac_helpers/infoplist_strings_util.mm',
700          ],
701        },
702      ],  # targets
703    }],  # OS=="mac"
704    ['OS=="linux"',
705      { 'targets': [
706        {
707          'target_name': 'linux_symbols',
708          'type': 'none',
709          'conditions': [
710            ['linux_dump_symbols==1', {
711              'actions': [
712                {
713                  'action_name': 'dump_symbols',
714                  'inputs': [
715                    '<(DEPTH)/build/linux/dump_app_syms',
716                    '<(PRODUCT_DIR)/dump_syms',
717                    '<(PRODUCT_DIR)/chrome',
718                  ],
719                  'outputs': [
720                    '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
721                  ],
722                  'action': ['<(DEPTH)/build/linux/dump_app_syms',
723                             '<(PRODUCT_DIR)/dump_syms',
724                             '<(linux_strip_binary)',
725                             '<(PRODUCT_DIR)/chrome',
726                             '<@(_outputs)'],
727                  'message': 'Dumping breakpad symbols to <(_outputs)',
728                  'process_outputs_as_sources': 1,
729                },
730              ],
731              'dependencies': [
732                'chrome',
733                '../breakpad/breakpad.gyp:dump_syms',
734              ],
735            }],
736            ['linux_strip_reliability_tests==1', {
737              'actions': [
738                {
739                  'action_name': 'strip_reliability_tests',
740                  'inputs': [
741                    '<(PRODUCT_DIR)/_pyautolib.so',
742                  ],
743                  'outputs': [
744                    '<(PRODUCT_DIR)/strip_reliability_tests.stamp',
745                  ],
746                  'action': ['strip',
747                             '-g',
748                             '<@(_inputs)'],
749                  'message': 'Stripping reliability tests',
750                },
751              ],
752            }],
753          ],
754        },
755      ],
756    }],  # OS=="linux"
757    ['OS=="win"',
758      { 'targets': [
759        {
760          # For historical reasons, chrome/chrome.sln has been the entry point
761          # for new Chrome developers. To assist development, include several
762          # core unittests that are otherwise only accessible side-by-side with
763          # chrome via all/all.sln.
764          'target_name': 'test_targets',
765          'type': 'none',
766          'dependencies': [
767            '../base/base.gyp:base_unittests',
768            '../content/content_shell_and_tests.gyp:content_browsertests',
769            '../content/content_shell_and_tests.gyp:content_shell',
770            '../content/content_shell_and_tests.gyp:content_unittests',
771            '../net/net.gyp:net_unittests',
772            '../ui/ui_unittests.gyp:ui_unittests',
773          ],
774        },
775        {
776          'target_name': 'chrome_version_resources',
777          'type': 'none',
778          'conditions': [
779            ['branding == "Chrome"', {
780              'variables': {
781                 'branding_path': 'app/theme/google_chrome/BRANDING',
782              },
783            }, { # else branding!="Chrome"
784              'variables': {
785                 'branding_path': 'app/theme/chromium/BRANDING',
786              },
787            }],
788          ],
789          'variables': {
790            'output_dir': 'chrome_version',
791            'template_input_path': 'app/chrome_version.rc.version',
792          },
793          'direct_dependent_settings': {
794            'include_dirs': [
795              '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
796            ],
797          },
798          'sources': [
799            'app/chrome_exe.ver',
800            'app/chrome_dll.ver',
801            'app/nacl64_exe.ver',
802            'app/other.ver',
803          ],
804          'includes': [
805            'version_resource_rules.gypi',
806          ],
807        },
808        {
809          'target_name': 'chrome_version_header',
810          'type': 'none',
811          'hard_dependency': 1,
812          'actions': [
813            {
814              'action_name': 'version_header',
815              'variables': {
816                'lastchange_path':
817                  '<(DEPTH)/build/util/LASTCHANGE',
818              },
819              'conditions': [
820                ['branding == "Chrome"', {
821                  'variables': {
822                     'branding_path': 'app/theme/google_chrome/BRANDING',
823                  },
824                }, { # else branding!="Chrome"
825                  'variables': {
826                     'branding_path': 'app/theme/chromium/BRANDING',
827                  },
828                }],
829              ],
830              'inputs': [
831                '<(version_path)',
832                '<(branding_path)',
833                '<(lastchange_path)',
834                'version.h.in',
835              ],
836              'outputs': [
837                '<(SHARED_INTERMEDIATE_DIR)/version.h',
838              ],
839              'action': [
840                'python',
841                '<(version_py_path)',
842                '-f', '<(version_path)',
843                '-f', '<(branding_path)',
844                '-f', '<(lastchange_path)',
845                'version.h.in',
846                '<@(_outputs)',
847              ],
848              'message': 'Generating version header file: <@(_outputs)',
849            },
850          ],
851        },
852        {
853          'target_name': 'automation',
854          'type': 'static_library',
855          'dependencies': [
856            'chrome_resources.gyp:theme_resources',
857            '../skia/skia.gyp:skia',
858          ],
859          'include_dirs': [
860            '..',
861          ],
862          'sources': [
863             'test/automation/automation_handle_tracker.cc',
864             'test/automation/automation_handle_tracker.h',
865             'test/automation/automation_proxy.cc',
866             'test/automation/automation_proxy.h',
867             'test/automation/browser_proxy.cc',
868             'test/automation/browser_proxy.h',
869             'test/automation/tab_proxy.cc',
870             'test/automation/tab_proxy.h',
871             'test/automation/window_proxy.cc',
872             'test/automation/window_proxy.h',
873          ],
874        },
875        {
876          'target_name': 'crash_service',
877          'type': 'executable',
878          'dependencies': [
879            'installer_util',
880            '../base/base.gyp:base',
881            '../chrome/common_constants.gyp:common_constants',
882            '../components/components.gyp:breakpad_crash_service',
883          ],
884          'include_dirs': [
885            '..',
886          ],
887          'sources': [
888            'tools/crash_service/main.cc',
889          ],
890          'msvs_settings': {
891            'VCLinkerTool': {
892              'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
893            },
894          },
895        },
896        {
897          'target_name': 'sb_sigutil',
898          'type': 'executable',
899          'dependencies': [
900            '../base/base.gyp:base',
901            'safe_browsing_proto',
902          ],
903          'sources': [
904            'browser/safe_browsing/signature_util.h',
905            'browser/safe_browsing/signature_util_win.cc',
906            'tools/safe_browsing/sb_sigutil.cc',
907          ],
908        },
909      ],  # 'targets'
910      'includes': [
911        'chrome_process_finder.gypi',
912        'metro_utils.gypi',
913      ],
914    }],  # OS=="win"
915    ['OS=="win" and target_arch=="ia32"',
916      { 'targets': [
917        {
918          'target_name': 'chrome_user32_delay_imports',
919          'type': 'none',
920          'variables': {
921            'lib_dir': '<(INTERMEDIATE_DIR)',
922          },
923          'sources': [
924              'chrome.user32.delay.imports'
925          ],
926          'includes': [
927              '../build/win/importlibs/create_import_lib.gypi',
928          ],
929          'direct_dependent_settings': {
930            'msvs_settings': {
931              'VCLinkerTool': {
932                'AdditionalLibraryDirectories': ['<(lib_dir)', ],
933                'AdditionalDependencies': ['chrome.user32.delay.lib', ],
934              },
935            },
936          },
937        },
938        {
939          'target_name': 'crash_service_win64',
940          'type': 'executable',
941          'product_name': 'crash_service64',
942          'dependencies': [
943            'installer_util_nacl_win64',
944            '../base/base.gyp:base_static_win64',
945            '../chrome/common_constants.gyp:common_constants_win64',
946            '../components/components.gyp:breakpad_crash_service_win64',
947          ],
948          'include_dirs': [
949            '..',
950          ],
951          'sources': [
952            'tools/crash_service/main.cc',
953            '../content/public/common/content_switches.cc',
954          ],
955          'defines': [
956            'COMPILE_CONTENT_STATICALLY',
957          ],
958          'msvs_settings': {
959            'VCLinkerTool': {
960              'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
961            },
962          },
963          'configurations': {
964            'Common_Base': {
965              'msvs_target_platform': 'x64',
966            },
967          },
968        },
969      ]},  # 'targets'
970    ],  # OS=="win" and target_arch=="ia32"
971    ['chromeos==1', {
972      'includes': [ 'chrome_browser_chromeos.gypi' ],
973    }],  # chromeos==1
974    ['OS=="android"',
975      {
976      'targets': [
977        {
978          'target_name': 'chrome_java',
979          'type': 'none',
980          'dependencies': [
981            'chrome_resources.gyp:chrome_strings',
982            'profile_sync_service_model_type_selection_java',
983            'resource_id_java',
984            'toolbar_model_security_levels_java',
985            '../base/base.gyp:base',
986            '../components/components.gyp:autofill_java',
987            '../components/components.gyp:navigation_interception_java',
988            '../components/components.gyp:sessions',
989            '../components/components.gyp:web_contents_delegate_android_java',
990            '../content/content.gyp:content_java',
991            '../printing/printing.gyp:printing_java',
992            '../sync/sync.gyp:sync_java',
993            '../third_party/guava/guava.gyp:guava_javalib',
994            '../ui/android/ui_android.gyp:ui_java',
995          ],
996          'variables': {
997            'java_in_dir': '../chrome/android/java',
998            'has_java_resources': 1,
999            'R_package': 'org.chromium.chrome',
1000            'R_package_relpath': 'org/chromium/chrome',
1001            'java_strings_grd': 'android_chrome_strings.grd',
1002            # Include xml string files generated from generated_resources.grd
1003            'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
1004            'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
1005          },
1006          'includes': [
1007            '../build/java.gypi',
1008          ],
1009        },
1010      ], # 'targets'
1011      'includes': [
1012        'chrome_android.gypi',
1013      ]}, # 'includes'
1014    ],  # OS=="android"
1015    ['configuration_policy==1 and OS!="android"', {
1016      'includes': [ 'policy.gypi', ],
1017    }],
1018    ['enable_printing==1', {
1019      'targets': [
1020        {
1021          'target_name': 'service',
1022          'type': 'static_library',
1023          'variables': { 'enable_wexit_time_destructors': 1, },
1024          'dependencies': [
1025            'chrome_resources.gyp:chrome_strings',
1026            'common',
1027            'common_net',
1028            '../base/base.gyp:base',
1029            '../google_apis/google_apis.gyp:google_apis',
1030            '../jingle/jingle.gyp:notifier',
1031            '../net/net.gyp:net',
1032            '../printing/printing.gyp:printing',
1033            '../skia/skia.gyp:skia',
1034            '../third_party/libjingle/libjingle.gyp:libjingle',
1035          ],
1036          'sources': [
1037            'service/chrome_service_application_mac.h',
1038            'service/chrome_service_application_mac.mm',
1039            'service/service_ipc_server.cc',
1040            'service/service_ipc_server.h',
1041            'service/service_main.cc',
1042            'service/service_process.cc',
1043            'service/service_process.h',
1044            'service/service_process_prefs.cc',
1045            'service/service_process_prefs.h',
1046            'service/service_utility_process_host.cc',
1047            'service/service_utility_process_host.h',
1048            'service/cloud_print/cloud_print_auth.cc',
1049            'service/cloud_print/cloud_print_auth.h',
1050            'service/cloud_print/cloud_print_connector.cc',
1051            'service/cloud_print/cloud_print_connector.h',
1052            'service/cloud_print/cloud_print_service_helpers.cc',
1053            'service/cloud_print/cloud_print_service_helpers.h',
1054            'service/cloud_print/cloud_print_proxy.cc',
1055            'service/cloud_print/cloud_print_proxy.h',
1056            'service/cloud_print/cloud_print_proxy_backend.cc',
1057            'service/cloud_print/cloud_print_proxy_backend.h',
1058            'service/cloud_print/cloud_print_token_store.cc',
1059            'service/cloud_print/cloud_print_token_store.h',
1060            'service/cloud_print/cloud_print_url_fetcher.cc',
1061            'service/cloud_print/cloud_print_url_fetcher.h',
1062            'service/cloud_print/cloud_print_wipeout.cc',
1063            'service/cloud_print/cloud_print_wipeout.h',
1064            'service/cloud_print/connector_settings.cc',
1065            'service/cloud_print/connector_settings.h',
1066            'service/cloud_print/job_status_updater.cc',
1067            'service/cloud_print/job_status_updater.h',
1068            'service/cloud_print/print_system.cc',
1069            'service/cloud_print/print_system.h',
1070            'service/cloud_print/printer_job_handler.cc',
1071            'service/cloud_print/printer_job_handler.h',
1072            'service/cloud_print/printer_job_queue_handler.cc',
1073            'service/cloud_print/printer_job_queue_handler.h',
1074            'service/net/service_url_request_context.cc',
1075            'service/net/service_url_request_context.h',
1076          ],
1077          'include_dirs': [
1078            '..',
1079          ],
1080          'conditions': [
1081            ['OS=="win"', {
1082              'sources': [
1083                'service/cloud_print/print_system_win.cc',
1084                'service/cloud_print/print_system_win.h',
1085                'service/cloud_print/print_system_xps_win.cc',
1086              ],
1087            }],
1088            ['toolkit_uses_gtk == 1', {
1089              'dependencies': [
1090                '../build/linux/system.gyp:gtk',
1091              ],
1092            }],
1093            ['use_cups==1', {
1094              'dependencies': [
1095                '../printing/printing.gyp:cups',
1096              ],
1097              'sources': [
1098                'service/cloud_print/print_system_cups.cc',
1099              ],
1100            }],
1101            ['OS!="win" and use_cups!=1', {
1102              'sources': [
1103                'service/cloud_print/print_system_dummy.cc',
1104              ],
1105            }],
1106          ],
1107        },
1108      ],
1109    }],
1110  ],  # 'conditions'
1111}
1112