Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 1 | |
| 2 | |
| 3 | // Touchpad implementation. |
| 4 | |
Bob Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 5 | package { |
| 6 | // See: http://go/android-license-faq |
| 7 | // A large-scale-change added 'default_applicable_licenses' to import |
| 8 | // all of the 'license_kinds' from "frameworks_native_license" |
| 9 | // to get the below license kinds: |
| 10 | // SPDX-license-identifier-Apache-2.0 |
| 11 | default_applicable_licenses: ["frameworks_native_license"], |
| 12 | } |
| 13 | |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 14 | src = [ |
| 15 | "EvdevInjector.cpp", |
| 16 | "VirtualTouchpadEvdev.cpp", |
| 17 | ] |
| 18 | |
| 19 | shared_libs = [ |
| 20 | "libbase", |
| 21 | "liblog", |
| 22 | "libutils", |
| 23 | ] |
| 24 | |
John Bates | 14bc55a | 2017-05-26 09:00:08 -0700 | [diff] [blame] | 25 | header_libraries = [ |
Orion Hodson | a58ef35 | 2020-04-22 11:10:13 +0100 | [diff] [blame] | 26 | "jni_headers", |
Logan Chien | 3e60b39 | 2018-02-27 16:00:11 +0800 | [diff] [blame] | 27 | "libdvr_headers", |
John Bates | 14bc55a | 2017-05-26 09:00:08 -0700 | [diff] [blame] | 28 | ] |
| 29 | |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 30 | cc_library { |
| 31 | srcs: src, |
| 32 | export_include_dirs: ["include"], |
| 33 | shared_libs: shared_libs, |
John Bates | 14bc55a | 2017-05-26 09:00:08 -0700 | [diff] [blame] | 34 | header_libs: header_libraries, |
Chih-Hung Hsieh | e27d5eb | 2017-10-31 15:39:40 -0700 | [diff] [blame] | 35 | cflags: [ |
| 36 | "-DLOG_TAG=\"VrVirtualTouchpad\"", |
| 37 | "-Wall", |
| 38 | "-Werror", |
| 39 | ], |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 40 | name: "libvirtualtouchpad", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | // Touchpad unit tests. |
| 44 | |
| 45 | test_static_libs = [ |
| 46 | "libcutils", |
| 47 | "libvirtualtouchpad", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 48 | "libbase", |
| 49 | "liblog", |
| 50 | "libutils", |
| 51 | ] |
| 52 | |
| 53 | test_src_files = ["tests/VirtualTouchpad_test.cpp"] |
| 54 | |
| 55 | cc_test { |
| 56 | srcs: test_src_files, |
| 57 | static_libs: test_static_libs, |
John Bates | 14bc55a | 2017-05-26 09:00:08 -0700 | [diff] [blame] | 58 | header_libs: header_libraries, |
Logan Chien | 3e60b39 | 2018-02-27 16:00:11 +0800 | [diff] [blame] | 59 | cflags: [ |
Chih-Hung Hsieh | e27d5eb | 2017-10-31 15:39:40 -0700 | [diff] [blame] | 60 | "-Wall", |
| 61 | "-Werror", |
| 62 | ], |
Logan Chien | 3e60b39 | 2018-02-27 16:00:11 +0800 | [diff] [blame] | 63 | host_ldlibs: [ |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 64 | "-llog", |
| 65 | ], |
| 66 | name: "VirtualTouchpad_test", |
| 67 | stl: "libc++_static", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | // Service. |
| 71 | |
| 72 | service_src = [ |
| 73 | "main.cpp", |
| 74 | "VirtualTouchpadService.cpp", |
Dan Willemsen | 9ba6e65 | 2018-09-14 21:27:01 -0700 | [diff] [blame] | 75 | ":virtualtouchpad_aidl", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 76 | ] |
| 77 | |
| 78 | service_static_libs = [ |
| 79 | "libcutils", |
| 80 | "libvirtualtouchpad", |
| 81 | ] |
| 82 | |
| 83 | service_shared_libs = [ |
| 84 | "libbase", |
| 85 | "libbinder", |
| 86 | "liblog", |
| 87 | "libutils", |
| 88 | ] |
| 89 | |
| 90 | cc_binary { |
| 91 | srcs: service_src, |
| 92 | static_libs: service_static_libs, |
| 93 | shared_libs: service_shared_libs, |
John Bates | 14bc55a | 2017-05-26 09:00:08 -0700 | [diff] [blame] | 94 | header_libs: header_libraries, |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 95 | cflags: [ |
| 96 | "-DLOG_TAG=\"VrVirtualTouchpad\"", |
Chih-Hung Hsieh | e27d5eb | 2017-10-31 15:39:40 -0700 | [diff] [blame] | 97 | "-Wall", |
| 98 | "-Werror", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 99 | ], |
| 100 | host_ldlibs: ["-llog"], |
| 101 | name: "virtual_touchpad", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 102 | init_rc: ["virtual_touchpad.rc"], |
| 103 | compile_multilib: "64", |
| 104 | stl: "libc++_static", |
| 105 | } |
| 106 | |
| 107 | // Touchpad client library. |
| 108 | |
| 109 | client_src = [ |
| 110 | "VirtualTouchpadClient.cpp", |
Kevin Schoedel | de1cdae | 2017-03-17 11:07:06 -0400 | [diff] [blame] | 111 | "DvrVirtualTouchpadClient.cpp", |
Dan Willemsen | 9ba6e65 | 2018-09-14 21:27:01 -0700 | [diff] [blame] | 112 | ":virtualtouchpad_aidl", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 113 | ] |
| 114 | |
| 115 | client_shared_libs = [ |
| 116 | "libbase", |
| 117 | "libbinder", |
| 118 | "liblog", |
| 119 | "libutils", |
| 120 | ] |
| 121 | |
| 122 | cc_library { |
| 123 | srcs: client_src, |
| 124 | shared_libs: client_shared_libs, |
John Bates | 14bc55a | 2017-05-26 09:00:08 -0700 | [diff] [blame] | 125 | header_libs: header_libraries, |
Chih-Hung Hsieh | e27d5eb | 2017-10-31 15:39:40 -0700 | [diff] [blame] | 126 | cflags: [ |
| 127 | "-DLOG_TAG=\"VirtualTouchpadClient\"", |
| 128 | "-Wall", |
| 129 | "-Werror", |
| 130 | ], |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 131 | host_ldlibs: ["-llog"], |
| 132 | name: "libvirtualtouchpadclient", |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 133 | export_include_dirs: ["include"], |
| 134 | } |
Dan Willemsen | 9ba6e65 | 2018-09-14 21:27:01 -0700 | [diff] [blame] | 135 | |
| 136 | filegroup { |
| 137 | name: "virtualtouchpad_aidl", |
| 138 | srcs: ["aidl/android/dvr/IVirtualTouchpadService.aidl"], |
| 139 | path: "aidl", |
| 140 | } |