Minor Python style clean-up
[chromium-blink-merge.git] / tools / android / forwarder2 / BUILD.gn
blob7d77bdc1c7908cb9260cf98f8f78a39f14692c3b
1 # Copyright 2014 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.
5 # GYP: //tools/android/forwarder2/forwarder.gyp:forwarder2
6 group("forwarder2") {
7   data_deps = [
8     ":host_forwarder($host_toolchain)",
9     ":host_forwarder_copy($host_toolchain)",
10     ":device_forwarder($default_toolchain)",
11     ":device_forwarder_prepare_dist($default_toolchain)",
12   ]
15 if (current_toolchain == default_toolchain) {
16   import("//build/config/android/rules.gni")
18   # GYP: //tools/android/forwarder2/forwarder.gyp:device_forwarder
19   executable("device_forwarder") {
20     sources = [
21       "command.cc",
22       "command.h",
23       "common.cc",
24       "common.h",
25       "daemon.cc",
26       "daemon.h",
27       "device_controller.cc",
28       "device_controller.h",
29       "device_forwarder_main.cc",
30       "device_listener.cc",
31       "device_listener.h",
32       "forwarder.cc",
33       "forwarder.h",
34       "forwarders_manager.cc",
35       "forwarders_manager.h",
36       "pipe_notifier.cc",
37       "pipe_notifier.h",
38       "self_deleter_helper.h",
39       "socket.cc",
40       "socket.h",
41       "util.h",
42     ]
43     deps = [
44       "//base",
45       "//build/config/sanitizers:deps",
46       "//tools/android/common",
47     ]
48     data_deps = [ "//build/android/pylib/device/commands" ]
49   }
51   # GYP: //tools/android/forwarder2/forwarder.gyp:forwarder2
52   create_native_executable_dist("device_forwarder_prepare_dist") {
53     dist_dir = "$root_build_dir/forwarder_dist"
54     binary = "$root_build_dir/device_forwarder"
55     deps = [
56       ":device_forwarder",
57     ]
58   }
61 if (current_toolchain != default_toolchain) {
62   # GYP: //tools/android/forwarder2/forwarder.gyp:host_forwarder
63   executable("host_forwarder") {
64     sources = [
65       "command.cc",
66       "command.h",
67       "common.cc",
68       "common.h",
69       "daemon.cc",
70       "daemon.h",
71       "forwarder.cc",
72       "forwarder.h",
73       "forwarders_manager.cc",
74       "forwarders_manager.h",
75       "host_controller.cc",
76       "host_controller.h",
77       "host_forwarder_main.cc",
78       "pipe_notifier.cc",
79       "pipe_notifier.h",
80       "self_deleter_helper.h",
81       "socket.cc",
82       "socket.h",
83       "util.h",
84     ]
85     deps = [
86       "//base",
87       "//build/config/sanitizers:deps",
88       "//tools/android/common",
89     ]
90   }
92   # GYP: //tools/android/forwarder2/forwarder.gyp:forwarder2
93   copy("host_forwarder_copy") {
94     sources = [
95       "$root_out_dir/host_forwarder",
96     ]
97     outputs = [
98       "$root_build_dir/host_forwarder",
99     ]
100     deps = [
101       ":host_forwarder",
102     ]
103   }