1 LOCAL_PATH:= $(call my-dir) 2 3 # A2DP plugin 4 5 include $(CLEAR_VARS) 6 7 LOCAL_SRC_FILES:= \ 8 a2dp.c \ 9 avdtp.c \ 10 control.c \ 11 device.c \ 12 gateway.c \ 13 headset.c \ 14 ipc.c \ 15 main.c \ 16 manager.c \ 17 media.c \ 18 module-bluetooth-sink.c \ 19 sink.c \ 20 source.c \ 21 telephony-dummy.c \ 22 transport.c \ 23 unix.c 24 25 LOCAL_CFLAGS:= \ 26 -DVERSION=\"4.93\" \ 27 -DSTORAGEDIR=\"/data/misc/bluetoothd\" \ 28 -DCONFIGDIR=\"/etc/bluetooth\" \ 29 -DANDROID \ 30 -D__S_IFREG=0100000 # missing from bionic stat.h 31 32 LOCAL_C_INCLUDES:= \ 33 $(LOCAL_PATH)/../lib \ 34 $(LOCAL_PATH)/../gdbus \ 35 $(LOCAL_PATH)/../src \ 36 $(LOCAL_PATH)/../btio \ 37 $(call include-path-for, glib) \ 38 $(call include-path-for, dbus) 39 40 LOCAL_SHARED_LIBRARIES := \ 41 libbluetooth \ 42 libbluetoothd \ 43 libbtio \ 44 libdbus \ 45 libglib 46 47 48 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/bluez-plugin 49 LOCAL_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/bluez-plugin 50 LOCAL_MODULE := audio 51 52 include $(BUILD_SHARED_LIBRARY) 53 54 # 55 # liba2dp 56 # This is linked to Audioflinger so **LGPL only** 57 58 include $(CLEAR_VARS) 59 60 LOCAL_SRC_FILES:= \ 61 android_audio_hw.c \ 62 liba2dp.c \ 63 ipc.c \ 64 ../sbc/sbc_primitives.c \ 65 ../sbc/sbc_primitives_neon.c 66 67 ifeq ($(TARGET_ARCH),x86) 68 LOCAL_SRC_FILES+= \ 69 ../sbc/sbc_primitives_mmx.c \ 70 ../sbc/sbc.c 71 else 72 LOCAL_SRC_FILES+= \ 73 ../sbc/sbc.c.arm \ 74 ../sbc/sbc_primitives_armv6.c 75 endif 76 77 # to improve SBC performance 78 LOCAL_CFLAGS:= -funroll-loops 79 80 LOCAL_C_INCLUDES:= \ 81 $(LOCAL_PATH)/../sbc \ 82 ../../../../frameworks/base/include \ 83 system/bluetooth/bluez-clean-headers 84 85 LOCAL_SHARED_LIBRARIES := \ 86 libcutils 87 88 ifneq ($(wildcard system/bluetooth/legacy.mk),) 89 LOCAL_STATIC_LIBRARIES := \ 90 libpower 91 92 LOCAL_MODULE := liba2dp 93 else 94 LOCAL_SHARED_LIBRARIES += \ 95 libpower 96 97 LOCAL_MODULE := audio.a2dp.default 98 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 99 endif 100 101 LOCAL_MODULE_TAGS := optional 102 103 include $(BUILD_SHARED_LIBRARY) 104