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': 'forwarder2', 9 'type': 'none', 10 'dependencies': [ 11 'device_forwarder', 12 'host_forwarder#host', 13 ], 14 # For the component build, ensure dependent shared libraries are stripped 15 # and put alongside forwarder to simplify pushing to the device. 16 'variables': { 17 'output_dir': '<(PRODUCT_DIR)/forwarder_dist/', 18 'native_binary': '<(PRODUCT_DIR)/device_forwarder', 19 }, 20 'includes': ['../../../build/android/native_app_dependencies.gypi'], 21 }, 22 { 23 'target_name': 'device_forwarder', 24 'type': 'executable', 25 'toolsets': ['target'], 26 'dependencies': [ 27 '../../../base/base.gyp:base', 28 '../common/common.gyp:android_tools_common', 29 ], 30 'include_dirs': [ 31 '../../..', 32 ], 33 'conditions': [ 34 # Warning: A PIE tool cannot run on ICS 4.0.4, so only 35 # build it as position-independent when ASAN 36 # is activated. See b/6587214 for details. 37 [ 'asan==1', { 38 'cflags': [ 39 '-fPIE', 40 ], 41 'ldflags': [ 42 '-pie', 43 ], 44 }], 45 ], 46 'sources': [ 47 'command.cc', 48 'common.cc', 49 'daemon.cc', 50 'device_controller.cc', 51 'device_forwarder_main.cc', 52 'device_listener.cc', 53 'forwarder.cc', 54 'pipe_notifier.cc', 55 'socket.cc', 56 ], 57 }, 58 { 59 'target_name': 'host_forwarder', 60 'type': 'executable', 61 'toolsets': ['host'], 62 'dependencies': [ 63 '../../../base/base.gyp:base', 64 '../../../build/linux/system.gyp:x11', 65 '../common/common.gyp:android_tools_common', 66 ], 67 'include_dirs': [ 68 '../../..', 69 ], 70 'sources': [ 71 'command.cc', 72 'common.cc', 73 'daemon.cc', 74 'forwarder.cc', 75 'host_controller.cc', 76 'host_forwarder_main.cc', 77 'pipe_notifier.cc', 78 'socket.cc', 79 # TODO(pliard): Remove this and x11 dependency above. This is needed 80 # to avoid undefined references at link time. 81 '../../../base/message_loop/message_pump_glib.cc', 82 '../../../base/message_loop/message_pump_gtk.cc', 83 ], 84 }, 85 ], 86 } 87