1LOCAL_PATH:= $(call my-dir)
2
3# Bluetooth main HW module / shared library for target
4# ========================================================
5include $(CLEAR_VARS)
6
7# platform specific
8LOCAL_SRC_FILES+= \
9	bte_main.c \
10	bte_init.c \
11	bte_logmsg.c \
12	bte_conf.c \
13	stack_config.c
14
15# sbc encoder
16LOCAL_SRC_FILES+= \
17	../embdrv/sbc/encoder/srce/sbc_analysis.c \
18	../embdrv/sbc/encoder/srce/sbc_dct.c \
19	../embdrv/sbc/encoder/srce/sbc_dct_coeffs.c \
20	../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c \
21	../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c \
22	../embdrv/sbc/encoder/srce/sbc_enc_coeffs.c \
23	../embdrv/sbc/encoder/srce/sbc_encoder.c \
24	../embdrv/sbc/encoder/srce/sbc_packing.c \
25
26LOCAL_SRC_FILES+= \
27	../udrv/ulinux/uipc.c
28
29LOCAL_C_INCLUDES+= . \
30	$(LOCAL_PATH)/../ \
31	$(LOCAL_PATH)/../bta/include \
32	$(LOCAL_PATH)/../bta/sys \
33	$(LOCAL_PATH)/../bta/dm \
34	$(LOCAL_PATH)/../btcore/include \
35	$(LOCAL_PATH)/../include \
36	$(LOCAL_PATH)/../stack/include \
37	$(LOCAL_PATH)/../stack/l2cap \
38	$(LOCAL_PATH)/../stack/a2dp \
39	$(LOCAL_PATH)/../stack/btm \
40	$(LOCAL_PATH)/../stack/avdt \
41	$(LOCAL_PATH)/../hcis \
42	$(LOCAL_PATH)/../hcis/include \
43	$(LOCAL_PATH)/../hcis/patchram \
44	$(LOCAL_PATH)/../udrv/include \
45	$(LOCAL_PATH)/../btif/include \
46	$(LOCAL_PATH)/../btif/co \
47	$(LOCAL_PATH)/../hci/include\
48	$(LOCAL_PATH)/../vnd/include \
49	$(LOCAL_PATH)/../brcm/include \
50	$(LOCAL_PATH)/../embdrv/sbc/encoder/include \
51	$(LOCAL_PATH)/../embdrv/sbc/decoder/include \
52	$(LOCAL_PATH)/../audio_a2dp_hw \
53	$(LOCAL_PATH)/../utils/include \
54	$(bluetooth_C_INCLUDES) \
55	external/tinyxml2 \
56	external/zlib
57
58LOCAL_SHARED_LIBRARIES := \
59    libcutils \
60    libdl \
61    liblog \
62    libz \
63    libpower \
64    libprotobuf-cpp-full \
65    libmedia \
66    libutils \
67    libchrome
68
69LOCAL_STATIC_LIBRARIES := \
70    libtinyxml2 \
71    libbt-qcom_sbc_decoder
72
73LOCAL_WHOLE_STATIC_LIBRARIES := \
74    libbt-bta \
75    libbtdevice \
76    libbtif \
77    libbt-hci \
78    libbt-protos \
79    libbt-stack \
80    libbt-utils \
81    libbtcore \
82    libosi
83
84LOCAL_MODULE := bluetooth.default
85LOCAL_MODULE_RELATIVE_PATH := hw
86LOCAL_MODULE_TAGS := optional
87LOCAL_MODULE_CLASS := SHARED_LIBRARIES
88
89#
90# Shared library link options.
91# References to global symbols and functions should bind to the library
92# itself. This is to avoid issues with some of the unit/system tests
93# that might link statically with some of the code in the library, and
94# also dlopen(3) the shared library.
95#
96LOCAL_LDLIBS := -Wl,-Bsymbolic,-Bsymbolic-functions
97
98LOCAL_REQUIRED_MODULES := \
99    bt_did.conf \
100    bt_stack.conf \
101    libbt-hci \
102    libbt-vendor
103
104LOCAL_CFLAGS += $(bluetooth_CFLAGS) -DBUILDCFG
105LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
106LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
107
108include $(BUILD_SHARED_LIBRARY)
109