OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'targets': [ | 6 'targets': [ |
7 { | 7 { |
8 'target_name': 'libusb', | 8 'target_name': 'libusb', |
9 'type': 'static_library', | 9 'type': 'static_library', |
10 'sources': [ | 10 'sources': [ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 'HAVE_GETTIMEOFDAY=1', | 46 'HAVE_GETTIMEOFDAY=1', |
47 'HAVE_POLL_H=1', | 47 'HAVE_POLL_H=1', |
48 'HAVE_SYS_TIME_H=1', | 48 'HAVE_SYS_TIME_H=1', |
49 'LIBUSB_DESCRIBE="1.0.16"', | 49 'LIBUSB_DESCRIBE="1.0.16"', |
50 'POLL_NFDS_TYPE=nfds_t', | 50 'POLL_NFDS_TYPE=nfds_t', |
51 'THREADS_POSIX=1', | 51 'THREADS_POSIX=1', |
52 ], | 52 ], |
53 }], | 53 }], |
54 [ 'OS == "linux" or OS == "android"', { | 54 [ 'OS == "linux" or OS == "android"', { |
55 'sources': [ | 55 'sources': [ |
56 'src/libusb/os/linux_udev.c', | |
57 'src/libusb/os/linux_usbfs.c', | 56 'src/libusb/os/linux_usbfs.c', |
58 'src/libusb/os/linux_usbfs.h', | 57 'src/libusb/os/linux_usbfs.h', |
59 ], | 58 ], |
60 'defines': [ | 59 'defines': [ |
| 60 'OS_LINUX=1', |
| 61 '_GNU_SOURCE=1', |
| 62 ], |
| 63 }], |
| 64 [ 'use_udev == 1 or OS == "android"', { |
| 65 'sources': [ |
| 66 'src/libusb/os/linux_udev.c', |
| 67 ], |
| 68 'defines': [ |
61 'HAVE_LIBUDEV=1', | 69 'HAVE_LIBUDEV=1', |
62 'OS_LINUX=1', | |
63 'USE_UDEV=1', | 70 'USE_UDEV=1', |
64 '_GNU_SOURCE=1', | 71 ], |
| 72 }], |
| 73 [ 'OS == "linux" and use_udev == 0', { |
| 74 'sources': [ |
| 75 'src/libusb/os/linux_netlink.c', |
| 76 ], |
| 77 'defines': [ |
| 78 'HAVE_LINUX_NETLINK_H', |
| 79 ], |
| 80 'conditions': [ |
| 81 ['clang==1', { |
| 82 'cflags': [ |
| 83 '-Wno-pointer-sign', |
| 84 ] |
| 85 }] |
65 ], | 86 ], |
66 }], | 87 }], |
67 [ 'OS == "mac"', { | 88 [ 'OS == "mac"', { |
68 'sources': [ | 89 'sources': [ |
69 'src/libusb/os/darwin_usb.c', | 90 'src/libusb/os/darwin_usb.c', |
70 'src/libusb/os/darwin_usb.h', | 91 'src/libusb/os/darwin_usb.h', |
71 ], | 92 ], |
72 'defines': [ | 93 'defines': [ |
73 'OS_DARWIN=1', | 94 'OS_DARWIN=1', |
74 ], | 95 ], |
(...skipping 16 matching lines...) Expand all Loading... |
91 ], | 112 ], |
92 'include_dirs': [ | 113 'include_dirs': [ |
93 'src/msvc', | 114 'src/msvc', |
94 ], | 115 ], |
95 'msvs_disabled_warnings': [ 4267 ], | 116 'msvs_disabled_warnings': [ 4267 ], |
96 }], | 117 }], |
97 ], | 118 ], |
98 }, | 119 }, |
99 ], | 120 ], |
100 } | 121 } |
OLD | NEW |