Home | History | Annotate | Download | only in libbt-vendor
      1 #
      2 # Copyright 2012 The Android Open Source Project
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 #
     16 
     17 LOCAL_PATH := $(call my-dir)
     18 
     19 ifeq ($(BOARD_HAVE_BLUETOOTH_QCOM),true)
     20 
     21 include $(CLEAR_VARS)
     22 
     23 
     24 LOCAL_SRC_FILES := \
     25         src/bt_vendor_qcom.c \
     26         src/hardware.c \
     27         src/hci_uart.c \
     28         src/hci_smd.c \
     29         src/hw_rome.c \
     30         src/hw_ar3k.c
     31 
     32 ifneq ($(TARGET_USES_AOSP),true)
     33 #Disable this flag in case if FM over UART support not needed
     34 ifeq ($(QCOM_BT_FM_OVER_UART),true)
     35 LOCAL_CFLAGS := -DFM_OVER_UART
     36 endif
     37 endif
     38 
     39 ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
     40 LOCAL_CFLAGS += -DPANIC_ON_SOC_CRASH
     41 LOCAL_CFLAGS += -DENABLE_DBG_FLAGS
     42 endif
     43 
     44 LOCAL_C_INCLUDES += \
     45         $(LOCAL_PATH)/include \
     46         external/bluetooth/bluedroid/hci/include \
     47         system/bt/hci/include \
     48         $(TARGET_OUT_HEADERS)/bt/hci_qcomm_init \
     49         $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
     50 
     51 ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
     52 LOCAL_ADDITIONAL_DEPENDENCIES += \
     53 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
     54 endif
     55 
     56 ifeq ($(BOARD_HAS_QCA_BT_AR3002), true)
     57 LOCAL_C_FLAGS := \
     58         -DBT_WAKE_VIA_PROC
     59 endif #BOARD_HAS_QCA_BT_AR3002
     60 
     61 ifeq ($(WIFI_BT_STATUS_SYNC), true)
     62 LOCAL_CFLAGS += -DWIFI_BT_STATUS_SYNC
     63 endif #WIFI_BT_STATUS_SYNC
     64 
     65 LOCAL_SHARED_LIBRARIES := \
     66         libcutils \
     67         liblog
     68 
     69 LOCAL_HEADER_LIBRARIES := \
     70         libutils_headers
     71 
     72 LOCAL_MODULE := libbt-vendor
     73 LOCAL_MODULE_TAGS := optional
     74 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     75 LOCAL_MODULE_OWNER := qcom
     76 
     77 LOCAL_VENDOR_MODULE := true
     78 
     79 #LOCAL_CFLAGS += -DBT_NV_SUPPORT
     80 
     81 ifneq ($(BOARD_ANT_WIRELESS_DEVICE),)
     82 LOCAL_CFLAGS += -DENABLE_ANT
     83 endif
     84 #LOCAL_CFLAGS += -DREAD_BT_ADDR_FROM_PROP
     85 
     86 LOCAL_CFLAGS += \
     87       -Wall \
     88       -Werror \
     89       -Wno-error=user-defined-warnings \
     90       -Wno-incompatible-pointer-types-discards-qualifiers \
     91       -Wno-unused-function \
     92       -Wno-unused-label \
     93       -Wno-unused-variable \
     94 
     95 #include $(LOCAL_PATH)/vnd_buildcfg.mk
     96 
     97 include $(BUILD_SHARED_LIBRARY)
     98 
     99 endif # BOARD_HAVE_BLUETOOTH_QCOM
    100