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
3 # found in the LICENSE file.
8 ['target_arch=="arm" or target_arch=="arm64"', {
9 'use_opus_fixed_point%': 1,
11 'use_opus_fixed_point%': 0,
13 ['target_arch=="arm"', {
14 'use_opus_arm_optimization%': 1,
16 'use_opus_arm_optimization%': 0,
18 ['target_arch=="arm" and (OS=="win" or OS=="android" or OS=="linux")', {
19 # Based on the conditions in celt/arm/armcpu.c:
20 # defined(_MSC_VER) || defined(__linux__).
29 'target_name': 'opus',
30 'type': 'static_library',
40 'direct_dependent_settings': {
47 # Disable LTO due to ELF section name out of range
49 '../../build/android/disable_lto.gypi',
51 'sources': ['<@(opus_common_sources)'],
64 'msvs_disabled_warnings': [
65 4305, # Disable truncation warning in celt/pitch.c .
66 4334, # Disable 32-bit shift warning in src/opus_encoder.c .
71 'libraries': [ '-lm' ],
74 ['os_posix==1 and OS!="android"', {
75 # Suppress a warning given by opus_decoder.c that tells us
76 # optimizations are turned off.
78 '-Wno-#pragma-messages',
82 '-Wno-#pragma-messages',
86 ['os_posix==1 and (target_arch=="arm" or target_arch=="arm64")', {
90 ['use_opus_fixed_point==0', {
94 'sources': ['<@(opus_float_sources)'],
102 'sources': ['<@(opus_fixed_sources)'],
104 ['use_opus_arm_optimization==1', {
107 'OPUS_ARM_INLINE_ASM',
108 'OPUS_ARM_INLINE_EDSP',
111 'opus_srcs_arm.gypi',
114 ['use_opus_rtcd==1', {
116 'OPUS_ARM_MAY_HAVE_EDSP',
117 'OPUS_ARM_MAY_HAVE_MEDIA',
118 'OPUS_ARM_MAY_HAVE_NEON',
122 'opus_srcs_rtcd.gypi',
132 'target_name': 'opus_demo',
133 'type': 'executable',
151 'cflags': [ '-Wno-absolute-value' ],
155 'src/src/opus_demo.c',
161 }, # target opus_demo