blob: 4ce148badafd7ffe9a7629e21306d986ef9db596 [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',
tommi@webrtc.org98ad0ff2012-04-10 11:53:07 +000027 '../interface/compile_assert.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000028 '../interface/condition_variable_wrapper.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000029 '../interface/cpu_info.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000030 '../interface/cpu_wrapper.h',
31 '../interface/cpu_features_wrapper.h',
32 '../interface/critical_section_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000033 '../interface/data_log.h',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000034 '../interface/data_log_c.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000035 '../interface/data_log_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000036 '../interface/event_wrapper.h',
37 '../interface/file_wrapper.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000038 '../interface/fix_interlocked_exchange_pointer_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000039 '../interface/list_wrapper.h',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000040 '../interface/logging.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000041 '../interface/map_wrapper.h',
perkj@google.com88a0da82011-09-02 12:51:35 +000042 '../interface/ref_count.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000043 '../interface/rw_lock_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000044 '../interface/scoped_ptr.h',
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +000045 '../interface/scoped_refptr.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000046 '../interface/sleep.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000047 '../interface/sort.h',
andrew@webrtc.org6d609b52011-12-14 02:36:33 +000048 '../interface/static_instance.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000049 '../interface/thread_wrapper.h',
50 '../interface/tick_util.h',
51 '../interface/trace.h',
52 'aligned_malloc.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000053 'atomic32_mac.cc',
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +000054 'atomic32_posix.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000055 'atomic32_win.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000056 'condition_variable.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000057 'condition_variable_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000058 'condition_variable_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000059 'condition_variable_win.cc',
60 'condition_variable_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000061 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000062 'cpu_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000063 'cpu_info.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000064 'cpu_linux.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000065 'cpu_linux.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000066 'cpu_mac.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000067 'cpu_mac.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000068 'cpu_win.cc',
69 'cpu_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000070 'cpu_features.cc',
71 'critical_section.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000072 'critical_section_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000073 'critical_section_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000074 'critical_section_win.cc',
75 'critical_section_win.h',
76 'data_log.cc',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000077 'data_log_c.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000078 'data_log_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000079 'event.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000080 'event_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000081 'event_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000082 'event_win.cc',
83 'event_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000084 'file_impl.cc',
85 'file_impl.h',
86 'list_no_stl.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000087 'logging.cc',
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +000088 'logging_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000089 'map.cc',
90 'rw_lock.cc',
henrike@webrtc.org9f847232012-09-25 20:27:51 +000091 'rw_lock_generic.cc',
92 'rw_lock_generic.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000093 'rw_lock_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000094 'rw_lock_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000095 'rw_lock_win.cc',
96 'rw_lock_win.h',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +000097 'set_thread_name_win.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000098 'sleep.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000099 'sort.cc',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000100 'tick_util.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000101 'thread.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000102 'thread_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000103 'thread_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000104 'thread_win.cc',
105 'thread_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000106 'trace_impl.cc',
107 'trace_impl.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000108 'trace_impl_no_op.cc',
109 'trace_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000110 'trace_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000111 'trace_win.cc',
112 'trace_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000113 ],
114 'conditions': [
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000115 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000116 'sources!': [ 'data_log_no_op.cc', ],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000117 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000118 'sources!': [ 'data_log.cc', ],
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000119 },],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000120 ['enable_tracing==1', {
121 'sources!': [
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000122 'logging_no_op.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000123 'trace_impl_no_op.cc',
124 ],
125 }, {
126 'sources!': [
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000127 'logging.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000128 'trace_impl.cc',
129 'trace_impl.h',
130 'trace_posix.cc',
131 'trace_posix.h',
132 'trace_win.cc',
133 'trace_win.h',
134 ],
135 }],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000136 ['OS=="android"', {
137 'dependencies': [ 'cpu_features_android', ],
138 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000139 ['OS=="linux"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000140 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000141 'libraries': [ '-lrt', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000142 },
143 }],
144 ['OS=="mac"', {
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000145 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000146 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000147 },
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +0000148 'sources!': [
149 'atomic32_posix.cc',
150 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000151 }],
152 ['OS=="win"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000153 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000154 'libraries': [ '-lwinmm.lib', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000155 },
156 }],
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000157 ['build_with_chromium==1', {
158 'sources!': [
159 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000160 'cpu_linux.h',
161 'cpu_mac.h',
162 'cpu_win.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000163 ],
164 }, {
165 'sources!': [
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000166 'cpu_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000167 ],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000168 }],
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000169 ], # 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', '^atomic32_mac\\.'],
178 ['include', '^cpu_mac\\.'],
179 ],
180 'sources!': [
181 'atomic32_posix.cc',
182 ],
183 }],
184 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000185 },
niklase@google.com470e71d2011-07-07 08:21:25 +0000186 ], # targets
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000187 'conditions': [
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000188 ['OS=="android"', {
189 'targets': [
190 {
191 'variables': {
192 # Treat this as third-party code.
193 'chromium_code': 0,
194 },
195 'target_name': 'cpu_features_android',
196 'type': '<(library)',
197 'sources': [
leozwang@webrtc.orgd63cf712012-05-08 21:33:04 +0000198 # TODO(leozwang): Ideally we want to audomatically exclude .c files
199 # as with .cc files, gyp currently only excludes .cc files.
200 'cpu_features_android.c',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000201 ],
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000202 'conditions': [
203 ['build_with_chromium==1', {
204 'dependencies': [
205 '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features',
206 ],
207 }, {
208 'sources': [
209 'android/cpu-features.c',
210 'android/cpu-features.h',
211 ],
212 }],
213 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000214 },
215 ],
216 }],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000217 ['include_tests==1', {
xians@google.com87062562011-08-08 12:08:15 +0000218 'targets': [
219 {
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000220 'target_name': 'system_wrappers_unittests',
xians@google.com87062562011-08-08 12:08:15 +0000221 'type': 'executable',
222 'dependencies': [
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000223 'system_wrappers',
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +0000224 '<(DEPTH)/testing/gtest.gyp:gtest',
225 '<(webrtc_root)/test/test.gyp:test_support_main',
xians@google.com87062562011-08-08 12:08:15 +0000226 ],
227 'sources': [
henrike@webrtc.orgcd9adf72012-09-29 03:49:36 +0000228 'aligned_malloc_unittest.cc',
hta@webrtc.org72e3a892012-06-19 13:49:48 +0000229 'condition_variable_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000230 'cpu_wrapper_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000231 'cpu_measurement_harness.h',
232 'cpu_measurement_harness.cc',
hta@webrtc.org3168e532012-06-20 06:45:56 +0000233 'critical_section_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000234 'list_unittest.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000235 'logging_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000236 'map_unittest.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000237 'data_log_unittest.cc',
238 'data_log_unittest_disabled.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000239 'data_log_helpers_unittest.cc',
240 'data_log_c_helpers_unittest.c',
241 'data_log_c_helpers_unittest.h',
hta@webrtc.orge1919f42012-05-22 15:57:34 +0000242 'thread_unittest.cc',
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000243 'thread_posix_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000244 'trace_unittest.cc',
hta@webrtc.org86a6aac2012-06-18 13:22:08 +0000245 'unittest_utilities_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000246 ],
247 'conditions': [
248 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000249 'sources!': [ 'data_log_unittest_disabled.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000250 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000251 'sources!': [ 'data_log_unittest.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000252 }],
henrike@webrtc.orgfdb1fef2012-10-17 18:03:49 +0000253 ['os_posix==0', {
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000254 'sources!': [ 'thread_posix_unittest.cc', ],
255 }],
xians@google.com87062562011-08-08 12:08:15 +0000256 ],
257 },
258 ], # targets
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000259 }], # include_tests
xians@google.com87062562011-08-08 12:08:15 +0000260 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000261}
262
263# Local Variables:
264# tab-width:2
265# indent-tabs-mode:nil
266# End:
267# vim: set expandtab tabstop=2 shiftwidth=2: