blob: 24e3d4d289bc01e75097384a6b8969bfc287c765 [file] [log] [blame]
The Android Open Source Project5738f832012-12-12 16:00:35 -08001LOCAL_PATH := $(call my-dir)
2
Pavlin Radoslavov0b60bb02016-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)
6
7LOCAL_SRC_FILES := \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -07008 src/btsnoop.c \
Andre Eisenbach1bd76052014-12-05 09:40:20 -08009 src/btsnoop_mem.c \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070010 src/btsnoop_net.c \
Zach Johnsonbf8193b2014-09-08 09:56:35 -070011 src/buffer_allocator.c \
Mudumba Ananth6afb2482015-03-25 05:20:02 -070012 src/hci_audio.c \
Zach Johnsonb7ddf132014-08-20 23:12:33 -070013 src/hci_hal.c \
14 src/hci_hal_h4.c \
15 src/hci_hal_mct.c \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070016 src/hci_inject.c \
17 src/hci_layer.c \
Zach Johnsonbf8193b2014-09-08 09:56:35 -070018 src/hci_packet_factory.c \
19 src/hci_packet_parser.c \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070020 src/low_power_manager.c \
21 src/packet_fragmenter.c \
22 src/vendor.c
The Android Open Source Project5738f832012-12-12 16:00:35 -080023
The Android Open Source Project5738f832012-12-12 16:00:35 -080024LOCAL_C_INCLUDES += \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070025 $(LOCAL_PATH)/include \
Chris Manton79ecab52014-10-31 14:54:51 -070026 $(LOCAL_PATH)/.. \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070027 $(LOCAL_PATH)/../include \
Zach Johnson9891f322014-09-22 22:11:55 -070028 $(LOCAL_PATH)/../btcore/include \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070029 $(LOCAL_PATH)/../stack/include \
30 $(LOCAL_PATH)/../utils/include \
Abhijit Adsule47b43102015-05-19 02:44:26 -050031 $(LOCAL_PATH)/../bta/include \
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080032 $(bluetooth_C_INCLUDES)
The Android Open Source Project5738f832012-12-12 16:00:35 -080033
The Android Open Source Project5738f832012-12-12 16:00:35 -080034LOCAL_MODULE := libbt-hci
The Android Open Source Project5738f832012-12-12 16:00:35 -080035
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080036ifeq ($(BLUETOOTH_HCI_USE_MCT),true)
37LOCAL_CFLAGS += -DHCI_USE_MCT
38endif
39LOCAL_CFLAGS += $(bluetooth_CFLAGS)
40LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
41LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
42
Chris Mantone01b1122014-05-07 16:21:00 -070043include $(BUILD_STATIC_LIBRARY)
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070044
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080045# HCI unit tests for target
46# ========================================================
Evgenii Stepanov1ab6fd72015-06-11 15:34:12 -070047ifeq (,$(strip $(SANITIZE_TARGET)))
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070048include $(CLEAR_VARS)
49
50LOCAL_C_INCLUDES := \
51 $(LOCAL_PATH)/include \
Chris Manton79ecab52014-10-31 14:54:51 -070052 $(LOCAL_PATH)/.. \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070053 $(LOCAL_PATH)/../include \
Zach Johnson9891f322014-09-22 22:11:55 -070054 $(LOCAL_PATH)/../btcore/include \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070055 $(LOCAL_PATH)/../osi/test \
56 $(LOCAL_PATH)/../stack/include \
57 $(LOCAL_PATH)/../utils/include \
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080058 $(bluetooth_C_INCLUDES)
Zach Johnson218f3752014-09-03 14:36:44 -070059
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070060LOCAL_SRC_FILES := \
Zach Johnsonee2aa452014-08-26 20:16:03 -070061 ../osi/test/AllocationTestHarness.cpp \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070062 ../osi/test/AlarmTestHarness.cpp \
63 ./test/hci_hal_h4_test.cpp \
Zach Johnsonb7ddf132014-08-20 23:12:33 -070064 ./test/hci_hal_mct_test.cpp \
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070065 ./test/hci_layer_test.cpp \
66 ./test/low_power_manager_test.cpp \
Dan Willemsend1fad882016-01-25 19:48:44 -080067 ./test/packet_fragmenter_test.cpp
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070068
Sharvil Nanavati61683572014-12-29 00:56:46 -080069LOCAL_MODULE := net_test_hci
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070070LOCAL_MODULE_TAGS := tests
Marie Janssenaa116442016-01-15 16:14:14 -080071LOCAL_SHARED_LIBRARIES := liblog libdl libprotobuf-cpp-full
72LOCAL_STATIC_LIBRARIES := libbt-hci libosi libcutils libbtcore libbt-protos
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070073
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080074LOCAL_CFLAGS += $(bluetooth_CFLAGS)
75LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
76LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
77
Zach Johnsonfbbd42b2014-08-15 17:00:17 -070078include $(BUILD_NATIVE_TEST)
Evgenii Stepanov1ab6fd72015-06-11 15:34:12 -070079endif # SANITIZE_TARGET