Home | History | Annotate | Download | only in test_vendor_lib
      1 LOCAL_PATH := $(call my-dir)
      2 
      3 # test-vendor shared library for target
      4 # ========================================================
      5 include $(CLEAR_VARS)
      6 
      7 BT_DIR := $(TOP_DIR)system/bt
      8 
      9 LOCAL_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.
     22 LOCAL_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 
     29 LOCAL_SHARED_LIBRARIES := \
     30     liblog \
     31     libchrome
     32 
     33 LOCAL_CPP_EXTENSION := .cc
     34 LOCAL_MODULE := test-vendor
     35 LOCAL_MODULE_TAGS := optional
     36 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     37 
     38 LOCAL_CFLAGS += $(bluetooth_CFLAGS)
     39 LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
     40 LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
     41 
     42 include $(BUILD_SHARED_LIBRARY)
     43 
     44 # test-vendor unit tests for host
     45 # ========================================================
     46 ifeq ($(HOST_OS), linux)
     47 include $(CLEAR_VARS)
     48 
     49 LOCAL_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 
     58 LOCAL_C_INCLUDES := \
     59     $(LOCAL_PATH)/include \
     60     $(BT_DIR) \
     61     $(BT_DIR)/hci/include \
     62     $(BT_DIR)/stack/include
     63 
     64 LOCAL_SHARED_LIBRARIES := \
     65     liblog \
     66     libchrome
     67 
     68 LOCAL_CPP_EXTENSION := .cc
     69 LOCAL_MODULE := test-vendor_test_host
     70 LOCAL_MODULE_TAGS := tests
     71 
     72 LOCAL_CFLAGS += $(bluetooth_CFLAGS)
     73 LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
     74 LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
     75 
     76 include $(BUILD_HOST_NATIVE_TEST)
     77 endif
     78