1LOCAL_PATH := $(call my-dir)
2
3ifneq ($(BOARD_HAVE_BLUETOOTH_BCM),)
4
5include $(CLEAR_VARS)
6
7ifneq ($(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR),)
8  bdroid_C_INCLUDES := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)
9  bdroid_CFLAGS += -DHAS_BDROID_BUILDCFG
10else
11  bdroid_C_INCLUDES :=
12  bdroid_CFLAGS += -DHAS_NO_BDROID_BUILDCFG
13endif
14
15BDROID_DIR := $(TOP_DIR)system/bt
16
17ifeq ($(strip $(USE_BLUETOOTH_BCM4343)),true)
18LOCAL_CFLAGS += -DUSE_BLUETOOTH_BCM4343
19endif
20
21LOCAL_CFLAGS += \
22        -Wall \
23        -Werror \
24        -Wno-switch \
25        -Wno-unused-function \
26        -Wno-unused-parameter \
27        -Wno-unused-variable \
28
29LOCAL_SRC_FILES := \
30        src/bt_vendor_brcm.c \
31        src/hardware.c \
32        src/userial_vendor.c \
33        src/upio.c \
34        src/conf.c
35
36LOCAL_C_INCLUDES += \
37        $(LOCAL_PATH)/include \
38        $(BDROID_DIR)/hci/include \
39        $(BDROID_DIR)/include \
40        $(BDROID_DIR)/device/include \
41        $(BDROID_DIR)
42
43LOCAL_C_INCLUDES += $(bdroid_C_INCLUDES)
44LOCAL_CFLAGS += $(bdroid_CFLAGS)
45
46LOCAL_HEADER_LIBRARIES := libutils_headers
47
48ifneq ($(BOARD_HAVE_BLUETOOTH_BCM_A2DP_OFFLOAD),)
49  LOCAL_STATIC_LIBRARIES := libbt-brcm_a2dp
50endif
51
52LOCAL_SHARED_LIBRARIES := \
53        libcutils \
54        liblog
55
56LOCAL_MODULE := libbt-vendor
57LOCAL_MODULE_TAGS := optional
58LOCAL_MODULE_CLASS := SHARED_LIBRARIES
59LOCAL_MODULE_OWNER := broadcom
60LOCAL_PROPRIETARY_MODULE := true
61
62include $(LOCAL_PATH)/vnd_buildcfg.mk
63
64include $(BUILD_SHARED_LIBRARY)
65
66ifeq ($(TARGET_PRODUCT), full_maguro)
67    include $(LOCAL_PATH)/conf/samsung/maguro/Android.mk
68endif
69ifeq ($(TARGET_PRODUCT), full_crespo)
70    include $(LOCAL_PATH)/conf/samsung/crespo/Android.mk
71endif
72ifeq ($(TARGET_PRODUCT), full_crespo4g)
73    include $(LOCAL_PATH)/conf/samsung/crespo4g/Android.mk
74endif
75ifeq ($(TARGET_PRODUCT), full_wingray)
76    include $(LOCAL_PATH)/conf/moto/wingray/Android.mk
77endif
78
79endif # BOARD_HAVE_BLUETOOTH_BCM
80