cc_defaults { name: "fluoride_osi_defaults_qti", defaults: ["fluoride_defaults_qti"], include_dirs: [ "vendor/qcom/opensource/commonsys/system/bt", "vendor/qcom/opensource/commonsys/system/bt/internal_include", "vendor/qcom/opensource/commonsys/system/bt/osi/src/protos", "vendor/qcom/opensource/commonsys/system/bt/utils/include", "vendor/qcom/opensource/commonsys/system/bt/stack/include", ] } // Static libraries required by other modules // ======================================================== cc_test_library { name: "libosi-AllocationTestHarness_qti", defaults: ["fluoride_osi_defaults_qti"], srcs: [ "test/AllocationTestHarness.cc", ], host_supported: true, shared: { enabled: false } } cc_test_library { name: "libosi-AlarmTestHarness_qti", defaults: ["fluoride_osi_defaults_qti"], srcs: [ "test/AlarmTestHarness.cc", ], host_supported: true, shared: { enabled: false } } // Bluetooth Protobuf static library for target and host // ======================================================== cc_library_static { name: "libbt-protos_qti", defaults: ["fluoride_defaults_qti"], srcs: ["src/protos/bluetooth.proto"], proto: { export_proto_headers: true, }, host_supported: true } // libosi static library for target // ======================================================== cc_library_static { name: "libosi_qti", defaults: ["fluoride_osi_defaults_qti"], // TODO(mcchou): Remove socket_utils sources after platform specific // dependencies are abstracted. srcs: [ "src/alarm.cc", "src/allocation_tracker.cc", "src/allocator.cc", "src/array.cc", "src/buffer.cc", "src/compat.cc", "src/config.cc", "src/fixed_queue.cc", "src/future.cc", "src/hash_map_utils.cc", "src/list.cc", "src/metrics.cc", "src/mutex.cc", "src/osi.cc", "src/properties.cc", "src/reactor.cc", "src/ringbuffer.cc", "src/semaphore.cc", "src/socket.cc", "src/socket_utils/socket_local_client.cc", "src/socket_utils/socket_local_server.cc", "src/thread.cc", "src/time.cc", "src/wakelock.cc", ], arch: { arm64: { cflags: ["-DALOCATION_TRACKER_DEBUG", "-Wno-frame-address"], }, }, include_dirs: [ "vendor/qcom/opensource/commonsys/bluetooth_ext/vhal/include/", ], shared_libs: [ "liblog", ], static_libs: ["libbt-protos_qti"], host_supported: true, // TODO(armansito): Setting _GNU_SOURCE isn't very platform-independent but // should be compatible for a Linux host OS. We should figure out what to do for // a non-Linux host OS. target: { darwin: { enabled: false, }, linux_glibc: { cflags: [ "-D_GNU_SOURCE", "-DOS_GENERIC", ], }, }, } // libosi unit tests for target and host // ======================================================== cc_test { name: "net_test_osi_qti", test_suites: ["device-tests"], defaults: ["fluoride_osi_defaults_qti"], host_supported: true, srcs: [ "test/AlarmTestHarness.cc", "test/AllocationTestHarness.cc", "test/alarm_test.cc", "test/allocation_tracker_test.cc", "test/allocator_test.cc", "test/array_test.cc", "test/config_test.cc", "test/fixed_queue_test.cc", "test/future_test.cc", "test/hash_map_utils_test.cc", "test/leaky_bonded_queue_test.cc", "test/list_test.cc", "test/metrics_test.cc", "test/properties_test.cc", "test/rand_test.cc", "test/reactor_test.cc", "test/ringbuffer_test.cc", "test/semaphore_test.cc", "test/thread_test.cc", "test/time_test.cc", "test/wakelock_test.cc", ], shared_libs: [ "liblog", "libprotobuf-cpp-lite", "libcutils", ], static_libs: [ "libbt-protos_qti", "libgmock", "libosi_qti", ], target: { linux_glibc: { cflags: ["-DOS_GENERIC"], host_ldlibs: [ "-lrt", "-lpthread", ], }, darwin: { enabled: false, } }, }