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