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