2013-10-04 19:48:43 +08:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
|
|
|
# Retrieve BlueZ version from configure.ac file
|
|
|
|
BLUEZ_VERSION := $(shell grep ^AC_INIT $(LOCAL_PATH)/../configure.ac | cpp -P -D'AC_INIT(_,v)=v')
|
2013-10-04 19:48:45 +08:00
|
|
|
|
|
|
|
# Specify pathmap for glib
|
|
|
|
pathmap_INCL += glib:external/bluetooth/glib
|
|
|
|
|
2013-10-29 23:23:37 +08:00
|
|
|
# Specify common compiler flags
|
2013-10-30 22:22:38 +08:00
|
|
|
BLUEZ_COMMON_CFLAGS := -DVERSION=\"$(BLUEZ_VERSION)\" \
|
|
|
|
-DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
|
2013-10-29 23:23:37 +08:00
|
|
|
|
2013-10-29 23:23:38 +08:00
|
|
|
# Disable warnings enabled by Android but not enabled in autotools build
|
2013-11-05 18:50:13 +08:00
|
|
|
BLUEZ_COMMON_CFLAGS += -Wno-pointer-arith -Wno-missing-field-initializers
|
2013-10-29 23:23:38 +08:00
|
|
|
|
2013-10-04 19:48:45 +08:00
|
|
|
#
|
|
|
|
# Android BlueZ daemon (bluetoothd)
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
main.c \
|
2013-11-14 20:56:50 +08:00
|
|
|
bluetooth.c \
|
2013-11-08 00:17:03 +08:00
|
|
|
hidhost.c \
|
2013-10-23 19:04:40 +08:00
|
|
|
socket.c \
|
2013-10-22 02:56:48 +08:00
|
|
|
ipc.c ipc.h \
|
2013-11-20 20:30:19 +08:00
|
|
|
avdtp.c \
|
2013-11-04 18:56:54 +08:00
|
|
|
a2dp.c \
|
2013-11-04 18:56:56 +08:00
|
|
|
pan.c \
|
2013-10-24 22:05:38 +08:00
|
|
|
../src/log.c \
|
2013-10-16 22:36:29 +08:00
|
|
|
../src/shared/mgmt.c \
|
|
|
|
../src/shared/util.c \
|
2013-10-16 22:36:31 +08:00
|
|
|
../src/sdpd-database.c \
|
|
|
|
../src/sdpd-service.c \
|
|
|
|
../src/sdpd-request.c \
|
|
|
|
../src/sdpd-server.c \
|
2013-10-31 22:25:31 +08:00
|
|
|
../src/glib-helper.c \
|
|
|
|
../src/eir.c \
|
2013-10-16 22:36:31 +08:00
|
|
|
../lib/sdp.c \
|
|
|
|
../lib/bluetooth.c \
|
|
|
|
../lib/hci.c \
|
2013-11-01 16:58:43 +08:00
|
|
|
../btio/btio.c \
|
|
|
|
../src/sdp-client.c \
|
2013-10-04 19:48:45 +08:00
|
|
|
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
|
|
$(call include-path-for, glib) \
|
|
|
|
$(call include-path-for, glib)/glib \
|
2013-10-16 22:36:29 +08:00
|
|
|
|
|
|
|
LOCAL_C_INCLUDES += \
|
|
|
|
$(LOCAL_PATH)/../ \
|
2013-10-04 19:48:47 +08:00
|
|
|
$(LOCAL_PATH)/../src \
|
2013-10-16 22:36:31 +08:00
|
|
|
$(LOCAL_PATH)/../lib \
|
2013-10-04 19:48:45 +08:00
|
|
|
|
2013-10-30 22:22:38 +08:00
|
|
|
LOCAL_CFLAGS := $(BLUEZ_COMMON_CFLAGS)
|
2013-10-04 19:48:45 +08:00
|
|
|
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
|
|
libglib \
|
|
|
|
|
2013-10-23 15:48:21 +08:00
|
|
|
lib_headers := \
|
|
|
|
bluetooth.h \
|
|
|
|
hci.h \
|
|
|
|
hci_lib.h \
|
|
|
|
l2cap.h \
|
|
|
|
sdp_lib.h \
|
|
|
|
sdp.h \
|
2013-10-29 20:48:41 +08:00
|
|
|
rfcomm.h \
|
|
|
|
sco.h \
|
2013-10-23 15:48:21 +08:00
|
|
|
|
|
|
|
$(shell mkdir -p $(LOCAL_PATH)/../lib/bluetooth)
|
|
|
|
|
|
|
|
$(foreach file,$(lib_headers), $(shell ln -sf ../$(file) $(LOCAL_PATH)/../lib/bluetooth/$(file)))
|
|
|
|
|
2013-10-04 19:48:45 +08:00
|
|
|
LOCAL_MODULE := bluetoothd
|
|
|
|
|
|
|
|
include $(BUILD_EXECUTABLE)
|
2013-10-11 18:02:00 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# bluetooth.default.so HAL
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2013-10-22 02:56:41 +08:00
|
|
|
hal-ipc.c \
|
2013-10-18 18:08:27 +08:00
|
|
|
hal-bluetooth.c \
|
2013-10-18 18:08:28 +08:00
|
|
|
hal-sock.c \
|
2013-10-18 18:47:58 +08:00
|
|
|
hal-hidhost.c \
|
2013-10-17 16:26:46 +08:00
|
|
|
hal-pan.c \
|
2013-11-07 23:32:06 +08:00
|
|
|
hal-a2dp.c \
|
2013-11-08 21:15:59 +08:00
|
|
|
hal-utils.c \
|
2013-10-11 18:02:00 +08:00
|
|
|
|
2013-10-23 20:44:41 +08:00
|
|
|
LOCAL_C_INCLUDES += \
|
2013-10-23 21:42:17 +08:00
|
|
|
$(call include-path-for, system-core) \
|
2013-10-30 23:51:24 +08:00
|
|
|
$(call include-path-for, libhardware) \
|
2013-10-23 20:44:41 +08:00
|
|
|
|
2013-10-11 18:02:00 +08:00
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
|
|
libcutils \
|
|
|
|
|
2013-10-29 23:23:37 +08:00
|
|
|
LOCAL_CFLAGS := $(BLUEZ_COMMON_CFLAGS) \
|
|
|
|
|
2013-10-11 18:02:00 +08:00
|
|
|
LOCAL_MODULE := bluetooth.default
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
2013-10-24 22:22:41 +08:00
|
|
|
LOCAL_REQUIRED_MODULES := haltest bluetoothd
|
2013-10-11 18:02:00 +08:00
|
|
|
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
2013-10-16 22:00:08 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# haltest
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
client/haltest.c \
|
|
|
|
client/pollhandler.c \
|
2013-10-16 22:00:09 +08:00
|
|
|
client/terminal.c \
|
2013-10-16 22:00:10 +08:00
|
|
|
client/history.c \
|
2013-10-18 21:15:58 +08:00
|
|
|
client/tabcompletion.c \
|
2013-10-23 22:38:25 +08:00
|
|
|
client/if-av.c \
|
2013-10-16 22:00:12 +08:00
|
|
|
client/if-bt.c \
|
2013-10-28 19:39:00 +08:00
|
|
|
client/if-hf.c \
|
2013-10-22 19:02:26 +08:00
|
|
|
client/if-hh.c \
|
2013-10-23 16:34:58 +08:00
|
|
|
client/if-pan.c \
|
2013-10-23 16:34:57 +08:00
|
|
|
client/if-sock.c \
|
2013-11-08 21:15:59 +08:00
|
|
|
hal-utils.c \
|
2013-10-16 22:00:08 +08:00
|
|
|
|
2013-10-31 18:45:06 +08:00
|
|
|
ANDROID_4_3_OR_ABOVE := $(shell echo 0 | awk -v v=$(PLATFORM_SDK_VERSION) 'END {print (v > 17) ? 1 : 0}')
|
|
|
|
|
|
|
|
ifeq ($(ANDROID_4_3_OR_ABOVE), 1)
|
|
|
|
LOCAL_SRC_FILES += \
|
|
|
|
client/if-gatt.c
|
|
|
|
endif
|
|
|
|
|
2013-10-31 16:37:19 +08:00
|
|
|
LOCAL_C_INCLUDES += \
|
|
|
|
$(call include-path-for, system-core) \
|
|
|
|
$(call include-path-for, libhardware) \
|
|
|
|
|
2013-10-29 23:23:37 +08:00
|
|
|
LOCAL_CFLAGS := $(BLUEZ_COMMON_CFLAGS)
|
2013-10-22 18:37:08 +08:00
|
|
|
|
2013-10-16 22:00:08 +08:00
|
|
|
LOCAL_SHARED_LIBRARIES := libhardware
|
|
|
|
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE := haltest
|
|
|
|
|
|
|
|
include $(BUILD_EXECUTABLE)
|
2013-11-05 17:46:52 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# btmon
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
../monitor/main.c \
|
|
|
|
../monitor/bt.h \
|
|
|
|
../monitor/mainloop.h \
|
|
|
|
../monitor/mainloop.c \
|
|
|
|
../monitor/display.h \
|
|
|
|
../monitor/display.c \
|
|
|
|
../monitor/hcidump.h \
|
|
|
|
../monitor/hcidump.c \
|
|
|
|
../monitor/btsnoop.h \
|
|
|
|
../monitor/btsnoop.c \
|
|
|
|
../monitor/control.h \
|
|
|
|
../monitor/control.c \
|
|
|
|
../monitor/packet.h \
|
|
|
|
../monitor/packet.c \
|
|
|
|
../monitor/l2cap.h \
|
|
|
|
../monitor/l2cap.c \
|
|
|
|
../monitor/uuid.h \
|
|
|
|
../monitor/uuid.c \
|
|
|
|
../monitor/sdp.h \
|
|
|
|
../monitor/sdp.c \
|
|
|
|
../monitor/vendor.h \
|
|
|
|
../monitor/vendor.c \
|
|
|
|
../monitor/lmp.h \
|
|
|
|
../monitor/lmp.c \
|
|
|
|
../monitor/crc.h \
|
|
|
|
../monitor/crc.c \
|
|
|
|
../monitor/ll.h \
|
|
|
|
../monitor/ll.c \
|
|
|
|
../lib/hci.c \
|
|
|
|
../lib/bluetooth.c \
|
|
|
|
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
|
|
$(LOCAL_PATH)/.. \
|
|
|
|
$(LOCAL_PATH)/../lib \
|
|
|
|
$(LOCAL_PATH)/../src/shared \
|
|
|
|
|
|
|
|
LOCAL_C_INCLUDES += \
|
|
|
|
$(call include-path-for, glib) \
|
|
|
|
$(call include-path-for, glib)/glib \
|
|
|
|
|
|
|
|
LOCAL_CFLAGS := $(BLUEZ_COMMON_CFLAGS)
|
|
|
|
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
|
|
|
|
LOCAL_MODULE_TAGS := eng
|
|
|
|
LOCAL_MODULE := btmon
|
|
|
|
|
|
|
|
include $(BUILD_EXECUTABLE)
|