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 "libcuttlefish_device_config", 47 "libcuttlefish_device_config_proto", 48 ], 49 static_libs: [ 50 "libcuttlefish_host_config", 51 "libgflags", 52 "libtinyxml2", 53 ], 54 cflags: ["-Werror", "-Wall", "-fexceptions"], 55 defaults: ["cuttlefish_host"], 56} 57 58cc_binary { 59 name: "modem_simulator", 60 srcs: [ 61 "main.cpp" 62 ], 63 defaults: ["cuttlefish_host", "modem_simulator_base"], 64} 65 66prebuilt_etc { 67 name: "iccprofile_for_sim0.xml", 68 vendor: true, 69 src: "files/iccprofile_for_sim0.xml", 70 filename: "iccprofile_for_sim0.xml", 71 sub_dir: "modem_simulator/files", 72} 73 74prebuilt_etc { 75 name: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml", 76 vendor: true, 77 src: "files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml", 78 filename: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml", 79 sub_dir: "modem_simulator/files", 80} 81 82prebuilt_etc { 83 name: "numeric_operator.xml", 84 vendor: true, 85 src: "files/numeric_operator.xml", 86 filename: "numeric_operator.xml", 87 sub_dir: "modem_simulator/files", 88} 89 90prebuilt_etc_host { 91 name: "iccprofile_for_sim0.xml_host", 92 src: "files/iccprofile_for_sim0.xml", 93 filename: "iccprofile_for_sim0.xml", 94 sub_dir: "modem_simulator/files", 95} 96 97prebuilt_etc_host { 98 name: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml_host", 99 src: "files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml", 100 filename: "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml", 101 sub_dir: "modem_simulator/files", 102} 103 104prebuilt_etc_host { 105 name: "numeric_operator.xml_host", 106 src: "files/numeric_operator.xml", 107 filename: "numeric_operator.xml", 108 sub_dir: "modem_simulator/files", 109} 110 111cc_test_host { 112 name: "modem_simulator_test", 113 srcs: [ 114 "unittest/main_test.cpp", 115 "unittest/service_test.cpp", 116 "unittest/command_parser_test.cpp", 117 "unittest/pdu_parser_test.cpp", 118 ], 119 include_dirs: [ 120 "device/google/cuttlefish/host/commands", 121 ], 122 defaults: ["cuttlefish_host", "modem_simulator_base"], 123 whole_static_libs: [ 124 "libc++fs" 125 ], 126} 127