blob: c931b177a0a695807f10c7cd96fe330884075f48 [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 ],
19 'direct_dependent_settings': {
20 'include_dirs': [
21 '../interface',
22 ],
23 },
24 'sources': [
25 '../interface/aligned_malloc.h',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000026 '../interface/atomic32.h',
stefan@webrtc.org20ed36d2013-01-17 14:01:20 +000027 '../interface/clock.h',
tommi@webrtc.org98ad0ff2012-04-10 11:53:07 +000028 '../interface/compile_assert.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000029 '../interface/condition_variable_wrapper.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000030 '../interface/cpu_info.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000031 '../interface/cpu_wrapper.h',
32 '../interface/cpu_features_wrapper.h',
33 '../interface/critical_section_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000034 '../interface/data_log.h',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000035 '../interface/data_log_c.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000036 '../interface/data_log_impl.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000037 '../interface/event_tracer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000038 '../interface/event_wrapper.h',
39 '../interface/file_wrapper.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000040 '../interface/fix_interlocked_exchange_pointer_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000041 '../interface/list_wrapper.h',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000042 '../interface/logging.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000043 '../interface/map_wrapper.h',
perkj@google.com88a0da82011-09-02 12:51:35 +000044 '../interface/ref_count.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000045 '../interface/rw_lock_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000046 '../interface/scoped_ptr.h',
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +000047 '../interface/scoped_refptr.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000048 '../interface/sleep.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000049 '../interface/sort.h',
andrew@webrtc.org6d609b52011-12-14 02:36:33 +000050 '../interface/static_instance.h',
andrew@webrtc.org076fc122013-02-15 03:54:22 +000051 '../interface/stringize_macros.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000052 '../interface/thread_wrapper.h',
53 '../interface/tick_util.h',
54 '../interface/trace.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000055 '../interface/trace_event.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000056 'aligned_malloc.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000057 'atomic32_mac.cc',
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +000058 'atomic32_posix.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000059 'atomic32_win.cc',
stefan@webrtc.org20ed36d2013-01-17 14:01:20 +000060 'clock.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000061 'condition_variable.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000062 'condition_variable_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000063 'condition_variable_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000064 'condition_variable_win.cc',
65 'condition_variable_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000066 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000067 'cpu_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000068 'cpu_info.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000069 'cpu_linux.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000070 'cpu_linux.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000071 'cpu_mac.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000072 'cpu_mac.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000073 'cpu_win.cc',
74 'cpu_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000075 'cpu_features.cc',
76 'critical_section.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000077 'critical_section_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000078 'critical_section_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000079 'critical_section_win.cc',
80 'critical_section_win.h',
81 'data_log.cc',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000082 'data_log_c.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000083 'data_log_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000084 'event.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000085 'event_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000086 'event_posix.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000087 'event_tracer.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000088 'event_win.cc',
89 'event_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000090 'file_impl.cc',
91 'file_impl.h',
92 'list_no_stl.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000093 'logging.cc',
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +000094 'logging_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000095 'map.cc',
96 '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',
niklase@google.com470e71d2011-07-07 08:21:25 +0000112 'trace_impl.cc',
113 'trace_impl.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000114 'trace_impl_no_op.cc',
115 '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 },],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000126 ['enable_tracing==1', {
127 'sources!': [
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000128 'logging_no_op.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000129 'trace_impl_no_op.cc',
130 ],
131 }, {
132 'sources!': [
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000133 'logging.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000134 'trace_impl.cc',
135 'trace_impl.h',
136 'trace_posix.cc',
137 'trace_posix.h',
138 'trace_win.cc',
139 'trace_win.h',
140 ],
141 }],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000142 ['OS=="android"', {
143 'dependencies': [ 'cpu_features_android', ],
144 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000145 ['OS=="linux"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000146 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000147 'libraries': [ '-lrt', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000148 },
149 }],
150 ['OS=="mac"', {
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000151 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000152 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000153 },
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +0000154 'sources!': [
155 'atomic32_posix.cc',
156 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000157 }],
158 ['OS=="win"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000159 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000160 'libraries': [ '-lwinmm.lib', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000161 },
162 }],
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000163 ['build_with_chromium==1', {
164 'sources!': [
165 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000166 'cpu_linux.h',
167 'cpu_mac.h',
168 'cpu_win.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000169 ],
170 }, {
171 'sources!': [
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000172 'cpu_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000173 ],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000174 }],
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000175 ], # conditions
176 'target_conditions': [
177 # We need to do this in a target_conditions block to override the
178 # filename_rules filters.
179 ['OS=="ios"', {
180 # Pull in specific Mac files for iOS (which have been filtered out
181 # by file name rules).
182 'sources/': [
183 ['include', '^atomic32_mac\\.'],
184 ['include', '^cpu_mac\\.'],
185 ],
186 'sources!': [
187 'atomic32_posix.cc',
188 ],
189 }],
190 ],
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000191 # Disable warnings to enable Win64 build, issue 1323.
192 'msvs_disabled_warnings': [
193 4267, # size_t to int truncation.
194 4334, # Ignore warning on shift operator promotion.
195 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000196 },
niklase@google.com470e71d2011-07-07 08:21:25 +0000197 ], # targets
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000198 'conditions': [
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000199 ['OS=="android"', {
200 'targets': [
201 {
202 'variables': {
203 # Treat this as third-party code.
204 'chromium_code': 0,
205 },
206 'target_name': 'cpu_features_android',
wjia@webrtc.orga3c82bf2013-01-18 23:42:21 +0000207 'type': 'static_library',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000208 'sources': [
leozwang@webrtc.orgd63cf712012-05-08 21:33:04 +0000209 # TODO(leozwang): Ideally we want to audomatically exclude .c files
210 # as with .cc files, gyp currently only excludes .cc files.
211 'cpu_features_android.c',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000212 ],
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000213 'conditions': [
214 ['build_with_chromium==1', {
wjia@webrtc.orgdf943292012-12-05 22:54:52 +0000215 'conditions': [
wjia@webrtc.org95a8ddd2013-03-18 21:41:04 +0000216 ['android_webview_build == 1', {
wjia@webrtc.orgdf943292012-12-05 22:54:52 +0000217 'libraries': [
218 'cpufeatures.a'
219 ],
220 }, {
221 'dependencies': [
222 '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features',
223 ],
224 }],
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000225 ],
226 }, {
227 'sources': [
228 'android/cpu-features.c',
229 'android/cpu-features.h',
230 ],
231 }],
232 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000233 },
234 ],
235 }],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000236 ['include_tests==1', {
xians@google.com87062562011-08-08 12:08:15 +0000237 'targets': [
238 {
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000239 'target_name': 'system_wrappers_unittests',
xians@google.com87062562011-08-08 12:08:15 +0000240 'type': 'executable',
241 'dependencies': [
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000242 'system_wrappers',
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +0000243 '<(DEPTH)/testing/gtest.gyp:gtest',
244 '<(webrtc_root)/test/test.gyp:test_support_main',
xians@google.com87062562011-08-08 12:08:15 +0000245 ],
246 'sources': [
henrike@webrtc.orgcd9adf72012-09-29 03:49:36 +0000247 'aligned_malloc_unittest.cc',
hta@webrtc.org72e3a892012-06-19 13:49:48 +0000248 'condition_variable_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000249 'cpu_wrapper_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000250 'cpu_measurement_harness.h',
251 'cpu_measurement_harness.cc',
hta@webrtc.org3168e532012-06-20 06:45:56 +0000252 'critical_section_unittest.cc',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +0000253 'event_tracer_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000254 'list_unittest.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000255 'logging_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000256 'map_unittest.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000257 'data_log_unittest.cc',
258 'data_log_unittest_disabled.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000259 'data_log_helpers_unittest.cc',
260 'data_log_c_helpers_unittest.c',
261 'data_log_c_helpers_unittest.h',
andrew@webrtc.org076fc122013-02-15 03:54:22 +0000262 'stringize_macros_unittest.cc',
hta@webrtc.orge1919f42012-05-22 15:57:34 +0000263 'thread_unittest.cc',
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000264 'thread_posix_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000265 'trace_unittest.cc',
hta@webrtc.org86a6aac2012-06-18 13:22:08 +0000266 'unittest_utilities_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000267 ],
268 'conditions': [
269 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000270 'sources!': [ 'data_log_unittest_disabled.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000271 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000272 'sources!': [ 'data_log_unittest.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000273 }],
henrike@webrtc.orgfdb1fef2012-10-17 18:03:49 +0000274 ['os_posix==0', {
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000275 'sources!': [ 'thread_posix_unittest.cc', ],
276 }],
xians@google.com87062562011-08-08 12:08:15 +0000277 ],
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000278 # Disable warnings to enable Win64 build, issue 1323.
279 'msvs_disabled_warnings': [
280 4267, # size_t to int truncation.
281 ],
xians@google.com87062562011-08-08 12:08:15 +0000282 },
283 ], # targets
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000284 }], # include_tests
xians@google.com87062562011-08-08 12:08:15 +0000285 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000286}
287
288# Local Variables:
289# tab-width:2
290# indent-tabs-mode:nil
291# End:
292# vim: set expandtab tabstop=2 shiftwidth=2: