- add sources.
[platform/framework/web/crosswalk.git] / src / third_party / libusb / libusb.gyp
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/sync.c',
22         'src/libusb/version.h',
23         'src/libusb/version_nano.h',
24       ],
25       'include_dirs': [
26         'src',
27         'src/libusb',
28         'src/libusb/os',
29       ],
30       'direct_dependent_settings': {
31         'include_dirs': [
32           'src/libusb',
33         ],
34       },
35       'conditions': [
36         [ 'OS == "linux" or OS == "android" or OS == "mac"', {
37           'sources': [
38             'src/libusb/os/poll_posix.c',
39             'src/libusb/os/poll_posix.h',
40             'src/libusb/os/threads_posix.c',
41             'src/libusb/os/threads_posix.h',
42           ],
43           'defines': [
44             'DEFAULT_VISIBILITY=',
45             'HAVE_GETTIMEOFDAY=1',
46             'HAVE_POLL_H=1',
47             'HAVE_SYS_TIME_H=1',
48             'LIBUSB_DESCRIBE="1.0.16"',
49             'POLL_NFDS_TYPE=nfds_t',
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',
63             '_GNU_SOURCE=1',
64           ],
65         }],
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"', {
76           'sources': [
77             'src/libusb/os/poll_windows.c',
78             'src/libusb/os/poll_windows.h',
79             'src/libusb/os/threads_windows.c',
80             'src/libusb/os/threads_windows.h',
81             'src/libusb/os/windows_common.h',
82             'src/libusb/os/windows_usb.c',
83             'src/libusb/os/windows_usb.h',
84             'src/msvc/config.h',
85             'src/msvc/inttypes.h',
86             'src/msvc/stdint.h',
87           ],
88           'include_dirs!': [
89             'src',
90           ],
91           'include_dirs': [
92             'src/msvc',
93           ],
94           'msvs_disabled_warnings': [ 4267 ],
95         }],
96       ],
97     },
98   ],
99 }