Ian McKellar | e93ac12 | 2013-11-07 16:30:05 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 2 | |
Pavlin Radoslavov | 1377f93 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 3 | # Bluetooth main HW module / shared library for target |
| 4 | # ======================================================== |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 5 | include $(CLEAR_VARS) |
| 6 | |
Jakub Pawlowski | 75b8366 | 2016-09-27 18:24:59 -0700 | [diff] [blame] | 7 | LOCAL_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 | # ======================================================== |
| 17 | ifneq (,$(findstring NDEBUG,$(TARGET_GLOBAL_CFLAGS))) |
| 18 | btmain_orig_TARGET_NDEBUG := -DBT_LIBCHROME_NDEBUG |
| 19 | else |
| 20 | btmain_orig_TARGET_NDEBUG := |
| 21 | endif |
| 22 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 23 | # platform specific |
Pavlin Radoslavov | 7aaf7c6 | 2016-08-23 12:24:03 -0700 | [diff] [blame] | 24 | LOCAL_SRC_FILES := \ |
Pavlin Radoslavov | b2a292b | 2016-10-14 19:34:48 -0700 | [diff] [blame] | 25 | 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 Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 31 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 32 | # sbc encoder |
Pavlin Radoslavov | 7aaf7c6 | 2016-08-23 12:24:03 -0700 | [diff] [blame] | 33 | LOCAL_SRC_FILES += \ |
Pavlin Radoslavov | b2a292b | 2016-10-14 19:34:48 -0700 | [diff] [blame] | 34 | ../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 Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 42 | |
Pavlin Radoslavov | 7aaf7c6 | 2016-08-23 12:24:03 -0700 | [diff] [blame] | 43 | LOCAL_SRC_FILES += \ |
Pavlin Radoslavov | b2a292b | 2016-10-14 19:34:48 -0700 | [diff] [blame] | 44 | ../udrv/ulinux/uipc.cc |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 45 | |
Pavlin Radoslavov | 7aaf7c6 | 2016-08-23 12:24:03 -0700 | [diff] [blame] | 46 | LOCAL_C_INCLUDES := . \ |
Pavlin Radoslavov | b2a292b | 2016-10-14 19:34:48 -0700 | [diff] [blame] | 47 | $(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 Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 74 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 75 | LOCAL_SHARED_LIBRARIES := \ |
Ian McKellar | e93ac12 | 2013-11-07 16:30:05 -0800 | [diff] [blame] | 76 | libcutils \ |
| 77 | libdl \ |
| 78 | liblog \ |
Anubhav Gupta | 6b84f29 | 2015-05-05 13:15:07 +0530 | [diff] [blame] | 79 | libz \ |
| 80 | libpower \ |
Colin Cross | 2d97ffe | 2016-10-27 13:37:40 -0700 | [diff] [blame] | 81 | libprotobuf-cpp-lite \ |
Marco Nelissen | bc40fb1 | 2016-11-03 10:34:08 -0700 | [diff] [blame] | 82 | libaudioclient \ |
Ajay Panicker | 1d00dd2 | 2016-02-17 18:18:00 -0800 | [diff] [blame] | 83 | libutils \ |
| 84 | libchrome |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 85 | |
Chris Manton | e01b112 | 2014-05-07 16:21:00 -0700 | [diff] [blame] | 86 | LOCAL_STATIC_LIBRARIES := \ |
Alain Vongsouvanh | 9a58e68 | 2016-03-29 17:33:55 -0700 | [diff] [blame] | 87 | libtinyxml2 \ |
Zach Johnson | 0ef6b34 | 2015-05-19 14:49:37 -0700 | [diff] [blame] | 88 | libbt-qcom_sbc_decoder |
| 89 | |
| 90 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
Andre Eisenbach | e11cc0b | 2016-01-21 17:47:46 -0800 | [diff] [blame] | 91 | libbt-bta \ |
Chris Manton | 79ecab5 | 2014-10-31 14:54:51 -0700 | [diff] [blame] | 92 | libbtdevice \ |
Andre Eisenbach | e11cc0b | 2016-01-21 17:47:46 -0800 | [diff] [blame] | 93 | libbtif \ |
Ian McKellar | e93ac12 | 2013-11-07 16:30:05 -0800 | [diff] [blame] | 94 | libbt-hci \ |
Marie Janssen | 77f579f | 2016-01-15 16:14:14 -0800 | [diff] [blame] | 95 | libbt-protos \ |
Andre Eisenbach | e11cc0b | 2016-01-21 17:47:46 -0800 | [diff] [blame] | 96 | libbt-stack \ |
Ian McKellar | e93ac12 | 2013-11-07 16:30:05 -0800 | [diff] [blame] | 97 | libbt-utils \ |
Sharvil Nanavati | 8a6a89f | 2014-08-20 09:39:25 -0700 | [diff] [blame] | 98 | libbtcore \ |
Zach Johnson | 0ef6b34 | 2015-05-19 14:49:37 -0700 | [diff] [blame] | 99 | libosi |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 100 | |
| 101 | LOCAL_MODULE := bluetooth.default |
Colin Cross | 273789b | 2014-01-24 21:00:32 -0800 | [diff] [blame] | 102 | LOCAL_MODULE_RELATIVE_PATH := hw |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 103 | LOCAL_MODULE_TAGS := optional |
| 104 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
Pavlin Radoslavov | 7462611 | 2015-06-11 02:09:01 -0700 | [diff] [blame] | 105 | |
| 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 | # |
| 113 | LOCAL_LDLIBS := -Wl,-Bsymbolic,-Bsymbolic-functions |
| 114 | |
Chris Manton | e01b112 | 2014-05-07 16:21:00 -0700 | [diff] [blame] | 115 | LOCAL_REQUIRED_MODULES := \ |
Ian McKellar | e93ac12 | 2013-11-07 16:30:05 -0800 | [diff] [blame] | 116 | bt_did.conf \ |
| 117 | bt_stack.conf \ |
| 118 | libbt-hci \ |
| 119 | libbt-vendor |
Chris Manton | 462cd3f | 2014-05-07 16:21:00 -0700 | [diff] [blame] | 120 | |
Jakub Pawlowski | 75b8366 | 2016-09-27 18:24:59 -0700 | [diff] [blame] | 121 | LOCAL_CFLAGS += $(bluetooth_CFLAGS) -DBUILDCFG $(btmain_orig_TARGET_NDEBUG) |
Pavlin Radoslavov | 1377f93 | 2016-02-11 19:44:47 -0800 | [diff] [blame] | 122 | LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS) |
| 123 | LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS) |
Bernhard Rosenkränzer | e406c16 | 2014-11-12 22:11:31 +0100 | [diff] [blame] | 124 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 125 | include $(BUILD_SHARED_LIBRARY) |