blob: 29760e4e0bd2e702ca3d1e88ced63eda95604681 [file] [log] [blame]
The Android Open Source Project5738f832012-12-12 16:00:35 -08001LOCAL_PATH := $(call my-dir)
2
Pavlin Radoslavov1377f932016-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 Radoslavov1377f932016-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 Radoslavov1377f932016-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
Richie Hsiehc928a4f2014-04-17 22:39:31 +080012ifneq ($(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED),)
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080013 bluetooth_CFLAGS += -DHCILP_INCLUDED=$(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED)
Richie Hsiehc928a4f2014-04-17 22:39:31 +080014endif
15
Sharvil Nanavatic0745da2014-11-13 01:04:19 -080016ifneq ($(TARGET_BUILD_VARIANT),user)
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080017bluetooth_CFLAGS += -DBLUEDROID_DEBUG
Sharvil Nanavatic0745da2014-11-13 01:04:19 -080018endif
19
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080020bluetooth_CFLAGS += -DEXPORT_SYMBOL="__attribute__((visibility(\"default\")))"
Ian Coolidge1f81b642015-04-21 16:25:08 -070021
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080022#
23# Common C/C++ compiler flags.
24#
Pavlin Radoslavov43947202016-02-13 08:47:19 -080025# -Wno-gnu-variable-sized-type-not-at-end is needed, because struct BT_HDR
26# is defined as a variable-size header in a struct.
27# -Wno-typedef-redefinition is needed because of the way the struct typedef
28# is done in osi/include header files. This issue can be obsoleted by
29# switching to C11 or C++.
30# -Wno-unused-parameter is needed, because there are too many unused
31# parameters in all the code.
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080032#
33bluetooth_CFLAGS += \
Ian Coolidge1f81b642015-04-21 16:25:08 -070034 -fvisibility=hidden \
Sharvil Nanavatif1c764f2015-02-23 17:31:48 -080035 -Wall \
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080036 -Wextra \
37 -Werror \
Pavlin Radoslavov43947202016-02-13 08:47:19 -080038 -Wno-gnu-variable-sized-type-not-at-end \
39 -Wno-typedef-redefinition \
40 -Wno-unused-parameter \
Sharvil Nanavatif1c764f2015-02-23 17:31:48 -080041 -UNDEBUG \
42 -DLOG_NDEBUG=1
43
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080044bluetooth_CONLYFLAGS += -std=c99
45bluetooth_CPPFLAGS :=
46
The Android Open Source Project5738f832012-12-12 16:00:35 -080047include $(call all-subdir-makefiles)
48
49# Cleanup our locals
Pavlin Radoslavov1377f932016-02-11 19:44:47 -080050bluetooth_C_INCLUDES :=
51bluetooth_CFLAGS :=
52bluetooth_CONLYFLAGS :=
53bluetooth_CPPFLAGS :=