1//
2// Copyright (C) 2020 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
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_defaults {
21    name: "modem_simulator_base",
22    srcs: [
23        "call_service.cpp",
24        "cf_device_config.cpp",
25        "channel_monitor.cpp",
26        "command_parser.cpp",
27        "data_service.cpp",
28        "misc_service.cpp",
29        "modem_service.cpp",
30        "modem_simulator.cpp",
31        "network_service.cpp",
32        "nvram_config.cpp",
33        "pdu_parser.cpp",
34        "sim_service.cpp",
35        "sms_service.cpp",
36        "stk_service.cpp",
37        "sup_service.cpp",
38        "thread_looper.cpp",
39    ],
40    shared_libs: [
41        "libbase",
42        "libcuttlefish_fs",
43        "libcuttlefish_utils",
44        "libjsoncpp",
45        "libnl",
46    ],
47    static_libs: [
48        "libcuttlefish_host_config",
49        "libgflags",
50        "libtinyxml2",
51    ],
52    cflags: [
53        "-Wall",
54        "-Werror",
55        "-fexceptions",
56    ],
57    defaults: ["cuttlefish_host"],
58}
59
60cc_binary {
61    name: "modem_simulator",
62    srcs: [
63        "main.cpp",
64    ],
65    defaults: [
66        "cuttlefish_host",
67        "modem_simulator_base",
68    ],
69}
70
71prebuilt_etc {
72    name: "iccprofile_for_sim0.xml",
73    vendor: true,
74    src: "files/iccprofile_for_sim0.xml",
75    filename: "iccprofile_for_sim0.xml",
76    sub_dir: "modem_simulator/files",
77}
78
79prebuilt_etc {
80    name: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml",
81    vendor: true,
82    src: "files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml",
83    filename: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml",
84    sub_dir: "modem_simulator/files",
85}
86
87prebuilt_etc {
88    name: "numeric_operator.xml",
89    vendor: true,
90    src: "files/numeric_operator.xml",
91    filename: "numeric_operator.xml",
92    sub_dir: "modem_simulator/files",
93}
94
95prebuilt_etc_host {
96    name: "iccprofile_for_sim0.xml_host",
97    src: "files/iccprofile_for_sim0.xml",
98    filename: "iccprofile_for_sim0.xml",
99    sub_dir: "modem_simulator/files",
100}
101
102prebuilt_etc_host {
103    name: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml_host",
104    src: "files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml",
105    filename: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml",
106    sub_dir: "modem_simulator/files",
107}
108
109prebuilt_etc_host {
110    name: "numeric_operator.xml_host",
111    src: "files/numeric_operator.xml",
112    filename: "numeric_operator.xml",
113    sub_dir: "modem_simulator/files",
114}
115
116cc_test_host {
117    name: "modem_simulator_test",
118    srcs: [
119        "unittest/command_parser_test.cpp",
120        "unittest/main_test.cpp",
121        "unittest/pdu_parser_test.cpp",
122        "unittest/service_test.cpp",
123    ],
124    include_dirs: [
125        "device/google/cuttlefish/host/commands",
126    ],
127    defaults: [
128        "cuttlefish_host",
129        "modem_simulator_base",
130    ],
131}
132