1# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2# 3# Use of this source code is governed by a BSD-style license 4# that can be found in the LICENSE file in the root of the source 5# tree. An additional intellectual property rights grant can be found 6# in the file PATENTS. All contributing project authors may 7# be found in the AUTHORS file in the root of the source tree. 8 9{ 10 'includes': [ '../build/common.gypi', ], 11 'targets': [ 12 { 13 'target_name': 'system_wrappers', 14 'type': 'static_library', 15 'dependencies': [ 16 '<(webrtc_root)/common.gyp:webrtc_common', 17 '../base/base.gyp:rtc_base_approved', 18 ], 19 'sources': [ 20 'include/aligned_array.h', 21 'include/aligned_malloc.h', 22 'include/atomic32.h', 23 'include/clock.h', 24 'include/condition_variable_wrapper.h', 25 'include/cpu_info.h', 26 'include/cpu_features_wrapper.h', 27 'include/critical_section_wrapper.h', 28 'include/data_log.h', 29 'include/data_log_c.h', 30 'include/data_log_impl.h', 31 'include/event_wrapper.h', 32 'include/field_trial.h', 33 'include/file_wrapper.h', 34 'include/fix_interlocked_exchange_pointer_win.h', 35 'include/logcat_trace_context.h', 36 'include/logging.h', 37 'include/metrics.h', 38 'include/ntp_time.h', 39 'include/ref_count.h', 40 'include/rtp_to_ntp.h', 41 'include/rw_lock_wrapper.h', 42 'include/scoped_vector.h', 43 'include/sleep.h', 44 'include/sort.h', 45 'include/static_instance.h', 46 'include/stl_util.h', 47 'include/stringize_macros.h', 48 'include/tick_util.h', 49 'include/timestamp_extrapolator.h', 50 'include/trace.h', 51 'include/utf_util_win.h', 52 'source/aligned_malloc.cc', 53 'source/atomic32_mac.cc', 54 'source/atomic32_posix.cc', 55 'source/atomic32_win.cc', 56 'source/clock.cc', 57 'source/condition_variable.cc', 58 'source/condition_variable_posix.cc', 59 'source/condition_variable_posix.h', 60 'source/condition_variable_event_win.cc', 61 'source/condition_variable_event_win.h', 62 'source/condition_variable_native_win.cc', 63 'source/condition_variable_native_win.h', 64 'source/cpu_info.cc', 65 'source/cpu_features.cc', 66 'source/critical_section.cc', 67 'source/critical_section_posix.cc', 68 'source/critical_section_posix.h', 69 'source/critical_section_win.cc', 70 'source/critical_section_win.h', 71 'source/data_log.cc', 72 'source/data_log_c.cc', 73 'source/data_log_no_op.cc', 74 'source/event.cc', 75 'source/event_timer_posix.cc', 76 'source/event_timer_posix.h', 77 'source/event_timer_win.cc', 78 'source/event_timer_win.h', 79 'source/file_impl.cc', 80 'source/file_impl.h', 81 'source/logcat_trace_context.cc', 82 'source/logging.cc', 83 'source/rtp_to_ntp.cc', 84 'source/rw_lock.cc', 85 'source/rw_lock_generic.cc', 86 'source/rw_lock_generic.h', 87 'source/rw_lock_posix.cc', 88 'source/rw_lock_posix.h', 89 'source/rw_lock_win.cc', 90 'source/rw_lock_win.h', 91 'source/sleep.cc', 92 'source/sort.cc', 93 'source/tick_util.cc', 94 'source/timestamp_extrapolator.cc', 95 'source/trace_impl.cc', 96 'source/trace_impl.h', 97 'source/trace_posix.cc', 98 'source/trace_posix.h', 99 'source/trace_win.cc', 100 'source/trace_win.h', 101 ], 102 'conditions': [ 103 ['enable_data_logging==1', { 104 'sources!': [ 'source/data_log_no_op.cc', ], 105 }, { 106 'sources!': [ 'source/data_log.cc', ], 107 },], 108 ['OS=="android"', { 109 'defines': [ 110 'WEBRTC_THREAD_RR', 111 # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC 112 # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now, 113 # remove it after I verify that CLOCK_MONOTONIC is fully functional 114 # with condition and event functions in system_wrappers. 115 'WEBRTC_CLOCK_TYPE_REALTIME', 116 ], 117 'conditions': [ 118 ['build_with_chromium==1', { 119 'dependencies': [ 120 'cpu_features_chromium.gyp:cpu_features_android', 121 ], 122 }, { 123 'dependencies': [ 124 'cpu_features_webrtc.gyp:cpu_features_android', 125 ], 126 }], 127 ], 128 'link_settings': { 129 'libraries': [ 130 '-llog', 131 ], 132 }, 133 }, { # OS!="android" 134 'sources!': [ 135 'include/logcat_trace_context.h', 136 'source/logcat_trace_context.cc', 137 ], 138 }], 139 ['OS=="linux"', { 140 'defines': [ 141 'WEBRTC_THREAD_RR', 142 # TODO(andrew): can we select this automatically? 143 # Define this if the Linux system does not support CLOCK_MONOTONIC. 144 #'WEBRTC_CLOCK_TYPE_REALTIME', 145 ], 146 'link_settings': { 147 'libraries': [ '-lrt', ], 148 }, 149 }], 150 ['OS=="mac"', { 151 'link_settings': { 152 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ], 153 }, 154 'sources!': [ 155 'source/atomic32_posix.cc', 156 ], 157 }], 158 ['OS=="ios" or OS=="mac"', { 159 'defines': [ 160 'WEBRTC_THREAD_RR', 161 'WEBRTC_CLOCK_TYPE_REALTIME', 162 ], 163 }], 164 ['OS=="win"', { 165 'link_settings': { 166 'libraries': [ '-lwinmm.lib', ], 167 }, 168 }], 169 ], # conditions 170 'target_conditions': [ 171 # We need to do this in a target_conditions block to override the 172 # filename_rules filters. 173 ['OS=="ios"', { 174 # Pull in specific Mac files for iOS (which have been filtered out 175 # by file name rules). 176 'sources/': [ 177 ['include', '^source/atomic32_mac\\.'], 178 ], 179 'sources!': [ 180 'source/atomic32_posix.cc', 181 ], 182 }], 183 ], 184 # Disable warnings to enable Win64 build, issue 1323. 185 'msvs_disabled_warnings': [ 186 4267, # size_t to int truncation. 187 4334, # Ignore warning on shift operator promotion. 188 ], 189 }, { 190 'target_name': 'field_trial_default', 191 'type': 'static_library', 192 'sources': [ 193 'include/field_trial_default.h', 194 'source/field_trial_default.cc', 195 ] 196 }, { 197 'target_name': 'metrics_default', 198 'type': 'static_library', 199 'sources': [ 200 'source/metrics_default.cc', 201 ], 202 }, { 203 'target_name': 'system_wrappers_default', 204 'type': 'static_library', 205 'dependencies': [ 206 'system_wrappers', 207 'field_trial_default', 208 'metrics_default', 209 ] 210 }, 211 ], # targets 212} 213 214