1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 assert(!is_android && !is_ios)
7 config("libusb_config") {
8 include_dirs = [ "src/libusb" ]
11 static_library("libusb") {
15 "src/libusb/descriptor.c",
16 "src/libusb/hotplug.c",
17 "src/libusb/hotplug.h",
18 "src/libusb/interrupt.c",
19 "src/libusb/interrupt.h",
21 "src/libusb/libusb.h",
22 "src/libusb/libusbi.h",
23 "src/libusb/os/darwin_usb.c",
24 "src/libusb/os/darwin_usb.h",
25 "src/libusb/os/linux_udev.cc",
26 "src/libusb/os/linux_usbfs.c",
27 "src/libusb/os/linux_usbfs.h",
28 "src/libusb/os/poll_posix.c",
29 "src/libusb/os/poll_posix.h",
30 "src/libusb/os/poll_windows.c",
31 "src/libusb/os/poll_windows.h",
32 "src/libusb/os/threads_posix.c",
33 "src/libusb/os/threads_posix.h",
34 "src/libusb/os/threads_windows.c",
35 "src/libusb/os/threads_windows.h",
36 "src/libusb/os/windows_common.h",
37 "src/libusb/os/windows_usb.c",
38 "src/libusb/os/windows_usb.h",
39 "src/libusb/strerror.c",
41 "src/libusb/version.h",
42 "src/libusb/version_nano.h",
44 "src/msvc/inttypes.h",
48 include_dirs = [ "src/libusb/os" ]
50 configs -= [ "//build/config/compiler:chromium_code" ]
51 configs += [ "//build/config/compiler:no_chromium_code" ]
53 public_configs = [ ":libusb_config" ]
57 "DEFAULT_VISIBILITY=",
58 "HAVE_GETTIMEOFDAY=1",
61 "LIBUSB_DESCRIBE=\"1.0.16\"",
62 "POLL_NFDS_TYPE=nfds_t",
68 defines += [ "OS_DARWIN=1" ]
71 "src/libusb/os/darwin_usb.c",
72 "src/libusb/os/darwin_usb.h",
83 deps += [ "//build/config/linux:udev" ]
86 "src/libusb/os/linux_udev.cc",
87 "src/libusb/os/linux_usbfs.c",
88 "src/libusb/os/linux_usbfs.h",
93 include_dirs += [ "src/msvc" ]
95 "src/libusb/os/poll_posix.c",
96 "src/libusb/os/threads_posix.c",
99 include_dirs += [ "src" ]
101 "src/libusb/os/poll_windows.c",
102 "src/libusb/os/poll_windows.h",
103 "src/libusb/os/threads_windows.c",
104 "src/libusb/os/threads_windows.h",
105 "src/libusb/os/windows_common.h",
106 "src/libusb/os/windows_usb.c",
107 "src/libusb/os/windows_usb.h",
109 "src/msvc/inttypes.h",