1 # modified saki@serenegiant <t_saki@serenegiant.com>
2 # Copyright (C)2014-2016
4 # Android build config for libusb
5 # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 ######################################################################
23 ######################################################################
24 LOCAL_PATH := $(call my-dir)/../..
27 # changed linux_usbfs.c => android_usbfs.c
28 # changed linux_netlink.c => android_netlink.c
29 # these sources are also modified.
37 libusb/os/android_usbfs.c \
38 libusb/os/poll_posix.c \
39 libusb/os/threads_posix.c \
40 libusb/os/android_netlink.c
44 $(LOCAL_PATH)/libusb \
45 $(LOCAL_PATH)/libusb/os \
47 $(LOCAL_PATH)/../include \
48 $(LOCAL_PATH)/android \
50 LOCAL_EXPORT_C_INCLUDES := \
55 LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
56 LOCAL_CFLAGS += -DANDROID_NDK
57 LOCAL_CFLAGS += -DLOG_NDEBUG
58 LOCAL_CFLAGS += -DACCESS_RAW_DESCRIPTORS
59 LOCAL_CFLAGS += -DENABLE_LOGGING
60 LOCAL_CFLAGS += -DENABLE_DEBUG_LOGGING
61 LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
62 LOCAL_EXPORT_LDLIBS += -llog
65 LOCAL_MODULE := libusb100_static
66 include $(BUILD_STATIC_LIBRARY)
68 ######################################################################
70 ######################################################################
72 LOCAL_MODULE_TAGS := optional
73 LOCAL_EXPORT_LDLIBS += -llog
75 LOCAL_WHOLE_STATIC_LIBRARIES = libusb100_static
77 LOCAL_MODULE := libusb100
78 include $(BUILD_SHARED_LIBRARY)