1 # Copyright (c) 2011 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.
10 'target_conditions': [
11 # This part is shared between the targets defined below.
14 '../build/build_config.h',
15 'third_party/dmg_fp/dmg_fp.h',
16 'third_party/dmg_fp/g_fmt.cc',
17 'third_party/dmg_fp/dtoa_wrapper.cc',
18 'third_party/icu/icu_utf.cc',
19 'third_party/icu/icu_utf.h',
20 'third_party/nspr/prtime.cc',
21 'third_party/nspr/prtime.h',
22 'third_party/nspr/prcpucfg_linux.h',
23 'third_party/xdg_mime/xdgmime.h',
24 'android/scoped_java_ref.cc',
25 'android/scoped_java_ref.h',
26 'android/jni_android.cc',
27 'android/jni_android.h',
28 'android/jni_array.cc',
29 'android/jni_array.h',
30 'android/jni_string.cc',
31 'android/jni_string.h',
32 'android/path_utils.cc',
33 'android/path_utils.h',
37 'atomic_sequence_num.h',
39 'atomicops_internals_x86_gcc.cc',
40 'atomicops_internals_x86_gcc.h',
41 'atomicops_internals_x86_msvc.h',
45 'base_paths_android.cc',
48 'base_paths_posix.cc',
56 'bind_internal_win.h',
61 'callback_internal.cc',
62 'callback_internal.h',
64 'cancelable_callback.h',
67 'compiler_specific.h',
72 'debug/debug_on_start_win.cc',
73 'debug/debug_on_start_win.h',
76 'debug/debugger_posix.cc',
77 'debug/debugger_win.cc',
78 'debug/leak_annotations.h',
79 'debug/leak_tracker.h',
82 'debug/stack_trace.cc',
83 'debug/stack_trace.h',
84 'debug/stack_trace_android.cc',
85 'debug/stack_trace_posix.cc',
86 'debug/stack_trace_win.cc',
87 'debug/trace_event_win.cc',
88 'debug/trace_event.cc',
89 'debug/trace_event.h',
90 'dir_reader_fallback.h',
96 'file_descriptor_posix.h',
101 'file_util_android.cc',
102 'file_util_deprecated.h',
103 'file_util_linux.cc',
105 'file_util_posix.cc',
107 'file_util_proxy.cc',
109 'file_version_info.h',
110 'file_version_info_mac.h',
111 'file_version_info_mac.mm',
112 'file_version_info_win.cc',
113 'file_version_info_win.h',
114 'files/file_path_watcher.cc',
115 'files/file_path_watcher.h',
116 'files/file_path_watcher_kqueue.cc',
117 'files/file_path_watcher_linux.cc',
118 'files/file_path_watcher_stub.cc',
119 'files/file_path_watcher_win.cc',
122 'global_descriptors_posix.cc',
123 'global_descriptors_posix.h',
127 'json/json_reader.cc',
128 'json/json_reader.h',
129 'json/json_value_serializer.cc',
130 'json/json_value_serializer.h',
131 'json/json_writer.cc',
132 'json/json_writer.h',
133 'json/string_escape.cc',
134 'json/string_escape.h',
144 'mac/cocoa_protocols.h',
145 'mac/crash_logging.h',
146 'mac/crash_logging.mm',
147 'mac/foundation_util.h',
148 'mac/foundation_util.mm',
151 'mac/objc_property_releaser.h',
152 'mac/objc_property_releaser.mm',
153 'mac/os_crash_dumps.cc',
154 'mac/os_crash_dumps.h',
155 'mac/scoped_aedesc.h',
156 'mac/scoped_cftyperef.h',
157 'mac/scoped_nsautorelease_pool.h',
158 'mac/scoped_nsautorelease_pool.mm',
159 'mac/scoped_nsexception_enabler.h',
160 'mac/scoped_nsexception_enabler.mm',
163 'memory/linked_ptr.h',
164 'memory/mru_cache.h',
165 'memory/raw_scoped_refptr_mismatch_checker.h',
166 'memory/ref_counted.cc',
167 'memory/ref_counted.h',
168 'memory/ref_counted_memory.cc',
169 'memory/ref_counted_memory.h',
170 'memory/scoped_callback_factory.h',
171 'memory/scoped_handle.h',
172 'memory/scoped_nsobject.h',
173 'memory/scoped_open_process.h',
174 'memory/scoped_ptr.h',
175 'memory/scoped_vector.h',
176 'memory/singleton.cc',
177 'memory/singleton.h',
178 'memory/weak_ptr.cc',
182 'message_loop_proxy.cc',
183 'message_loop_proxy.h',
184 'message_loop_proxy_impl.cc',
185 'message_loop_proxy_impl.h',
188 'message_pump_default.cc',
189 'message_pump_default.h',
190 'message_pump_win.cc',
191 'message_pump_win.h',
192 'metrics/histogram.cc',
193 'metrics/histogram.h',
194 'metrics/stats_counters.cc',
195 'metrics/stats_counters.h',
196 'metrics/stats_table.cc',
197 'metrics/stats_table.h',
199 'native_library_mac.mm',
200 'native_library_posix.cc',
201 'native_library_win.cc',
203 'observer_list_threadsafe.h',
204 'os_compat_android.cc',
205 'os_compat_android.h',
214 'platform_file_posix.cc',
215 'platform_file_win.cc',
222 'process_util_linux.cc',
223 'process_util_mac.mm',
224 'process_util_openbsd.cc',
225 'process_util_posix.cc',
226 'process_util_win.cc',
228 'profiler/scoped_profile.cc',
229 'profiler/scoped_profile.h',
230 'profiler/tracked_time.cc',
231 'profiler/tracked_time.h',
237 'rand_util_posix.cc',
239 'safe_strerror_posix.cc',
240 'safe_strerror_posix.h',
241 'scoped_native_library.cc',
242 'scoped_native_library.h',
243 'scoped_temp_dir.cc',
249 'shared_memory_android.cc',
250 'shared_memory_posix.cc',
251 'shared_memory_win.cc',
255 'string_number_conversions.cc',
256 'string_number_conversions.h',
261 'string_tokenizer.h',
264 'string_util_posix.h',
266 'stringize_macros.h',
269 'synchronization/cancellation_flag.cc',
270 'synchronization/cancellation_flag.h',
271 'synchronization/condition_variable.h',
272 'synchronization/condition_variable_posix.cc',
273 'synchronization/condition_variable_win.cc',
274 'synchronization/lock.cc',
275 'synchronization/lock.h',
276 'synchronization/lock_impl.h',
277 'synchronization/lock_impl_posix.cc',
278 'synchronization/lock_impl_win.cc',
279 'synchronization/waitable_event.h',
280 'synchronization/waitable_event_posix.cc',
281 'synchronization/waitable_event_watcher.h',
282 'synchronization/waitable_event_watcher_posix.cc',
283 'synchronization/waitable_event_watcher_win.cc',
284 'synchronization/waitable_event_win.cc',
285 'system_monitor/system_monitor.cc',
286 'system_monitor/system_monitor.h',
287 'system_monitor/system_monitor_android.cc',
288 'system_monitor/system_monitor_mac.mm',
289 'system_monitor/system_monitor_posix.cc',
290 'system_monitor/system_monitor_win.cc',
292 'sys_info_chromeos.cc',
293 'sys_info_freebsd.cc',
296 'sys_info_openbsd.cc',
299 'sys_string_conversions.h',
300 'sys_string_conversions_mac.mm',
301 'sys_string_conversions_posix.cc',
302 'sys_string_conversions_win.cc',
306 'threading/non_thread_safe.h',
307 'threading/non_thread_safe_impl.cc',
308 'threading/non_thread_safe_impl.h',
309 'threading/platform_thread.h',
310 'threading/platform_thread_mac.mm',
311 'threading/platform_thread_posix.cc',
312 'threading/platform_thread_win.cc',
313 'threading/post_task_and_reply_impl.cc',
314 'threading/post_task_and_reply_impl.h',
315 'threading/simple_thread.cc',
316 'threading/simple_thread.h',
317 'threading/thread.cc',
318 'threading/thread.h',
319 'threading/thread_checker.h',
320 'threading/thread_checker_impl.cc',
321 'threading/thread_checker_impl.h',
322 'threading/thread_collision_warner.cc',
323 'threading/thread_collision_warner.h',
324 'threading/thread_local.h',
325 'threading/thread_local_posix.cc',
326 'threading/thread_local_storage.h',
327 'threading/thread_local_storage_posix.cc',
328 'threading/thread_local_storage_win.cc',
329 'threading/thread_local_win.cc',
330 'threading/thread_restrictions.h',
331 'threading/thread_restrictions.cc',
332 'threading/watchdog.cc',
333 'threading/watchdog.h',
334 'threading/worker_pool.h',
335 'threading/worker_pool.cc',
336 'threading/worker_pool_posix.cc',
337 'threading/worker_pool_posix.h',
338 'threading/worker_pool_win.cc',
344 'tracked_objects.cc',
349 'utf_offset_string_conversions.cc',
350 'utf_offset_string_conversions.h',
351 'utf_string_conversion_utils.cc',
352 'utf_string_conversion_utils.h',
353 'utf_string_conversions.cc',
354 'utf_string_conversions.h',
357 'value_conversions.cc',
358 'value_conversions.h',
363 'nix/mime_util_xdg.cc',
364 'nix/mime_util_xdg.h',
367 'wayland/wayland_event.h',
368 'win/event_trace_consumer.h',
369 'win/event_trace_controller.cc',
370 'win/event_trace_controller.h',
371 'win/event_trace_provider.cc',
372 'win/event_trace_provider.h',
375 'win/iat_patch_function.cc',
376 'win/iat_patch_function.h',
377 'win/object_watcher.cc',
378 'win/object_watcher.h',
381 'win/resource_util.cc',
382 'win/resource_util.h',
383 'win/scoped_bstr.cc',
385 'win/scoped_co_mem.h',
386 'win/scoped_com_initializer.h',
387 'win/scoped_comptr.h',
388 'win/scoped_gdi_object.h',
389 'win/scoped_handle.h',
391 'win/scoped_hglobal.h',
392 'win/scoped_select_object.h',
393 'win/scoped_variant.cc',
394 'win/scoped_variant.h',
395 'win/windows_version.cc',
396 'win/windows_version.h',
399 'win/wrapped_window_proc.cc',
400 'win/wrapped_window_proc.h',
403 'BASE_IMPLEMENTATION',
408 # These warnings are needed for the files in third_party\dmg_fp.
409 'msvs_disabled_warnings': [
410 4244, 4554, 4018, 4102,
412 'mac_framework_dirs': [
413 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
418 ['exclude', '^nix/'],
421 'atomicops_internals_x86_gcc.cc',
422 'message_pump_glib.cc',
426 [ 'toolkit_uses_gtk==0', {
427 'sources!': [ 'message_pump_gtk.cc', ],
429 [ 'use_aura==0 or OS == "win" or OS == "mac"', {
430 'sources!' : [ 'message_pump_x.cc', ],
432 'sources!' : [ 'message_pump_gtk.cc', ],
433 'sources/' : [ [ 'include', '^message_pump_x\\.cc$', ] ],
435 [ 'use_wayland==1', {
437 [ 'exclude', '^message_pump_gtk\\.cc$',],
438 [ 'exclude', '^message_pump_x\\.cc$',],
441 [ 'OS != "linux" and OS != "openbsd"', {
443 # Not automatically excluded by the *linux.cc rules.
448 [ 'OS == "android"', {
450 'files/file_path_watcher_kqueue.cc',
451 'system_monitor/system_monitor_posix.cc',
454 ['include', '^process_util_linux\\.cc$'],
455 ['include', '^sys_info_linux\\.cc$'],
456 ['include', '^sys_string_conversions_posix\\.cc$'],
457 ['include', '^worker_pool_linux\\.cc$'],
458 # TODO(michaelbai): The below files are excluded because of the
459 # missing JNI, add them back when JNI is ready.
460 ['exclude', '^android/'],
461 ['exclude', '^base_paths_android\\.cc$'],
462 ['exclude', '^debug/stack_trace_android\\.cc$'],
463 ['exclude', '^message_pump_android\\.cc$'],
468 'mac/scoped_aedesc.h'
471 # For now, just test the *BSD platforms enough to exclude them.
472 # Subsequent changes will include them further.
473 [ 'OS != "freebsd"', {
474 'sources/': [ ['exclude', '_freebsd\\.cc$'] ],
477 [ 'OS != "openbsd"', {
478 'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
482 'sources/': [ ['exclude', '^win/'] ],
485 ['OS != "android"', {
486 'sources/': [ ['exclude', '^android/'] ],
491 '<(DEPTH)/third_party/wtl/include',
494 'event_recorder_stubs.cc',
495 'file_descriptor_shuffle.cc',
496 'files/file_path_watcher_kqueue.cc',
497 'files/file_path_watcher_stub.cc',
498 'message_pump_libevent.cc',
499 # Not using sha1_win.cc because it may have caused a
500 # regression to page cycler moz.
507 'files/file_path_watcher_kqueue.cc',
508 'files/file_path_watcher_stub.cc',
513 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
514 ['exclude', '^base_paths_posix\\.cc$'],
515 ['exclude', '^native_library_posix\\.cc$'],
516 ['exclude', '^sys_string_conversions_posix\\.cc$'],
519 [ 'OS == "openbsd"', {
521 ['exclude', '^files/file_path_watcher_linux\\.cc$'],
522 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
523 ['exclude', '^file_util_linux\\.cc$'],
524 ['exclude', '^process_linux\\.cc$'],
525 ['exclude', '^process_util_linux\\.cc$'],
526 ['exclude', '^sys_info_linux\\.cc$'],
535 'target_name': 'base',
536 'type': '<(component)',
537 'toolsets': ['host', 'target'],
540 'enable_wexit_time_destructors': 1,
544 '../third_party/modp_b64/modp_b64.gyp:modp_b64',
545 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
547 # TODO(gregoryd): direct_dependent_settings should be shared with the
548 # 64-bit target, but it doesn't work due to a bug in gyp
549 'direct_dependent_settings': {
558 'sources/': [ ['include', '_chromeos\\.cc$'] ]
561 [ 'linux_use_tcmalloc==0', {
565 'direct_dependent_settings': {
572 [ 'toolkit_uses_gtk==1', {
574 '../build/linux/system.gyp:gtk',
576 'export_dependent_settings': [
577 '../build/linux/system.gyp:gtk',
583 '../build/util/build_util.gyp:lastchange#target',
584 '../build/linux/system.gyp:glib',
585 '../build/linux/system.gyp:x11',
592 '-Wno-write-strings',
594 'export_dependent_settings': [
595 '../build/linux/system.gyp:glib',
596 '../build/linux/system.gyp:x11',
600 ['exclude', '/xdg_user_dirs/'],
601 ['exclude', '_nss\.cc$'],
604 [ 'OS == "android" and _toolset == "host"', {
605 # Base for host support is the minimum required to run the
606 # ssl false start blacklist tool. It requires further changes
607 # to generically support host builds (and tests).
608 # Note: when building for host, gyp has OS == "android",
609 # hence the *_android.cc files are included but the actual code
610 # doesn't have OS_ANDROID / ANDROID defined.
612 ['host_os == "linux"', {
614 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
617 '../build/linux/system.gyp:glib',
619 'export_dependent_settings': [
620 '../build/linux/system.gyp:glib',
623 ['host_os == "mac"', {
625 ['exclude', '^native_library_linux\\.cc$'],
626 ['exclude', '^process_util_linux\\.cc$'],
627 ['exclude', '^sys_info_linux\\.cc$'],
628 ['exclude', '^sys_string_conversions_linux\\.cc$'],
629 ['exclude', '^worker_pool_linux\\.cc$'],
634 [ 'OS == "android" and _toolset == "target"', {
637 '../third_party/ashmem/ashmem.gyp:ashmem',
648 'debug/stack_trace.cc',
649 'debug/stack_trace_posix.cc',
654 '/usr/local/include',
658 '-L/usr/local/lib -lexecinfo',
666 # We need rt for clock_gettime().
668 # For 'native_library_linux.cc'
676 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
677 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
678 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
679 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
680 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
681 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
685 '../third_party/mach_override/mach_override.gyp:mach_override',
689 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
691 [ 'component=="shared_library"', {
695 'debug/debug_on_start_win.cc',
702 'third_party/nspr/prcpucfg.h',
703 'third_party/nspr/prcpucfg_win.h',
704 'third_party/nspr/prtypes.h',
705 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
706 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
711 'event_recorder_stubs.cc',
712 'event_recorder_win.cc',
713 'file_descriptor_shuffle.cc',
714 'file_descriptor_shuffle.h',
719 'message_pump_android.cc',
720 'message_pump_android.h',
721 'message_pump_glib.cc',
722 'message_pump_glib.h',
723 'message_pump_gtk.cc',
724 'message_pump_gtk.h',
725 'message_pump_observer.h',
728 'message_pump_libevent.cc',
729 'message_pump_libevent.h',
730 'message_pump_mac.h',
731 'message_pump_mac.mm',
732 'message_pump_wayland.cc',
733 'message_pump_wayland.h',
734 'metrics/field_trial.cc',
735 'metrics/field_trial.h',
739 'sync_socket_win.cc',
740 'sync_socket_posix.cc',
750 'target_name': 'base_nacl_win64',
751 'type': '<(component)',
757 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
759 # TODO(gregoryd): direct_dependent_settings should be shared with the
760 # 32-bit target, but it doesn't work due to a bug in gyp
761 'direct_dependent_settings': {
767 '<@(nacl_win64_defines)',
771 'msvs_target_platform': 'x64',
775 [ 'component == "shared_library"', {
777 'debug/debug_on_start_win.cc',
783 'target_name': 'base_i18n_nacl_win64',
784 'type': '<(component)',
785 # TODO(gregoryd): direct_dependent_settings should be shared with the
786 # 32-bit target, but it doesn't work due to a bug in gyp
787 'direct_dependent_settings': {
793 '<@(nacl_win64_defines)',
794 'BASE_I18N_IMPLEMENTATION',
800 'i18n/icu_util_nacl_win64.cc',
804 'msvs_target_platform': 'x64',
810 [ 'os_posix==1 and OS!="mac"', {
813 'target_name': 'symbolize',
814 'type': 'static_library',
815 'toolsets': ['host', 'target'],
820 [ 'OS == "solaris"', {
823 '/usr/gnu/include/libelf',
834 'third_party/symbolize/config.h',
835 'third_party/symbolize/demangle.cc',
836 'third_party/symbolize/demangle.h',
837 'third_party/symbolize/glog/logging.h',
838 'third_party/symbolize/glog/raw_logging.h',
839 'third_party/symbolize/symbolize.cc',
840 'third_party/symbolize/symbolize.h',
841 'third_party/symbolize/utilities.h',
848 'target_name': 'xdg_mime',
849 'type': 'static_library',
850 'toolsets': ['host', 'target'],
858 'third_party/xdg_mime/xdgmime.c',
859 'third_party/xdg_mime/xdgmime.h',
860 'third_party/xdg_mime/xdgmimealias.c',
861 'third_party/xdg_mime/xdgmimealias.h',
862 'third_party/xdg_mime/xdgmimecache.c',
863 'third_party/xdg_mime/xdgmimecache.h',
864 'third_party/xdg_mime/xdgmimeglob.c',
865 'third_party/xdg_mime/xdgmimeglob.h',
866 'third_party/xdg_mime/xdgmimeicon.c',
867 'third_party/xdg_mime/xdgmimeicon.h',
868 'third_party/xdg_mime/xdgmimeint.c',
869 'third_party/xdg_mime/xdgmimeint.h',
870 'third_party/xdg_mime/xdgmimemagic.c',
871 'third_party/xdg_mime/xdgmimemagic.h',
872 'third_party/xdg_mime/xdgmimeparent.c',
873 'third_party/xdg_mime/xdgmimeparent.h',