| // Copyright 2022 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| package { |
| default_visibility: [ |
| "//tools/netsim:__subpackages__", |
| "//device/google/cuttlefish/build:__subpackages__", |
| ], |
| default_applicable_licenses: ["tools_netsim_license"], |
| } |
| |
| // Added automatically by a large-scale-change |
| // See: http://go/android-license-faq |
| license { |
| name: "tools_netsim_license", |
| visibility: [":__subpackages__"], |
| license_kinds: [ |
| "SPDX-license-identifier-Apache-2.0", |
| ], |
| license_text: [ |
| "LICENSE", |
| ], |
| } |
| |
| cc_defaults { |
| name: "netsim_defaults", |
| cflags: [ |
| "-Wno-unused-parameter", |
| "-g", // Produce debugging information. |
| ], |
| ldflags: ["-rdynamic"], // Allow obtaining backtraces for debugging. |
| local_include_dirs: [ |
| "src", |
| ], |
| include_dirs: [ |
| "external/grpc-grpc/include", |
| "external/protobuf/src", |
| "packages/modules/Bluetooth/system", |
| "packages/modules/Bluetooth/system/gd", |
| ], |
| generated_headers: [ |
| "RootCanalGeneratedPackets_h", |
| "RootCanalBrEdrBBGeneratedPackets_h", |
| "FrontendStub_h", |
| ], |
| generated_sources: [ |
| "FrontendStub_cc", |
| ], |
| } |
| |
| cc_library_host_static { |
| name: "lib-netsim", |
| defaults: ["netsim_defaults"], |
| srcs: [ |
| "src/controller/chip.cc", |
| "src/controller/device.cc", |
| "src/controller/scene_controller.cc", |
| "src/controller/device_notify_manager.cc", |
| "src/core/server.cc", |
| "src/fe/cli.cc", |
| "src/fe/frontend_server.cc", |
| "src/fe/http_server.cc", |
| "src/hci/fd_startup.cc", |
| "src/hci/bluetooth_chip_emulator.cc", |
| "src/hci/hci_debug.cc", |
| "src/util/ini_file.cc", |
| "src/util/log.cc", |
| "src/util/os_utils.cc", |
| "src/util/ranging.cc", |
| "src/util/string_utils.cc", |
| ], |
| shared_libs: [ |
| "libgrpc++", |
| "libcap", |
| "libcrypto", |
| "libssl", |
| ], |
| static_libs: [ |
| "libc++fs", |
| "libjsoncpp", |
| "libprotobuf-cpp-full", |
| "libscriptedbeaconpayload-protos-lite", |
| "libwebsockets", |
| "netsim-proto", |
| ], |
| whole_static_libs: [ |
| "libbt-rootcanal", |
| ], |
| } |
| |
| cc_binary_host { |
| name: "netsim", |
| defaults: ["netsim_defaults"], |
| srcs: [ |
| "src/netsim.cc", |
| ], |
| shared_libs: [ |
| "libgrpc++", |
| "libcap", |
| "libcrypto", |
| "libssl", |
| ], |
| static_libs: [ |
| "libc++fs", |
| "libjsoncpp", |
| "libprotobuf-cpp-full", |
| "libscriptedbeaconpayload-protos-lite", |
| "libwebsockets", |
| "netsim-proto", |
| "lib-netsim", |
| ], |
| whole_static_libs: [ |
| "libbt-rootcanal", |
| ], |
| } |
| |
| cc_test_host { |
| name: "netsim-test", |
| defaults: ["netsim_defaults"], |
| srcs: [ |
| "src/controller/device_test.cc", |
| "src/controller/scene_controller_test.cc", |
| "src/fe/frontend_server_test.cc", |
| "src/hci/startup_test.cc", |
| "src/util/ini_file_test.cc", |
| "src/util/os_utils_test.cc", |
| "src/util/string_utils_test.cc", |
| ], |
| shared_libs: [ |
| "libgrpc++", |
| ], |
| static_libs: [ |
| "libc++fs", |
| "libjsoncpp", |
| "libprotobuf-cpp-full", |
| "libscriptedbeaconpayload-protos-lite", |
| "netsim-proto", |
| "lib-netsim", |
| ], |
| whole_static_libs: [ |
| "libbt-rootcanal", |
| ], |
| } |