xref: /aosp_15_r20/hardware/ril/rild/Android.bp (revision 062a843b36e31144e02d312b6b2de34642e6750e)
1*062a843bSAndroid Build Coastguard Worker// Copyright (C) 2006 The Android Open Source Project
2*062a843bSAndroid Build Coastguard Worker//
3*062a843bSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*062a843bSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*062a843bSAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*062a843bSAndroid Build Coastguard Worker//
7*062a843bSAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*062a843bSAndroid Build Coastguard Worker//
9*062a843bSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*062a843bSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*062a843bSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*062a843bSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*062a843bSAndroid Build Coastguard Worker// limitations under the License.
14*062a843bSAndroid Build Coastguard Worker
15*062a843bSAndroid Build Coastguard Workerpackage {
16*062a843bSAndroid Build Coastguard Worker    // See: http://go/android-license-faq
17*062a843bSAndroid Build Coastguard Worker    default_applicable_licenses: [
18*062a843bSAndroid Build Coastguard Worker        "hardware_ril_rild_license",
19*062a843bSAndroid Build Coastguard Worker    ],
20*062a843bSAndroid Build Coastguard Worker}
21*062a843bSAndroid Build Coastguard Worker
22*062a843bSAndroid Build Coastguard Workerlicense {
23*062a843bSAndroid Build Coastguard Worker    name: "hardware_ril_rild_license",
24*062a843bSAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
25*062a843bSAndroid Build Coastguard Worker    license_kinds: [
26*062a843bSAndroid Build Coastguard Worker        "SPDX-license-identifier-Apache-2.0",
27*062a843bSAndroid Build Coastguard Worker    ],
28*062a843bSAndroid Build Coastguard Worker    license_text: [
29*062a843bSAndroid Build Coastguard Worker        "NOTICE",
30*062a843bSAndroid Build Coastguard Worker    ],
31*062a843bSAndroid Build Coastguard Worker}
32*062a843bSAndroid Build Coastguard Worker
33*062a843bSAndroid Build Coastguard Workercc_binary {
34*062a843bSAndroid Build Coastguard Worker    name: "rild",
35*062a843bSAndroid Build Coastguard Worker    srcs: ["rild.c"],
36*062a843bSAndroid Build Coastguard Worker
37*062a843bSAndroid Build Coastguard Worker    shared_libs: [
38*062a843bSAndroid Build Coastguard Worker        "libcutils",
39*062a843bSAndroid Build Coastguard Worker        "libdl",
40*062a843bSAndroid Build Coastguard Worker        "liblog",
41*062a843bSAndroid Build Coastguard Worker        "libril",
42*062a843bSAndroid Build Coastguard Worker    ],
43*062a843bSAndroid Build Coastguard Worker
44*062a843bSAndroid Build Coastguard Worker    // Temporary hack for broken vendor RILs.
45*062a843bSAndroid Build Coastguard Worker    whole_static_libs: ["librilutils"],
46*062a843bSAndroid Build Coastguard Worker    cflags: [
47*062a843bSAndroid Build Coastguard Worker        "-DRIL_SHLIB",
48*062a843bSAndroid Build Coastguard Worker        "-Wall",
49*062a843bSAndroid Build Coastguard Worker        "-Wextra",
50*062a843bSAndroid Build Coastguard Worker        "-Werror",
51*062a843bSAndroid Build Coastguard Worker        "-DPRODUCT_COMPATIBLE_PROPERTY",
52*062a843bSAndroid Build Coastguard Worker    ] + select(soong_config_variable("ril", "sim_count"), {
53*062a843bSAndroid Build Coastguard Worker        "2": [
54*062a843bSAndroid Build Coastguard Worker            "-DANDROID_MULTI_SIM",
55*062a843bSAndroid Build Coastguard Worker            "-DANDROID_SIM_COUNT_2",
56*062a843bSAndroid Build Coastguard Worker        ],
57*062a843bSAndroid Build Coastguard Worker        default: [],
58*062a843bSAndroid Build Coastguard Worker    }),
59*062a843bSAndroid Build Coastguard Worker    relative_install_path: "hw",
60*062a843bSAndroid Build Coastguard Worker    proprietary: true,
61*062a843bSAndroid Build Coastguard Worker    init_rc: ["rild.rc"],
62*062a843bSAndroid Build Coastguard Worker    enabled: select(soong_config_variable("ril", "use_aosp_rild"), {
63*062a843bSAndroid Build Coastguard Worker        true: true,
64*062a843bSAndroid Build Coastguard Worker        default: false,
65*062a843bSAndroid Build Coastguard Worker    }),
66*062a843bSAndroid Build Coastguard Worker}
67