1
2
3// Touchpad implementation.
4
5package {
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
14src = [
15    "EvdevInjector.cpp",
16    "VirtualTouchpadEvdev.cpp",
17]
18
19shared_libs = [
20    "libbase",
21    "liblog",
22    "libutils",
23]
24
25header_libraries = [
26    "jni_headers",
27    "libdvr_headers",
28]
29
30cc_library {
31    srcs: src,
32    export_include_dirs: ["include"],
33    shared_libs: shared_libs,
34    header_libs: header_libraries,
35    cflags: [
36        "-DLOG_TAG=\"VrVirtualTouchpad\"",
37        "-Wall",
38        "-Werror",
39    ],
40    name: "libvirtualtouchpad",
41}
42
43// Touchpad unit tests.
44
45test_static_libs = [
46    "libcutils",
47    "libvirtualtouchpad",
48    "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,
58    header_libs: header_libraries,
59    cflags: [
60        "-Wall",
61        "-Werror",
62    ],
63    host_ldlibs: [
64        "-llog",
65    ],
66    name: "VirtualTouchpad_test",
67    stl: "libc++_static",
68}
69
70// Service.
71
72service_src = [
73    "main.cpp",
74    "VirtualTouchpadService.cpp",
75    ":virtualtouchpad_aidl",
76]
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,
94    header_libs: header_libraries,
95    cflags: [
96        "-DLOG_TAG=\"VrVirtualTouchpad\"",
97        "-Wall",
98        "-Werror",
99    ],
100    host_ldlibs: ["-llog"],
101    name: "virtual_touchpad",
102    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",
111    "DvrVirtualTouchpadClient.cpp",
112    ":virtualtouchpad_aidl",
113]
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,
125    header_libs: header_libraries,
126    cflags: [
127        "-DLOG_TAG=\"VirtualTouchpadClient\"",
128        "-Wall",
129        "-Werror",
130    ],
131    host_ldlibs: ["-llog"],
132    name: "libvirtualtouchpadclient",
133    export_include_dirs: ["include"],
134}
135
136filegroup {
137    name: "virtualtouchpad_aidl",
138    srcs: ["aidl/android/dvr/IVirtualTouchpadService.aidl"],
139    path: "aidl",
140}
141