| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 { | |
| 6 'targets': [ | |
| 7 { | |
| 8 'target_name': 'libusb', | |
| 9 'type': 'static_library', | |
| 10 'sources': [ | |
| 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', | |
| 19 'src/libusb/libusb.h', | |
| 20 'src/libusb/libusbi.h', | |
| 21 'src/libusb/strerror.c', | |
| 22 'src/libusb/sync.c', | |
| 23 'src/libusb/version.h', | |
| 24 'src/libusb/version_nano.h', | |
| 25 ], | |
| 26 'variables': { | |
| 27 'clang_warning_flags': [ | |
| 28 # guid_eq in windows_usb.c is unused. | |
| 29 '-Wno-unused-function', | |
| 30 ], | |
| 31 }, | |
| 32 'include_dirs': [ | |
| 33 'src', | |
| 34 'src/libusb', | |
| 35 'src/libusb/os', | |
| 36 ], | |
| 37 'direct_dependent_settings': { | |
| 38 'include_dirs': [ | |
| 39 'src/libusb', | |
| 40 ], | |
| 41 }, | |
| 42 'conditions': [ | |
| 43 ['OS=="linux" or OS=="mac"', { | |
| 44 'sources': [ | |
| 45 'src/libusb/os/poll_posix.c', | |
| 46 'src/libusb/os/poll_posix.h', | |
| 47 'src/libusb/os/threads_posix.c', | |
| 48 'src/libusb/os/threads_posix.h', | |
| 49 ], | |
| 50 'defines': [ | |
| 51 'DEFAULT_VISIBILITY=', | |
| 52 'HAVE_GETTIMEOFDAY=1', | |
| 53 'HAVE_POLL_H=1', | |
| 54 'HAVE_SYS_TIME_H=1', | |
| 55 'LIBUSB_DESCRIBE="1.0.16"', | |
| 56 'POLL_NFDS_TYPE=nfds_t', | |
| 57 'THREADS_POSIX=1', | |
| 58 ], | |
| 59 }], | |
| 60 ['OS=="linux"', { | |
| 61 'sources': [ | |
| 62 'src/libusb/os/linux_usbfs.c', | |
| 63 'src/libusb/os/linux_usbfs.h', | |
| 64 ], | |
| 65 'defines': [ | |
| 66 'OS_LINUX=1', | |
| 67 '_GNU_SOURCE=1', | |
| 68 ], | |
| 69 }], | |
| 70 ['chromeos==1', { | |
| 71 'defines': [ | |
| 72 'USBI_TIMERFD_AVAILABLE', | |
| 73 ] | |
| 74 }], | |
| 75 ['use_udev==1', { | |
| 76 'sources': [ | |
| 77 'src/libusb/os/linux_udev.cc', | |
| 78 ], | |
| 79 'defines': [ | |
| 80 'HAVE_LIBUDEV=1', | |
| 81 'USE_UDEV=1', | |
| 82 ], | |
| 83 'dependencies': [ | |
| 84 '../../device/udev_linux/udev.gyp:udev_linux', | |
| 85 ], | |
| 86 'include_dirs': [ | |
| 87 '../..', | |
| 88 ], | |
| 89 }], | |
| 90 ['OS=="linux" and use_udev==0', { | |
| 91 'sources': [ | |
| 92 'src/libusb/os/linux_netlink.c', | |
| 93 ], | |
| 94 'defines': [ | |
| 95 'HAVE_LINUX_NETLINK_H', | |
| 96 ], | |
| 97 'conditions': [ | |
| 98 ['clang==1', { | |
| 99 'cflags': [ | |
| 100 '-Wno-pointer-sign', | |
| 101 ] | |
| 102 }] | |
| 103 ], | |
| 104 }], | |
| 105 ['OS=="mac"', { | |
| 106 'sources': [ | |
| 107 'src/libusb/os/darwin_usb.c', | |
| 108 'src/libusb/os/darwin_usb.h', | |
| 109 ], | |
| 110 'defines': [ | |
| 111 'OS_DARWIN=1', | |
| 112 ], | |
| 113 }], | |
| 114 ['OS=="win"', { | |
| 115 'sources': [ | |
| 116 'src/libusb/os/poll_windows.c', | |
| 117 'src/libusb/os/poll_windows.h', | |
| 118 'src/libusb/os/threads_windows.c', | |
| 119 'src/libusb/os/threads_windows.h', | |
| 120 'src/libusb/os/windows_common.h', | |
| 121 'src/libusb/os/windows_usb.c', | |
| 122 'src/libusb/os/windows_usb.h', | |
| 123 'src/msvc/config.h', | |
| 124 'src/msvc/inttypes.h', | |
| 125 'src/msvc/stdint.h', | |
| 126 ], | |
| 127 'include_dirs!': [ | |
| 128 'src', | |
| 129 ], | |
| 130 'include_dirs': [ | |
| 131 'src/msvc', | |
| 132 ], | |
| 133 'msvs_disabled_warnings': [ 4267 ], | |
| 134 }], | |
| 135 ], | |
| 136 }, | |
| 137 ], | |
| 138 } | |
| OLD | NEW |