blob: f2ec5a42b1f6eab862e18f827fa1d6fb2dc47dda [file] [log] [blame]
Stephen Kiazyke77dce22017-03-14 15:38:12 -07001
2
3// Touchpad implementation.
4
Bob Badour3c538232021-02-12 21:26:48 -08005package {
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 Kiazyke77dce22017-03-14 15:38:12 -070014src = [
15 "EvdevInjector.cpp",
16 "VirtualTouchpadEvdev.cpp",
17]
18
19shared_libs = [
20 "libbase",
21 "liblog",
22 "libutils",
23]
24
John Bates14bc55a2017-05-26 09:00:08 -070025header_libraries = [
Orion Hodsona58ef352020-04-22 11:10:13 +010026 "jni_headers",
Logan Chien3e60b392018-02-27 16:00:11 +080027 "libdvr_headers",
John Bates14bc55a2017-05-26 09:00:08 -070028]
29
Stephen Kiazyke77dce22017-03-14 15:38:12 -070030cc_library {
31 srcs: src,
32 export_include_dirs: ["include"],
33 shared_libs: shared_libs,
John Bates14bc55a2017-05-26 09:00:08 -070034 header_libs: header_libraries,
Chih-Hung Hsiehe27d5eb2017-10-31 15:39:40 -070035 cflags: [
36 "-DLOG_TAG=\"VrVirtualTouchpad\"",
37 "-Wall",
38 "-Werror",
39 ],
Stephen Kiazyke77dce22017-03-14 15:38:12 -070040 name: "libvirtualtouchpad",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070041}
42
43// Touchpad unit tests.
44
45test_static_libs = [
46 "libcutils",
47 "libvirtualtouchpad",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070048 "libbase",
49 "liblog",
50 "libutils",
51]
52
53test_src_files = ["tests/VirtualTouchpad_test.cpp"]
54
55cc_test {
56 srcs: test_src_files,
57 static_libs: test_static_libs,
John Bates14bc55a2017-05-26 09:00:08 -070058 header_libs: header_libraries,
Logan Chien3e60b392018-02-27 16:00:11 +080059 cflags: [
Chih-Hung Hsiehe27d5eb2017-10-31 15:39:40 -070060 "-Wall",
61 "-Werror",
62 ],
Logan Chien3e60b392018-02-27 16:00:11 +080063 host_ldlibs: [
Stephen Kiazyke77dce22017-03-14 15:38:12 -070064 "-llog",
65 ],
66 name: "VirtualTouchpad_test",
67 stl: "libc++_static",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070068}
69
70// Service.
71
72service_src = [
73 "main.cpp",
74 "VirtualTouchpadService.cpp",
Dan Willemsen9ba6e652018-09-14 21:27:01 -070075 ":virtualtouchpad_aidl",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070076]
77
78service_static_libs = [
79 "libcutils",
80 "libvirtualtouchpad",
81]
82
83service_shared_libs = [
84 "libbase",
85 "libbinder",
86 "liblog",
87 "libutils",
88]
89
90cc_binary {
91 srcs: service_src,
92 static_libs: service_static_libs,
93 shared_libs: service_shared_libs,
John Bates14bc55a2017-05-26 09:00:08 -070094 header_libs: header_libraries,
Stephen Kiazyke77dce22017-03-14 15:38:12 -070095 cflags: [
96 "-DLOG_TAG=\"VrVirtualTouchpad\"",
Chih-Hung Hsiehe27d5eb2017-10-31 15:39:40 -070097 "-Wall",
98 "-Werror",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070099 ],
100 host_ldlibs: ["-llog"],
101 name: "virtual_touchpad",
Stephen Kiazyke77dce22017-03-14 15:38:12 -0700102 init_rc: ["virtual_touchpad.rc"],
103 compile_multilib: "64",
104 stl: "libc++_static",
105}
106
107// Touchpad client library.
108
109client_src = [
110 "VirtualTouchpadClient.cpp",
Kevin Schoedelde1cdae2017-03-17 11:07:06 -0400111 "DvrVirtualTouchpadClient.cpp",
Dan Willemsen9ba6e652018-09-14 21:27:01 -0700112 ":virtualtouchpad_aidl",
Stephen Kiazyke77dce22017-03-14 15:38:12 -0700113]
114
115client_shared_libs = [
116 "libbase",
117 "libbinder",
118 "liblog",
119 "libutils",
120]
121
122cc_library {
123 srcs: client_src,
124 shared_libs: client_shared_libs,
John Bates14bc55a2017-05-26 09:00:08 -0700125 header_libs: header_libraries,
Chih-Hung Hsiehe27d5eb2017-10-31 15:39:40 -0700126 cflags: [
127 "-DLOG_TAG=\"VirtualTouchpadClient\"",
128 "-Wall",
129 "-Werror",
130 ],
Stephen Kiazyke77dce22017-03-14 15:38:12 -0700131 host_ldlibs: ["-llog"],
132 name: "libvirtualtouchpadclient",
Stephen Kiazyke77dce22017-03-14 15:38:12 -0700133 export_include_dirs: ["include"],
134}
Dan Willemsen9ba6e652018-09-14 21:27:01 -0700135
136filegroup {
137 name: "virtualtouchpad_aidl",
138 srcs: ["aidl/android/dvr/IVirtualTouchpadService.aidl"],
139 path: "aidl",
140}