blob: ff7b4a503fd49b4fd30e194efb7f03229d5ee089 [file] [log] [blame]
Ian McKellare93ac122013-11-07 16:30:05 -08001LOCAL_PATH:= $(call my-dir)
The Android Open Source Project5738f832012-12-12 16:00:35 -08002
3#
4# Bluetooth HW module
5#
6
7include $(CLEAR_VARS)
8
9# HAL layer
10LOCAL_SRC_FILES:= \
11 ../btif/src/bluetooth.c
12
13# platform specific
Ian McKellare93ac122013-11-07 16:30:05 -080014LOCAL_SRC_FILES+= \
15 bte_main.c \
The Android Open Source Project5738f832012-12-12 16:00:35 -080016 bte_init.c \
The Android Open Source Project5738f832012-12-12 16:00:35 -080017 bte_logmsg.c \
Zach Johnson9891f322014-09-22 22:11:55 -070018 bte_conf.c \
19 stack_config.c
The Android Open Source Project5738f832012-12-12 16:00:35 -080020
21# BTIF
22LOCAL_SRC_FILES += \
Sharvil Nanavatib95c4ef2014-08-15 18:58:22 -070023 ../btif/src/btif_av.c \
24 ../btif/src/btif_config.c \
25 ../btif/src/btif_config_transcode.cpp \
Ian McKellare93ac122013-11-07 16:30:05 -080026 ../btif/src/btif_core.c \
Andre Eisenbach89f5e412014-12-05 09:40:20 -080027 ../btif/src/btif_debug.c \
28 ../btif/src/btif_debug_btsnoop.c \
29 ../btif/src/btif_debug_conn.c \
Ian McKellare93ac122013-11-07 16:30:05 -080030 ../btif/src/btif_dm.c \
Ian McKellare93ac122013-11-07 16:30:05 -080031 ../btif/src/btif_gatt.c \
32 ../btif/src/btif_gatt_client.c \
33 ../btif/src/btif_gatt_multi_adv_util.c \
34 ../btif/src/btif_gatt_server.c \
Ian McKellare93ac122013-11-07 16:30:05 -080035 ../btif/src/btif_gatt_test.c \
Sharvil Nanavatib95c4ef2014-08-15 18:58:22 -070036 ../btif/src/btif_gatt_util.c \
37 ../btif/src/btif_hf.c \
38 ../btif/src/btif_hf_client.c \
39 ../btif/src/btif_hh.c \
40 ../btif/src/btif_hl.c \
Kim Schulz8372aa52015-03-25 10:39:40 +010041 ../btif/src/btif_sdp.c \
Sharvil Nanavatib95c4ef2014-08-15 18:58:22 -070042 ../btif/src/btif_media_task.c \
43 ../btif/src/btif_pan.c \
44 ../btif/src/btif_profile_queue.c \
45 ../btif/src/btif_rc.c \
46 ../btif/src/btif_sm.c \
47 ../btif/src/btif_sock.c \
48 ../btif/src/btif_sock_rfc.c \
Kim Schulz8372aa52015-03-25 10:39:40 +010049 ../btif/src/btif_sock_l2cap.c \
Sharvil Nanavatib95c4ef2014-08-15 18:58:22 -070050 ../btif/src/btif_sock_sco.c \
51 ../btif/src/btif_sock_sdp.c \
52 ../btif/src/btif_sock_thread.c \
Kim Schulz8372aa52015-03-25 10:39:40 +010053 ../btif/src/btif_sdp_server.c \
Sharvil Nanavatib95c4ef2014-08-15 18:58:22 -070054 ../btif/src/btif_sock_util.c \
55 ../btif/src/btif_storage.c \
Zach Johnson8df0d802014-09-09 16:31:14 -070056 ../btif/src/btif_util.c \
57 ../btif/src/stack_manager.c
The Android Open Source Project5738f832012-12-12 16:00:35 -080058
59# callouts
Ian McKellare93ac122013-11-07 16:30:05 -080060LOCAL_SRC_FILES+= \
Ian McKellare93ac122013-11-07 16:30:05 -080061 ../btif/co/bta_ag_co.c \
62 ../btif/co/bta_dm_co.c \
63 ../btif/co/bta_av_co.c \
64 ../btif/co/bta_hh_co.c \
65 ../btif/co/bta_hl_co.c \
66 ../btif/co/bta_pan_co.c \
67 ../btif/co/bta_gattc_co.c \
68 ../btif/co/bta_gatts_co.c \
The Android Open Source Project5738f832012-12-12 16:00:35 -080069
70# sbc encoder
Ian McKellare93ac122013-11-07 16:30:05 -080071LOCAL_SRC_FILES+= \
The Android Open Source Project5738f832012-12-12 16:00:35 -080072 ../embdrv/sbc/encoder/srce/sbc_analysis.c \
73 ../embdrv/sbc/encoder/srce/sbc_dct.c \
74 ../embdrv/sbc/encoder/srce/sbc_dct_coeffs.c \
75 ../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c \
76 ../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c \
77 ../embdrv/sbc/encoder/srce/sbc_enc_coeffs.c \
78 ../embdrv/sbc/encoder/srce/sbc_encoder.c \
79 ../embdrv/sbc/encoder/srce/sbc_packing.c \
80
Ian McKellare93ac122013-11-07 16:30:05 -080081LOCAL_SRC_FILES+= \
The Android Open Source Project5738f832012-12-12 16:00:35 -080082 ../udrv/ulinux/uipc.c
83
Ian McKellare93ac122013-11-07 16:30:05 -080084LOCAL_C_INCLUDES+= . \
Chris Manton79ecab52014-10-31 14:54:51 -070085 $(LOCAL_PATH)/../ \
The Android Open Source Project5738f832012-12-12 16:00:35 -080086 $(LOCAL_PATH)/../bta/include \
87 $(LOCAL_PATH)/../bta/sys \
88 $(LOCAL_PATH)/../bta/dm \
Sharvil Nanavati8a6a89f2014-08-20 09:39:25 -070089 $(LOCAL_PATH)/../btcore/include \
Sharvil Nanavati847ea132014-04-25 22:38:55 -070090 $(LOCAL_PATH)/../osi/include \
The Android Open Source Project5738f832012-12-12 16:00:35 -080091 $(LOCAL_PATH)/../gki/common \
92 $(LOCAL_PATH)/../gki/ulinux \
93 $(LOCAL_PATH)/../include \
94 $(LOCAL_PATH)/../stack/include \
95 $(LOCAL_PATH)/../stack/l2cap \
96 $(LOCAL_PATH)/../stack/a2dp \
97 $(LOCAL_PATH)/../stack/btm \
98 $(LOCAL_PATH)/../stack/avdt \
99 $(LOCAL_PATH)/../hcis \
100 $(LOCAL_PATH)/../hcis/include \
101 $(LOCAL_PATH)/../hcis/patchram \
102 $(LOCAL_PATH)/../udrv/include \
103 $(LOCAL_PATH)/../btif/include \
104 $(LOCAL_PATH)/../btif/co \
105 $(LOCAL_PATH)/../hci/include\
Andre Eisenbachb203d472013-11-20 17:23:06 -0800106 $(LOCAL_PATH)/../vnd/include \
Ian McKellare93ac122013-11-07 16:30:05 -0800107 $(LOCAL_PATH)/../brcm/include \
The Android Open Source Project5738f832012-12-12 16:00:35 -0800108 $(LOCAL_PATH)/../embdrv/sbc/encoder/include \
Hemant Guptace247652014-03-20 20:47:04 +0530109 $(LOCAL_PATH)/../embdrv/sbc/decoder/include \
The Android Open Source Project5738f832012-12-12 16:00:35 -0800110 $(LOCAL_PATH)/../audio_a2dp_hw \
111 $(LOCAL_PATH)/../utils/include \
112 $(bdroid_C_INCLUDES) \
Andre Eisenbach89f5e412014-12-05 09:40:20 -0800113 external/tinyxml2 \
114 external/zlib
The Android Open Source Project5738f832012-12-12 16:00:35 -0800115
Chris Mantone2e1d882014-07-18 12:55:34 -0700116LOCAL_CFLAGS += -DBUILDCFG $(bdroid_CFLAGS) -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=unused-parameter
Sharvil Nanavati5b6b25d2014-04-05 00:44:19 -0700117LOCAL_CONLYFLAGS := -std=c99
The Android Open Source Project5738f832012-12-12 16:00:35 -0800118
119ifeq ($(TARGET_PRODUCT), full_crespo)
Ian McKellare93ac122013-11-07 16:30:05 -0800120 LOCAL_CFLAGS += -DTARGET_CRESPO
The Android Open Source Project5738f832012-12-12 16:00:35 -0800121endif
122ifeq ($(TARGET_PRODUCT), full_crespo4g)
Ian McKellare93ac122013-11-07 16:30:05 -0800123 LOCAL_CFLAGS += -DTARGET_CRESPO
The Android Open Source Project5738f832012-12-12 16:00:35 -0800124endif
125ifeq ($(TARGET_PRODUCT), full_maguro)
Ian McKellare93ac122013-11-07 16:30:05 -0800126 LOCAL_CFLAGS += -DTARGET_MAGURO
The Android Open Source Project5738f832012-12-12 16:00:35 -0800127endif
128
The Android Open Source Project5738f832012-12-12 16:00:35 -0800129LOCAL_SHARED_LIBRARIES := \
Ian McKellare93ac122013-11-07 16:30:05 -0800130 libcutils \
131 libdl \
132 liblog \
133 libpower \
Andre Eisenbach89f5e412014-12-05 09:40:20 -0800134 libz
The Android Open Source Project5738f832012-12-12 16:00:35 -0800135
Chris Mantone01b1122014-05-07 16:21:00 -0700136LOCAL_STATIC_LIBRARIES := \
Zach Johnson0ef6b342015-05-19 14:49:37 -0700137 libtinyxml2 \
138 libbt-qcom_sbc_decoder
139
140LOCAL_WHOLE_STATIC_LIBRARIES := \
Ian McKellare93ac122013-11-07 16:30:05 -0800141 libbt-brcm_bta \
Sharvil Nanavatic0a87fe2015-03-02 14:56:24 -0800142 libbt-brcm_gki \
Ian McKellare93ac122013-11-07 16:30:05 -0800143 libbt-brcm_stack \
Chris Manton79ecab52014-10-31 14:54:51 -0700144 libbtdevice \
Ian McKellare93ac122013-11-07 16:30:05 -0800145 libbt-hci \
146 libbt-utils \
Sharvil Nanavati8a6a89f2014-08-20 09:39:25 -0700147 libbtcore \
Zach Johnson0ef6b342015-05-19 14:49:37 -0700148 libosi
The Android Open Source Project5738f832012-12-12 16:00:35 -0800149
150LOCAL_MODULE := bluetooth.default
Colin Cross273789b2014-01-24 21:00:32 -0800151LOCAL_MODULE_RELATIVE_PATH := hw
The Android Open Source Project5738f832012-12-12 16:00:35 -0800152LOCAL_MODULE_TAGS := optional
153LOCAL_MODULE_CLASS := SHARED_LIBRARIES
Pavlin Radoslavov74626112015-06-11 02:09:01 -0700154
155#
156# Shared library link options.
157# References to global symbols and functions should bind to the library
158# itself. This is to avoid issues with some of the unit/system tests
159# that might link statically with some of the code in the library, and
160# also dlopen(3) the shared library.
161#
162LOCAL_LDLIBS := -Wl,-Bsymbolic,-Bsymbolic-functions
163
Chris Mantone01b1122014-05-07 16:21:00 -0700164LOCAL_REQUIRED_MODULES := \
Ian McKellare93ac122013-11-07 16:30:05 -0800165 auto_pair_devlist.conf \
166 bt_did.conf \
167 bt_stack.conf \
168 libbt-hci \
169 libbt-vendor
Chris Manton462cd3f2014-05-07 16:21:00 -0700170
Narayan Kamathc2aeb2c2014-05-07 11:18:11 +0100171LOCAL_MULTILIB := 32
The Android Open Source Project5738f832012-12-12 16:00:35 -0800172
Bernhard Rosenkränzere406c162014-11-12 22:11:31 +0100173LOCAL_CLANG_CFLAGS := -Wno-error=gnu-variable-sized-type-not-at-end
Dan Albert098f6a72015-02-19 18:02:52 -0800174LOCAL_CLANG_CFLAGS += -Wno-typedef-redefinition
Bernhard Rosenkränzere406c162014-11-12 22:11:31 +0100175
The Android Open Source Project5738f832012-12-12 16:00:35 -0800176include $(BUILD_SHARED_LIBRARY)