The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 3 | # Setup Bluetooth local make variables for handling configuration |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 4 | ifneq ($(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR),) |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 5 | bluetooth_C_INCLUDES := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR) |
| 6 | bluetooth_CFLAGS += -DHAS_BDROID_BUILDCFG |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 7 | else |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 8 | bluetooth_C_INCLUDES := |
| 9 | bluetooth_CFLAGS += -DHAS_NO_BDROID_BUILDCFG |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 10 | endif |
| 11 | |
Sai Aitharaju | 81f43b0 | 2015-06-19 09:14:00 +0530 | [diff] [blame] | 12 | ifeq ($(TARGET_BUILD_VARIANT),userdebug) |
Matadeen Mishra | e717668 | 2016-08-12 15:53:29 +0530 | [diff] [blame] | 13 | bluetooth_CFLAGS += -DQLOGKIT_USERDEBUG |
Sai Aitharaju | 81f43b0 | 2015-06-19 09:14:00 +0530 | [diff] [blame] | 14 | endif |
| 15 | |
Richie Hsieh | c928a4f | 2014-04-17 22:39:31 +0800 | [diff] [blame] | 16 | ifneq ($(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED),) |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 17 | bluetooth_CFLAGS += -DHCILP_INCLUDED=$(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED) |
Richie Hsieh | c928a4f | 2014-04-17 22:39:31 +0800 | [diff] [blame] | 18 | endif |
| 19 | |
Aaron Kling | 61ea31d | 2016-01-06 13:48:26 -0600 | [diff] [blame] | 20 | ifeq ($(TARGET_BUILD_VARIANT),eng) |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 21 | bluetooth_CFLAGS += -DBLUEDROID_DEBUG |
Sharvil Nanavati | c0745da | 2014-11-13 01:04:19 -0800 | [diff] [blame] | 22 | endif |
| 23 | |
Venkateshwarlu Domakonda | 9d594b7 | 2016-08-01 11:10:40 +0530 | [diff] [blame] | 24 | bluetooth_CFLAGS += -DUSE_AUDIO_TRACK |
| 25 | |
Kiran Kelageri | 10df4bb | 2016-10-16 19:38:08 -0700 | [diff] [blame] | 26 | ifeq ($(BOARD_USES_WIPOWER),true) |
| 27 | bluetooth_CFLAGS += -DWIPOWER_SUPPORTED |
| 28 | endif |
| 29 | |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 30 | bluetooth_CFLAGS += -DEXPORT_SYMBOL="__attribute__((visibility(\"default\")))" |
Ian Coolidge | 1f81b64 | 2015-04-21 16:25:08 -0700 | [diff] [blame] | 31 | |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 32 | # |
| 33 | # Common C/C++ compiler flags. |
| 34 | # |
Pavlin Radoslavov | 12265e3 | 2016-02-13 08:47:19 -0800 | [diff] [blame] | 35 | # -Wno-gnu-variable-sized-type-not-at-end is needed, because struct BT_HDR |
| 36 | # is defined as a variable-size header in a struct. |
| 37 | # -Wno-typedef-redefinition is needed because of the way the struct typedef |
| 38 | # is done in osi/include header files. This issue can be obsoleted by |
| 39 | # switching to C11 or C++. |
| 40 | # -Wno-unused-parameter is needed, because there are too many unused |
| 41 | # parameters in all the code. |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 42 | # |
| 43 | bluetooth_CFLAGS += \ |
Ian Coolidge | 1f81b64 | 2015-04-21 16:25:08 -0700 | [diff] [blame] | 44 | -fvisibility=hidden \ |
Sharvil Nanavati | f1c764f | 2015-02-23 17:31:48 -0800 | [diff] [blame] | 45 | -Wall \ |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 46 | -Wextra \ |
| 47 | -Werror \ |
Pavlin Radoslavov | 12265e3 | 2016-02-13 08:47:19 -0800 | [diff] [blame] | 48 | -Wno-gnu-variable-sized-type-not-at-end \ |
| 49 | -Wno-typedef-redefinition \ |
| 50 | -Wno-unused-parameter \ |
Sharvil Nanavati | f1c764f | 2015-02-23 17:31:48 -0800 | [diff] [blame] | 51 | -UNDEBUG \ |
| 52 | -DLOG_NDEBUG=1 |
| 53 | |
Ayan Ghosh | e7eb410 | 2015-10-07 18:34:50 +0530 | [diff] [blame] | 54 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPLIT_A2DP)),true) |
pramod kotreshappa | 696abe5 | 2016-05-09 23:44:35 -0700 | [diff] [blame] | 55 | bluetooth_CFLAGS += -DBTA_AV_SPLIT_A2DP_ENABLED |
| 56 | bluetooth_CFLAGS += -DBTA_AV_SPLIT_A2DP_DEF_FREQ_48KHZ |
| 57 | bluetooth_CFLAGS += -DAPTX_48000 |
Ayan Ghosh | e7eb410 | 2015-10-07 18:34:50 +0530 | [diff] [blame] | 58 | endif |
| 59 | |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 60 | bluetooth_CONLYFLAGS += -std=c99 |
| 61 | bluetooth_CPPFLAGS := |
| 62 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 63 | include $(call all-subdir-makefiles) |
| 64 | |
| 65 | # Cleanup our locals |
Pavlin Radoslavov | 0b60bb0 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 66 | bluetooth_C_INCLUDES := |
| 67 | bluetooth_CFLAGS := |
| 68 | bluetooth_CONLYFLAGS := |
| 69 | bluetooth_CPPFLAGS := |