1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
| cc_library {
| name: "libusb",
| host_supported: true,
| vendor_available: true,
|
| srcs: [
| "libusb/core.c",
| "libusb/descriptor.c",
| "libusb/hotplug.c",
| "libusb/io.c",
| "libusb/sync.c",
| "libusb/strerror.c",
| ],
|
| local_include_dirs: [
| "libusb",
| "libusb/os",
| ],
|
| cflags: [
| "-Wall",
| "-Wno-error=sign-compare",
| "-Wno-error=switch",
| ],
|
| target: {
| linux: {
| srcs: [
| "libusb/os/linux_usbfs.c",
| "libusb/os/poll_posix.c",
| "libusb/os/threads_posix.c",
| "libusb/os/linux_netlink.c",
| ],
| },
|
| android: {
| local_include_dirs: [
| "android",
| ],
|
| cflags: ["-Werror"],
| },
|
| darwin: {
| srcs: [
| "libusb/os/darwin_usb.c",
| "libusb/os/poll_posix.c",
| "libusb/os/threads_posix.c",
| ],
|
| local_include_dirs: [
| "darwin",
| ],
|
| host_ldlibs: [
| "-framework CoreFoundation",
| "-framework IOKit",
| "-lobjc"
| ],
|
| cflags: [
| "-Wno-unused-parameter",
| "-Wno-deprecated-declarations"
| ],
| },
|
| linux_glibc: {
| local_include_dirs: [
| "linux",
| ],
|
| cflags: ["-Werror"],
| },
|
| windows: {
| srcs: [
| "libusb/os/poll_windows.c",
| "libusb/os/threads_windows.c",
| "libusb/os/windows_nt_common.c",
| "libusb/os/windows_winusb.c",
| ],
|
| local_include_dirs: [
| "windows",
| ],
|
| cflags: [
| "-Werror",
| "-Wno-unused-function",
| "-Wno-unused-parameter",
| ],
| enabled: true,
| },
| },
|
| shared_libs: ["liblog"],
| export_include_dirs: ["include"],
| }
|
|