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': [ |
11 'src/config.h', | 11 'src/config.h', |
| 12 'src/libusb/core.c', |
| 13 'src/libusb/descriptor.c', |
| 14 'src/libusb/hotplug.c', |
| 15 'src/libusb/hotplug.h', |
| 16 'src/libusb/interrupt.c', |
| 17 'src/libusb/interrupt.h', |
| 18 'src/libusb/io.c', |
12 'src/libusb/libusb.h', | 19 'src/libusb/libusb.h', |
13 'src/libusb/libusbi.h', | 20 'src/libusb/libusbi.h', |
14 'src/libusb/core.c', | |
15 'src/libusb/descriptor.c', | |
16 'src/libusb/io.c', | |
17 'src/libusb/sync.c', | 21 'src/libusb/sync.c', |
18 'src/libusb/version.h', | 22 'src/libusb/version.h', |
19 'src/libusb/interrupt.c', | 23 'src/libusb/version_nano.h', |
20 'src/libusb/interrupt.h', | |
21 ], | 24 ], |
22 'include_dirs': [ | 25 'include_dirs': [ |
23 'src', | 26 'src', |
24 'src/libusb', | 27 'src/libusb', |
25 'src/libusb/os', | 28 'src/libusb/os', |
26 ], | 29 ], |
27 'direct_dependent_settings': { | 30 'direct_dependent_settings': { |
28 'include_dirs': [ | 31 'include_dirs': [ |
29 'src/libusb', | 32 'src/libusb', |
30 ], | 33 ], |
31 }, | 34 }, |
32 'conditions': [ | 35 'conditions': [ |
33 [ 'OS == "linux" or OS == "android"', { | 36 [ 'OS == "linux" or OS == "android" or OS == "mac"', { |
34 'sources': [ | 37 'sources': [ |
35 'src/libusb/os/linux_usbfs.c', | 38 'src/libusb/os/poll_posix.c', |
36 'src/libusb/os/linux_usbfs.h', | |
37 'src/libusb/os/poll_posix.h', | 39 'src/libusb/os/poll_posix.h', |
38 'src/libusb/os/threads_posix.c', | 40 'src/libusb/os/threads_posix.c', |
39 'src/libusb/os/threads_posix.h', | 41 'src/libusb/os/threads_posix.h', |
40 ], | 42 ], |
41 'defines': [ | 43 'defines': [ |
42 'DEFAULT_VISIBILITY=', | 44 'DEFAULT_VISIBILITY=', |
43 'HAVE_GETTIMEOFDAY=1', | 45 'HAVE_GETTIMEOFDAY=1', |
44 'HAVE_POLL_H=1', | 46 'HAVE_POLL_H=1', |
45 'HAVE_SYS_TIME_H=1', | 47 'HAVE_SYS_TIME_H=1', |
46 'LIBUSB_DESCRIBE="1.0.9"', | 48 'LIBUSB_DESCRIBE="1.0.16"', |
47 'OS_LINUX=1', | |
48 'POLL_NFDS_TYPE=nfds_t', | 49 'POLL_NFDS_TYPE=nfds_t', |
49 'THREADS_POSIX=1', | 50 'THREADS_POSIX=1', |
| 51 ], |
| 52 }], |
| 53 [ 'OS == "linux" or OS == "android"', { |
| 54 'sources': [ |
| 55 'src/libusb/os/linux_udev.c', |
| 56 'src/libusb/os/linux_usbfs.c', |
| 57 'src/libusb/os/linux_usbfs.h', |
| 58 ], |
| 59 'defines': [ |
| 60 'HAVE_LIBUDEV=1', |
| 61 'OS_LINUX=1', |
| 62 'USE_UDEV=1', |
50 '_GNU_SOURCE=1', | 63 '_GNU_SOURCE=1', |
51 ], | 64 ], |
52 }], | 65 }], |
53 ['OS == "win"', { | 66 [ 'OS == "mac"', { |
| 67 'sources': [ |
| 68 'src/libusb/os/darwin_usb.c', |
| 69 'src/libusb/os/darwin_usb.h', |
| 70 ], |
| 71 'defines': [ |
| 72 'OS_DARWIN=1', |
| 73 ], |
| 74 }], |
| 75 [ 'OS == "win"', { |
54 'sources': [ | 76 'sources': [ |
55 'src/libusb/os/poll_windows.c', | 77 'src/libusb/os/poll_windows.c', |
56 'src/libusb/os/poll_windows.h', | 78 'src/libusb/os/poll_windows.h', |
57 'src/libusb/os/threads_windows.c', | 79 'src/libusb/os/threads_windows.c', |
58 'src/libusb/os/threads_windows.h', | 80 'src/libusb/os/threads_windows.h', |
| 81 'src/libusb/os/windows_common.h', |
59 'src/libusb/os/windows_usb.c', | 82 'src/libusb/os/windows_usb.c', |
60 'src/libusb/os/windows_usb.h', | 83 'src/libusb/os/windows_usb.h', |
61 'src/msvc/config.h', | 84 'src/msvc/config.h', |
62 'src/msvc/inttypes.h', | 85 'src/msvc/inttypes.h', |
63 'src/msvc/stdint.h', | 86 'src/msvc/stdint.h', |
64 ], | 87 ], |
65 'include_dirs!': [ | 88 'include_dirs!': [ |
66 'src', | 89 'src', |
67 ], | 90 ], |
68 'include_dirs': [ | 91 'include_dirs': [ |
69 'src/msvc', | 92 'src/msvc', |
70 ], | 93 ], |
71 'defines': [ | 94 'msvs_disabled_warnings': [ 4267 ], |
72 'DDKBUILD=1', | |
73 ] | |
74 }], | |
75 ['OS == "mac"', { | |
76 'sources': [ | |
77 'src/libusb/os/darwin_usb.c', | |
78 'src/libusb/os/darwin_usb.h', | |
79 'src/libusb/os/poll_posix.h', | |
80 'src/libusb/os/threads_posix.c', | |
81 'src/libusb/os/threads_posix.h', | |
82 ], | |
83 'defines': [ | |
84 'DEFAULT_VISIBILITY=', | |
85 'HAVE_GETTIMEOFDAY=1', | |
86 'HAVE_POLL_H=1', | |
87 'HAVE_SYS_TIME_H=1', | |
88 'LIBUSB_DESCRIBE="1.0.9"', | |
89 'OS_DARWIN=1', | |
90 'POLL_NFDS_TYPE=nfds_t', | |
91 'THREADS_POSIX=1', | |
92 '_GNU_SOURCE=1', | |
93 ], | |
94 }], | 95 }], |
95 ], | 96 ], |
96 }, | 97 }, |
97 ], | 98 ], |
98 } | 99 } |
OLD | NEW |