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