libusb 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +8 -2
  3. data/Gemfile +2 -0
  4. data/History.md +12 -0
  5. data/README.md +25 -14
  6. data/Rakefile +64 -109
  7. data/appveyor.yml +23 -0
  8. data/ext/extconf.rb +10 -12
  9. data/ext/libusb_recipe.rb +29 -0
  10. data/lib/libusb/call.rb +14 -11
  11. data/lib/libusb/compat.rb +9 -9
  12. data/lib/libusb/context.rb +16 -1
  13. data/lib/libusb/dependencies.rb +7 -0
  14. data/lib/libusb/dev_handle.rb +13 -3
  15. data/lib/libusb/eventmachine.rb +4 -4
  16. data/lib/libusb/transfer.rb +71 -10
  17. data/lib/libusb/version_gem.rb +1 -1
  18. data/libusb.gemspec +7 -5
  19. data/ports/archives/libusb-1.0.21.tar.bz2 +0 -0
  20. data/test/test_libusb_bulk_stream_transfer.rb +1 -1
  21. data/test/test_libusb_descriptors.rb +4 -4
  22. data/test/test_libusb_event_machine.rb +7 -7
  23. data/test/test_libusb_hotplug.rb +15 -3
  24. data/test/test_libusb_iso_transfer.rb +1 -1
  25. data/test/test_libusb_mass_storage.rb +19 -19
  26. data/test/test_libusb_mass_storage2.rb +1 -1
  27. data/test/test_libusb_structs.rb +13 -0
  28. data/test/test_libusb_threads.rb +2 -2
  29. data/wireshark-usb-sniffer.png +0 -0
  30. metadata +32 -156
  31. checksums.yaml.gz.sig +0 -0
  32. data.tar.gz.sig +0 -0
  33. data/ext/libusb-1.0.20/AUTHORS +0 -89
  34. data/ext/libusb-1.0.20/COPYING +0 -504
  35. data/ext/libusb-1.0.20/ChangeLog +0 -227
  36. data/ext/libusb-1.0.20/INSTALL +0 -234
  37. data/ext/libusb-1.0.20/Makefile.am +0 -28
  38. data/ext/libusb-1.0.20/Makefile.in +0 -897
  39. data/ext/libusb-1.0.20/NEWS +0 -2
  40. data/ext/libusb-1.0.20/PORTING +0 -94
  41. data/ext/libusb-1.0.20/README +0 -29
  42. data/ext/libusb-1.0.20/TODO +0 -2
  43. data/ext/libusb-1.0.20/Xcode/common.xcconfig +0 -49
  44. data/ext/libusb-1.0.20/Xcode/config.h +0 -28
  45. data/ext/libusb-1.0.20/Xcode/debug.xcconfig +0 -29
  46. data/ext/libusb-1.0.20/Xcode/libusb.xcconfig +0 -21
  47. data/ext/libusb-1.0.20/Xcode/libusb.xcodeproj/project.pbxproj +0 -865
  48. data/ext/libusb-1.0.20/Xcode/libusb_debug.xcconfig +0 -21
  49. data/ext/libusb-1.0.20/Xcode/libusb_release.xcconfig +0 -21
  50. data/ext/libusb-1.0.20/Xcode/release.xcconfig +0 -30
  51. data/ext/libusb-1.0.20/aclocal.m4 +0 -1193
  52. data/ext/libusb-1.0.20/android/README +0 -114
  53. data/ext/libusb-1.0.20/android/config.h +0 -81
  54. data/ext/libusb-1.0.20/android/jni/Android.mk +0 -23
  55. data/ext/libusb-1.0.20/android/jni/Application.mk +0 -24
  56. data/ext/libusb-1.0.20/android/jni/examples.mk +0 -134
  57. data/ext/libusb-1.0.20/android/jni/libusb.mk +0 -54
  58. data/ext/libusb-1.0.20/android/jni/tests.mk +0 -56
  59. data/ext/libusb-1.0.20/compile +0 -347
  60. data/ext/libusb-1.0.20/config.guess +0 -1421
  61. data/ext/libusb-1.0.20/config.h.in +0 -155
  62. data/ext/libusb-1.0.20/config.sub +0 -1807
  63. data/ext/libusb-1.0.20/configure +0 -15466
  64. data/ext/libusb-1.0.20/configure.ac +0 -326
  65. data/ext/libusb-1.0.20/depcomp +0 -791
  66. data/ext/libusb-1.0.20/doc/Makefile.am +0 -9
  67. data/ext/libusb-1.0.20/doc/Makefile.in +0 -456
  68. data/ext/libusb-1.0.20/doc/doxygen.cfg.in +0 -2334
  69. data/ext/libusb-1.0.20/examples/Makefile.am +0 -19
  70. data/ext/libusb-1.0.20/examples/Makefile.in +0 -713
  71. data/ext/libusb-1.0.20/examples/dpfp.c +0 -506
  72. data/ext/libusb-1.0.20/examples/dpfp_threaded.c +0 -549
  73. data/ext/libusb-1.0.20/examples/ezusb.c +0 -831
  74. data/ext/libusb-1.0.20/examples/ezusb.h +0 -120
  75. data/ext/libusb-1.0.20/examples/fxload.c +0 -308
  76. data/ext/libusb-1.0.20/examples/getopt/getopt.c +0 -1060
  77. data/ext/libusb-1.0.20/examples/getopt/getopt.h +0 -180
  78. data/ext/libusb-1.0.20/examples/getopt/getopt1.c +0 -188
  79. data/ext/libusb-1.0.20/examples/hotplugtest.c +0 -122
  80. data/ext/libusb-1.0.20/examples/listdevs.c +0 -71
  81. data/ext/libusb-1.0.20/examples/sam3u_benchmark.c +0 -193
  82. data/ext/libusb-1.0.20/examples/xusb.c +0 -1130
  83. data/ext/libusb-1.0.20/install-sh +0 -501
  84. data/ext/libusb-1.0.20/libusb-1.0.pc.in +0 -11
  85. data/ext/libusb-1.0.20/libusb/Makefile.am +0 -90
  86. data/ext/libusb-1.0.20/libusb/Makefile.in +0 -1053
  87. data/ext/libusb-1.0.20/libusb/core.c +0 -2452
  88. data/ext/libusb-1.0.20/libusb/descriptor.c +0 -1201
  89. data/ext/libusb-1.0.20/libusb/hotplug.c +0 -344
  90. data/ext/libusb-1.0.20/libusb/hotplug.h +0 -90
  91. data/ext/libusb-1.0.20/libusb/io.c +0 -2760
  92. data/ext/libusb-1.0.20/libusb/libusb-1.0.def +0 -168
  93. data/ext/libusb-1.0.20/libusb/libusb-1.0.rc +0 -61
  94. data/ext/libusb-1.0.20/libusb/libusb.h +0 -1999
  95. data/ext/libusb-1.0.20/libusb/libusbi.h +0 -1102
  96. data/ext/libusb-1.0.20/libusb/os/darwin_usb.c +0 -1969
  97. data/ext/libusb-1.0.20/libusb/os/darwin_usb.h +0 -158
  98. data/ext/libusb-1.0.20/libusb/os/haiku/Makefile.am +0 -5
  99. data/ext/libusb-1.0.20/libusb/os/haiku/Makefile.in +0 -810
  100. data/ext/libusb-1.0.20/libusb/os/haiku/aclocal.m4 +0 -1193
  101. data/ext/libusb-1.0.20/libusb/os/haiku/compile +0 -347
  102. data/ext/libusb-1.0.20/libusb/os/haiku/config.guess +0 -1421
  103. data/ext/libusb-1.0.20/libusb/os/haiku/config.sub +0 -1807
  104. data/ext/libusb-1.0.20/libusb/os/haiku/configure +0 -17579
  105. data/ext/libusb-1.0.20/libusb/os/haiku/configure.ac +0 -8
  106. data/ext/libusb-1.0.20/libusb/os/haiku/depcomp +0 -791
  107. data/ext/libusb-1.0.20/libusb/os/haiku/haiku_pollfs.cpp +0 -378
  108. data/ext/libusb-1.0.20/libusb/os/haiku/haiku_usb.h +0 -112
  109. data/ext/libusb-1.0.20/libusb/os/haiku/haiku_usb_backend.cpp +0 -550
  110. data/ext/libusb-1.0.20/libusb/os/haiku/haiku_usb_raw.cpp +0 -255
  111. data/ext/libusb-1.0.20/libusb/os/haiku/haiku_usb_raw.h +0 -180
  112. data/ext/libusb-1.0.20/libusb/os/haiku/install-sh +0 -501
  113. data/ext/libusb-1.0.20/libusb/os/haiku/ltmain.sh +0 -9655
  114. data/ext/libusb-1.0.20/libusb/os/haiku/m4/libtool.m4 +0 -7992
  115. data/ext/libusb-1.0.20/libusb/os/haiku/m4/ltoptions.m4 +0 -384
  116. data/ext/libusb-1.0.20/libusb/os/haiku/m4/ltsugar.m4 +0 -123
  117. data/ext/libusb-1.0.20/libusb/os/haiku/m4/ltversion.m4 +0 -23
  118. data/ext/libusb-1.0.20/libusb/os/haiku/m4/lt~obsolete.m4 +0 -98
  119. data/ext/libusb-1.0.20/libusb/os/haiku/missing +0 -215
  120. data/ext/libusb-1.0.20/libusb/os/linux_netlink.c +0 -369
  121. data/ext/libusb-1.0.20/libusb/os/linux_udev.c +0 -306
  122. data/ext/libusb-1.0.20/libusb/os/linux_usbfs.c +0 -2692
  123. data/ext/libusb-1.0.20/libusb/os/linux_usbfs.h +0 -192
  124. data/ext/libusb-1.0.20/libusb/os/netbsd_usb.c +0 -674
  125. data/ext/libusb-1.0.20/libusb/os/openbsd_usb.c +0 -768
  126. data/ext/libusb-1.0.20/libusb/os/poll_posix.c +0 -53
  127. data/ext/libusb-1.0.20/libusb/os/poll_posix.h +0 -11
  128. data/ext/libusb-1.0.20/libusb/os/poll_windows.c +0 -728
  129. data/ext/libusb-1.0.20/libusb/os/poll_windows.h +0 -131
  130. data/ext/libusb-1.0.20/libusb/os/threads_posix.c +0 -82
  131. data/ext/libusb-1.0.20/libusb/os/threads_posix.h +0 -50
  132. data/ext/libusb-1.0.20/libusb/os/threads_windows.c +0 -214
  133. data/ext/libusb-1.0.20/libusb/os/threads_windows.h +0 -87
  134. data/ext/libusb-1.0.20/libusb/os/wince_usb.c +0 -869
  135. data/ext/libusb-1.0.20/libusb/os/wince_usb.h +0 -131
  136. data/ext/libusb-1.0.20/libusb/os/windows_common.h +0 -108
  137. data/ext/libusb-1.0.20/libusb/os/windows_usb.c +0 -4643
  138. data/ext/libusb-1.0.20/libusb/os/windows_usb.h +0 -973
  139. data/ext/libusb-1.0.20/libusb/strerror.c +0 -202
  140. data/ext/libusb-1.0.20/libusb/sync.c +0 -308
  141. data/ext/libusb-1.0.20/libusb/version.h +0 -18
  142. data/ext/libusb-1.0.20/libusb/version_nano.h +0 -1
  143. data/ext/libusb-1.0.20/ltmain.sh +0 -9655
  144. data/ext/libusb-1.0.20/m4/libtool.m4 +0 -7992
  145. data/ext/libusb-1.0.20/m4/ltoptions.m4 +0 -384
  146. data/ext/libusb-1.0.20/m4/ltsugar.m4 +0 -123
  147. data/ext/libusb-1.0.20/m4/ltversion.m4 +0 -23
  148. data/ext/libusb-1.0.20/m4/lt~obsolete.m4 +0 -98
  149. data/ext/libusb-1.0.20/missing +0 -215
  150. data/ext/libusb-1.0.20/tests/Makefile.am +0 -6
  151. data/ext/libusb-1.0.20/tests/Makefile.in +0 -596
  152. data/ext/libusb-1.0.20/tests/libusb_testlib.h +0 -107
  153. data/ext/libusb-1.0.20/tests/stress.c +0 -160
  154. data/ext/libusb-1.0.20/tests/testlib.c +0 -277
  155. metadata.gz.sig +0 -0
@@ -1,114 +0,0 @@
1
- libusb for Android
2
- ==================
3
-
4
- Building:
5
- ---------
6
-
7
- To build libusb for Android do the following:
8
-
9
- 1. Download the latest NDK from:
10
- http://developer.android.com/tools/sdk/ndk/index.html
11
-
12
- 2. Extract the NDK.
13
-
14
- 3. Open a shell and make sure there exist an NDK global variable
15
- set to the directory where you extracted the NDK.
16
-
17
- 4. Change directory to libusb's "android/jni"
18
-
19
- 5. Run "$NDK/ndk-build".
20
-
21
- The libusb library, examples and tests can then be found in:
22
- "android/libs/$ARCH"
23
-
24
- Where $ARCH is one of:
25
- armeabi
26
- armeabi-v7a
27
- x86
28
-
29
-
30
- Installing:
31
- -----------
32
-
33
- If you wish to use libusb from native code in own Android application
34
- then you should add the following line to your Android.mk file:
35
-
36
- include $(PATH_TO_LIBUSB_SRC)/android/jni/libusb.mk
37
-
38
- You will then need to add the following lines to the build
39
- configuration for each native binary which uses libusb:
40
-
41
- LOCAL_C_INCLUDES += $(LIBUSB_ROOT_ABS)
42
- LOCAL_SHARED_LIBRARIES += libusb1.0
43
-
44
- The Android build system will then correctly include libusb in the
45
- application package (APK) file, provided ndk-build is invoked before
46
- the package is built.
47
-
48
-
49
- For a rooted device it is possible to install libusb into the system
50
- image of a running device:
51
-
52
- 1. Enable ADB on the device.
53
-
54
- 2. Connect the device to a machine running ADB.
55
-
56
- 3. Execute the following commands on the machine
57
- running ADB:
58
-
59
- # Make the system partition writable
60
- adb shell su -c "mount -o remount,rw /system"
61
-
62
- # Install libusb
63
- adb push obj/local/armeabi/libusb1.0.so /sdcard/
64
- adb shell su -c "cat > /system/lib/libusb1.0.so < /sdcard/libusb1.0.so"
65
- adb shell rm /system/lib/libusb1.0.so
66
-
67
- # Install the samples and tests
68
- for B in listdevs fxload xusb sam3u_benchmark hotplugtest stress
69
- do
70
- adb push "obj/local/armeabi/$B" /sdcard/
71
- adb shell su -c "cat > /system/bin/$B < /sdcard/$B"
72
- adb shell su -c "chmod 0755 /system/bin/$B"
73
- adb shell rm "/sdcard/$B"
74
- done
75
-
76
- # Make the system partition read only again
77
- adb shell su -c "mount -o remount,ro /system"
78
-
79
- # Run listdevs to
80
- adb shell su -c "listdevs"
81
-
82
- 4. If your device only has a single OTG port then ADB can generally
83
- be switched to using Wifi with the following commands when connected
84
- via USB:
85
-
86
- adb shell netcfg
87
- # Note the wifi IP address of the phone
88
- adb tcpip 5555
89
- # Use the IP address from netcfg
90
- adb connect 192.168.1.123:5555
91
-
92
- Runtime Permissions:
93
- --------------------
94
-
95
- The default system configuration on most Android device will not allow
96
- access to USB devices. There are several options for changing this.
97
-
98
- If you have control of the system image then you can modify the
99
- ueventd.rc used in the image to change the permissions on
100
- /dev/bus/usb/*/*. If using this approach then it is advisable to
101
- create a new Android permission to protect access to these files.
102
- It is not advisable to give all applications read and write permissions
103
- to these files.
104
-
105
- For rooted devices the code using libusb could be executed as root
106
- using the "su" command. An alternative would be to use the "su" command
107
- to change the permissions on the appropriate /dev/bus/usb/ files.
108
-
109
- Users have reported success in using android.hardware.usb.UsbManager
110
- to request permission to use the UsbDevice and then opening the
111
- device. The difficulties in this method is that there is no guarantee
112
- that it will continue to work in the future Android versions, it
113
- requires invoking Java APIs and running code to match each
114
- android.hardware.usb.UsbDevice to a libusb_device.
@@ -1,81 +0,0 @@
1
- /*
2
- * Android build config for libusb
3
- * Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
4
- *
5
- * This library is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU Lesser General Public
7
- * License as published by the Free Software Foundation; either
8
- * version 2.1 of the License, or (at your option) any later version.
9
- *
10
- * This library is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this library; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
- */
19
-
20
- /* Start with debug message logging enabled */
21
- /* #undef ENABLE_DEBUG_LOGGING */
22
-
23
- /* Message logging */
24
- #define ENABLE_LOGGING
25
-
26
- /* Define to 1 if you have the <dlfcn.h> header file. */
27
- #define HAVE_DLFCN_H 1
28
-
29
- /* Define to 1 if you have the `gettimeofday' function. */
30
- #define HAVE_GETTIMEOFDAY 1
31
-
32
- /* Define to 1 if you have the <inttypes.h> header file. */
33
- #define HAVE_INTTYPES_H 1
34
-
35
- /* Linux backend */
36
- #define OS_LINUX 1
37
-
38
- /* Enable output to system log */
39
- #define USE_SYSTEM_LOGGING_FACILITY 1
40
-
41
- /* type of second poll() argument */
42
- #define POLL_NFDS_TYPE nfds_t
43
-
44
- /* Use POSIX Threads */
45
- #define THREADS_POSIX 1
46
-
47
- /* Default visibility */
48
- #define DEFAULT_VISIBILITY __attribute__((visibility("default")))
49
-
50
- /* Define to 1 if you have the <memory.h> header file. */
51
- #define HAVE_MEMORY_H 1
52
-
53
- /* Define to 1 if you have the <poll.h> header file. */
54
- #define HAVE_POLL_H 1
55
-
56
- /* Define to 1 if you have the <signal.h> header file. */
57
- #define HAVE_SIGNAL_H 1
58
-
59
- /* Define to 1 if you have the <sys/stat.h> header file. */
60
- #define HAVE_SYS_STAT_H 1
61
-
62
- /* Define to 1 if you have the <sys/time.h> header file. */
63
- #define HAVE_SYS_TIME_H 1
64
-
65
- /* Define to 1 if you have the <sys/types.h> header file. */
66
- #define HAVE_SYS_TYPES_H 1
67
-
68
- /* Define to 1 if you have the <unistd.h> header file. */
69
- #define HAVE_UNISTD_H 1
70
-
71
- /* Define to 1 if you have the <linux/filter.h> header file. */
72
- #define HAVE_LINUX_FILTER_H 1
73
-
74
- /* Define to 1 if you have the <linux/netlink.h> header file. */
75
- #define HAVE_LINUX_NETLINK_H 1
76
-
77
- /* Define to 1 if you have the <asm/types.h> header file. */
78
- #define HAVE_ASM_TYPES_H 1
79
-
80
- /* Define to 1 if you have the <sys/socket.h> header file. */
81
- #define HAVE_SYS_SOCKET_H 1
@@ -1,23 +0,0 @@
1
- # Android build config for libusb, examples and tests
2
- # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
3
- #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
8
- #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
- #
18
-
19
- LOCAL_PATH:= $(call my-dir)
20
-
21
- include $(LOCAL_PATH)/libusb.mk
22
- include $(LOCAL_PATH)/examples.mk
23
- include $(LOCAL_PATH)/tests.mk
@@ -1,24 +0,0 @@
1
- # Android application build config for libusb
2
- # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
3
- #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
8
- #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
- #
18
-
19
- APP_ABI := all
20
-
21
- # Workaround for MIPS toolchain linker being unable to find liblog dependency
22
- # of shared object in NDK versions at least up to r9.
23
- #
24
- APP_LDFLAGS := -llog
@@ -1,134 +0,0 @@
1
- # Android build config for libusb examples
2
- # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
3
- #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
8
- #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
- #
18
-
19
- LOCAL_PATH:= $(call my-dir)
20
- LIBUSB_ROOT_REL:= ../..
21
- LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../..
22
-
23
- # listdevs
24
-
25
- include $(CLEAR_VARS)
26
-
27
- LOCAL_SRC_FILES := \
28
- $(LIBUSB_ROOT_REL)/examples/listdevs.c
29
-
30
- LOCAL_C_INCLUDES += \
31
- $(LIBUSB_ROOT_ABS)
32
-
33
- LOCAL_SHARED_LIBRARIES += libusb1.0
34
-
35
- LOCAL_MODULE:= listdevs
36
-
37
- include $(BUILD_EXECUTABLE)
38
-
39
- # xusb
40
-
41
- include $(CLEAR_VARS)
42
-
43
- LOCAL_SRC_FILES := \
44
- $(LIBUSB_ROOT_REL)/examples/xusb.c
45
-
46
- LOCAL_C_INCLUDES += \
47
- $(LIBUSB_ROOT_ABS)
48
-
49
- LOCAL_SHARED_LIBRARIES += libusb1.0
50
-
51
- LOCAL_MODULE:= xusb
52
-
53
- include $(BUILD_EXECUTABLE)
54
-
55
- # hotplugtest
56
-
57
- include $(CLEAR_VARS)
58
-
59
- LOCAL_SRC_FILES := \
60
- $(LIBUSB_ROOT_REL)/examples/hotplugtest.c
61
-
62
- LOCAL_C_INCLUDES += \
63
- $(LIBUSB_ROOT_ABS)
64
-
65
- LOCAL_SHARED_LIBRARIES += libusb1.0
66
-
67
- LOCAL_MODULE:= hotplugtest
68
-
69
- include $(BUILD_EXECUTABLE)
70
-
71
- # fxload
72
-
73
- include $(CLEAR_VARS)
74
-
75
- LOCAL_SRC_FILES := \
76
- $(LIBUSB_ROOT_REL)/examples/fxload.c \
77
- $(LIBUSB_ROOT_REL)/examples/ezusb.c
78
-
79
- LOCAL_C_INCLUDES += \
80
- $(LIBUSB_ROOT_ABS)
81
-
82
- LOCAL_SHARED_LIBRARIES += libusb1.0
83
-
84
- LOCAL_MODULE:= fxload
85
-
86
- include $(BUILD_EXECUTABLE)
87
-
88
- # sam3u_benchmake
89
-
90
- include $(CLEAR_VARS)
91
-
92
- LOCAL_SRC_FILES := \
93
- $(LIBUSB_ROOT_REL)/examples/sam3u_benchmark.c
94
-
95
- LOCAL_C_INCLUDES += \
96
- $(LIBUSB_ROOT_ABS)
97
-
98
- LOCAL_SHARED_LIBRARIES += libusb1.0
99
-
100
- LOCAL_MODULE:= sam3u_benchmark
101
-
102
- include $(BUILD_EXECUTABLE)
103
-
104
- # dpfp
105
-
106
- include $(CLEAR_VARS)
107
-
108
- LOCAL_SRC_FILES := \
109
- $(LIBUSB_ROOT_REL)/examples/dpfp.c
110
-
111
- LOCAL_C_INCLUDES += \
112
- $(LIBUSB_ROOT_ABS)
113
-
114
- LOCAL_SHARED_LIBRARIES += libusb1.0
115
-
116
- LOCAL_MODULE:= dpfp
117
-
118
- include $(BUILD_EXECUTABLE)
119
-
120
- # dpfp_threaded
121
-
122
- include $(CLEAR_VARS)
123
-
124
- LOCAL_SRC_FILES := \
125
- $(LIBUSB_ROOT_REL)/examples/dpfp_threaded.c
126
-
127
- LOCAL_C_INCLUDES += \
128
- $(LIBUSB_ROOT_ABS)
129
-
130
- LOCAL_SHARED_LIBRARIES += libusb1.0
131
-
132
- LOCAL_MODULE:= dpfp_threaded
133
-
134
- include $(BUILD_EXECUTABLE)
@@ -1,54 +0,0 @@
1
- # Android build config for libusb
2
- # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
3
- #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
8
- #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
- #
18
-
19
- LOCAL_PATH:= $(call my-dir)
20
- LIBUSB_ROOT_REL:= ../..
21
- LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../..
22
-
23
- # libusb
24
-
25
- include $(CLEAR_VARS)
26
-
27
- LIBUSB_ROOT_REL:= ../..
28
- LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../..
29
-
30
- LOCAL_SRC_FILES := \
31
- $(LIBUSB_ROOT_REL)/libusb/core.c \
32
- $(LIBUSB_ROOT_REL)/libusb/descriptor.c \
33
- $(LIBUSB_ROOT_REL)/libusb/hotplug.c \
34
- $(LIBUSB_ROOT_REL)/libusb/io.c \
35
- $(LIBUSB_ROOT_REL)/libusb/sync.c \
36
- $(LIBUSB_ROOT_REL)/libusb/strerror.c \
37
- $(LIBUSB_ROOT_REL)/libusb/os/linux_usbfs.c \
38
- $(LIBUSB_ROOT_REL)/libusb/os/poll_posix.c \
39
- $(LIBUSB_ROOT_REL)/libusb/os/threads_posix.c \
40
- $(LIBUSB_ROOT_REL)/libusb/os/linux_netlink.c
41
-
42
- LOCAL_C_INCLUDES += \
43
- $(LOCAL_PATH)/.. \
44
- $(LIBUSB_ROOT_ABS)/libusb \
45
- $(LIBUSB_ROOT_ABS)/libusb/os
46
-
47
- LOCAL_EXPORT_C_INCLUDES := \
48
- $(LIBUSB_ROOT_ABS)/libusb
49
-
50
- LOCAL_LDLIBS := -llog
51
-
52
- LOCAL_MODULE := libusb1.0
53
-
54
- include $(BUILD_SHARED_LIBRARY)
@@ -1,56 +0,0 @@
1
- # Android build config for libusb tests
2
- # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
3
- #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
8
- #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
- #
18
-
19
- LOCAL_PATH:= $(call my-dir)
20
- LIBUSB_ROOT_REL:= ../..
21
- LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../..
22
-
23
- # testlib
24
-
25
- include $(CLEAR_VARS)
26
-
27
- LOCAL_SRC_FILES := \
28
- $(LIBUSB_ROOT_REL)/tests/testlib.c
29
-
30
- LOCAL_C_INCLUDES += \
31
- $(LIBUSB_ROOT_ABS)/tests
32
-
33
- LOCAL_EXPORT_C_INCLUDES := \
34
- $(LIBUSB_ROOT_ABS)/tests
35
-
36
- LOCAL_MODULE := testlib
37
-
38
- include $(BUILD_STATIC_LIBRARY)
39
-
40
-
41
- # stress
42
-
43
- include $(CLEAR_VARS)
44
-
45
- LOCAL_SRC_FILES := \
46
- $(LIBUSB_ROOT_REL)/tests/stress.c
47
-
48
- LOCAL_C_INCLUDES += \
49
- $(LIBUSB_ROOT_ABS)
50
-
51
- LOCAL_SHARED_LIBRARIES += libusb1.0
52
- LOCAL_STATIC_LIBRARIES += testlib
53
-
54
- LOCAL_MODULE:= stress
55
-
56
- include $(BUILD_EXECUTABLE)