stream pushing ok without access permission of /dev/video0
[rtmpclient.git] / app / src / main / jni / libusb / android / jni / libusb.mk
1 # modified saki@serenegiant <t_saki@serenegiant.com>
2 # Copyright (C)2014-2016
3 #
4 # Android build config for libusb
5 # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
6 #
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.
11 #
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.
16 #
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
20 #
21 ######################################################################
22 # libusb.a
23 ######################################################################
24 LOCAL_PATH                      := $(call my-dir)/../..
25 include $(CLEAR_VARS)
26
27 # changed linux_usbfs.c => android_usbfs.c
28 # changed linux_netlink.c => android_netlink.c
29 # these sources are also modified.
30 LOCAL_SRC_FILES := \
31         libusb/core.c \
32         libusb/descriptor.c \
33         libusb/hotplug.c \
34         libusb/io.c \
35         libusb/sync.c \
36         libusb/strerror.c \
37         libusb/os/android_usbfs.c \
38         libusb/os/poll_posix.c \
39         libusb/os/threads_posix.c \
40         libusb/os/android_netlink.c
41
42 LOCAL_C_INCLUDES += \
43         $(LOCAL_PATH)/ \
44         $(LOCAL_PATH)/libusb \
45         $(LOCAL_PATH)/libusb/os \
46         $(LOCAL_PATH)/../ \
47         $(LOCAL_PATH)/../include \
48         $(LOCAL_PATH)/android \
49
50 LOCAL_EXPORT_C_INCLUDES := \
51         $(LOCAL_PATH)/ \
52         $(LOCAL_PATH)/libusb
53
54 # add some flags
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
63 LOCAL_ARM_MODE := arm
64
65 LOCAL_MODULE := libusb100_static
66 include $(BUILD_STATIC_LIBRARY)
67
68 ######################################################################
69 # libusb100.so
70 ######################################################################
71 include $(CLEAR_VARS)
72 LOCAL_MODULE_TAGS := optional
73 LOCAL_EXPORT_LDLIBS += -llog
74
75 LOCAL_WHOLE_STATIC_LIBRARIES = libusb100_static
76
77 LOCAL_MODULE := libusb100
78 include $(BUILD_SHARED_LIBRARY)