1 LOCAL_PATH := $(call my-dir) 2 3 # HCI static library for target 4 # ======================================================== 5 include $(CLEAR_VARS) 6 7 LOCAL_SRC_FILES := \ 8 src/btsnoop.c \ 9 src/btsnoop_mem.c \ 10 src/btsnoop_net.c \ 11 src/buffer_allocator.c \ 12 src/hci_audio.c \ 13 src/hci_hal.c \ 14 src/hci_hal_h4.c \ 15 src/hci_hal_mct.c \ 16 src/hci_inject.c \ 17 src/hci_layer.c \ 18 src/hci_packet_factory.c \ 19 src/hci_packet_parser.c \ 20 src/low_power_manager.c \ 21 src/packet_fragmenter.c \ 22 src/vendor.c \ 23 ../EventLogTags.logtags 24 25 LOCAL_C_INCLUDES += \ 26 $(LOCAL_PATH)/include \ 27 $(LOCAL_PATH)/.. \ 28 $(LOCAL_PATH)/../include \ 29 $(LOCAL_PATH)/../btcore/include \ 30 $(LOCAL_PATH)/../stack/include \ 31 $(LOCAL_PATH)/../utils/include \ 32 $(LOCAL_PATH)/../bta/include \ 33 $(bluetooth_C_INCLUDES) 34 35 LOCAL_MODULE := libbt-hci 36 37 ifeq ($(BLUETOOTH_HCI_USE_MCT),true) 38 LOCAL_CFLAGS += -DHCI_USE_MCT 39 endif 40 LOCAL_CFLAGS += $(bluetooth_CFLAGS) 41 LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS) 42 LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS) 43 44 include $(BUILD_STATIC_LIBRARY) 45 46 # HCI unit tests for target 47 # ======================================================== 48 ifeq (,$(strip $(SANITIZE_TARGET))) 49 include $(CLEAR_VARS) 50 51 LOCAL_C_INCLUDES := \ 52 $(LOCAL_PATH)/include \ 53 $(LOCAL_PATH)/.. \ 54 $(LOCAL_PATH)/../include \ 55 $(LOCAL_PATH)/../btcore/include \ 56 $(LOCAL_PATH)/../osi/test \ 57 $(LOCAL_PATH)/../stack/include \ 58 $(LOCAL_PATH)/../utils/include \ 59 $(bluetooth_C_INCLUDES) 60 61 LOCAL_SRC_FILES := \ 62 ../osi/test/AllocationTestHarness.cpp \ 63 ../osi/test/AlarmTestHarness.cpp \ 64 ./test/hci_hal_h4_test.cpp \ 65 ./test/hci_hal_mct_test.cpp \ 66 ./test/hci_layer_test.cpp \ 67 ./test/low_power_manager_test.cpp \ 68 ./test/packet_fragmenter_test.cpp 69 70 LOCAL_MODULE := net_test_hci 71 LOCAL_MODULE_TAGS := tests 72 LOCAL_SHARED_LIBRARIES := liblog libdl libprotobuf-cpp-full 73 LOCAL_STATIC_LIBRARIES := libbt-hci libosi libcutils libbtcore libbt-protos 74 75 LOCAL_CFLAGS += $(bluetooth_CFLAGS) 76 LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS) 77 LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS) 78 79 include $(BUILD_NATIVE_TEST) 80 endif # SANITIZE_TARGET 81