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