blob: 0672520d439fbf6c6c9dccf6e6cd14a7c4e65bdb [file] [log] [blame]
The Android Open Source Project5738f832012-12-12 16:00:35 -08001LOCAL_PATH := $(call my-dir)
2
Pavlin Radoslavov1377f932016-02-11 19:44:47 -08003# HCI static library for target
4# ========================================================
The Android Open Source Project5738f832012-12-12 16:00:35 -08005include $(CLEAR_VARS)
Jakub Pawlowskidd5e3e92016-05-25 15:33:41 -07006LOCAL_CPP_EXTENSION := .cc
The Android Open Source Project5738f832012-12-12 16:00:35 -08007
8LOCAL_SRC_FILES := \
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -07009 src/btsnoop.cc \
10 src/btsnoop_mem.cc \
11 src/btsnoop_net.cc \
12 src/buffer_allocator.cc \
13 src/hci_audio.cc \
14 src/hci_hal.cc \
15 src/hci_hal_h4.cc \
16 src/hci_hal_mct.cc \
17 src/hci_inject.cc \
18 src/hci_layer.cc \
19 src/hci_packet_factory.cc \
20 src/hci_packet_parser.cc \
21 src/low_power_manager.cc \
Jakub Pawlowskidd5e3e92016-05-25 15:33:41 -070022 src/packet_fragmenter.cc \
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070023 src/vendor.cc \
Jacky Cheunge909ff52016-05-23 12:39:01 -070024 ../EventLogTags.logtags
The Android Open Source Project5738f832012-12-12 16:00:35 -080025
Pavlin Radoslavov7aaf7c62016-08-23 12:24:03 -070026LOCAL_C_INCLUDES := \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070027 $(LOCAL_PATH)/include \
Chris Manton79ecab52014-10-31 14:54:51 -070028 $(LOCAL_PATH)/.. \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070029 $(LOCAL_PATH)/../include \
Zach Johnson9891f322014-09-22 22:11:55 -070030 $(LOCAL_PATH)/../btcore/include \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070031 $(LOCAL_PATH)/../stack/include \
32 $(LOCAL_PATH)/../utils/include \
Abhijit Adsule47b43102015-05-19 02:44:26 -050033 $(LOCAL_PATH)/../bta/include \
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080034 $(bluetooth_C_INCLUDES)
The Android Open Source Project5738f832012-12-12 16:00:35 -080035
The Android Open Source Project5738f832012-12-12 16:00:35 -080036LOCAL_MODULE := libbt-hci
The Android Open Source Project5738f832012-12-12 16:00:35 -080037
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080038ifeq ($(BLUETOOTH_HCI_USE_MCT),true)
Pavlin Radoslavov7aaf7c62016-08-23 12:24:03 -070039 LOCAL_CFLAGS += -DHCI_USE_MCT
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080040endif
41LOCAL_CFLAGS += $(bluetooth_CFLAGS)
42LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
43LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
44
Chris Mantone01b1122014-05-07 16:21:00 -070045include $(BUILD_STATIC_LIBRARY)
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070046
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080047# HCI unit tests for target
48# ========================================================
Evgenii Stepanov1ab6fd72015-06-11 15:34:12 -070049ifeq (,$(strip $(SANITIZE_TARGET)))
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070050include $(CLEAR_VARS)
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070051LOCAL_CPP_EXTENSION := .cc
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070052
53LOCAL_C_INCLUDES := \
54 $(LOCAL_PATH)/include \
Chris Manton79ecab52014-10-31 14:54:51 -070055 $(LOCAL_PATH)/.. \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070056 $(LOCAL_PATH)/../include \
Zach Johnson9891f322014-09-22 22:11:55 -070057 $(LOCAL_PATH)/../btcore/include \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070058 $(LOCAL_PATH)/../osi/test \
59 $(LOCAL_PATH)/../stack/include \
60 $(LOCAL_PATH)/../utils/include \
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080061 $(bluetooth_C_INCLUDES)
Zach Johnson218f3752014-09-03 14:36:44 -070062
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070063LOCAL_SRC_FILES := \
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070064 ../osi/test/AllocationTestHarness.cc \
65 ../osi/test/AlarmTestHarness.cc \
66 ./test/hci_hal_h4_test.cc \
67 ./test/hci_hal_mct_test.cc \
68 ./test/hci_layer_test.cc \
69 ./test/low_power_manager_test.cc \
70 ./test/packet_fragmenter_test.cc
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070071
Sharvil Nanavati61683572014-12-29 00:56:46 -080072LOCAL_MODULE := net_test_hci
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070073LOCAL_MODULE_TAGS := tests
Colin Cross9a247112016-10-26 14:25:28 -070074LOCAL_SHARED_LIBRARIES := liblog libdl libprotobuf-cpp-lite
Marie Janssen77f579f2016-01-15 16:14:14 -080075LOCAL_STATIC_LIBRARIES := libbt-hci libosi libcutils libbtcore libbt-protos
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070076
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080077LOCAL_CFLAGS += $(bluetooth_CFLAGS)
78LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
79LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
80
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070081include $(BUILD_NATIVE_TEST)
Evgenii Stepanov1ab6fd72015-06-11 15:34:12 -070082endif # SANITIZE_TARGET