OSDN Git Service

Cleanup C and C++ compiler flags
[android-x86/system-bt.git] / Android.mk
1 LOCAL_PATH := $(call my-dir)
2
3 # Setup Bluetooth local make variables for handling configuration
4 ifneq ($(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR),)
5   bluetooth_C_INCLUDES := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)
6   bluetooth_CFLAGS += -DHAS_BDROID_BUILDCFG
7 else
8   bluetooth_C_INCLUDES :=
9   bluetooth_CFLAGS += -DHAS_NO_BDROID_BUILDCFG
10 endif
11
12 ifneq ($(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED),)
13   bluetooth_CFLAGS += -DHCILP_INCLUDED=$(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED)
14 endif
15
16 ifneq ($(TARGET_BUILD_VARIANT),user)
17 bluetooth_CFLAGS += -DBLUEDROID_DEBUG
18 endif
19
20 bluetooth_CFLAGS += -DEXPORT_SYMBOL="__attribute__((visibility(\"default\")))"
21
22 #
23 # Common C/C++ compiler flags.
24 #
25 # - gnu-variable-sized-type-not-at-end is needed for a variable-size header in
26 #   a struct.
27 # - constant-logical-operand is needed for code in l2c_utils.c that looks
28 #   intentional.
29 #
30 bluetooth_CFLAGS += \
31   -fvisibility=hidden \
32   -Wall \
33   -Wextra \
34   -Werror \
35   -Wno-typedef-redefinition \
36   -Wno-gnu-variable-sized-type-not-at-end \
37   -Wno-unused-parameter \
38   -Wno-maybe-uninitialized \
39   -Wno-uninitialized \
40   -Wno-missing-field-initializers \
41   -Wno-unused-variable \
42   -Wno-non-literal-null-conversion \
43   -Wno-sign-compare \
44   -Wno-incompatible-pointer-types \
45   -Wno-unused-function \
46   -Wno-missing-braces \
47   -Wno-enum-conversion \
48   -Wno-logical-not-parentheses \
49   -Wno-parentheses \
50   -Wno-constant-logical-operand \
51   -Wno-format \
52   -UNDEBUG \
53   -DLOG_NDEBUG=1
54
55 bluetooth_CONLYFLAGS += -std=c99
56 bluetooth_CPPFLAGS :=
57
58 include $(call all-subdir-makefiles)
59
60 # Cleanup our locals
61 bluetooth_C_INCLUDES :=
62 bluetooth_CFLAGS :=
63 bluetooth_CONLYFLAGS :=
64 bluetooth_CPPFLAGS :=