Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 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 | |
Ilia Lin | 8e30e72 | 2013-09-16 21:10:40 +0300 | [diff] [blame] | 19 | ifeq ($(BOARD_HAVE_BLUETOOTH_QCOM),true) |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 20 | |
| 21 | include $(CLEAR_VARS) |
| 22 | |
RAJATH R | 4f3b5c1 | 2018-04-04 16:30:51 +0530 | [diff] [blame] | 23 | #logging headers |
Srinu Jella | 73216bb | 2018-04-29 13:58:15 +0530 | [diff] [blame] | 24 | LOCAL_HEADER_LIBRARIES := libutils_headers |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 25 | LOCAL_SRC_FILES := \ |
| 26 | src/bt_vendor_qcom.c \ |
| 27 | src/hardware.c \ |
Sungjun Park | 5b324b2 | 2013-09-24 18:17:00 -0700 | [diff] [blame] | 28 | src/hci_uart.c \ |
| 29 | src/hci_smd.c \ |
| 30 | src/hw_rome.c \ |
Vadivel Thekkamalai | 8de7842 | 2013-10-08 11:33:55 -0700 | [diff] [blame] | 31 | src/hw_ar3k.c \ |
| 32 | src/bt_vendor_persist.cpp |
Sungjun Park | 5b324b2 | 2013-09-24 18:17:00 -0700 | [diff] [blame] | 33 | |
Yanfei Zhou | 6091453 | 2017-09-22 13:42:39 +0800 | [diff] [blame] | 34 | # By default, "ENABLE_FM_OVER_UART" is un-defined. |
| 35 | # To enable the feature, set it as "true" in "BoardConfig.mk". |
| 36 | ifeq ($(ENABLE_FM_OVER_UART), true) |
Bhakthavatsala Raghavendra | d50b139 | 2016-04-13 11:42:15 -0700 | [diff] [blame] | 37 | LOCAL_CFLAGS := -DFM_OVER_UART |
Yanfei Zhou | 6091453 | 2017-09-22 13:42:39 +0800 | [diff] [blame] | 38 | endif |
Bhakthavatsala Raghavendra | d50b139 | 2016-04-13 11:42:15 -0700 | [diff] [blame] | 39 | |
Sungjun Park | 33146d4 | 2015-06-10 15:55:37 -0700 | [diff] [blame] | 40 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 41 | LOCAL_CFLAGS += -DPANIC_ON_SOC_CRASH |
Manu Viswanadhan | cb1c424 | 2016-11-15 17:04:37 +0530 | [diff] [blame] | 42 | LOCAL_CFLAGS += -DENABLE_DBG_FLAGS |
Sungjun Park | 33146d4 | 2015-06-10 15:55:37 -0700 | [diff] [blame] | 43 | endif |
| 44 | |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 45 | LOCAL_C_INCLUDES += \ |
| 46 | $(LOCAL_PATH)/include \ |
Mahesh Kumar Sharma | 4a50201 | 2015-06-17 17:38:25 -0700 | [diff] [blame] | 47 | external/bluetooth/bluedroid/hci/include \ |
Arne Coucheron | 03b5f8c | 2018-08-26 04:04:08 +0200 | [diff] [blame] | 48 | system/bt/hci/include \ |
Bruno Martins | 9d32e69 | 2018-11-02 11:14:56 +0000 | [diff] [blame] | 49 | $(TARGET_OUT_HEADERS)/bt/hci_qcomm_init |
Luke Zhang | ba61352 | 2016-11-14 10:01:44 -0800 | [diff] [blame] | 50 | |
Karsten Tausche | b5cf9e9 | 2020-03-02 17:59:59 +0100 | [diff] [blame] | 51 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 52 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
| 53 | |
Ilia Lin | 19b4c94 | 2013-09-02 13:42:42 +0300 | [diff] [blame] | 54 | ifeq ($(BOARD_HAS_QCA_BT_AR3002), true) |
| 55 | LOCAL_C_FLAGS := \ |
| 56 | -DBT_WAKE_VIA_PROC |
| 57 | endif #BOARD_HAS_QCA_BT_AR3002 |
| 58 | |
Pradeep Panigrahi | 0fb6684 | 2014-01-28 15:04:08 +0530 | [diff] [blame] | 59 | ifeq ($(WIFI_BT_STATUS_SYNC), true) |
| 60 | LOCAL_CFLAGS += -DWIFI_BT_STATUS_SYNC |
| 61 | endif #WIFI_BT_STATUS_SYNC |
| 62 | |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 63 | LOCAL_SHARED_LIBRARIES := \ |
Ying Wang | cb62121 | 2013-04-09 21:58:41 -0700 | [diff] [blame] | 64 | libcutils \ |
Steve Kondik | c3f4881 | 2014-05-04 00:39:25 -0700 | [diff] [blame] | 65 | liblog |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 66 | |
Jiyong Park | a697ca4 | 2017-06-27 18:29:11 +0900 | [diff] [blame] | 67 | LOCAL_HEADER_LIBRARIES := \ |
| 68 | libutils_headers |
| 69 | |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 70 | LOCAL_MODULE := libbt-vendor |
| 71 | LOCAL_MODULE_TAGS := optional |
| 72 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 73 | LOCAL_MODULE_OWNER := qcom |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 74 | |
Vishwath Mohan | ef219ec | 2017-05-02 12:08:58 -0700 | [diff] [blame] | 75 | LOCAL_VENDOR_MODULE := true |
Mahesh Kumar Sharma | 4a50201 | 2015-06-17 17:38:25 -0700 | [diff] [blame] | 76 | |
Scott Mertz | a8e82ff | 2015-08-13 16:08:56 -0700 | [diff] [blame] | 77 | ifeq ($(QCOM_BT_USE_BTNV),true) |
Vadivel Thekkamalai | 8de7842 | 2013-10-08 11:33:55 -0700 | [diff] [blame] | 78 | LOCAL_CFLAGS += -DBT_NV_SUPPORT |
Scott Mertz | a8e82ff | 2015-08-13 16:08:56 -0700 | [diff] [blame] | 79 | ifeq ($(QCPATH),) |
| 80 | LOCAL_SHARED_LIBRARIES += libdl |
| 81 | LOCAL_CFLAGS += -DBT_NV_SUPPORT_DL |
| 82 | else |
Steve Kondik | c3f4881 | 2014-05-04 00:39:25 -0700 | [diff] [blame] | 83 | LOCAL_SHARED_LIBRARIES += libbtnv |
| 84 | endif |
Scott Mertz | a8e82ff | 2015-08-13 16:08:56 -0700 | [diff] [blame] | 85 | endif |
Steve Kondik | c3f4881 | 2014-05-04 00:39:25 -0700 | [diff] [blame] | 86 | |
Soumil Shah | e0db187 | 2018-01-26 18:56:37 -0800 | [diff] [blame] | 87 | LOCAL_CFLAGS += -Wno-unused-variable |
| 88 | LOCAL_CFLAGS += -Wno-unused-label |
| 89 | LOCAL_CFLAGS += -Wno-user-defined-warnings |
| 90 | LOCAL_CFLAGS += -Wno-unused-parameter |
| 91 | LOCAL_CFLAGS += -Wno-incompatible-pointer-types-discards-qualifiers |
| 92 | LOCAL_CFLAGS += -Wno-unused-function |
Divya Sharma | 28c05eb | 2018-03-19 15:43:31 -0700 | [diff] [blame] | 93 | LOCAL_CFLAGS += -Wno-enum-conversion |
Kiran Kelageri | 6e54461 | 2015-08-04 15:06:22 -0700 | [diff] [blame] | 94 | |
| 95 | ifneq ($(BOARD_ANT_WIRELESS_DEVICE),) |
| 96 | LOCAL_CFLAGS += -DENABLE_ANT |
| 97 | endif |
Alberto97 | 79c7aee | 2017-08-07 23:09:38 +0200 | [diff] [blame] | 98 | ifeq ($(QCOM_BT_READ_ADDR_FROM_PROP),true) |
| 99 | LOCAL_CFLAGS += -DREAD_BT_ADDR_FROM_PROP |
| 100 | endif |
LuK1337 | a790391 | 2019-02-19 14:30:40 +0100 | [diff] [blame] | 101 | ifeq ($(QCOM_BT_USE_OLD_WCNSS_FILTER),true) |
| 102 | LOCAL_CFLAGS += -DUSE_OLD_WCNSS_FILTER |
| 103 | endif |
Vadivel Thekkamalai | 8de7842 | 2013-10-08 11:33:55 -0700 | [diff] [blame] | 104 | |
Mahesh Kumar Sharma | 4a50201 | 2015-06-17 17:38:25 -0700 | [diff] [blame] | 105 | #include $(LOCAL_PATH)/vnd_buildcfg.mk |
Iliyan Malchev | ad7eab0 | 2012-10-10 22:24:12 -0700 | [diff] [blame] | 106 | |
| 107 | include $(BUILD_SHARED_LIBRARY) |
| 108 | |
| 109 | endif # BOARD_HAVE_BLUETOOTH_QCOM |