blob: 1d4d764353e53b21957f46ffac4934ba86081bdd [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',
14 'type': '<(library)',
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.orge84373c2012-04-19 14:28:45 +000026 '../interface/atomic32.h',
hclam@chromium.org81cffd12012-12-05 22:51:01 +000027 '../interface/atomicops.h',
28 '../interface/atomicops_internals_atomicword_compat.h',
29 '../interface/atomicops_internals_gcc.h',
30 '../interface/atomicops_internals_mac.h',
31 '../interface/atomicops_internals_mips_gcc.h',
32 '../interface/atomicops_internals_x86_gcc.h',
33 '../interface/atomicops_internals_x86_msvc.h',
tommi@webrtc.org98ad0ff2012-04-10 11:53:07 +000034 '../interface/compile_assert.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000035 '../interface/condition_variable_wrapper.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000036 '../interface/cpu_info.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000037 '../interface/cpu_wrapper.h',
38 '../interface/cpu_features_wrapper.h',
39 '../interface/critical_section_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000040 '../interface/data_log.h',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000041 '../interface/data_log_c.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000042 '../interface/data_log_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000043 '../interface/event_wrapper.h',
44 '../interface/file_wrapper.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000045 '../interface/fix_interlocked_exchange_pointer_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000046 '../interface/list_wrapper.h',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000047 '../interface/logging.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000048 '../interface/map_wrapper.h',
perkj@google.com88a0da82011-09-02 12:51:35 +000049 '../interface/ref_count.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000050 '../interface/rw_lock_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000051 '../interface/scoped_ptr.h',
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +000052 '../interface/scoped_refptr.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000053 '../interface/sleep.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000054 '../interface/sort.h',
andrew@webrtc.org6d609b52011-12-14 02:36:33 +000055 '../interface/static_instance.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000056 '../interface/thread_wrapper.h',
57 '../interface/tick_util.h',
58 '../interface/trace.h',
59 'aligned_malloc.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000060 'atomic32_mac.cc',
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +000061 'atomic32_posix.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000062 'atomic32_win.cc',
hclam@chromium.org81cffd12012-12-05 22:51:01 +000063 'atomicops_internals_x86_gcc.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000064 'condition_variable.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000065 'condition_variable_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000066 'condition_variable_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000067 'condition_variable_win.cc',
68 'condition_variable_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000069 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000070 'cpu_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000071 'cpu_info.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000072 'cpu_linux.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000073 'cpu_linux.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000074 'cpu_mac.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000075 'cpu_mac.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000076 'cpu_win.cc',
77 'cpu_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000078 'cpu_features.cc',
79 'critical_section.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000080 'critical_section_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000081 'critical_section_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000082 'critical_section_win.cc',
83 'critical_section_win.h',
84 'data_log.cc',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000085 'data_log_c.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000086 'data_log_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000087 'event.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000088 'event_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000089 'event_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000090 'event_win.cc',
91 'event_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000092 'file_impl.cc',
93 'file_impl.h',
94 'list_no_stl.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000095 'logging.cc',
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +000096 'logging_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000097 'map.cc',
98 'rw_lock.cc',
henrike@webrtc.org9f847232012-09-25 20:27:51 +000099 'rw_lock_generic.cc',
100 'rw_lock_generic.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000101 'rw_lock_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000102 'rw_lock_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000103 'rw_lock_win.cc',
104 'rw_lock_win.h',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000105 'set_thread_name_win.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +0000106 'sleep.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000107 'sort.cc',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000108 'tick_util.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000109 'thread.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000110 'thread_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000111 'thread_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000112 'thread_win.cc',
113 'thread_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000114 'trace_impl.cc',
115 'trace_impl.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000116 'trace_impl_no_op.cc',
117 'trace_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000118 'trace_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000119 'trace_win.cc',
120 'trace_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000121 ],
122 'conditions': [
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000123 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000124 'sources!': [ 'data_log_no_op.cc', ],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000125 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000126 'sources!': [ 'data_log.cc', ],
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000127 },],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000128 ['enable_tracing==1', {
129 'sources!': [
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000130 'logging_no_op.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000131 'trace_impl_no_op.cc',
132 ],
133 }, {
134 'sources!': [
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000135 'logging.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000136 'trace_impl.cc',
137 'trace_impl.h',
138 'trace_posix.cc',
139 'trace_posix.h',
140 'trace_win.cc',
141 'trace_win.h',
142 ],
143 }],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000144 ['OS=="android"', {
145 'dependencies': [ 'cpu_features_android', ],
146 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000147 ['OS=="linux"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000148 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000149 'libraries': [ '-lrt', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000150 },
151 }],
152 ['OS=="mac"', {
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000153 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000154 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000155 },
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +0000156 'sources!': [
157 'atomic32_posix.cc',
158 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000159 }],
160 ['OS=="win"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000161 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000162 'libraries': [ '-lwinmm.lib', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000163 },
164 }],
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000165 ['build_with_chromium==1', {
166 'sources!': [
167 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000168 'cpu_linux.h',
169 'cpu_mac.h',
170 'cpu_win.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000171 ],
172 }, {
173 'sources!': [
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000174 'cpu_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000175 ],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000176 }],
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\\.'],
186 ['include', '^cpu_mac\\.'],
187 ],
188 'sources!': [
189 'atomic32_posix.cc',
190 ],
191 }],
192 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000193 },
niklase@google.com470e71d2011-07-07 08:21:25 +0000194 ], # targets
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000195 'conditions': [
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000196 ['OS=="android"', {
197 'targets': [
198 {
199 'variables': {
200 # Treat this as third-party code.
201 'chromium_code': 0,
202 },
203 'target_name': 'cpu_features_android',
204 'type': '<(library)',
205 'sources': [
leozwang@webrtc.orgd63cf712012-05-08 21:33:04 +0000206 # TODO(leozwang): Ideally we want to audomatically exclude .c files
207 # as with .cc files, gyp currently only excludes .cc files.
208 'cpu_features_android.c',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000209 ],
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000210 'conditions': [
211 ['build_with_chromium==1', {
wjia@webrtc.orgdf943292012-12-05 22:54:52 +0000212 'conditions': [
213 ['android_build_type != 0', {
214 'libraries': [
215 'cpufeatures.a'
216 ],
217 }, {
218 'dependencies': [
219 '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features',
220 ],
221 }],
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000222 ],
223 }, {
224 'sources': [
225 'android/cpu-features.c',
226 'android/cpu-features.h',
227 ],
228 }],
229 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000230 },
231 ],
232 }],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000233 ['include_tests==1', {
xians@google.com87062562011-08-08 12:08:15 +0000234 'targets': [
235 {
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000236 'target_name': 'system_wrappers_unittests',
xians@google.com87062562011-08-08 12:08:15 +0000237 'type': 'executable',
238 'dependencies': [
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000239 'system_wrappers',
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +0000240 '<(DEPTH)/testing/gtest.gyp:gtest',
241 '<(webrtc_root)/test/test.gyp:test_support_main',
xians@google.com87062562011-08-08 12:08:15 +0000242 ],
243 'sources': [
henrike@webrtc.orgcd9adf72012-09-29 03:49:36 +0000244 'aligned_malloc_unittest.cc',
hclam@chromium.org81cffd12012-12-05 22:51:01 +0000245 'atomicops_unittest.cc',
hta@webrtc.org72e3a892012-06-19 13:49:48 +0000246 'condition_variable_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000247 'cpu_wrapper_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000248 'cpu_measurement_harness.h',
249 'cpu_measurement_harness.cc',
hta@webrtc.org3168e532012-06-20 06:45:56 +0000250 'critical_section_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000251 'list_unittest.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000252 'logging_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000253 'map_unittest.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000254 'data_log_unittest.cc',
255 'data_log_unittest_disabled.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000256 'data_log_helpers_unittest.cc',
257 'data_log_c_helpers_unittest.c',
258 'data_log_c_helpers_unittest.h',
hta@webrtc.orge1919f42012-05-22 15:57:34 +0000259 'thread_unittest.cc',
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000260 'thread_posix_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000261 'trace_unittest.cc',
hta@webrtc.org86a6aac2012-06-18 13:22:08 +0000262 'unittest_utilities_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000263 ],
264 'conditions': [
265 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000266 'sources!': [ 'data_log_unittest_disabled.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000267 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000268 'sources!': [ 'data_log_unittest.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000269 }],
henrike@webrtc.orgfdb1fef2012-10-17 18:03:49 +0000270 ['os_posix==0', {
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000271 'sources!': [ 'thread_posix_unittest.cc', ],
272 }],
xians@google.com87062562011-08-08 12:08:15 +0000273 ],
274 },
275 ], # targets
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000276 }], # include_tests
xians@google.com87062562011-08-08 12:08:15 +0000277 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000278}
279
280# Local Variables:
281# tab-width:2
282# indent-tabs-mode:nil
283# End:
284# vim: set expandtab tabstop=2 shiftwidth=2: