blob: 7a3cd209057a0b51178070e5a0f732069a8270a9 [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',
40 '../interface/map_wrapper.h',
perkj@google.com88a0da82011-09-02 12:51:35 +000041 '../interface/ref_count.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000042 '../interface/rw_lock_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000043 '../interface/scoped_ptr.h',
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +000044 '../interface/scoped_refptr.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000045 '../interface/sleep.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000046 '../interface/sort.h',
andrew@webrtc.org6d609b52011-12-14 02:36:33 +000047 '../interface/static_instance.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000048 '../interface/thread_wrapper.h',
49 '../interface/tick_util.h',
50 '../interface/trace.h',
51 'aligned_malloc.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000052 'atomic32_mac.cc',
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +000053 'atomic32_posix.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000054 'atomic32_win.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000055 'condition_variable.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000056 'condition_variable_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000057 'condition_variable_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000058 'condition_variable_win.cc',
59 'condition_variable_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000060 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000061 'cpu_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000062 'cpu_info.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000063 'cpu_linux.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000064 'cpu_linux.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000065 'cpu_mac.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000066 'cpu_mac.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000067 'cpu_win.cc',
68 'cpu_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000069 'cpu_features.cc',
70 'critical_section.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000071 'critical_section_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000072 'critical_section_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000073 'critical_section_win.cc',
74 'critical_section_win.h',
75 'data_log.cc',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000076 'data_log_c.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000077 'data_log_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000078 'event.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000079 'event_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000080 'event_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000081 'event_win.cc',
82 'event_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000083 'file_impl.cc',
84 'file_impl.h',
85 'list_no_stl.cc',
86 'map.cc',
87 'rw_lock.cc',
henrike@webrtc.org9f847232012-09-25 20:27:51 +000088 'rw_lock_generic.cc',
89 'rw_lock_generic.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000090 'rw_lock_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000091 'rw_lock_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000092 'rw_lock_win.cc',
93 'rw_lock_win.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000094 'sleep.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000095 'sort.cc',
96 'thread.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000097 'thread_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000098 'thread_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000099 'thread_win.cc',
100 'thread_win.h',
101 'set_thread_name_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000102 'trace_impl.cc',
103 'trace_impl.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000104 'trace_impl_no_op.cc',
105 'trace_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000106 'trace_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000107 'trace_win.cc',
108 'trace_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000109 ],
110 'conditions': [
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000111 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000112 'sources!': [ 'data_log_no_op.cc', ],
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000113 },{
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000114 'sources!': [ 'data_log.cc', ],
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000115 },],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000116 ['OS=="android"', {
117 'dependencies': [ 'cpu_features_android', ],
118 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000119 ['OS=="linux"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000120 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000121 'libraries': [ '-lrt', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000122 },
123 }],
124 ['OS=="mac"', {
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000125 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000126 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000127 },
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +0000128 'sources!': [
129 'atomic32_posix.cc',
130 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000131 }],
132 ['OS=="win"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000133 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000134 'libraries': [ '-lwinmm.lib', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000135 },
136 }],
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000137 ['build_with_chromium==1', {
138 'sources!': [
139 'cpu.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000140 'cpu_linux.h',
141 'cpu_mac.h',
142 'cpu_win.h',
henrike@webrtc.org2f47b5a2011-12-10 00:44:47 +0000143 'trace_impl.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000144 'trace_impl.h',
wjia@webrtc.orgc28e7982011-12-13 02:16:11 +0000145 'trace_posix.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000146 'trace_posix.h',
147 'trace_win.cc',
148 'trace_win.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000149 ],
150 }, {
151 'sources!': [
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000152 'cpu_no_op.cc',
henrike@webrtc.org2f47b5a2011-12-10 00:44:47 +0000153 'trace_impl_no_op.cc',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +0000154 ],
155 }]
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000156 ], # conditions
157 'target_conditions': [
158 # We need to do this in a target_conditions block to override the
159 # filename_rules filters.
160 ['OS=="ios"', {
161 # Pull in specific Mac files for iOS (which have been filtered out
162 # by file name rules).
163 'sources/': [
164 ['include', '^atomic32_mac\\.'],
165 ['include', '^cpu_mac\\.'],
166 ],
167 'sources!': [
168 'atomic32_posix.cc',
169 ],
170 }],
171 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000172 },
niklase@google.com470e71d2011-07-07 08:21:25 +0000173 ], # targets
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000174 'conditions': [
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000175 ['OS=="android"', {
176 'targets': [
177 {
178 'variables': {
179 # Treat this as third-party code.
180 'chromium_code': 0,
181 },
182 'target_name': 'cpu_features_android',
183 'type': '<(library)',
184 'sources': [
185 'android/cpu-features.c',
186 'android/cpu-features.h',
leozwang@webrtc.orgd63cf712012-05-08 21:33:04 +0000187 # TODO(leozwang): Ideally we want to audomatically exclude .c files
188 # as with .cc files, gyp currently only excludes .cc files.
189 'cpu_features_android.c',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000190 ],
191 },
192 ],
193 }],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000194 ['include_tests==1', {
xians@google.com87062562011-08-08 12:08:15 +0000195 'targets': [
196 {
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000197 'target_name': 'system_wrappers_unittests',
xians@google.com87062562011-08-08 12:08:15 +0000198 'type': 'executable',
199 'dependencies': [
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000200 'system_wrappers',
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +0000201 '<(DEPTH)/testing/gtest.gyp:gtest',
202 '<(webrtc_root)/test/test.gyp:test_support_main',
xians@google.com87062562011-08-08 12:08:15 +0000203 ],
204 'sources': [
henrike@webrtc.orgcd9adf72012-09-29 03:49:36 +0000205 'aligned_malloc_unittest.cc',
hta@webrtc.org72e3a892012-06-19 13:49:48 +0000206 'condition_variable_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000207 'cpu_wrapper_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000208 'cpu_measurement_harness.h',
209 'cpu_measurement_harness.cc',
hta@webrtc.org3168e532012-06-20 06:45:56 +0000210 'critical_section_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000211 'list_unittest.cc',
212 'map_unittest.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000213 'data_log_unittest.cc',
214 'data_log_unittest_disabled.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000215 'data_log_helpers_unittest.cc',
216 'data_log_c_helpers_unittest.c',
217 'data_log_c_helpers_unittest.h',
hta@webrtc.orge1919f42012-05-22 15:57:34 +0000218 'thread_unittest.cc',
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000219 'thread_posix_unittest.cc',
henrike@webrtc.org0e7c0602012-02-08 18:53:50 +0000220 'trace_unittest.cc',
hta@webrtc.org86a6aac2012-06-18 13:22:08 +0000221 'unittest_utilities_unittest.cc',
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000222 ],
223 'conditions': [
224 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000225 'sources!': [ 'data_log_unittest_disabled.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000226 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000227 'sources!': [ 'data_log_unittest.cc', ],
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000228 }],
henrike@webrtc.orgfdb1fef2012-10-17 18:03:49 +0000229 ['os_posix==0', {
henrike@webrtc.org5ba44112012-10-05 14:36:54 +0000230 'sources!': [ 'thread_posix_unittest.cc', ],
231 }],
xians@google.com87062562011-08-08 12:08:15 +0000232 ],
233 },
234 ], # targets
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000235 }], # include_tests
xians@google.com87062562011-08-08 12:08:15 +0000236 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000237}
238
239# Local Variables:
240# tab-width:2
241# indent-tabs-mode:nil
242# End:
243# vim: set expandtab tabstop=2 shiftwidth=2: