• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH := $(call my-dir)
2
3# Setup Bluetooth local make variables for handling configuration
4ifneq ($(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR),)
5  bluetooth_C_INCLUDES := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)
6  bluetooth_CFLAGS += -DHAS_BDROID_BUILDCFG
7else
8  bluetooth_C_INCLUDES :=
9  bluetooth_CFLAGS += -DHAS_NO_BDROID_BUILDCFG
10endif
11
12ifneq ($(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED),)
13  bluetooth_CFLAGS += -DHCILP_INCLUDED=$(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED)
14endif
15
16ifneq ($(TARGET_BUILD_VARIANT),user)
17bluetooth_CFLAGS += -DBLUEDROID_DEBUG
18endif
19
20bluetooth_CFLAGS += -DEXPORT_SYMBOL="__attribute__((visibility(\"default\")))"
21
22#
23# Common C/C++ compiler flags.
24#
25# -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.
32#
33bluetooth_CFLAGS += \
34  -fvisibility=hidden \
35  -Wall \
36  -Wextra \
37  -Werror \
38  -Wno-gnu-variable-sized-type-not-at-end \
39  -Wno-typedef-redefinition \
40  -Wno-unused-parameter \
41  -UNDEBUG \
42  -DLOG_NDEBUG=1
43
44bluetooth_CONLYFLAGS += -std=c99
45bluetooth_CPPFLAGS :=
46
47include $(call all-subdir-makefiles)
48
49# Cleanup our locals
50bluetooth_C_INCLUDES :=
51bluetooth_CFLAGS :=
52bluetooth_CONLYFLAGS :=
53bluetooth_CPPFLAGS :=
54