summaryrefslogtreecommitdiffstats
path: root/main/Android.mk
blob: d98d2efef57d8b8303ce41017bc1964a6a2ce0da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
LOCAL_PATH:= $(call my-dir)

#
# Bluetooth HW module
#

include $(CLEAR_VARS)

ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
	LOCAL_CFLAGS += -DSAMPLE_RATE_48K
endif

# HAL layer
LOCAL_SRC_FILES:= \
	../btif/src/bluetooth.c

# platform specific
LOCAL_SRC_FILES+= \
	bte_main.c \
	bte_init.c \
	bte_logmsg.c \
	bte_conf.c \
	stack_config.c

# BTIF
LOCAL_SRC_FILES += \
    ../btif/src/btif_av.c \
    ../btif/src/btif_config.c \
    ../btif/src/btif_config_transcode.cpp \
    ../btif/src/btif_core.c \
    ../btif/src/btif_debug.c \
    ../btif/src/btif_debug_btsnoop.c \
    ../btif/src/btif_debug_conn.c \
    ../btif/src/btif_dm.c \
    ../btif/src/btif_gatt.c \
    ../btif/src/btif_gatt_client.c \
    ../btif/src/btif_gatt_multi_adv_util.c \
    ../btif/src/btif_gatt_server.c \
    ../btif/src/btif_gatt_test.c \
    ../btif/src/btif_gatt_util.c \
    ../btif/src/btif_hf.c \
    ../btif/src/btif_hf_client.c \
    ../btif/src/btif_hh.c \
    ../btif/src/btif_hd.c \
    ../btif/src/btif_hl.c \
    ../btif/src/btif_sdp.c \
    ../btif/src/btif_media_task.c \
    ../btif/src/btif_pan.c \
    ../btif/src/btif_profile_queue.c \
    ../btif/src/bluetoothTrack.cpp \
    ../btif/src/btif_rc.c \
    ../btif/src/btif_sm.c \
    ../btif/src/btif_sock.c \
    ../btif/src/btif_sock_rfc.c \
    ../btif/src/btif_sock_l2cap.c \
    ../btif/src/btif_sock_sco.c \
    ../btif/src/btif_sock_sdp.c \
    ../btif/src/btif_sock_thread.c \
    ../btif/src/btif_sdp_server.c \
    ../btif/src/btif_sock_util.c \
    ../btif/src/btif_storage.c \
    ../btif/src/btif_util.c \
    ../btif/src/stack_manager.c \
    ../btif/src/btif_rfcomm.c \
    ../btif/src/btif_mcap.c \
    ../btif/src/btif_l2cap.c \
    ../btif/src/btif_stack_log.c \
    ../btif/src/btif_gatt_qual.c \
    ../btif/src/btif_gap.c \
    ../btif/src/btif_smp.c
ifeq ($(BOARD_USES_WIPOWER), true)
    LOCAL_SRC_FILES += \
        ../wipowerif/src/wipower.c
endif

# callouts
LOCAL_SRC_FILES+= \
    ../btif/co/bta_ag_co.c \
    ../btif/co/bta_dm_co.c \
    ../btif/co/bta_av_co.c \
    ../btif/co/bta_hh_co.c \
    ../btif/co/bta_hl_co.c \
    ../btif/co/bta_pan_co.c \
    ../btif/co/bta_gattc_co.c \
    ../btif/co/bta_gatts_co.c \

# sbc encoder
LOCAL_SRC_FILES+= \
	../embdrv/sbc/encoder/srce/sbc_analysis.c \
	../embdrv/sbc/encoder/srce/sbc_dct.c \
	../embdrv/sbc/encoder/srce/sbc_dct_coeffs.c \
	../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c \
	../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c \
	../embdrv/sbc/encoder/srce/sbc_enc_coeffs.c \
	../embdrv/sbc/encoder/srce/sbc_encoder.c \
	../embdrv/sbc/encoder/srce/sbc_packing.c \

LOCAL_SRC_FILES+= \
	../udrv/ulinux/uipc.c

LOCAL_C_INCLUDES+= . \
	$(LOCAL_PATH)/../ \
	$(LOCAL_PATH)/../bta/include \
	$(LOCAL_PATH)/../bta/sys \
	$(LOCAL_PATH)/../bta/dm \
	$(LOCAL_PATH)/../btcore/include \
	$(LOCAL_PATH)/../osi/include \
	$(LOCAL_PATH)/../gki/common \
	$(LOCAL_PATH)/../gki/ulinux \
	$(LOCAL_PATH)/../include \
	$(LOCAL_PATH)/../stack/include \
	$(LOCAL_PATH)/../stack/l2cap \
	$(LOCAL_PATH)/../stack/a2dp \
	$(LOCAL_PATH)/../stack/btm \
	$(LOCAL_PATH)/../stack/avdt \
	$(LOCAL_PATH)/../hcis \
	$(LOCAL_PATH)/../hcis/include \
	$(LOCAL_PATH)/../hcis/patchram \
	$(LOCAL_PATH)/../udrv/include \
	$(LOCAL_PATH)/../btif/include \
	$(LOCAL_PATH)/../btif/co \
	$(LOCAL_PATH)/../hci/include\
	$(LOCAL_PATH)/../vnd/include \
	$(LOCAL_PATH)/../brcm/include \
	$(LOCAL_PATH)/../embdrv/sbc/encoder/include \
	$(LOCAL_PATH)/../embdrv/sbc/decoder/include \
	$(LOCAL_PATH)/../audio_a2dp_hw \
	$(LOCAL_PATH)/../utils/include \
	$(bdroid_C_INCLUDES) \
	external/tinyxml2 \
	external/zlib

ifeq ($(BOARD_USES_WIPOWER), true)
    LOCAL_C_INCLUDES+= $(LOCAL_PATH)/../wipowerif/include
endif

LOCAL_CFLAGS += -DBUILDCFG $(bdroid_CFLAGS) -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=unused-parameter
LOCAL_CONLYFLAGS := -std=c99

ifeq ($(TARGET_PRODUCT), full_crespo)
     LOCAL_CFLAGS += -DTARGET_CRESPO
endif
ifeq ($(TARGET_PRODUCT), full_crespo4g)
     LOCAL_CFLAGS += -DTARGET_CRESPO
endif
ifeq ($(TARGET_PRODUCT), full_maguro)
     LOCAL_CFLAGS += -DTARGET_MAGURO
endif

LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libdl \
    liblog \
    libpower \
    libz \
    libmedia \
    libutils

LOCAL_STATIC_LIBRARIES := \
    libtinyxml2 \
    libbt-qcom_sbc_decoder

LOCAL_WHOLE_STATIC_LIBRARIES := \
    libbt-brcm_bta \
    libbt-brcm_gki \
    libbt-brcm_stack \
    libbtdevice \
    libbt-hci \
    libbt-utils \
    libbtcore \
    libosi

LOCAL_MODULE := bluetooth.default
LOCAL_CLANG := false
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES

#
# Shared library link options.
# References to global symbols and functions should bind to the library
# itself. This is to avoid issues with some of the unit/system tests
# that might link statically with some of the code in the library, and
# also dlopen(3) the shared library.
#
LOCAL_LDLIBS := -Wl,-Bsymbolic,-Bsymbolic-functions

LOCAL_REQUIRED_MODULES := \
    auto_pair_devlist.conf \
    bt_did.conf \
    bt_stack.conf \
    libbt-hci \
    libbt-vendor

LOCAL_MULTILIB := 32

LOCAL_CLANG_CFLAGS := -Wno-error=gnu-variable-sized-type-not-at-end
LOCAL_CLANG_CFLAGS += -Wno-typedef-redefinition

include $(BUILD_SHARED_LIBRARY)