1 # Copyright (c) 2009 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 { 6 'target_defaults': { 7 'variables': { 8 'base_target': 0, 9 }, 10 'target_conditions': [ 11 # This part is shared between the targets defined below. Only files and 12 # settings relevant for building the Win64 target should be added here. 13 # All the rest should be added to the 'base' target below. 14 ['base_target==1', { 15 'sources': [ 16 '../build/build_config.h', 17 'third_party/dmg_fp/dmg_fp.h', 18 'third_party/dmg_fp/dtoa.cc', 19 'third_party/dmg_fp/g_fmt.cc', 20 'third_party/icu/icu_utf.cc', 21 'third_party/icu/icu_utf.h', 22 'third_party/nspr/prtime.cc', 23 'third_party/nspr/prtime.h', 24 'atomicops_internals_x86_gcc.cc', 25 'at_exit.cc', 26 'at_exit.h', 27 'atomic_ref_count.h', 28 'atomic_sequence_num.h', 29 'atomicops.h', 30 'atomicops_internals_x86_msvc.h', 31 'base_paths.cc', 32 'base_paths.h', 33 'base_paths_mac.h', 34 'base_paths_mac.mm', 35 'base_paths_posix.cc', 36 'base_paths_win.cc', 37 'base_paths_win.h', 38 'base_switches.cc', 39 'base_switches.h', 40 'basictypes.h', 41 'bits.h', 42 'bzip2_error_handler.cc', 43 'cancellation_flag.h', 44 'cancellation_flag.cc', 45 'chrome_application_mac.h', 46 'chrome_application_mac.mm', 47 'cocoa_protocols_mac.h', 48 'command_line.cc', 49 'command_line.h', 50 'compiler_specific.h', 51 'condition_variable.h', 52 'condition_variable_posix.cc', 53 'condition_variable_win.cc', 54 'cpu.cc', 55 'cpu.h', 56 'debug_on_start.cc', 57 'debug_on_start.h', 58 'debug_util.cc', 59 'debug_util.h', 60 'debug_util_mac.cc', 61 'debug_util_posix.cc', 62 'debug_util_win.cc', 63 'event_trace_consumer_win.h', 64 'event_trace_controller_win.cc', 65 'event_trace_controller_win.h', 66 'event_trace_provider_win.cc', 67 'event_trace_provider_win.h', 68 'file_path.cc', 69 'file_path.h', 70 'file_util.cc', 71 'file_util.h', 72 'file_util_linux.cc', 73 'file_util_mac.mm', 74 'file_util_posix.cc', 75 'file_util_win.cc', 76 'file_version_info.cc', 77 'file_version_info.h', 78 'file_version_info_mac.mm', 79 'fix_wp64.h', 80 'float_util.h', 81 'foundation_utils_mac.h', 82 'global_descriptors_posix.h', 83 'global_descriptors_posix.cc', 84 'hash_tables.h', 85 'histogram.cc', 86 'histogram.h', 87 'iat_patch.cc', 88 'iat_patch.h', 89 'id_map.h', 90 'lazy_instance.cc', 91 'lazy_instance.h', 92 'leak_annotations.h', 93 'leak_tracker.h', 94 'linked_list.h', 95 'linked_ptr.h', 96 'lock.cc', 97 'lock.h', 98 'lock_impl.h', 99 'lock_impl_posix.cc', 100 'lock_impl_win.cc', 101 'logging.cc', 102 'logging_win.cc', 103 'logging.h', 104 'mac_util.h', 105 'mac_util.mm', 106 'mach_ipc_mac.h', 107 'mach_ipc_mac.mm', 108 'memory_debug.cc', 109 'memory_debug.h', 110 'message_loop.cc', 111 'message_loop.h', 112 'message_pump.h', 113 'message_pump_default.cc', 114 'message_pump_default.h', 115 'message_pump_win.cc', 116 'message_pump_win.h', 117 'mime_util.h', 118 'mime_util_linux.cc', 119 'native_library.h', 120 'native_library_linux.cc', 121 'native_library_mac.mm', 122 'native_library_win.cc', 123 'non_thread_safe.cc', 124 'non_thread_safe.h', 125 'nullable_string16.h', 126 'object_watcher.cc', 127 'object_watcher.h', 128 'observer_list.h', 129 'observer_list_threadsafe.h', 130 'path_service.cc', 131 'path_service.h', 132 'pickle.cc', 133 'pickle.h', 134 'platform_file.h', 135 'platform_file_win.cc', 136 'platform_file_posix.cc', 137 'platform_thread.h', 138 'platform_thread_mac.mm', 139 'platform_thread_posix.cc', 140 'platform_thread_win.cc', 141 'port.h', 142 'profiler.cc', 143 'profiler.h', 144 'process.h', 145 'process_linux.cc', 146 'process_posix.cc', 147 'process_util.h', 148 'process_util_linux.cc', 149 'process_util_mac.mm', 150 'process_util_posix.cc', 151 'process_util_win.cc', 152 'process_win.cc', 153 'rand_util.cc', 154 'rand_util.h', 155 'rand_util_posix.cc', 156 'rand_util_win.cc', 157 'raw_scoped_refptr_mismatch_checker.h', 158 'ref_counted.cc', 159 'ref_counted.h', 160 'ref_counted_memory.h', 161 'registry.cc', 162 'registry.h', 163 'resource_util.cc', 164 'resource_util.h', 165 'safe_strerror_posix.cc', 166 'safe_strerror_posix.h', 167 'scoped_bstr_win.cc', 168 'scoped_bstr_win.h', 169 'scoped_cftyperef.h', 170 'scoped_comptr_win.h', 171 'scoped_handle.h', 172 'scoped_handle_gtk.h', 173 'scoped_handle_win.h', 174 'scoped_nsautorelease_pool.h', 175 'scoped_nsautorelease_pool.mm', 176 'scoped_nsdisable_screen_updates.h', 177 'scoped_nsobject.h', 178 'scoped_ptr.h', 179 'scoped_temp_dir.cc', 180 'scoped_temp_dir.h', 181 'scoped_variant_win.cc', 182 'scoped_variant_win.h', 183 'scoped_vector.h', 184 'sha1.cc', 185 'sha1.h', 186 'shared_memory.h', 187 'shared_memory_posix.cc', 188 'shared_memory_win.cc', 189 'simple_thread.cc', 190 'simple_thread.h', 191 'singleton.h', 192 'spin_wait.h', 193 'stack_container.h', 194 'stats_counters.h', 195 'stats_table.cc', 196 'stats_table.h', 197 'stl_util-inl.h', 198 'string_piece.cc', 199 'string_piece.h', 200 'string_split.cc', 201 'string_split.h', 202 'string_tokenizer.h', 203 'string_util.cc', 204 'string_util.h', 205 'string_util_win.h', 206 'sys_info.h', 207 'sys_info_chromeos.cc', 208 'sys_info_freebsd.cc', 209 'sys_info_linux.cc', 210 'sys_info_mac.cc', 211 'sys_info_openbsd.cc', 212 'sys_info_posix.cc', 213 'sys_info_win.cc', 214 'sys_string_conversions.h', 215 'sys_string_conversions_linux.cc', 216 'sys_string_conversions_mac.mm', 217 'sys_string_conversions_win.cc', 218 'task.h', 219 'thread.cc', 220 'thread.h', 221 'thread_collision_warner.cc', 222 'thread_collision_warner.h', 223 'thread_local.h', 224 'thread_local_posix.cc', 225 'thread_local_storage.h', 226 'thread_local_storage_posix.cc', 227 'thread_local_storage_win.cc', 228 'thread_local_win.cc', 229 'time.cc', 230 'time.h', 231 'time_win.cc', 232 'timer.cc', 233 'timer.h', 234 'trace_event.cc', 235 'trace_event.h', 236 'tracked.cc', 237 'tracked.h', 238 'tracked_objects.cc', 239 'tracked_objects.h', 240 'tuple.h', 241 'utf_offset_string_conversions.cc', 242 'utf_offset_string_conversions.h', 243 'utf_string_conversion_utils.cc', 244 'utf_string_conversion_utils.h', 245 'utf_string_conversions.cc', 246 'utf_string_conversions.h', 247 'unix_domain_socket_posix.cc', 248 'waitable_event.h', 249 'waitable_event_posix.cc', 250 'waitable_event_watcher.h', 251 'waitable_event_watcher_posix.cc', 252 'waitable_event_watcher_win.cc', 253 'waitable_event_win.cc', 254 'watchdog.cc', 255 'watchdog.h', 256 'weak_ptr.h', 257 'win_util.cc', 258 'win_util.h', 259 'windows_message_list.h', 260 'wmi_util.cc', 261 'wmi_util.h', 262 'worker_pool.h', 263 'worker_pool_linux.cc', 264 'worker_pool_linux.h', 265 'worker_pool_mac.h', 266 'worker_pool_mac.mm', 267 'worker_pool_win.cc', 268 ], 269 'include_dirs': [ 270 '..', 271 ], 272 # These warnings are needed for the files in third_party\dmg_fp. 273 'msvs_disabled_warnings': [ 274 4244, 4554, 4018, 4102, 275 ], 276 'mac_framework_dirs': [ 277 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks', 278 ], 279 'conditions': [ 280 [ 'OS != "linux" and OS != "freebsd" and OS != "openbsd"', { 281 'sources/': [ 282 ['exclude', '/xdg_user_dirs/'], 283 ['exclude', '_nss\.cc$'], 284 ], 285 'sources!': [ 286 'atomicops_internals_x86_gcc.cc', 287 'base_paths_posix.cc', 288 'directory_watcher_inotify.cc', 289 'linux_util.cc', 290 'message_pump_glib.cc', 291 ], 292 },], 293 [ 'OS != "linux"', { 294 'sources!': [ 295 # Not automatically excluded by the *linux.cc rules. 296 'setproctitle_linux.c', 297 'setproctitle_linux.h', 298 ], 299 }, 300 ], 301 # For now, just test the *BSD platforms enough to exclude them. 302 # Subsequent changes will include them further. 303 [ 'OS != "freebsd"', { 304 'sources/': [ ['exclude', '_freebsd\\.cc$'] ], 305 }, 306 ], 307 [ 'OS != "openbsd"', { 308 'sources/': [ ['exclude', '_openbsd\\.cc$'] ], 309 }, 310 ], 311 [ 'GENERATOR == "quentin"', { 312 # Quentin builds don't have a recent enough glibc to include the 313 # inotify headers 314 'sources!': [ 315 'directory_watcher_inotify.cc', 316 ], 317 'sources': [ 318 'directory_watcher_stub.cc', 319 ], 320 }, 321 ], 322 [ 'OS == "mac"', { 323 'sources!': [ 324 # TODO(wtc): Remove nss_util.{cc,h} when http://crbug.com/30689 325 # is fixed. 326 'nss_util.cc', 327 'nss_util.h', 328 ], 329 }, { # OS != "mac" 330 'sources!': [ 331 'crypto/cssm_init.cc', 332 'crypto/cssm_init.h', 333 ], 334 },], 335 [ 'OS == "win"', { 336 'include_dirs': [ 337 '../chrome/third_party/wtl/include', 338 ], 339 'sources!': [ 340 'event_recorder_stubs.cc', 341 'file_descriptor_shuffle.cc', 342 'message_pump_libevent.cc', 343 'string16.cc', 344 ], 345 },], 346 ], 347 }], 348 ], 349 }, 350 'targets': [ 351 { 352 'target_name': 'base', 353 'type': '<(library)', 354 'msvs_guid': '1832A374-8A74-4F9E-B536-69A699B3E165', 355 'variables': { 356 'base_target': 1, 357 }, 358 'dependencies': [ 359 '../third_party/modp_b64/modp_b64.gyp:modp_b64', 360 ], 361 # TODO(gregoryd): direct_dependent_settings should be shared with the 362 # 64-bit target, but it doesn't work due to a bug in gyp 363 'direct_dependent_settings': { 364 'include_dirs': [ 365 '..', 366 ], 367 }, 368 # Conditions that are not relevant for Win64 build 369 'conditions': [ 370 [ 'OS == "linux" or OS == "freebsd"', { 371 'conditions': [ 372 [ 'chromeos==1', { 373 'sources/': [ ['include', '_chromeos\\.cc$'] ] 374 }, 375 ], 376 [ 'linux_use_tcmalloc==1', { 377 'defines': [ 378 'LINUX_USE_TCMALLOC', 379 ], 380 'direct_dependent_settings': { 381 'defines': [ 382 'LINUX_USE_TCMALLOC', 383 ], 384 }, 385 }, 386 ], 387 [ 'OS == "linux"', { 388 'link_settings': { 389 'libraries': [ 390 # We need rt for clock_gettime(). 391 '-lrt', 392 ], 393 }, 394 }], 395 ], 396 'dependencies': [ 397 '../build/util/build_util.gyp:lastchange', 398 '../build/linux/system.gyp:gtk', 399 '../build/linux/system.gyp:nss', 400 'symbolize', 401 'xdg_mime', 402 ], 403 'defines': [ 404 'USE_SYMBOLIZE', 405 ], 406 'cflags': [ 407 '-Wno-write-strings', 408 ], 409 'export_dependent_settings': [ 410 '../build/linux/system.gyp:gtk', 411 ], 412 },], 413 [ 'OS == "freebsd"', { 414 'sources!': [ 415 'directory_watcher_inotify.cc', 416 ], 417 'sources': [ 418 'directory_watcher_stub.cc', 419 ], 420 'link_settings': { 421 'libraries': [ 422 '-L/usr/local/lib -lexecinfo', 423 ], 424 }, 425 }, 426 ], 427 [ 'OS == "mac"', { 428 'link_settings': { 429 'libraries': [ 430 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', 431 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', 432 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', 433 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', 434 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework', 435 '$(SDKROOT)/System/Library/Frameworks/Security.framework', 436 ], 437 }, 438 },], 439 [ 'OS == "win"', { 440 'dependencies': [ 441 '../third_party/nss/nss.gyp:nss', 442 ], 443 }, { # OS != "win" 444 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'], 445 'sources!': [ 446 'third_party/purify/pure_api.c', 447 'base_drag_source.cc', 448 'base_drop_target.cc', 449 'cpu.cc', 450 'debug_on_start.cc', 451 'event_recorder.cc', 452 'file_version_info.cc', 453 'iat_patch.cc', 454 'image_util.cc', 455 'object_watcher.cc', 456 'pe_image.cc', 457 'registry.cc', 458 'resource_util.cc', 459 'win_util.cc', 460 'wmi_util.cc', 461 ], 462 },], 463 ], 464 'sources': [ 465 'crypto/cssm_init.cc', 466 'crypto/cssm_init.h', 467 'crypto/rsa_private_key.h', 468 'crypto/rsa_private_key.cc', 469 'crypto/rsa_private_key_mac.cc', 470 'crypto/rsa_private_key_nss.cc', 471 'crypto/rsa_private_key_win.cc', 472 'crypto/signature_creator.h', 473 'crypto/signature_creator_mac.cc', 474 'crypto/signature_creator_nss.cc', 475 'crypto/signature_creator_win.cc', 476 'crypto/signature_verifier.h', 477 'crypto/signature_verifier_mac.cc', 478 'crypto/signature_verifier_nss.cc', 479 'crypto/signature_verifier_win.cc', 480 'third_party/nspr/prcpucfg.h', 481 'third_party/nspr/prcpucfg_win.h', 482 'third_party/nspr/prtypes.h', 483 'third_party/nss/blapi.h', 484 'third_party/nss/blapit.h', 485 'third_party/nss/sha256.h', 486 'third_party/nss/sha512.cc', 487 'third_party/purify/pure.h', 488 'third_party/purify/pure_api.c', 489 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc', 490 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h', 491 'auto_reset.h', 492 'base64.cc', 493 'base64.h', 494 'base_drag_source.cc', 495 'base_drag_source.h', 496 'base_drop_target.cc', 497 'base_drop_target.h', 498 'data_pack.cc', 499 'directory_watcher.h', 500 'directory_watcher_inotify.cc', 501 'directory_watcher_mac.cc', 502 'directory_watcher_win.cc', 503 'dynamic_annotations.h', 504 'dynamic_annotations.cc', 505 'event_recorder.cc', 506 'event_recorder.h', 507 'event_recorder_stubs.cc', 508 'field_trial.cc', 509 'field_trial.h', 510 'file_descriptor_shuffle.cc', 511 'file_descriptor_shuffle.h', 512 'gfx/point.cc', 513 'gfx/point.h', 514 'gfx/rect.cc', 515 'gfx/rect.h', 516 'gfx/size.cc', 517 'gfx/size.h', 518 'hmac.h', 519 'hmac_mac.cc', 520 'hmac_nss.cc', 521 'hmac_win.cc', 522 'image_util.cc', 523 'image_util.h', 524 'json/json_reader.cc', 525 'json/json_reader.h', 526 'json/json_writer.cc', 527 'json/json_writer.h', 528 'json/string_escape.cc', 529 'json/string_escape.h', 530 'keyboard_code_conversion_gtk.cc', 531 'keyboard_code_conversion_gtk.h', 532 'keyboard_codes.h', 533 'keyboard_codes_win.h', 534 'keyboard_codes_posix.h', 535 'linux_util.cc', 536 'linux_util.h', 537 'md5.cc', 538 'md5.h', 539 'message_pump_glib.cc', 540 'message_pump_glib.h', 541 'message_pump_libevent.cc', 542 'message_pump_libevent.h', 543 'message_pump_mac.h', 544 'message_pump_mac.mm', 545 'nsimage_cache_mac.h', 546 'nsimage_cache_mac.mm', 547 'nss_util.cc', 548 'nss_util.h', 549 'pe_image.cc', 550 'pe_image.h', 551 'setproctitle_linux.c', 552 'setproctitle_linux.h', 553 'sha2.cc', 554 'sha2.h', 555 'string16.cc', 556 'string16.h', 557 'sync_socket.h', 558 'sync_socket_win.cc', 559 'sync_socket_posix.cc', 560 'time_mac.cc', 561 'time_posix.cc', 562 'values.cc', 563 'values.h', 564 'version.cc', 565 'version.h', 566 ], 567 }, 568 ], 569 'conditions': [ 570 [ 'OS == "win"', { 571 'targets': [ 572 { 573 'target_name': 'base_nacl_win64', 574 'type': '<(library)', 575 'msvs_guid': 'CEE1F794-DC70-4FED-B7C4-4C12986672FE', 576 'variables': { 577 'base_target': 1, 578 }, 579 # TODO(gregoryd): direct_dependent_settings should be shared with the 580 # 32-bit target, but it doesn't work due to a bug in gyp 581 'direct_dependent_settings': { 582 'include_dirs': [ 583 '..', 584 ], 585 }, 586 'defines': [ 587 '<@(nacl_win64_defines)', 588 ], 589 'sources': [ 590 'i18n/icu_util_nacl_win64.cc', 591 ], 592 'configurations': { 593 'Common_Base': { 594 'msvs_target_platform': 'x64', 595 }, 596 }, 597 }, 598 ], 599 }], 600 [ 'OS == "linux" or OS == "freebsd"', { 601 # TODO: these third-party targets should be in a separate .gyp file 602 # so it can set chromium_code=0 to turn off our aggressive warnings. 603 'targets': [ 604 { 605 'target_name': 'symbolize', 606 'type': '<(library)', 607 'cflags': [ 608 '-Wno-sign-compare', 609 ], 610 'sources': [ 611 'third_party/symbolize/symbolize.cc', 612 'third_party/symbolize/demangle.cc', 613 ], 614 }, 615 { 616 'target_name': 'xdg_mime', 617 'type': '<(library)', 618 'sources': [ 619 'third_party/xdg_mime/xdgmime.c', 620 'third_party/xdg_mime/xdgmime.h', 621 'third_party/xdg_mime/xdgmimealias.c', 622 'third_party/xdg_mime/xdgmimealias.h', 623 'third_party/xdg_mime/xdgmimecache.c', 624 'third_party/xdg_mime/xdgmimecache.h', 625 'third_party/xdg_mime/xdgmimeglob.c', 626 'third_party/xdg_mime/xdgmimeglob.h', 627 'third_party/xdg_mime/xdgmimeicon.c', 628 'third_party/xdg_mime/xdgmimeicon.h', 629 'third_party/xdg_mime/xdgmimeint.c', 630 'third_party/xdg_mime/xdgmimeint.h', 631 'third_party/xdg_mime/xdgmimemagic.c', 632 'third_party/xdg_mime/xdgmimemagic.h', 633 'third_party/xdg_mime/xdgmimeparent.c', 634 'third_party/xdg_mime/xdgmimeparent.h', 635 ], 636 }, 637 ], 638 }], 639 ], 640 } 641