blob: 87fef5484d20a0144e4da4db12f32592b8f97bb0 [file] [log] [blame]
Iliyan Malchevad7eab02012-10-10 22:24:12 -07001#
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
17LOCAL_PATH := $(call my-dir)
18
Ilia Lin8e30e722013-09-16 21:10:40 +030019ifeq ($(BOARD_HAVE_BLUETOOTH_QCOM),true)
Iliyan Malchevad7eab02012-10-10 22:24:12 -070020
21include $(CLEAR_VARS)
22
RAJATH R4f3b5c12018-04-04 16:30:51 +053023#logging headers
Srinu Jella73216bb2018-04-29 13:58:15 +053024LOCAL_HEADER_LIBRARIES := libutils_headers
Iliyan Malchevad7eab02012-10-10 22:24:12 -070025LOCAL_SRC_FILES := \
26 src/bt_vendor_qcom.c \
27 src/hardware.c \
Sungjun Park5b324b22013-09-24 18:17:00 -070028 src/hci_uart.c \
29 src/hci_smd.c \
30 src/hw_rome.c \
Vadivel Thekkamalai8de78422013-10-08 11:33:55 -070031 src/hw_ar3k.c \
32 src/bt_vendor_persist.cpp
Sungjun Park5b324b22013-09-24 18:17:00 -070033
Yanfei Zhou60914532017-09-22 13:42:39 +080034# By default, "ENABLE_FM_OVER_UART" is un-defined.
35# To enable the feature, set it as "true" in "BoardConfig.mk".
36ifeq ($(ENABLE_FM_OVER_UART), true)
Bhakthavatsala Raghavendrad50b1392016-04-13 11:42:15 -070037LOCAL_CFLAGS := -DFM_OVER_UART
Yanfei Zhou60914532017-09-22 13:42:39 +080038endif
Bhakthavatsala Raghavendrad50b1392016-04-13 11:42:15 -070039
Sungjun Park33146d42015-06-10 15:55:37 -070040ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
41LOCAL_CFLAGS += -DPANIC_ON_SOC_CRASH
Manu Viswanadhancb1c4242016-11-15 17:04:37 +053042LOCAL_CFLAGS += -DENABLE_DBG_FLAGS
Sungjun Park33146d42015-06-10 15:55:37 -070043endif
44
Iliyan Malchevad7eab02012-10-10 22:24:12 -070045LOCAL_C_INCLUDES += \
46 $(LOCAL_PATH)/include \
Mahesh Kumar Sharma4a502012015-06-17 17:38:25 -070047 external/bluetooth/bluedroid/hci/include \
Arne Coucheron03b5f8c2018-08-26 04:04:08 +020048 system/bt/hci/include \
Bruno Martins9d32e692018-11-02 11:14:56 +000049 $(TARGET_OUT_HEADERS)/bt/hci_qcomm_init
Luke Zhangba613522016-11-14 10:01:44 -080050
Karsten Tauscheb5cf9e92020-03-02 17:59:59 +010051LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
52LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
53
Ilia Lin19b4c942013-09-02 13:42:42 +030054ifeq ($(BOARD_HAS_QCA_BT_AR3002), true)
55LOCAL_C_FLAGS := \
56 -DBT_WAKE_VIA_PROC
57endif #BOARD_HAS_QCA_BT_AR3002
58
Pradeep Panigrahi0fb66842014-01-28 15:04:08 +053059ifeq ($(WIFI_BT_STATUS_SYNC), true)
60LOCAL_CFLAGS += -DWIFI_BT_STATUS_SYNC
61endif #WIFI_BT_STATUS_SYNC
62
Iliyan Malchevad7eab02012-10-10 22:24:12 -070063LOCAL_SHARED_LIBRARIES := \
Ying Wangcb621212013-04-09 21:58:41 -070064 libcutils \
Steve Kondikc3f48812014-05-04 00:39:25 -070065 liblog
Iliyan Malchevad7eab02012-10-10 22:24:12 -070066
Jiyong Parka697ca42017-06-27 18:29:11 +090067LOCAL_HEADER_LIBRARIES := \
68 libutils_headers
69
Iliyan Malchevad7eab02012-10-10 22:24:12 -070070LOCAL_MODULE := libbt-vendor
71LOCAL_MODULE_TAGS := optional
72LOCAL_MODULE_CLASS := SHARED_LIBRARIES
73LOCAL_MODULE_OWNER := qcom
Iliyan Malchevad7eab02012-10-10 22:24:12 -070074
Vishwath Mohanef219ec2017-05-02 12:08:58 -070075LOCAL_VENDOR_MODULE := true
Mahesh Kumar Sharma4a502012015-06-17 17:38:25 -070076
Scott Mertza8e82ff2015-08-13 16:08:56 -070077ifeq ($(QCOM_BT_USE_BTNV),true)
Vadivel Thekkamalai8de78422013-10-08 11:33:55 -070078LOCAL_CFLAGS += -DBT_NV_SUPPORT
Scott Mertza8e82ff2015-08-13 16:08:56 -070079ifeq ($(QCPATH),)
80LOCAL_SHARED_LIBRARIES += libdl
81LOCAL_CFLAGS += -DBT_NV_SUPPORT_DL
82else
Steve Kondikc3f48812014-05-04 00:39:25 -070083LOCAL_SHARED_LIBRARIES += libbtnv
84endif
Scott Mertza8e82ff2015-08-13 16:08:56 -070085endif
Steve Kondikc3f48812014-05-04 00:39:25 -070086
Soumil Shahe0db1872018-01-26 18:56:37 -080087LOCAL_CFLAGS += -Wno-unused-variable
88LOCAL_CFLAGS += -Wno-unused-label
89LOCAL_CFLAGS += -Wno-user-defined-warnings
90LOCAL_CFLAGS += -Wno-unused-parameter
91LOCAL_CFLAGS += -Wno-incompatible-pointer-types-discards-qualifiers
92LOCAL_CFLAGS += -Wno-unused-function
Divya Sharma28c05eb2018-03-19 15:43:31 -070093LOCAL_CFLAGS += -Wno-enum-conversion
Kiran Kelageri6e544612015-08-04 15:06:22 -070094
95ifneq ($(BOARD_ANT_WIRELESS_DEVICE),)
96LOCAL_CFLAGS += -DENABLE_ANT
97endif
Alberto9779c7aee2017-08-07 23:09:38 +020098ifeq ($(QCOM_BT_READ_ADDR_FROM_PROP),true)
99LOCAL_CFLAGS += -DREAD_BT_ADDR_FROM_PROP
100endif
LuK1337a7903912019-02-19 14:30:40 +0100101ifeq ($(QCOM_BT_USE_OLD_WCNSS_FILTER),true)
102LOCAL_CFLAGS += -DUSE_OLD_WCNSS_FILTER
103endif
Vadivel Thekkamalai8de78422013-10-08 11:33:55 -0700104
Mahesh Kumar Sharma4a502012015-06-17 17:38:25 -0700105#include $(LOCAL_PATH)/vnd_buildcfg.mk
Iliyan Malchevad7eab02012-10-10 22:24:12 -0700106
107include $(BUILD_SHARED_LIBRARY)
108
109endif # BOARD_HAVE_BLUETOOTH_QCOM