blob: dba963ce8a617a9abd4239f91e75f1d33cdf3c36 [file] [log] [blame]
tommi@webrtc.orge84373c2012-04-19 14:28:45 +00001# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +00002#
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.com470e71d2011-07-07 08:21:25 +00008
niklase@google.com470e71d2011-07-07 08:21:25 +00009{
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000010 'includes': [ '../../build/common.gypi', ],
niklase@google.com470e71d2011-07-07 08:21:25 +000011 'targets': [
12 {
13 'target_name': 'system_wrappers',
wjia@webrtc.orga3c82bf2013-01-18 23:42:21 +000014 'type': 'static_library',
niklase@google.com470e71d2011-07-07 08:21:25 +000015 'include_dirs': [
16 'spreadsortlib',
17 '../interface',
18 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000019 'dependencies': [
20 '../../base/base.gyp:webrtc_base',
21 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000022 'direct_dependent_settings': {
23 'include_dirs': [
24 '../interface',
25 ],
26 },
27 'sources': [
28 '../interface/aligned_malloc.h',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000029 '../interface/atomic32.h',
stefan@webrtc.org20ed36d2013-01-17 14:01:20 +000030 '../interface/clock.h',
tommi@webrtc.org98ad0ff2012-04-10 11:53:07 +000031 '../interface/compile_assert.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000032 '../interface/condition_variable_wrapper.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000033 '../interface/cpu_info.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000034 '../interface/cpu_features_wrapper.h',
35 '../interface/critical_section_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000036 '../interface/data_log.h',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000037 '../interface/data_log_c.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000038 '../interface/data_log_impl.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000039 '../interface/event_tracer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000040 '../interface/event_wrapper.h',
41 '../interface/file_wrapper.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000042 '../interface/fix_interlocked_exchange_pointer_win.h',
fischman@webrtc.org7e4d0df2013-10-01 02:40:43 +000043 '../interface/logcat_trace_context.h',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000044 '../interface/logging.h',
perkj@google.com88a0da82011-09-02 12:51:35 +000045 '../interface/ref_count.h',
wu@webrtc.org66773a02014-05-07 17:09:44 +000046 '../interface/rtp_to_ntp.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000047 '../interface/rw_lock_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000048 '../interface/scoped_ptr.h',
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +000049 '../interface/scoped_refptr.h',
andrew@webrtc.org0daa8be2014-04-18 21:20:54 +000050 '../interface/scoped_vector.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000051 '../interface/sleep.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000052 '../interface/sort.h',
andrew@webrtc.org6d609b52011-12-14 02:36:33 +000053 '../interface/static_instance.h',
andrew@webrtc.org0daa8be2014-04-18 21:20:54 +000054 '../interface/stl_util.h',
andrew@webrtc.org076fc122013-02-15 03:54:22 +000055 '../interface/stringize_macros.h',
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +000056 '../interface/thread_annotations.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000057 '../interface/thread_wrapper.h',
58 '../interface/tick_util.h',
wu@webrtc.org66773a02014-05-07 17:09:44 +000059 '../interface/timestamp_extrapolator.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000060 '../interface/trace.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000061 '../interface/trace_event.h',
kjellander@webrtc.org7de47bc2014-04-16 08:04:26 +000062 '../interface/utf_util_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000063 'aligned_malloc.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000064 'atomic32_mac.cc',
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +000065 'atomic32_posix.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000066 'atomic32_win.cc',
stefan@webrtc.org20ed36d2013-01-17 14:01:20 +000067 'clock.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000068 'condition_variable.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000069 'condition_variable_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000070 'condition_variable_posix.h',
henrike@webrtc.org686001d2013-03-26 14:16:05 +000071 'condition_variable_event_win.cc',
72 'condition_variable_event_win.h',
73 'condition_variable_native_win.cc',
74 'condition_variable_native_win.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000075 'cpu_info.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000076 'cpu_features.cc',
77 'critical_section.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000078 'critical_section_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000079 'critical_section_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000080 'critical_section_win.cc',
81 'critical_section_win.h',
82 'data_log.cc',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000083 'data_log_c.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000084 'data_log_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000085 'event.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000086 'event_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000087 'event_posix.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000088 'event_tracer.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000089 'event_win.cc',
90 'event_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000091 'file_impl.cc',
92 'file_impl.h',
fischman@webrtc.org7e4d0df2013-10-01 02:40:43 +000093 'logcat_trace_context.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000094 'logging.cc',
wu@webrtc.org66773a02014-05-07 17:09:44 +000095 'rtp_to_ntp.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000096 'rw_lock.cc',
henrike@webrtc.org9f847232012-09-25 20:27:51 +000097 'rw_lock_generic.cc',
98 'rw_lock_generic.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000099 'rw_lock_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000100 'rw_lock_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000101 'rw_lock_win.cc',
102 'rw_lock_win.h',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000103 'set_thread_name_win.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +0000104 'sleep.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000105 'sort.cc',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000106 'tick_util.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000107 'thread.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000108 'thread_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000109 'thread_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000110 'thread_win.cc',
111 'thread_win.h',
wu@webrtc.org66773a02014-05-07 17:09:44 +0000112 'timestamp_extrapolator.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000113 'trace_impl.cc',
114 'trace_impl.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000115 'trace_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000116 'trace_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000117 'trace_win.cc',
118 'trace_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000119 ],
120 'conditions': [
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000121 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000122 'sources!': [ 'data_log_no_op.cc', ],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000123 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000124 'sources!': [ 'data_log.cc', ],
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000125 },],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000126 ['OS=="android"', {
sergeyu@chromium.org23516632013-04-30 22:53:51 +0000127 'defines': [
128 'WEBRTC_THREAD_RR',
129 # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
130 # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
131 # remove it after I verify that CLOCK_MONOTONIC is fully functional
132 # with condition and event functions in system_wrappers.
133 'WEBRTC_CLOCK_TYPE_REALTIME',
134 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000135 'dependencies': [ 'cpu_features_android', ],
fischman@webrtc.org4e65e072013-10-03 18:23:13 +0000136 'link_settings': {
137 'libraries': [
138 '-llog',
139 ],
140 },
fischman@webrtc.org7e4d0df2013-10-01 02:40:43 +0000141 }, { # OS!="android"
142 'sources!': [
143 '../interface/logcat_trace_context.h',
144 'logcat_trace_context.cc',
145 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000146 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000147 ['OS=="linux"', {
sergeyu@chromium.org23516632013-04-30 22:53:51 +0000148 'defines': [
149 'WEBRTC_THREAD_RR',
150 # TODO(andrew): can we select this automatically?
151 # Define this if the Linux system does not support CLOCK_MONOTONIC.
152 #'WEBRTC_CLOCK_TYPE_REALTIME',
153 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000154 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000155 'libraries': [ '-lrt', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000156 },
157 }],
158 ['OS=="mac"', {
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000159 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000160 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000161 },
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +0000162 'sources!': [
163 'atomic32_posix.cc',
164 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000165 }],
sergeyu@chromium.org23516632013-04-30 22:53:51 +0000166 ['OS=="ios" or OS=="mac"', {
167 'defines': [
168 'WEBRTC_THREAD_RR',
169 'WEBRTC_CLOCK_TYPE_REALTIME',
170 ],
171 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000172 ['OS=="win"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000173 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000174 'libraries': [ '-lwinmm.lib', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000175 },
176 }],
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000177 ], # conditions
178 'target_conditions': [
179 # We need to do this in a target_conditions block to override the
180 # filename_rules filters.
181 ['OS=="ios"', {
182 # Pull in specific Mac files for iOS (which have been filtered out
183 # by file name rules).
184 'sources/': [
185 ['include', '^atomic32_mac\\.'],
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000186 ],
187 'sources!': [
188 'atomic32_posix.cc',
189 ],
190 }],
191 ],
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000192 # Disable warnings to enable Win64 build, issue 1323.
193 'msvs_disabled_warnings': [
194 4267, # size_t to int truncation.
195 4334, # Ignore warning on shift operator promotion.
196 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000197 },
niklase@google.com470e71d2011-07-07 08:21:25 +0000198 ], # targets
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000199 'conditions': [
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000200 ['OS=="android"', {
201 'targets': [
202 {
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000203 'target_name': 'cpu_features_android',
wjia@webrtc.orga3c82bf2013-01-18 23:42:21 +0000204 'type': 'static_library',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000205 'sources': [
leozwang@webrtc.orgd63cf712012-05-08 21:33:04 +0000206 'cpu_features_android.c',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000207 ],
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000208 'conditions': [
michaelbai@google.comf928f5c2014-02-05 18:43:46 +0000209 ['android_webview_build == 1', {
210 'libraries': [
211 'cpufeatures.a'
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000212 ],
213 }, {
michaelbai@google.comf928f5c2014-02-05 18:43:46 +0000214 'dependencies': [
215 '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features',
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000216 ],
217 }],
218 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000219 },
220 ],
221 }],
xians@google.com87062562011-08-08 12:08:15 +0000222 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000223}
224