From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [RFCv3 08/14] android: Add Android Makefile for libbluetooth
Date: Thu, 3 Oct 2013 17:38:14 +0300 [thread overview]
Message-ID: <1380811100-30144-9-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
In-Reply-To: <1380811100-30144-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Build libbluetooth library for Android.
---
android/Android.mk | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/android/Android.mk b/android/Android.mk
index ab11bd1..115a9d7 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -38,6 +38,7 @@ LOCAL_SHARED_LIBRARIES := \
libglib \
LOCAL_MODULE := bluetoothd
+LOCAL_REQUIRED_MODULES := libbluetooth
include $(BUILD_EXECUTABLE)
@@ -60,3 +61,55 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
+
+#
+# libbluetooth library
+#
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ ../lib/bluetooth.c \
+ ../lib/sdp.c \
+ ../lib/hci.c \
+ ../lib/uuid.c \
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/../lib/ \
+ $(LOCAL_PATH)/../src/shared \
+
+LOCAL_C_INCLUDES += \
+ $(call include-path-for, glib) \
+ $(call include-path-for, glib)/glib \
+
+LOCAL_CFLAGS += -O3
+
+# to suppress the "pointer of type 'void *' used in arithmetic" warning
+LOCAL_CFLAGS += -Wno-pointer-arith
+
+# to suppress the "missing initializer near initialization" warning
+LOCAL_CFLAGS += -Wno-missing-field-initializers
+
+# Define missing flags for Android 4.2
+LOCAL_CFLAGS += -DSOCK_CLOEXEC=02000000 -DSOCK_NONBLOCK=04000
+
+lib_headers := \
+ bluetooth.h \
+ hci.h \
+ hci_lib.h \
+ sco.h \
+ l2cap.h \
+ sdp.h \
+ sdp_lib.h \
+ rfcomm.h \
+ bnep.h \
+ cmtp.h \
+ hidp.h \
+
+$(shell mkdir -p $(LOCAL_PATH)/../lib/bluetooth)
+
+$(foreach file,$(lib_headers), $(shell ln -sf ../$(file) $(LOCAL_PATH)/../lib/bluetooth/$(file)))
+
+LOCAL_MODULE := libbluetooth
+
+include $(BUILD_SHARED_LIBRARY)
--
1.7.10.4
next prev parent reply other threads:[~2013-10-03 14:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 14:38 [RFCv3 00/14] Basic code for Android BlueZ Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 01/14] android: Add Adapter Bluetooth HAL template Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 02/14] android: Add Socket " Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 03/14] android: Enable Socket interface Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 04/14] android: Start Android Bluetooth daemon Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 05/14] android: Add basic mgmt initialization sequence Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 06/14] android: Create HAL API header skeleton Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 07/14] android: Add adapter and device struct for BlueZ daemon Andrei Emeltchenko
2013-10-03 14:38 ` Andrei Emeltchenko [this message]
2013-10-03 14:38 ` [RFCv3 09/14] android: sdp: Reuse BlueZ SDP server in Android Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 10/14] android: Add cap to bind to port < 1024 Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 11/14] android: Implement read_info_complete callback Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 12/14] android: Handle mgmt changed events Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 13/14] android: Add makefile for hciconfig Andrei Emeltchenko
2013-10-03 14:38 ` [RFCv3 14/14] android: Add makefile for hcitool Andrei Emeltchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380811100-30144-9-git-send-email-Andrei.Emeltchenko.news@gmail.com \
--to=andrei.emeltchenko.news@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox