blob: c2abe1729ea5d32eb952bb9d359f932ebe4c76ea [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
Pavlin Radoslavov1377f932016-02-11 19:44:47 -08003# Bluetooth main HW module / shared library for target
4# ========================================================
The Android Open Source Project5738f832012-12-12 16:00:35 -08005include $(CLEAR_VARS)
6
Jakub Pawlowski75b83662016-09-27 18:24:59 -07007LOCAL_CPP_EXTENSION := .cc
8
9#
10# Workaround for libchrome and -DNDEBUG usage.
11#
12# Test whether the original TARGET_GLOBAL_CFLAGS contains -DNDEBUG.
13# This is needed as a workaround to make sure that
14# libchrome and local files calling logging::InitLogging()
15# are consistent with the usage of -DNDEBUG .
16# ========================================================
17ifneq (,$(findstring NDEBUG,$(TARGET_GLOBAL_CFLAGS)))
18 btmain_orig_TARGET_NDEBUG := -DBT_LIBCHROME_NDEBUG
19else
20 btmain_orig_TARGET_NDEBUG :=
21endif
22
The Android Open Source Project5738f832012-12-12 16:00:35 -080023# platform specific
Pavlin Radoslavov7aaf7c62016-08-23 12:24:03 -070024LOCAL_SRC_FILES := \
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070025 bte_conf.cc \
26 bte_init.cc \
27 bte_init_cpp_logging.cc \
28 bte_logmsg.cc \
29 bte_main.cc \
30 stack_config.cc
The Android Open Source Project5738f832012-12-12 16:00:35 -080031
The Android Open Source Project5738f832012-12-12 16:00:35 -080032# sbc encoder
Pavlin Radoslavov7aaf7c62016-08-23 12:24:03 -070033LOCAL_SRC_FILES += \
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070034 ../embdrv/sbc/encoder/srce/sbc_analysis.c \
35 ../embdrv/sbc/encoder/srce/sbc_dct.c \
36 ../embdrv/sbc/encoder/srce/sbc_dct_coeffs.c \
37 ../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c \
38 ../embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c \
39 ../embdrv/sbc/encoder/srce/sbc_enc_coeffs.c \
40 ../embdrv/sbc/encoder/srce/sbc_encoder.c \
41 ../embdrv/sbc/encoder/srce/sbc_packing.c \
The Android Open Source Project5738f832012-12-12 16:00:35 -080042
Pavlin Radoslavov7aaf7c62016-08-23 12:24:03 -070043LOCAL_SRC_FILES += \
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070044 ../udrv/ulinux/uipc.cc
The Android Open Source Project5738f832012-12-12 16:00:35 -080045
Pavlin Radoslavov7aaf7c62016-08-23 12:24:03 -070046LOCAL_C_INCLUDES := . \
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070047 $(LOCAL_PATH)/../ \
48 $(LOCAL_PATH)/../bta/include \
49 $(LOCAL_PATH)/../bta/sys \
50 $(LOCAL_PATH)/../bta/dm \
51 $(LOCAL_PATH)/../btcore/include \
52 $(LOCAL_PATH)/../include \
53 $(LOCAL_PATH)/../stack/include \
54 $(LOCAL_PATH)/../stack/l2cap \
55 $(LOCAL_PATH)/../stack/a2dp \
56 $(LOCAL_PATH)/../stack/btm \
57 $(LOCAL_PATH)/../stack/avdt \
58 $(LOCAL_PATH)/../hcis \
59 $(LOCAL_PATH)/../hcis/include \
60 $(LOCAL_PATH)/../hcis/patchram \
61 $(LOCAL_PATH)/../udrv/include \
62 $(LOCAL_PATH)/../btif/include \
63 $(LOCAL_PATH)/../btif/co \
64 $(LOCAL_PATH)/../hci/include\
65 $(LOCAL_PATH)/../vnd/include \
66 $(LOCAL_PATH)/../brcm/include \
67 $(LOCAL_PATH)/../embdrv/sbc/encoder/include \
68 $(LOCAL_PATH)/../embdrv/sbc/decoder/include \
69 $(LOCAL_PATH)/../audio_a2dp_hw \
70 $(LOCAL_PATH)/../utils/include \
71 $(bluetooth_C_INCLUDES) \
72 external/tinyxml2 \
73 external/zlib
The Android Open Source Project5738f832012-12-12 16:00:35 -080074
The Android Open Source Project5738f832012-12-12 16:00:35 -080075LOCAL_SHARED_LIBRARIES := \
Ian McKellare93ac122013-11-07 16:30:05 -080076 libcutils \
77 libdl \
78 liblog \
Anubhav Gupta6b84f292015-05-05 13:15:07 +053079 libz \
80 libpower \
Colin Cross2d97ffe2016-10-27 13:37:40 -070081 libprotobuf-cpp-lite \
Marco Nelissenbc40fb12016-11-03 10:34:08 -070082 libaudioclient \
Ajay Panicker1d00dd22016-02-17 18:18:00 -080083 libutils \
84 libchrome
The Android Open Source Project5738f832012-12-12 16:00:35 -080085
Chris Mantone01b1122014-05-07 16:21:00 -070086LOCAL_STATIC_LIBRARIES := \
Alain Vongsouvanh9a58e682016-03-29 17:33:55 -070087 libtinyxml2 \
Zach Johnson0ef6b342015-05-19 14:49:37 -070088 libbt-qcom_sbc_decoder
89
90LOCAL_WHOLE_STATIC_LIBRARIES := \
Andre Eisenbache11cc0b2016-01-21 17:47:46 -080091 libbt-bta \
Chris Manton79ecab52014-10-31 14:54:51 -070092 libbtdevice \
Andre Eisenbache11cc0b2016-01-21 17:47:46 -080093 libbtif \
Ian McKellare93ac122013-11-07 16:30:05 -080094 libbt-hci \
Marie Janssen77f579f2016-01-15 16:14:14 -080095 libbt-protos \
Andre Eisenbache11cc0b2016-01-21 17:47:46 -080096 libbt-stack \
Ian McKellare93ac122013-11-07 16:30:05 -080097 libbt-utils \
Sharvil Nanavati8a6a89f2014-08-20 09:39:25 -070098 libbtcore \
Zach Johnson0ef6b342015-05-19 14:49:37 -070099 libosi
The Android Open Source Project5738f832012-12-12 16:00:35 -0800100
101LOCAL_MODULE := bluetooth.default
Colin Cross273789b2014-01-24 21:00:32 -0800102LOCAL_MODULE_RELATIVE_PATH := hw
The Android Open Source Project5738f832012-12-12 16:00:35 -0800103LOCAL_MODULE_TAGS := optional
104LOCAL_MODULE_CLASS := SHARED_LIBRARIES
Pavlin Radoslavov74626112015-06-11 02:09:01 -0700105
106#
107# Shared library link options.
108# References to global symbols and functions should bind to the library
109# itself. This is to avoid issues with some of the unit/system tests
110# that might link statically with some of the code in the library, and
111# also dlopen(3) the shared library.
112#
113LOCAL_LDLIBS := -Wl,-Bsymbolic,-Bsymbolic-functions
114
Chris Mantone01b1122014-05-07 16:21:00 -0700115LOCAL_REQUIRED_MODULES := \
Ian McKellare93ac122013-11-07 16:30:05 -0800116 bt_did.conf \
117 bt_stack.conf \
118 libbt-hci \
119 libbt-vendor
Chris Manton462cd3f2014-05-07 16:21:00 -0700120
Jakub Pawlowski75b83662016-09-27 18:24:59 -0700121LOCAL_CFLAGS += $(bluetooth_CFLAGS) -DBUILDCFG $(btmain_orig_TARGET_NDEBUG)
Pavlin Radoslavov1377f932016-02-11 19:44:47 -0800122LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
123LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
Bernhard Rosenkränzere406c162014-11-12 22:11:31 +0100124
The Android Open Source Project5738f832012-12-12 16:00:35 -0800125include $(BUILD_SHARED_LIBRARY)