blob: 66b34356c22b433de22d4b180ed423bcc0791e94 [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',
andresp@webrtc.orga36ad692014-05-14 12:24:04 +000041 '../interface/field_trial.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000042 '../interface/file_wrapper.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000043 '../interface/fix_interlocked_exchange_pointer_win.h',
fischman@webrtc.org7e4d0df2013-10-01 02:40:43 +000044 '../interface/logcat_trace_context.h',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000045 '../interface/logging.h',
perkj@google.com88a0da82011-09-02 12:51:35 +000046 '../interface/ref_count.h',
wu@webrtc.org66773a02014-05-07 17:09:44 +000047 '../interface/rtp_to_ntp.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000048 '../interface/rw_lock_wrapper.h',
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +000049 '../interface/scoped_ptr.h',
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +000050 '../interface/scoped_refptr.h',
andrew@webrtc.org0daa8be2014-04-18 21:20:54 +000051 '../interface/scoped_vector.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +000052 '../interface/sleep.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000053 '../interface/sort.h',
andrew@webrtc.org6d609b52011-12-14 02:36:33 +000054 '../interface/static_instance.h',
andrew@webrtc.org0daa8be2014-04-18 21:20:54 +000055 '../interface/stl_util.h',
andrew@webrtc.org076fc122013-02-15 03:54:22 +000056 '../interface/stringize_macros.h',
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +000057 '../interface/thread_annotations.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000058 '../interface/thread_wrapper.h',
59 '../interface/tick_util.h',
wu@webrtc.org66773a02014-05-07 17:09:44 +000060 '../interface/timestamp_extrapolator.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000061 '../interface/trace.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000062 '../interface/trace_event.h',
kjellander@webrtc.org7de47bc2014-04-16 08:04:26 +000063 '../interface/utf_util_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000064 'aligned_malloc.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000065 'atomic32_mac.cc',
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +000066 'atomic32_posix.cc',
tommi@webrtc.orge84373c2012-04-19 14:28:45 +000067 'atomic32_win.cc',
stefan@webrtc.org20ed36d2013-01-17 14:01:20 +000068 'clock.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000069 'condition_variable.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000070 'condition_variable_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000071 'condition_variable_posix.h',
henrike@webrtc.org686001d2013-03-26 14:16:05 +000072 'condition_variable_event_win.cc',
73 'condition_variable_event_win.h',
74 'condition_variable_native_win.cc',
75 'condition_variable_native_win.h',
henrikg@webrtc.orgc58ef082011-11-08 08:44:17 +000076 'cpu_info.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000077 'cpu_features.cc',
78 'critical_section.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000079 'critical_section_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000080 'critical_section_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000081 'critical_section_win.cc',
82 'critical_section_win.h',
83 'data_log.cc',
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000084 'data_log_c.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000085 'data_log_no_op.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000086 'event.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000087 'event_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +000088 'event_posix.h',
hclam@chromium.orgad7efa62012-12-11 21:19:08 +000089 'event_tracer.cc',
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',
fischman@webrtc.org7e4d0df2013-10-01 02:40:43 +000094 'logcat_trace_context.cc',
andrew@webrtc.org50419b02012-11-14 19:07:54 +000095 'logging.cc',
wu@webrtc.org66773a02014-05-07 17:09:44 +000096 'rtp_to_ntp.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000097 'rw_lock.cc',
henrike@webrtc.org9f847232012-09-25 20:27:51 +000098 'rw_lock_generic.cc',
99 'rw_lock_generic.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000100 'rw_lock_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000101 'rw_lock_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000102 'rw_lock_win.cc',
103 'rw_lock_win.h',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000104 'set_thread_name_win.h',
hta@webrtc.org41adcdb2012-06-18 11:24:57 +0000105 'sleep.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000106 'sort.cc',
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000107 'tick_util.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000108 'thread.cc',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000109 'thread_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000110 'thread_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000111 'thread_win.cc',
112 'thread_win.h',
wu@webrtc.org66773a02014-05-07 17:09:44 +0000113 'timestamp_extrapolator.cc',
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_posix.cc',
ajm@google.comb5c49ff2011-08-01 17:04:04 +0000117 'trace_posix.h',
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000118 'trace_win.cc',
119 'trace_win.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000120 ],
121 'conditions': [
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000122 ['enable_data_logging==1', {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000123 'sources!': [ 'data_log_no_op.cc', ],
andrew@webrtc.org50419b02012-11-14 19:07:54 +0000124 }, {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000125 'sources!': [ 'data_log.cc', ],
stefan@webrtc.orgc9cff242011-08-29 07:39:02 +0000126 },],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000127 ['OS=="android"', {
sergeyu@chromium.org23516632013-04-30 22:53:51 +0000128 'defines': [
129 'WEBRTC_THREAD_RR',
130 # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
131 # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
132 # remove it after I verify that CLOCK_MONOTONIC is fully functional
133 # with condition and event functions in system_wrappers.
134 'WEBRTC_CLOCK_TYPE_REALTIME',
135 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000136 'dependencies': [ 'cpu_features_android', ],
fischman@webrtc.org4e65e072013-10-03 18:23:13 +0000137 'link_settings': {
138 'libraries': [
139 '-llog',
140 ],
141 },
fischman@webrtc.org7e4d0df2013-10-01 02:40:43 +0000142 }, { # OS!="android"
143 'sources!': [
144 '../interface/logcat_trace_context.h',
145 'logcat_trace_context.cc',
146 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000147 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000148 ['OS=="linux"', {
sergeyu@chromium.org23516632013-04-30 22:53:51 +0000149 'defines': [
150 'WEBRTC_THREAD_RR',
151 # TODO(andrew): can we select this automatically?
152 # Define this if the Linux system does not support CLOCK_MONOTONIC.
153 #'WEBRTC_CLOCK_TYPE_REALTIME',
154 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000155 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000156 'libraries': [ '-lrt', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000157 },
158 }],
159 ['OS=="mac"', {
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000160 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000161 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
zakkhoyt@google.com59af6f12011-08-25 20:30:25 +0000162 },
tommi@webrtc.org9018c9f2012-04-19 15:38:10 +0000163 'sources!': [
164 'atomic32_posix.cc',
165 ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000166 }],
sergeyu@chromium.org23516632013-04-30 22:53:51 +0000167 ['OS=="ios" or OS=="mac"', {
168 'defines': [
169 'WEBRTC_THREAD_RR',
170 'WEBRTC_CLOCK_TYPE_REALTIME',
171 ],
172 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000173 ['OS=="win"', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000174 'link_settings': {
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +0000175 'libraries': [ '-lwinmm.lib', ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000176 },
177 }],
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000178 ], # conditions
179 'target_conditions': [
180 # We need to do this in a target_conditions block to override the
181 # filename_rules filters.
182 ['OS=="ios"', {
183 # Pull in specific Mac files for iOS (which have been filtered out
184 # by file name rules).
185 'sources/': [
186 ['include', '^atomic32_mac\\.'],
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000187 ],
188 'sources!': [
189 'atomic32_posix.cc',
190 ],
191 }],
192 ],
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000193 # Disable warnings to enable Win64 build, issue 1323.
194 'msvs_disabled_warnings': [
195 4267, # size_t to int truncation.
196 4334, # Ignore warning on shift operator promotion.
197 ],
andresp@webrtc.orga36ad692014-05-14 12:24:04 +0000198 }, {
199 'target_name': 'field_trial_default',
200 'type': 'static_library',
201 'sources': [
202 'field_trial_default.cc',
203 ],
204 'dependencies': [
205 'system_wrappers',
206 ]
niklase@google.com470e71d2011-07-07 08:21:25 +0000207 },
niklase@google.com470e71d2011-07-07 08:21:25 +0000208 ], # targets
kjellander@webrtc.org177bb522011-10-31 17:10:01 +0000209 'conditions': [
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000210 ['OS=="android"', {
211 'targets': [
212 {
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000213 'target_name': 'cpu_features_android',
wjia@webrtc.orga3c82bf2013-01-18 23:42:21 +0000214 'type': 'static_library',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000215 'sources': [
leozwang@webrtc.orgd63cf712012-05-08 21:33:04 +0000216 'cpu_features_android.c',
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000217 ],
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000218 'conditions': [
michaelbai@google.comf928f5c2014-02-05 18:43:46 +0000219 ['android_webview_build == 1', {
220 'libraries': [
221 'cpufeatures.a'
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000222 ],
223 }, {
michaelbai@google.comf928f5c2014-02-05 18:43:46 +0000224 'dependencies': [
225 '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features',
wjia@webrtc.org815653b2012-11-19 04:04:10 +0000226 ],
227 }],
228 ],
leozwang@webrtc.orgf5fe1002012-05-08 15:20:02 +0000229 },
230 ],
231 }],
xians@google.com87062562011-08-08 12:08:15 +0000232 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000233}
234