OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 config("libusb_config") { | 5 config("libusb_config") { |
6 include_dirs = [ | 6 include_dirs = [ |
7 "src/libusb", | 7 "src/libusb", |
8 ] | 8 ] |
9 } | 9 } |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 "src/libusb/version.h", | 41 "src/libusb/version.h", |
42 "src/libusb/version_nano.h", | 42 "src/libusb/version_nano.h", |
43 "src/msvc/config.h", | 43 "src/msvc/config.h", |
44 "src/msvc/inttypes.h", | 44 "src/msvc/inttypes.h", |
45 "src/msvc/stdint.h", | 45 "src/msvc/stdint.h", |
46 ] | 46 ] |
47 include_dirs = [ | 47 include_dirs = [ |
48 "src/libusb/os", | 48 "src/libusb/os", |
49 ] | 49 ] |
50 | 50 |
51 configs -= "//build/config/compiler:chromium_code" | 51 configs -= [ "//build/config/compiler:chromium_code" ] |
52 configs += "//build/config/compiler:no_chromium_code" | 52 configs += [ "//build/config/compiler:no_chromium_code" ] |
53 | 53 |
54 direct_dependent_configs = [ ":libusb_config" ] | 54 direct_dependent_configs = [ ":libusb_config" ] |
55 | 55 |
56 if (is_posix) { | 56 if (is_posix) { |
57 defines = [ | 57 defines = [ |
58 "DEFAULT_VISIBILITY=", | 58 "DEFAULT_VISIBILITY=", |
59 "HAVE_GETTIMEOFDAY=1", | 59 "HAVE_GETTIMEOFDAY=1", |
60 "HAVE_POLL_H=1", | 60 "HAVE_POLL_H=1", |
61 "HAVE_SYS_TIME_H=1", | 61 "HAVE_SYS_TIME_H=1", |
62 "LIBUSB_DESCRIBE=\"1.0.16\"", | 62 "LIBUSB_DESCRIBE=\"1.0.16\"", |
63 "POLL_NFDS_TYPE=nfds_t", | 63 "POLL_NFDS_TYPE=nfds_t", |
64 "THREADS_POSIX=1", | 64 "THREADS_POSIX=1", |
65 ] | 65 ] |
66 } | 66 } |
67 | 67 |
68 if (is_mac) { | 68 if (is_mac) { |
69 defines += "OS_DARWIN=1" | 69 defines += [ "OS_DARWIN=1" ] |
70 } else { | 70 } else { |
71 sources -= [ | 71 sources -= [ |
72 "src/libusb/os/darwin_usb.c", | 72 "src/libusb/os/darwin_usb.c", |
73 "src/libusb/os/darwin_usb.h", | 73 "src/libusb/os/darwin_usb.h", |
74 ] | 74 ] |
75 } | 75 } |
76 | 76 |
77 if (is_linux || is_android) { | 77 if (is_linux || is_android) { |
78 defines += [ | 78 defines += [ |
79 "HAVE_LIBUDEV=1", | 79 "HAVE_LIBUDEV=1", |
80 "OS_LINUX=1", | 80 "OS_LINUX=1", |
81 "USE_UDEV=1", | 81 "USE_UDEV=1", |
82 "_GNU_SOURCE=1", | 82 "_GNU_SOURCE=1", |
83 ] | 83 ] |
84 configs += "//build/config/linux:udev" | 84 configs += [ "//build/config/linux:udev" ] |
85 } else { | 85 } else { |
86 sources -= [ | 86 sources -= [ |
87 "src/libusb/os/linux_udev.c", | 87 "src/libusb/os/linux_udev.c", |
88 "src/libusb/os/linux_usbfs.c", | 88 "src/libusb/os/linux_usbfs.c", |
89 "src/libusb/os/linux_usbfs.h", | 89 "src/libusb/os/linux_usbfs.h", |
90 ] | 90 ] |
91 } | 91 } |
92 | 92 |
93 if (is_win) { | 93 if (is_win) { |
94 include_dirs += "src/msvc" | 94 include_dirs += [ "src/msvc" ] |
95 } else { | 95 } else { |
96 include_dirs += "src" | 96 include_dirs += [ "src" ] |
97 sources -= [ | 97 sources -= [ |
98 "src/libusb/os/poll_windows.c", | 98 "src/libusb/os/poll_windows.c", |
99 "src/libusb/os/poll_windows.h", | 99 "src/libusb/os/poll_windows.h", |
100 "src/libusb/os/threads_windows.c", | 100 "src/libusb/os/threads_windows.c", |
101 "src/libusb/os/threads_windows.h", | 101 "src/libusb/os/threads_windows.h", |
102 "src/libusb/os/windows_common.h", | 102 "src/libusb/os/windows_common.h", |
103 "src/libusb/os/windows_usb.c", | 103 "src/libusb/os/windows_usb.c", |
104 "src/libusb/os/windows_usb.h", | 104 "src/libusb/os/windows_usb.h", |
105 "src/msvc/config.h", | 105 "src/msvc/config.h", |
106 "src/msvc/inttypes.h", | 106 "src/msvc/inttypes.h", |
107 "src/msvc/stdint.h", | 107 "src/msvc/stdint.h", |
108 ] | 108 ] |
109 } | 109 } |
110 } | 110 } |
OLD | NEW |