blob: 6acb661c0aee4a021dd4c1b76f74a93c10790429 [file] [log] [blame]
The Android Open Source Project5738f832012-12-12 16:00:35 -08001LOCAL_PATH := $(call my-dir)
2
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -08003# Setup Bluetooth local make variables for handling configuration
The Android Open Source Project5738f832012-12-12 16:00:35 -08004ifneq ($(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR),)
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -08005 bluetooth_C_INCLUDES := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)
6 bluetooth_CFLAGS += -DHAS_BDROID_BUILDCFG
The Android Open Source Project5738f832012-12-12 16:00:35 -08007else
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -08008 bluetooth_C_INCLUDES :=
9 bluetooth_CFLAGS += -DHAS_NO_BDROID_BUILDCFG
The Android Open Source Project5738f832012-12-12 16:00:35 -080010endif
11
Sai Aitharaju81f43b02015-06-19 09:14:00 +053012ifeq ($(TARGET_BUILD_VARIANT),userdebug)
Matadeen Mishrae7176682016-08-12 15:53:29 +053013bluetooth_CFLAGS += -DQLOGKIT_USERDEBUG
Sai Aitharaju81f43b02015-06-19 09:14:00 +053014endif
15
Richie Hsiehc928a4f2014-04-17 22:39:31 +080016ifneq ($(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED),)
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080017 bluetooth_CFLAGS += -DHCILP_INCLUDED=$(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED)
Richie Hsiehc928a4f2014-04-17 22:39:31 +080018endif
19
Aaron Kling61ea31d2016-01-06 13:48:26 -060020ifeq ($(TARGET_BUILD_VARIANT),eng)
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080021bluetooth_CFLAGS += -DBLUEDROID_DEBUG
Sharvil Nanavatic0745da2014-11-13 01:04:19 -080022endif
23
Venkateshwarlu Domakonda9d594b72016-08-01 11:10:40 +053024bluetooth_CFLAGS += -DUSE_AUDIO_TRACK
25
Kiran Kelageri10df4bb2016-10-16 19:38:08 -070026ifeq ($(BOARD_USES_WIPOWER),true)
27bluetooth_CFLAGS += -DWIPOWER_SUPPORTED
28endif
29
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080030bluetooth_CFLAGS += -DEXPORT_SYMBOL="__attribute__((visibility(\"default\")))"
Ian Coolidge1f81b642015-04-21 16:25:08 -070031
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080032#
33# Common C/C++ compiler flags.
34#
Pavlin Radoslavov12265e32016-02-13 08:47:19 -080035# -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 Radoslavov0b60bb02016-02-11 19:44:47 -080042#
43bluetooth_CFLAGS += \
Ian Coolidge1f81b642015-04-21 16:25:08 -070044 -fvisibility=hidden \
Sharvil Nanavatif1c764f2015-02-23 17:31:48 -080045 -Wall \
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080046 -Wextra \
47 -Werror \
Pavlin Radoslavov12265e32016-02-13 08:47:19 -080048 -Wno-gnu-variable-sized-type-not-at-end \
49 -Wno-typedef-redefinition \
50 -Wno-unused-parameter \
Sharvil Nanavatif1c764f2015-02-23 17:31:48 -080051 -UNDEBUG \
52 -DLOG_NDEBUG=1
53
Ayan Ghoshe7eb4102015-10-07 18:34:50 +053054ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPLIT_A2DP)),true)
pramod kotreshappa696abe52016-05-09 23:44:35 -070055bluetooth_CFLAGS += -DBTA_AV_SPLIT_A2DP_ENABLED
56bluetooth_CFLAGS += -DBTA_AV_SPLIT_A2DP_DEF_FREQ_48KHZ
57bluetooth_CFLAGS += -DAPTX_48000
Ayan Ghoshe7eb4102015-10-07 18:34:50 +053058endif
59
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080060bluetooth_CONLYFLAGS += -std=c99
61bluetooth_CPPFLAGS :=
62
The Android Open Source Project5738f832012-12-12 16:00:35 -080063include $(call all-subdir-makefiles)
64
65# Cleanup our locals
Pavlin Radoslavov0b60bb02016-02-11 19:44:47 -080066bluetooth_C_INCLUDES :=
67bluetooth_CFLAGS :=
68bluetooth_CONLYFLAGS :=
69bluetooth_CPPFLAGS :=