• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH := $(call my-dir)
2
3# test-vendor shared library for target
4# ========================================================
5include $(CLEAR_VARS)
6
7BT_DIR := $(TOP_DIR)system/bt
8
9LOCAL_SRC_FILES := \
10    src/bt_vendor.cc \
11    src/command_packet.cc \
12    src/dual_mode_controller.cc \
13    src/event_packet.cc \
14    src/hci_transport.cc \
15    src/packet.cc \
16    src/packet_stream.cc \
17    src/test_channel_transport.cc \
18    src/vendor_manager.cc
19
20# We pull in gtest because base/files/file_util.h, which is used to read the
21# controller properties file, needs gtest/gtest_prod.h.
22LOCAL_C_INCLUDES := \
23    $(LOCAL_PATH)/include \
24    $(BT_DIR) \
25    $(BT_DIR)/hci/include \
26    $(BT_DIR)/stack/include \
27    $(BT_DIR)/third_party/gtest/include
28
29LOCAL_SHARED_LIBRARIES := \
30    liblog \
31    libchrome
32
33LOCAL_CPP_EXTENSION := .cc
34LOCAL_MODULE := test-vendor
35LOCAL_MODULE_TAGS := optional
36LOCAL_MODULE_CLASS := SHARED_LIBRARIES
37
38LOCAL_CFLAGS += $(bluetooth_CFLAGS)
39LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
40LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
41
42include $(BUILD_SHARED_LIBRARY)
43
44# test-vendor unit tests for host
45# ========================================================
46ifeq ($(HOST_OS), linux)
47include $(CLEAR_VARS)
48
49LOCAL_SRC_FILES := \
50    src/command_packet.cc \
51    src/event_packet.cc \
52    src/hci_transport.cc \
53    src/packet.cc \
54    src/packet_stream.cc \
55    test/hci_transport_unittest.cc \
56    test/packet_stream_unittest.cc
57
58LOCAL_C_INCLUDES := \
59    $(LOCAL_PATH)/include \
60    $(BT_DIR) \
61    $(BT_DIR)/hci/include \
62    $(BT_DIR)/stack/include
63
64LOCAL_SHARED_LIBRARIES := \
65    liblog \
66    libchrome
67
68LOCAL_CPP_EXTENSION := .cc
69LOCAL_MODULE := test-vendor_test_host
70LOCAL_MODULE_TAGS := tests
71
72LOCAL_CFLAGS += $(bluetooth_CFLAGS)
73LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
74LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
75
76include $(BUILD_HOST_NATIVE_TEST)
77endif
78