OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 source_ids = "//third_party/usb_ids/usb.ids" | 5 source_ids = "//third_party/usb_ids/usb.ids" |
6 generated_ids = "$target_gen_dir/usb_ids_gen.cc" | 6 generated_ids = "$target_gen_dir/usb_ids_gen.cc" |
7 | 7 |
8 static_library("usb") { | 8 source_set("usb") { |
9 output_name = "device_usb" | |
10 sources = [ | 9 sources = [ |
11 "usb_ids.cc", | 10 "usb_ids.cc", |
12 "usb_ids.h", | 11 "usb_ids.h", |
13 generated_ids, | 12 generated_ids, |
14 ] | 13 ] |
15 deps = [ | 14 deps = [ |
16 ":usb_device_ids", | 15 ":usb_device_ids", |
17 "//base", | 16 "//base", |
18 ] | 17 ] |
19 } | 18 } |
20 | 19 |
21 action("usb_device_ids") { | 20 action("usb_device_ids") { |
22 script = "//device/usb/tools/usb_ids.py" | 21 script = "//device/usb/tools/usb_ids.py" |
23 source_prereqs = [ source_ids ] | 22 source_prereqs = [ source_ids ] |
24 outputs = [ generated_ids ] | 23 outputs = [ generated_ids ] |
25 args = [ | 24 args = [ |
26 "-i", rebase_path(source_ids, root_build_dir), | 25 "-i", rebase_path(source_ids, root_build_dir), |
27 "-o", rebase_path(generated_ids, root_build_dir), | 26 "-o", rebase_path(generated_ids, root_build_dir), |
28 ] | 27 ] |
29 | 28 |
30 # Only the device_usb target can depend on us. | 29 # Only the device_usb target can depend on us. |
31 visibility = [ ":usb" ] | 30 visibility = [ ":usb" ] |
32 } | 31 } |
OLD | NEW |