OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 assert(!is_android && !is_ios) | 5 assert(!is_android && !is_ios) |
6 | 6 |
7 config("libusb_config") { | 7 config("libusb_config") { |
8 include_dirs = [ | 8 include_dirs = [ |
9 "src/libusb", | 9 "src/libusb", |
10 ] | 10 ] |
11 } | 11 } |
12 | 12 |
13 static_library("libusb") { | 13 static_library("libusb") { |
14 sources = [ | 14 sources = [ |
15 "src/config.h", | 15 "src/config.h", |
16 "src/libusb/core.c", | 16 "src/libusb/core.c", |
17 "src/libusb/descriptor.c", | 17 "src/libusb/descriptor.c", |
18 "src/libusb/hotplug.c", | 18 "src/libusb/hotplug.c", |
19 "src/libusb/hotplug.h", | 19 "src/libusb/hotplug.h", |
20 "src/libusb/interrupt.c", | 20 "src/libusb/interrupt.c", |
21 "src/libusb/interrupt.h", | 21 "src/libusb/interrupt.h", |
22 "src/libusb/io.c", | 22 "src/libusb/io.c", |
23 "src/libusb/libusb.h", | 23 "src/libusb/libusb.h", |
24 "src/libusb/libusbi.h", | 24 "src/libusb/libusbi.h", |
25 "src/libusb/os/darwin_usb.c", | 25 "src/libusb/os/darwin_usb.c", |
26 "src/libusb/os/darwin_usb.h", | 26 "src/libusb/os/darwin_usb.h", |
27 "src/libusb/os/linux_udev.c", | 27 "src/libusb/os/linux_udev.cc", |
28 "src/libusb/os/linux_usbfs.c", | 28 "src/libusb/os/linux_usbfs.c", |
29 "src/libusb/os/linux_usbfs.h", | 29 "src/libusb/os/linux_usbfs.h", |
30 "src/libusb/os/poll_posix.c", | 30 "src/libusb/os/poll_posix.c", |
31 "src/libusb/os/poll_posix.h", | 31 "src/libusb/os/poll_posix.h", |
32 "src/libusb/os/poll_windows.c", | 32 "src/libusb/os/poll_windows.c", |
33 "src/libusb/os/poll_windows.h", | 33 "src/libusb/os/poll_windows.h", |
34 "src/libusb/os/threads_posix.c", | 34 "src/libusb/os/threads_posix.c", |
35 "src/libusb/os/threads_posix.h", | 35 "src/libusb/os/threads_posix.h", |
36 "src/libusb/os/threads_windows.c", | 36 "src/libusb/os/threads_windows.c", |
37 "src/libusb/os/threads_windows.h", | 37 "src/libusb/os/threads_windows.h", |
38 "src/libusb/os/windows_common.h", | 38 "src/libusb/os/windows_common.h", |
39 "src/libusb/os/windows_usb.c", | 39 "src/libusb/os/windows_usb.c", |
40 "src/libusb/os/windows_usb.h", | 40 "src/libusb/os/windows_usb.h", |
41 "src/libusb/strerror.c", | 41 "src/libusb/strerror.c", |
42 "src/libusb/sync.c", | 42 "src/libusb/sync.c", |
43 "src/libusb/version.h", | 43 "src/libusb/version.h", |
44 "src/libusb/version_nano.h", | 44 "src/libusb/version_nano.h", |
45 "src/msvc/config.h", | 45 "src/msvc/config.h", |
46 "src/msvc/inttypes.h", | 46 "src/msvc/inttypes.h", |
47 "src/msvc/stdint.h", | 47 "src/msvc/stdint.h", |
48 ] | 48 ] |
| 49 deps = [] |
49 include_dirs = [ | 50 include_dirs = [ |
50 "src/libusb/os", | 51 "src/libusb/os", |
51 ] | 52 ] |
52 | 53 |
53 configs -= [ "//build/config/compiler:chromium_code" ] | 54 configs -= [ "//build/config/compiler:chromium_code" ] |
54 configs += [ "//build/config/compiler:no_chromium_code" ] | 55 configs += [ "//build/config/compiler:no_chromium_code" ] |
55 | 56 |
56 public_configs = [ ":libusb_config" ] | 57 public_configs = [ ":libusb_config" ] |
57 | 58 |
58 if (is_posix) { | 59 if (is_posix) { |
(...skipping 17 matching lines...) Expand all Loading... |
76 ] | 77 ] |
77 } | 78 } |
78 | 79 |
79 if (is_linux) { | 80 if (is_linux) { |
80 defines += [ | 81 defines += [ |
81 "HAVE_LIBUDEV=1", | 82 "HAVE_LIBUDEV=1", |
82 "OS_LINUX=1", | 83 "OS_LINUX=1", |
83 "USE_UDEV=1", | 84 "USE_UDEV=1", |
84 "_GNU_SOURCE=1", | 85 "_GNU_SOURCE=1", |
85 ] | 86 ] |
86 configs += [ "//build/config/linux:udev" ] | 87 deps += [ "//build/config/linux:udev" ] |
87 } else { | 88 } else { |
88 sources -= [ | 89 sources -= [ |
89 "src/libusb/os/linux_udev.c", | 90 "src/libusb/os/linux_udev.cc", |
90 "src/libusb/os/linux_usbfs.c", | 91 "src/libusb/os/linux_usbfs.c", |
91 "src/libusb/os/linux_usbfs.h", | 92 "src/libusb/os/linux_usbfs.h", |
92 ] | 93 ] |
93 } | 94 } |
94 | 95 |
95 if (is_win) { | 96 if (is_win) { |
96 include_dirs += [ "src/msvc" ] | 97 include_dirs += [ "src/msvc" ] |
97 sources -= [ | 98 sources -= [ |
98 "src/libusb/os/poll_posix.c", | 99 "src/libusb/os/poll_posix.c", |
99 "src/libusb/os/threads_posix.c", | 100 "src/libusb/os/threads_posix.c", |
100 ] | 101 ] |
101 } else { | 102 } else { |
102 include_dirs += [ "src" ] | 103 include_dirs += [ "src" ] |
103 sources -= [ | 104 sources -= [ |
104 "src/libusb/os/poll_windows.c", | 105 "src/libusb/os/poll_windows.c", |
105 "src/libusb/os/poll_windows.h", | 106 "src/libusb/os/poll_windows.h", |
106 "src/libusb/os/threads_windows.c", | 107 "src/libusb/os/threads_windows.c", |
107 "src/libusb/os/threads_windows.h", | 108 "src/libusb/os/threads_windows.h", |
108 "src/libusb/os/windows_common.h", | 109 "src/libusb/os/windows_common.h", |
109 "src/libusb/os/windows_usb.c", | 110 "src/libusb/os/windows_usb.c", |
110 "src/libusb/os/windows_usb.h", | 111 "src/libusb/os/windows_usb.h", |
111 "src/msvc/config.h", | 112 "src/msvc/config.h", |
112 "src/msvc/inttypes.h", | 113 "src/msvc/inttypes.h", |
113 "src/msvc/stdint.h", | 114 "src/msvc/stdint.h", |
114 ] | 115 ] |
115 } | 116 } |
116 } | 117 } |
OLD | NEW |