tommi@webrtc.org | e84373c | 2012-04-19 14:28:45 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
andrew@webrtc.org | a3c6d61 | 2011-09-13 17:17:49 +0000 | [diff] [blame] | 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. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 8 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 9 | { |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 10 | 'includes': [ '../../build/common.gypi', ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 11 | 'targets': [ |
| 12 | { |
| 13 | 'target_name': 'system_wrappers', |
wjia@webrtc.org | a3c82bf | 2013-01-18 23:42:21 +0000 | [diff] [blame] | 14 | 'type': 'static_library', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 15 | 'include_dirs': [ |
| 16 | 'spreadsortlib', |
| 17 | '../interface', |
| 18 | ], |
| 19 | 'direct_dependent_settings': { |
| 20 | 'include_dirs': [ |
| 21 | '../interface', |
| 22 | ], |
| 23 | }, |
| 24 | 'sources': [ |
| 25 | '../interface/aligned_malloc.h', |
tommi@webrtc.org | e84373c | 2012-04-19 14:28:45 +0000 | [diff] [blame] | 26 | '../interface/atomic32.h', |
stefan@webrtc.org | 20ed36d | 2013-01-17 14:01:20 +0000 | [diff] [blame] | 27 | '../interface/clock.h', |
tommi@webrtc.org | 98ad0ff | 2012-04-10 11:53:07 +0000 | [diff] [blame] | 28 | '../interface/compile_assert.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 29 | '../interface/condition_variable_wrapper.h', |
henrikg@webrtc.org | c58ef08 | 2011-11-08 08:44:17 +0000 | [diff] [blame] | 30 | '../interface/cpu_info.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 31 | '../interface/cpu_features_wrapper.h', |
| 32 | '../interface/critical_section_wrapper.h', |
stefan@webrtc.org | c9cff24 | 2011-08-29 07:39:02 +0000 | [diff] [blame] | 33 | '../interface/data_log.h', |
henrik.lundin@webrtc.org | d855bd4 | 2011-10-10 08:06:17 +0000 | [diff] [blame] | 34 | '../interface/data_log_c.h', |
stefan@webrtc.org | c9cff24 | 2011-08-29 07:39:02 +0000 | [diff] [blame] | 35 | '../interface/data_log_impl.h', |
hclam@chromium.org | ad7efa6 | 2012-12-11 21:19:08 +0000 | [diff] [blame] | 36 | '../interface/event_tracer.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 37 | '../interface/event_wrapper.h', |
| 38 | '../interface/file_wrapper.h', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 39 | '../interface/fix_interlocked_exchange_pointer_win.h', |
fischman@webrtc.org | 7e4d0df | 2013-10-01 02:40:43 +0000 | [diff] [blame] | 40 | '../interface/logcat_trace_context.h', |
andrew@webrtc.org | 50419b0 | 2012-11-14 19:07:54 +0000 | [diff] [blame] | 41 | '../interface/logging.h', |
perkj@google.com | 88a0da8 | 2011-09-02 12:51:35 +0000 | [diff] [blame] | 42 | '../interface/ref_count.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 43 | '../interface/rw_lock_wrapper.h', |
stefan@webrtc.org | c9cff24 | 2011-08-29 07:39:02 +0000 | [diff] [blame] | 44 | '../interface/scoped_ptr.h', |
andrew@webrtc.org | a3c6d61 | 2011-09-13 17:17:49 +0000 | [diff] [blame] | 45 | '../interface/scoped_refptr.h', |
hta@webrtc.org | 41adcdb | 2012-06-18 11:24:57 +0000 | [diff] [blame] | 46 | '../interface/sleep.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 47 | '../interface/sort.h', |
andrew@webrtc.org | 6d609b5 | 2011-12-14 02:36:33 +0000 | [diff] [blame] | 48 | '../interface/static_instance.h', |
andrew@webrtc.org | 076fc12 | 2013-02-15 03:54:22 +0000 | [diff] [blame] | 49 | '../interface/stringize_macros.h', |
andresp@webrtc.org | 7fb75ec | 2013-12-20 20:20:50 +0000 | [diff] [blame] | 50 | '../interface/thread_annotations.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 51 | '../interface/thread_wrapper.h', |
| 52 | '../interface/tick_util.h', |
| 53 | '../interface/trace.h', |
hclam@chromium.org | ad7efa6 | 2012-12-11 21:19:08 +0000 | [diff] [blame] | 54 | '../interface/trace_event.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 55 | 'aligned_malloc.cc', |
tommi@webrtc.org | e84373c | 2012-04-19 14:28:45 +0000 | [diff] [blame] | 56 | 'atomic32_mac.cc', |
tommi@webrtc.org | 9018c9f | 2012-04-19 15:38:10 +0000 | [diff] [blame] | 57 | 'atomic32_posix.cc', |
tommi@webrtc.org | e84373c | 2012-04-19 14:28:45 +0000 | [diff] [blame] | 58 | 'atomic32_win.cc', |
stefan@webrtc.org | 20ed36d | 2013-01-17 14:01:20 +0000 | [diff] [blame] | 59 | 'clock.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 60 | 'condition_variable.cc', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 61 | 'condition_variable_posix.cc', |
ajm@google.com | b5c49ff | 2011-08-01 17:04:04 +0000 | [diff] [blame] | 62 | 'condition_variable_posix.h', |
henrike@webrtc.org | 686001d | 2013-03-26 14:16:05 +0000 | [diff] [blame] | 63 | 'condition_variable_event_win.cc', |
| 64 | 'condition_variable_event_win.h', |
| 65 | 'condition_variable_native_win.cc', |
| 66 | 'condition_variable_native_win.h', |
henrikg@webrtc.org | c58ef08 | 2011-11-08 08:44:17 +0000 | [diff] [blame] | 67 | 'cpu_info.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 68 | 'cpu_features.cc', |
| 69 | 'critical_section.cc', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 70 | 'critical_section_posix.cc', |
ajm@google.com | b5c49ff | 2011-08-01 17:04:04 +0000 | [diff] [blame] | 71 | 'critical_section_posix.h', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 72 | 'critical_section_win.cc', |
| 73 | 'critical_section_win.h', |
| 74 | 'data_log.cc', |
henrik.lundin@webrtc.org | d855bd4 | 2011-10-10 08:06:17 +0000 | [diff] [blame] | 75 | 'data_log_c.cc', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 76 | 'data_log_no_op.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 77 | 'event.cc', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 78 | 'event_posix.cc', |
ajm@google.com | b5c49ff | 2011-08-01 17:04:04 +0000 | [diff] [blame] | 79 | 'event_posix.h', |
hclam@chromium.org | ad7efa6 | 2012-12-11 21:19:08 +0000 | [diff] [blame] | 80 | 'event_tracer.cc', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 81 | 'event_win.cc', |
| 82 | 'event_win.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 83 | 'file_impl.cc', |
| 84 | 'file_impl.h', |
fischman@webrtc.org | 7e4d0df | 2013-10-01 02:40:43 +0000 | [diff] [blame] | 85 | 'logcat_trace_context.cc', |
andrew@webrtc.org | 50419b0 | 2012-11-14 19:07:54 +0000 | [diff] [blame] | 86 | 'logging.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 87 | 'rw_lock.cc', |
henrike@webrtc.org | 9f84723 | 2012-09-25 20:27:51 +0000 | [diff] [blame] | 88 | 'rw_lock_generic.cc', |
| 89 | 'rw_lock_generic.h', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 90 | 'rw_lock_posix.cc', |
ajm@google.com | b5c49ff | 2011-08-01 17:04:04 +0000 | [diff] [blame] | 91 | 'rw_lock_posix.h', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 92 | 'rw_lock_win.cc', |
| 93 | 'rw_lock_win.h', |
phoglund@webrtc.org | 4cebe6c | 2012-11-07 13:37:19 +0000 | [diff] [blame] | 94 | 'set_thread_name_win.h', |
hta@webrtc.org | 41adcdb | 2012-06-18 11:24:57 +0000 | [diff] [blame] | 95 | 'sleep.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 96 | 'sort.cc', |
phoglund@webrtc.org | 4cebe6c | 2012-11-07 13:37:19 +0000 | [diff] [blame] | 97 | 'tick_util.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 98 | 'thread.cc', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 99 | 'thread_posix.cc', |
ajm@google.com | b5c49ff | 2011-08-01 17:04:04 +0000 | [diff] [blame] | 100 | 'thread_posix.h', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 101 | 'thread_win.cc', |
| 102 | 'thread_win.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 103 | 'trace_impl.cc', |
| 104 | 'trace_impl.h', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 105 | 'trace_posix.cc', |
ajm@google.com | b5c49ff | 2011-08-01 17:04:04 +0000 | [diff] [blame] | 106 | 'trace_posix.h', |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 107 | 'trace_win.cc', |
| 108 | 'trace_win.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 109 | ], |
| 110 | 'conditions': [ |
stefan@webrtc.org | c9cff24 | 2011-08-29 07:39:02 +0000 | [diff] [blame] | 111 | ['enable_data_logging==1', { |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 112 | 'sources!': [ 'data_log_no_op.cc', ], |
andrew@webrtc.org | 50419b0 | 2012-11-14 19:07:54 +0000 | [diff] [blame] | 113 | }, { |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 114 | 'sources!': [ 'data_log.cc', ], |
stefan@webrtc.org | c9cff24 | 2011-08-29 07:39:02 +0000 | [diff] [blame] | 115 | },], |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 116 | ['OS=="android"', { |
sergeyu@chromium.org | 2351663 | 2013-04-30 22:53:51 +0000 | [diff] [blame] | 117 | 'defines': [ |
| 118 | 'WEBRTC_THREAD_RR', |
| 119 | # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC |
| 120 | # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now, |
| 121 | # remove it after I verify that CLOCK_MONOTONIC is fully functional |
| 122 | # with condition and event functions in system_wrappers. |
| 123 | 'WEBRTC_CLOCK_TYPE_REALTIME', |
| 124 | ], |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 125 | 'dependencies': [ 'cpu_features_android', ], |
fischman@webrtc.org | 4e65e07 | 2013-10-03 18:23:13 +0000 | [diff] [blame] | 126 | 'link_settings': { |
| 127 | 'libraries': [ |
| 128 | '-llog', |
| 129 | ], |
| 130 | }, |
fischman@webrtc.org | 7e4d0df | 2013-10-01 02:40:43 +0000 | [diff] [blame] | 131 | }, { # OS!="android" |
| 132 | 'sources!': [ |
| 133 | '../interface/logcat_trace_context.h', |
| 134 | 'logcat_trace_context.cc', |
| 135 | ], |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 136 | }], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 137 | ['OS=="linux"', { |
sergeyu@chromium.org | 2351663 | 2013-04-30 22:53:51 +0000 | [diff] [blame] | 138 | 'defines': [ |
| 139 | 'WEBRTC_THREAD_RR', |
| 140 | # TODO(andrew): can we select this automatically? |
| 141 | # Define this if the Linux system does not support CLOCK_MONOTONIC. |
| 142 | #'WEBRTC_CLOCK_TYPE_REALTIME', |
| 143 | ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 144 | 'link_settings': { |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 145 | 'libraries': [ '-lrt', ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 146 | }, |
| 147 | }], |
| 148 | ['OS=="mac"', { |
zakkhoyt@google.com | 59af6f1 | 2011-08-25 20:30:25 +0000 | [diff] [blame] | 149 | 'link_settings': { |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 150 | 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ], |
zakkhoyt@google.com | 59af6f1 | 2011-08-25 20:30:25 +0000 | [diff] [blame] | 151 | }, |
tommi@webrtc.org | 9018c9f | 2012-04-19 15:38:10 +0000 | [diff] [blame] | 152 | 'sources!': [ |
| 153 | 'atomic32_posix.cc', |
| 154 | ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 155 | }], |
sergeyu@chromium.org | 2351663 | 2013-04-30 22:53:51 +0000 | [diff] [blame] | 156 | ['OS=="ios" or OS=="mac"', { |
| 157 | 'defines': [ |
| 158 | 'WEBRTC_THREAD_RR', |
| 159 | 'WEBRTC_CLOCK_TYPE_REALTIME', |
| 160 | ], |
| 161 | }], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 162 | ['OS=="win"', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 163 | 'link_settings': { |
andrew@webrtc.org | 59ccd5c | 2011-12-15 00:17:43 +0000 | [diff] [blame] | 164 | 'libraries': [ '-lwinmm.lib', ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 165 | }, |
| 166 | }], |
sjlee@webrtc.org | 4b42508 | 2012-09-10 17:58:21 +0000 | [diff] [blame] | 167 | ], # conditions |
| 168 | 'target_conditions': [ |
| 169 | # We need to do this in a target_conditions block to override the |
| 170 | # filename_rules filters. |
| 171 | ['OS=="ios"', { |
| 172 | # Pull in specific Mac files for iOS (which have been filtered out |
| 173 | # by file name rules). |
| 174 | 'sources/': [ |
| 175 | ['include', '^atomic32_mac\\.'], |
sjlee@webrtc.org | 4b42508 | 2012-09-10 17:58:21 +0000 | [diff] [blame] | 176 | ], |
| 177 | 'sources!': [ |
| 178 | 'atomic32_posix.cc', |
| 179 | ], |
| 180 | }], |
| 181 | ], |
kjellander@webrtc.org | fa53d87 | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 182 | # Disable warnings to enable Win64 build, issue 1323. |
| 183 | 'msvs_disabled_warnings': [ |
| 184 | 4267, # size_t to int truncation. |
| 185 | 4334, # Ignore warning on shift operator promotion. |
| 186 | ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 187 | }, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 188 | ], # targets |
kjellander@webrtc.org | 177bb52 | 2011-10-31 17:10:01 +0000 | [diff] [blame] | 189 | 'conditions': [ |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 190 | ['OS=="android"', { |
| 191 | 'targets': [ |
| 192 | { |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 193 | 'target_name': 'cpu_features_android', |
wjia@webrtc.org | a3c82bf | 2013-01-18 23:42:21 +0000 | [diff] [blame] | 194 | 'type': 'static_library', |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 195 | 'sources': [ |
leozwang@webrtc.org | d63cf71 | 2012-05-08 21:33:04 +0000 | [diff] [blame] | 196 | 'cpu_features_android.c', |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 197 | ], |
wjia@webrtc.org | 815653b | 2012-11-19 04:04:10 +0000 | [diff] [blame] | 198 | 'conditions': [ |
michaelbai@google.com | f928f5c | 2014-02-05 18:43:46 +0000 | [diff] [blame^] | 199 | ['android_webview_build == 1', { |
| 200 | 'libraries': [ |
| 201 | 'cpufeatures.a' |
wjia@webrtc.org | 815653b | 2012-11-19 04:04:10 +0000 | [diff] [blame] | 202 | ], |
| 203 | }, { |
michaelbai@google.com | f928f5c | 2014-02-05 18:43:46 +0000 | [diff] [blame^] | 204 | 'dependencies': [ |
| 205 | '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features', |
wjia@webrtc.org | 815653b | 2012-11-19 04:04:10 +0000 | [diff] [blame] | 206 | ], |
| 207 | }], |
| 208 | ], |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 +0000 | [diff] [blame] | 209 | }, |
| 210 | ], |
| 211 | }], |
xians@google.com | 8706256 | 2011-08-08 12:08:15 +0000 | [diff] [blame] | 212 | ], # conditions |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 213 | } |
| 214 | |