summaryrefslogtreecommitdiffstats
path: root/tools/usb_gadget.gyp
blob: 424b463480b038559cf12a7f460c41b0bd2fb487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'variables': {
    'usb_gadget_files': [
      'usb_gadget/__init__.py',
      'usb_gadget/__main__.py',
      'usb_gadget/default_gadget.py',
      'usb_gadget/gadget.py',
      'usb_gadget/hid_constants.py',
      'usb_gadget/hid_descriptors.py',
      'usb_gadget/hid_echo_gadget.py',
      'usb_gadget/hid_gadget.py',
      'usb_gadget/keyboard_gadget.py',
      'usb_gadget/linux_gadgetfs.py',
      'usb_gadget/mouse_gadget.py',
      'usb_gadget/server.py',
      'usb_gadget/usb_constants.py',
      'usb_gadget/usb_descriptors.py',
    ],
    'usb_gadget_package': '<(PRODUCT_DIR)/usb_gadget.zip',
    'usb_gadget_package_hash': '<(PRODUCT_DIR)/usb_gadget.zip.md5',
  },
  'targets': [
    {
      'target_name': 'usb_gadget',
      'type': 'none',
      'actions': [
        {
          'action_name': 'Building USB Gadget ZIP bundle',
          'inputs': [
            'usb_gadget/package.py',
            '<@(usb_gadget_files)',
          ],
          'outputs': [
            '<(usb_gadget_package)',
            '<(usb_gadget_package_hash)',
          ],
          'action': [
            'python', 'usb_gadget/package.py',
            '--zip-file', '<(usb_gadget_package)',
            '--hash-file', '<(usb_gadget_package_hash)',
            '<@(usb_gadget_files)',
          ]
        }
      ]
    }
  ]
}