OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'conditions': [ | 7 'conditions': [ |
8 # TODO(wtc): change "mipselx" to "mipsel" in this file when the | 8 # TODO(wtc): change "mipselx" to "mipsel" in this file when the |
9 # compilation errors in the MIPS optimizations are fixed. | 9 # compilation errors in the MIPS optimizations are fixed. |
10 ['target_arch=="arm" or target_arch=="arm64" or target_arch=="mipselx"', { | 10 ['target_arch=="arm" or target_arch=="arm64" or target_arch=="mipselx"', { |
(...skipping 13 matching lines...) Expand all Loading... | |
24 }], | 24 }], |
25 ['target_arch=="arm" and (OS=="win" or OS=="android" or OS=="linux")', { | 25 ['target_arch=="arm" and (OS=="win" or OS=="android" or OS=="linux")', { |
26 # Based on the conditions in celt/arm/armcpu.c: | 26 # Based on the conditions in celt/arm/armcpu.c: |
27 # defined(_MSC_VER) || defined(__linux__). | 27 # defined(_MSC_VER) || defined(__linux__). |
28 'use_opus_rtcd%': 1, | 28 'use_opus_rtcd%': 1, |
29 }, { | 29 }, { |
30 'use_opus_rtcd%': 0, | 30 'use_opus_rtcd%': 0, |
31 }], | 31 }], |
32 ], | 32 ], |
33 }, | 33 }, |
34 'target_defaults': { | |
35 'target_conditions': [ | |
36 ['_type=="executable"', { | |
37 # All of the executable targets depend on 'opus'. Unfortunately the | |
38 # 'dependencies' block cannot be inherited via 'target_defaults'. | |
39 'include_dirs': [ | |
40 'src/celt', | |
41 'src/silk', | |
42 ], | |
43 'conditions': [ | |
44 ['OS == "win"', { | |
45 'defines': [ | |
46 'inline=__inline', | |
47 ], | |
48 }], | |
49 ['OS=="android"', { | |
50 'libraries': [ | |
51 '-llog', | |
52 ], | |
53 }], | |
54 ['clang==1', { | |
55 'cflags': [ '-Wno-absolute-value' ], | |
56 }] | |
57 ], | |
58 }], | |
59 ], | |
60 }, | |
34 'targets': [ | 61 'targets': [ |
35 { | 62 { |
36 'target_name': 'opus', | 63 'target_name': 'opus', |
37 'type': 'static_library', | 64 'type': 'static_library', |
38 'defines': [ | 65 'defines': [ |
39 'OPUS_BUILD', | 66 'OPUS_BUILD', |
40 'OPUS_EXPORT=', | 67 'OPUS_EXPORT=', |
41 ], | 68 ], |
42 'include_dirs': [ | 69 'include_dirs': [ |
43 'src/celt', | 70 'src/celt', |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 ], | 171 ], |
145 }], | 172 }], |
146 ], | 173 ], |
147 }, # target opus | 174 }, # target opus |
148 { | 175 { |
149 'target_name': 'opus_compare', | 176 'target_name': 'opus_compare', |
150 'type': 'executable', | 177 'type': 'executable', |
151 'dependencies': [ | 178 'dependencies': [ |
152 'opus' | 179 'opus' |
153 ], | 180 ], |
154 'conditions': [ | |
155 ['OS == "win"', { | |
156 'defines': [ | |
157 'inline=__inline', | |
158 ], | |
159 }], | |
160 ['OS=="android"', { | |
161 'link_settings': { | |
162 'libraries': [ | |
163 '-llog', | |
164 ], | |
165 }, | |
166 }], | |
167 ['clang==1', { | |
168 'cflags': [ '-Wno-absolute-value' ], | |
169 }] | |
170 ], | |
171 'sources': [ | 181 'sources': [ |
172 'src/src/opus_compare.c', | 182 'src/src/opus_compare.c', |
173 ], | 183 ], |
174 'include_dirs': [ | |
175 'src/celt', | |
176 'src/silk', | |
177 ], | |
178 }, # target opus_compare | 184 }, # target opus_compare |
179 { | 185 { |
180 'target_name': 'opus_demo', | 186 'target_name': 'opus_demo', |
181 'type': 'executable', | 187 'type': 'executable', |
182 'dependencies': [ | 188 'dependencies': [ |
183 'opus' | 189 'opus' |
184 ], | 190 ], |
185 'conditions': [ | |
186 ['OS == "win"', { | |
187 'defines': [ | |
188 'inline=__inline', | |
189 ], | |
190 }], | |
191 ['OS=="android"', { | |
192 'link_settings': { | |
193 'libraries': [ | |
194 '-llog', | |
195 ], | |
196 }, | |
197 }], | |
198 ['clang==1', { | |
199 'cflags': [ '-Wno-absolute-value' ], | |
200 }] | |
201 ], | |
202 'sources': [ | 191 'sources': [ |
203 'src/src/opus_demo.c', | 192 'src/src/opus_demo.c', |
204 ], | 193 ], |
205 'include_dirs': [ | 194 }, # target opus_demo |
206 'src/celt', | 195 { |
207 'src/silk', | 196 'target_name': 'test_opus_api', |
197 'type': 'executable', | |
198 'dependencies': [ | |
199 'opus' | |
208 ], | 200 ], |
209 }, # target opus_demo | 201 'sources': [ |
202 'src/tests/test_opus_api.c', | |
203 ], | |
204 }, # target test_opus_api | |
205 { | |
206 'target_name': 'test_opus_encode', | |
207 'type': 'executable', | |
208 'dependencies': [ | |
209 'opus' | |
210 ], | |
211 'sources': [ | |
212 'src/tests/test_opus_encode.c', | |
213 ], | |
214 }, # target test_opus_encode | |
215 { | |
216 'target_name': 'test_opus_decode', | |
217 'type': 'executable', | |
218 'dependencies': [ | |
219 'opus' | |
220 ], | |
221 'sources': [ | |
222 'src/tests/test_opus_decode.c', | |
223 ], | |
224 # test_opus_decode passes a null pointer to opus_decode() for an argument | |
225 # marked as requiring a non-null value by the nonnull function attribute, | |
226 # and expects opus_decode() to fail. Disable the -Wnonnull option to avoid | |
227 # a compilation error if -Werror is specified. | |
228 'conditions': [ | |
229 ['os_posix==1 and OS!="mac" and OS!="ios"', { | |
230 'cflags': ['-Wno-nonnull'], | |
Sergey Ulanov
2015/02/02 19:04:38
Does this work with both gcc and clang?
wtc
2015/02/02 21:45:47
Yes, -Wnonnull and -Wno-nonnull work with both gcc
| |
231 }], | |
232 ['OS=="mac" or OS=="ios"', { | |
233 'xcode_settings': { | |
234 'WARNING_CFLAGS': ['-Wno-nonnull'], | |
Sergey Ulanov
2015/02/02 19:04:38
Why do we need this in xcode_settings, but not in
wtc
2015/02/02 21:45:47
This is a limitation of GYP. On Mac, xcode_setting
wtc
2015/02/02 21:47:21
I forgot to add that Mark Mentovai confirmed this
| |
235 }, | |
236 }], | |
237 ], | |
238 }, # target test_opus_decode | |
239 { | |
240 'target_name': 'test_opus_padding', | |
241 'type': 'executable', | |
242 'dependencies': [ | |
243 'opus' | |
244 ], | |
245 'sources': [ | |
246 'src/tests/test_opus_padding.c', | |
247 ], | |
248 }, # target test_opus_padding | |
210 ] | 249 ] |
211 } | 250 } |
OLD | NEW |