1*28e138c6SAndroid Build Coastguard Worker// 2*28e138c6SAndroid Build Coastguard Worker// Copyright (C) 2010 The Android Open Source Project 3*28e138c6SAndroid Build Coastguard Worker// 4*28e138c6SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 5*28e138c6SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 6*28e138c6SAndroid Build Coastguard Worker// You may obtain a copy of the License at 7*28e138c6SAndroid Build Coastguard Worker// 8*28e138c6SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 9*28e138c6SAndroid Build Coastguard Worker// 10*28e138c6SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 11*28e138c6SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 12*28e138c6SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*28e138c6SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 14*28e138c6SAndroid Build Coastguard Worker// limitations under the License. 15*28e138c6SAndroid Build Coastguard Worker// 16*28e138c6SAndroid Build Coastguard Worker 17*28e138c6SAndroid Build Coastguard Workerpackage { 18*28e138c6SAndroid Build Coastguard Worker default_applicable_licenses: ["external_speex_license"], 19*28e138c6SAndroid Build Coastguard Worker} 20*28e138c6SAndroid Build Coastguard Worker 21*28e138c6SAndroid Build Coastguard Worker// Added automatically by a large-scale-change that took the approach of 22*28e138c6SAndroid Build Coastguard Worker// 'apply every license found to every target'. While this makes sure we respect 23*28e138c6SAndroid Build Coastguard Worker// every license restriction, it may not be entirely correct. 24*28e138c6SAndroid Build Coastguard Worker// 25*28e138c6SAndroid Build Coastguard Worker// e.g. GPL in an MIT project might only apply to the contrib/ directory. 26*28e138c6SAndroid Build Coastguard Worker// 27*28e138c6SAndroid Build Coastguard Worker// Please consider splitting the single license below into multiple licenses, 28*28e138c6SAndroid Build Coastguard Worker// taking care not to lose any license_kind information, and overriding the 29*28e138c6SAndroid Build Coastguard Worker// default license using the 'licenses: [...]' property on targets as needed. 30*28e138c6SAndroid Build Coastguard Worker// 31*28e138c6SAndroid Build Coastguard Worker// For unused files, consider creating a 'fileGroup' with "//visibility:private" 32*28e138c6SAndroid Build Coastguard Worker// to attach the license to, and including a comment whether the files may be 33*28e138c6SAndroid Build Coastguard Worker// used in the current project. 34*28e138c6SAndroid Build Coastguard Worker// See: http://go/android-license-faq 35*28e138c6SAndroid Build Coastguard Workerlicense { 36*28e138c6SAndroid Build Coastguard Worker name: "external_speex_license", 37*28e138c6SAndroid Build Coastguard Worker visibility: [":__subpackages__"], 38*28e138c6SAndroid Build Coastguard Worker license_kinds: [ 39*28e138c6SAndroid Build Coastguard Worker "SPDX-license-identifier-BSD", 40*28e138c6SAndroid Build Coastguard Worker "SPDX-license-identifier-MIT", 41*28e138c6SAndroid Build Coastguard Worker "legacy_notice", 42*28e138c6SAndroid Build Coastguard Worker "legacy_unencumbered", 43*28e138c6SAndroid Build Coastguard Worker ], 44*28e138c6SAndroid Build Coastguard Worker license_text: [ 45*28e138c6SAndroid Build Coastguard Worker "COPYING", 46*28e138c6SAndroid Build Coastguard Worker ], 47*28e138c6SAndroid Build Coastguard Worker} 48*28e138c6SAndroid Build Coastguard Worker 49*28e138c6SAndroid Build Coastguard Workercc_library_shared { 50*28e138c6SAndroid Build Coastguard Worker name: "libspeexresampler", 51*28e138c6SAndroid Build Coastguard Worker 52*28e138c6SAndroid Build Coastguard Worker vendor_available: true, 53*28e138c6SAndroid Build Coastguard Worker product_available: true, 54*28e138c6SAndroid Build Coastguard Worker double_loadable: true, 55*28e138c6SAndroid Build Coastguard Worker host_supported: true, 56*28e138c6SAndroid Build Coastguard Worker apex_available: [ 57*28e138c6SAndroid Build Coastguard Worker "//apex_available:platform", 58*28e138c6SAndroid Build Coastguard Worker "com.android.media", 59*28e138c6SAndroid Build Coastguard Worker "com.android.media.swcodec", 60*28e138c6SAndroid Build Coastguard Worker ], 61*28e138c6SAndroid Build Coastguard Worker min_sdk_version: "29", 62*28e138c6SAndroid Build Coastguard Worker 63*28e138c6SAndroid Build Coastguard Worker arch: { 64*28e138c6SAndroid Build Coastguard Worker arm: { 65*28e138c6SAndroid Build Coastguard Worker instruction_set: "arm", 66*28e138c6SAndroid Build Coastguard Worker cflags: ["-D_USE_NEON"], 67*28e138c6SAndroid Build Coastguard Worker }, 68*28e138c6SAndroid Build Coastguard Worker }, 69*28e138c6SAndroid Build Coastguard Worker srcs: ["libspeexdsp/resample.c"], 70*28e138c6SAndroid Build Coastguard Worker 71*28e138c6SAndroid Build Coastguard Worker cflags: [ 72*28e138c6SAndroid Build Coastguard Worker "-DEXPORT=__attribute__((visibility(\"default\")))", 73*28e138c6SAndroid Build Coastguard Worker "-DFIXED_POINT", 74*28e138c6SAndroid Build Coastguard Worker "-DHAVE_STDINT_H", 75*28e138c6SAndroid Build Coastguard Worker "-DRESAMPLE_FULL_SINC_TABLE", 76*28e138c6SAndroid Build Coastguard Worker "-O3", 77*28e138c6SAndroid Build Coastguard Worker "-fstrict-aliasing", 78*28e138c6SAndroid Build Coastguard Worker "-fprefetch-loop-arrays", 79*28e138c6SAndroid Build Coastguard Worker "-Wall", 80*28e138c6SAndroid Build Coastguard Worker "-Werror", 81*28e138c6SAndroid Build Coastguard Worker "-Wno-sign-compare", 82*28e138c6SAndroid Build Coastguard Worker "-Wno-unused-parameter", 83*28e138c6SAndroid Build Coastguard Worker ], 84*28e138c6SAndroid Build Coastguard Worker 85*28e138c6SAndroid Build Coastguard Worker local_include_dirs: ["include"], 86*28e138c6SAndroid Build Coastguard Worker export_include_dirs: ["include"], 87*28e138c6SAndroid Build Coastguard Worker sanitize: { 88*28e138c6SAndroid Build Coastguard Worker integer_overflow: true, 89*28e138c6SAndroid Build Coastguard Worker misc_undefined: ["bounds"], 90*28e138c6SAndroid Build Coastguard Worker }, 91*28e138c6SAndroid Build Coastguard Worker} 92