xref: /aosp_15_r20/external/libgsm/Android.bp (revision 8ec969cea971fe25ff2d3933a5a9f8504f8e86c9)
1*8ec969ceSTreehugger Robot//
2*8ec969ceSTreehugger Robot// Copyright (C) 2010 The Android Open Source Project
3*8ec969ceSTreehugger Robot//
4*8ec969ceSTreehugger Robot// Licensed under the Apache License, Version 2.0 (the "License");
5*8ec969ceSTreehugger Robot// you may not use this file except in compliance with the License.
6*8ec969ceSTreehugger Robot// You may obtain a copy of the License at
7*8ec969ceSTreehugger Robot//
8*8ec969ceSTreehugger Robot//      http://www.apache.org/licenses/LICENSE-2.0
9*8ec969ceSTreehugger Robot//
10*8ec969ceSTreehugger Robot// Unless required by applicable law or agreed to in writing, software
11*8ec969ceSTreehugger Robot// distributed under the License is distributed on an "AS IS" BASIS,
12*8ec969ceSTreehugger Robot// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*8ec969ceSTreehugger Robot// See the License for the specific language governing permissions and
14*8ec969ceSTreehugger Robot// limitations under the License.
15*8ec969ceSTreehugger Robot//
16*8ec969ceSTreehugger Robot
17*8ec969ceSTreehugger Robotpackage {
18*8ec969ceSTreehugger Robot    default_applicable_licenses: ["external_libgsm_license"],
19*8ec969ceSTreehugger Robot}
20*8ec969ceSTreehugger Robot
21*8ec969ceSTreehugger Robot// Added automatically by a large-scale-change that took the approach of
22*8ec969ceSTreehugger Robot// 'apply every license found to every target'. While this makes sure we respect
23*8ec969ceSTreehugger Robot// every license restriction, it may not be entirely correct.
24*8ec969ceSTreehugger Robot//
25*8ec969ceSTreehugger Robot// e.g. GPL in an MIT project might only apply to the contrib/ directory.
26*8ec969ceSTreehugger Robot//
27*8ec969ceSTreehugger Robot// Please consider splitting the single license below into multiple licenses,
28*8ec969ceSTreehugger Robot// taking care not to lose any license_kind information, and overriding the
29*8ec969ceSTreehugger Robot// default license using the 'licenses: [...]' property on targets as needed.
30*8ec969ceSTreehugger Robot//
31*8ec969ceSTreehugger Robot// For unused files, consider creating a 'fileGroup' with "//visibility:private"
32*8ec969ceSTreehugger Robot// to attach the license to, and including a comment whether the files may be
33*8ec969ceSTreehugger Robot// used in the current project.
34*8ec969ceSTreehugger Robot// See: http://go/android-license-faq
35*8ec969ceSTreehugger Robotlicense {
36*8ec969ceSTreehugger Robot    name: "external_libgsm_license",
37*8ec969ceSTreehugger Robot    visibility: [":__subpackages__"],
38*8ec969ceSTreehugger Robot    license_kinds: [
39*8ec969ceSTreehugger Robot        "SPDX-license-identifier-0BSD",
40*8ec969ceSTreehugger Robot        "SPDX-license-identifier-Apache-2.0",
41*8ec969ceSTreehugger Robot        "SPDX-license-identifier-BSD",
42*8ec969ceSTreehugger Robot    ],
43*8ec969ceSTreehugger Robot    license_text: [
44*8ec969ceSTreehugger Robot        "COPYRIGHT",
45*8ec969ceSTreehugger Robot    ],
46*8ec969ceSTreehugger Robot}
47*8ec969ceSTreehugger Robot
48*8ec969ceSTreehugger Robotcc_library_static {
49*8ec969ceSTreehugger Robot    name: "libgsm",
50*8ec969ceSTreehugger Robot    vendor_available: true,
51*8ec969ceSTreehugger Robot    host_supported: true,
52*8ec969ceSTreehugger Robot
53*8ec969ceSTreehugger Robot    srcs: [
54*8ec969ceSTreehugger Robot        "src/add.c",
55*8ec969ceSTreehugger Robot        "src/code.c",
56*8ec969ceSTreehugger Robot        "src/decode.c",
57*8ec969ceSTreehugger Robot        "src/gsm_create.c",
58*8ec969ceSTreehugger Robot        "src/gsm_decode.c",
59*8ec969ceSTreehugger Robot        "src/gsm_destroy.c",
60*8ec969ceSTreehugger Robot        "src/gsm_encode.c",
61*8ec969ceSTreehugger Robot        "src/gsm_option.c",
62*8ec969ceSTreehugger Robot        "src/long_term.c",
63*8ec969ceSTreehugger Robot        "src/lpc.c",
64*8ec969ceSTreehugger Robot        "src/preprocess.c",
65*8ec969ceSTreehugger Robot        "src/rpe.c",
66*8ec969ceSTreehugger Robot        "src/short_term.c",
67*8ec969ceSTreehugger Robot        "src/table.c",
68*8ec969ceSTreehugger Robot    ],
69*8ec969ceSTreehugger Robot
70*8ec969ceSTreehugger Robot    cflags: [
71*8ec969ceSTreehugger Robot        "-DSASR",
72*8ec969ceSTreehugger Robot        "-DWAV49",
73*8ec969ceSTreehugger Robot        "-Werror",
74*8ec969ceSTreehugger Robot        "-Wno-comment",
75*8ec969ceSTreehugger Robot        "-Wno-unused-parameter",
76*8ec969ceSTreehugger Robot    ],
77*8ec969ceSTreehugger Robot
78*8ec969ceSTreehugger Robot    target: {
79*8ec969ceSTreehugger Robot        darwin: {
80*8ec969ceSTreehugger Robot            enabled: false,
81*8ec969ceSTreehugger Robot        },
82*8ec969ceSTreehugger Robot    },
83*8ec969ceSTreehugger Robot
84*8ec969ceSTreehugger Robot    export_include_dirs: ["inc"],
85*8ec969ceSTreehugger Robot    min_sdk_version: "apex_inherit",
86*8ec969ceSTreehugger Robot    apex_available: [
87*8ec969ceSTreehugger Robot        "//apex_available:platform",
88*8ec969ceSTreehugger Robot        "com.android.media.swcodec",
89*8ec969ceSTreehugger Robot        "test_com.android.media.swcodec",
90*8ec969ceSTreehugger Robot    ],
91*8ec969ceSTreehugger Robot
92*8ec969ceSTreehugger Robot}
93