• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15
16gen_dst_dir = root_out_dir + "/diff_libinput_mmi"
17
18config("libinput-third_config") {
19  visibility = [ ":*" ]
20
21  include_dirs = [
22    "$gen_dst_dir/src",
23    "$gen_dst_dir/include",
24    "$gen_dst_dir/hm_src",
25  ]
26
27  cflags = [
28    "-Wno-unused-parameter",
29    "-Wno-implicit-int",
30    "-Wno-return-type",
31    "-Wno-unused-function",
32    "-Wno-string-conversion",
33    "-DHAVE_LIBINPUT_LOG_CONSOLE_ENABLE",
34    "-DHAVE_LIBINPUT_LOG_ENABLE",
35  ]
36}
37
38config("libinput-third_public_config") {
39  include_dirs = [
40    "$gen_dst_dir/export_include",
41    "$gen_dst_dir/include",
42    "$gen_dst_dir/src",
43  ]
44
45  cflags = []
46}
47
48ohos_source_set("patch_gen_libinput-third-mmi") {
49  part_name = "input"
50  subsystem_name = "multimodalinput"
51  sources = [
52    root_out_dir + "/diff_libinput_mmi/src/evdev-debounce.c",
53    root_out_dir + "/diff_libinput_mmi/src/evdev-fallback.c",
54    root_out_dir + "/diff_libinput_mmi/src/evdev-joystick.c",
55    root_out_dir + "/diff_libinput_mmi/src/evdev-privacy-switch.c",
56    root_out_dir + "/diff_libinput_mmi/src/evdev-middle-button.c",
57    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-buttons.c",
58    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-edge-scroll.c",
59    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-gestures.c",
60    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-tap.c",
61    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-thumb.c",
62    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad.c",
63    root_out_dir + "/diff_libinput_mmi/src/evdev-tablet-pad-leds.c",
64    root_out_dir + "/diff_libinput_mmi/src/evdev-tablet-pad.c",
65    root_out_dir + "/diff_libinput_mmi/src/evdev-tablet.c",
66    root_out_dir + "/diff_libinput_mmi/src/evdev-totem.c",
67    root_out_dir + "/diff_libinput_mmi/src/evdev-wheel.c",
68    root_out_dir + "/diff_libinput_mmi/src/evdev.c",
69    root_out_dir + "/diff_libinput_mmi/src/filter-custom.c",
70    root_out_dir + "/diff_libinput_mmi/src/filter-flat.c",
71    root_out_dir + "/diff_libinput_mmi/src/filter-low-dpi.c",
72    root_out_dir + "/diff_libinput_mmi/src/filter-mouse.c",
73    root_out_dir + "/diff_libinput_mmi/src/filter-tablet.c",
74    root_out_dir + "/diff_libinput_mmi/src/filter-touchpad-flat.c",
75    root_out_dir + "/diff_libinput_mmi/src/filter-touchpad-x230.c",
76    root_out_dir + "/diff_libinput_mmi/src/filter-touchpad.c",
77    root_out_dir + "/diff_libinput_mmi/src/filter-trackpoint-flat.c",
78    root_out_dir + "/diff_libinput_mmi/src/filter-trackpoint.c",
79    root_out_dir + "/diff_libinput_mmi/src/filter.c",
80    root_out_dir + "/diff_libinput_mmi/src/libinput-util.c",
81    root_out_dir + "/diff_libinput_mmi/src/libinput.c",
82    root_out_dir + "/diff_libinput_mmi/src/path-seat.c",
83    root_out_dir + "/diff_libinput_mmi/src/quirks.c",
84    root_out_dir + "/diff_libinput_mmi/src/timer.c",
85    root_out_dir + "/diff_libinput_mmi/src/util-list.c",
86    root_out_dir + "/diff_libinput_mmi/src/util-prop-parsers.c",
87    root_out_dir + "/diff_libinput_mmi/src/util-ratelimit.c",
88    root_out_dir + "/diff_libinput_mmi/src/util-strings.c",
89  ]
90  branch_protector_ret = "pac_ret"
91  sanitize = {
92    cfi = true
93    cfi_cross_dso = true
94    debug = false
95  }
96  configs = [ ":libinput-third_config" ]
97
98  public_configs = [ ":libinput-third_public_config" ]
99
100  deps = [ "//third_party/libinput/patch:apply_patch" ]
101
102  public_external_deps = [
103    "input:mmi_libudev",
104    "libevdev:libevdev",
105    "mtdev:libmtdev-third-mmi",
106  ]
107}
108
109ohos_shared_library("libinput-third-mmi") {
110  sources = []
111  branch_protector_ret = "pac_ret"
112  sanitize = {
113    cfi = true
114    cfi_cross_dso = true
115    debug = false
116  }
117
118  configs = [ ":libinput-third_config" ]
119
120  public_configs = [ ":libinput-third_public_config" ]
121
122  deps = [ ":patch_gen_libinput-third-mmi" ]
123
124  public_external_deps = [
125    "input:mmi_libudev",
126    "libevdev:libevdev",
127    "mtdev:libmtdev-third-mmi",
128  ]
129
130  external_deps = [ "hilog:libhilog" ]
131  license_file = "//third_party/libinput/COPYING"
132  part_name = "input"
133  subsystem_name = "multimodalinput"
134}
135
136ohos_source_set("patch_gen_libinput-debug") {
137  part_name = "input"
138  subsystem_name = "multimodalinput"
139  sources = [
140    "$gen_dst_dir/tools/libinput-debug-events.c",
141    "$gen_dst_dir/tools/shared.c",
142    "$gen_dst_dir/tools/shared.h",
143  ]
144  branch_protector_ret = "pac_ret"
145  sanitize = {
146    cfi = true
147    cfi_cross_dso = true
148    debug = false
149  }
150  configs = [ ":libinput-third_config" ]
151
152  public_configs = [ ":libinput-third_public_config" ]
153
154  deps = [ "//third_party/libinput/patch:apply_patch" ]
155
156  public_external_deps = [
157    "input:mmi_libudev",
158    "libevdev:libevdev",
159    "mtdev:libmtdev-third-mmi",
160  ]
161}
162
163ohos_executable("libinput-debug-mmi") {
164  install_enable = true
165
166  sources = []
167  branch_protector_ret = "pac_ret"
168  sanitize = {
169    cfi = true
170    cfi_cross_dso = true
171    debug = false
172  }
173  configs = [ ":libinput-third_config" ]
174
175  public_configs = [ ":libinput-third_public_config" ]
176
177  deps = [
178    ":libinput-third-mmi",
179    ":patch_gen_libinput-debug",
180  ]
181
182  public_external_deps = [
183    "input:mmi_libudev",
184    "libevdev:libevdev",
185    "mtdev:libmtdev-third-mmi",
186  ]
187
188  part_name = "input"
189  subsystem_name = "multimodalinput"
190}
191
192ohos_source_set("patch_gen_libinput-list") {
193  part_name = "input"
194  subsystem_name = "multimodalinput"
195  sources = [
196    "$gen_dst_dir/tools/libinput-list-devices.c",
197    "$gen_dst_dir/tools/shared.c",
198    "$gen_dst_dir/tools/shared.h",
199  ]
200  branch_protector_ret = "pac_ret"
201  sanitize = {
202    cfi = true
203    cfi_cross_dso = true
204    debug = false
205  }
206  configs = [ ":libinput-third_config" ]
207
208  public_configs = [ ":libinput-third_public_config" ]
209
210  deps = [ "//third_party/libinput/patch:apply_patch" ]
211
212  public_external_deps = [
213    "input:mmi_libudev",
214    "libevdev:libevdev",
215    "mtdev:libmtdev-third-mmi",
216  ]
217}
218
219ohos_executable("libinput-list-mmi") {
220  install_enable = true
221
222  sources = []
223  branch_protector_ret = "pac_ret"
224  sanitize = {
225    cfi = true
226    cfi_cross_dso = true
227    debug = false
228  }
229  configs = [ ":libinput-third_config" ]
230
231  public_configs = [ ":libinput-third_public_config" ]
232
233  deps = [
234    ":libinput-third-mmi",
235    ":patch_gen_libinput-list",
236  ]
237
238  public_external_deps = [
239    "input:mmi_libudev",
240    "libevdev:libevdev",
241    "mtdev:libmtdev-third-mmi",
242  ]
243
244  part_name = "input"
245  subsystem_name = "multimodalinput"
246}
247
248ohos_source_set("patch_gen_libinput-tablet") {
249  part_name = "input"
250  subsystem_name = "multimodalinput"
251  sources = [
252    "$gen_dst_dir/tools/libinput-debug-tablet.c",
253    "$gen_dst_dir/tools/shared.c",
254    "$gen_dst_dir/tools/shared.h",
255  ]
256  branch_protector_ret = "pac_ret"
257  sanitize = {
258    cfi = true
259    cfi_cross_dso = true
260    debug = false
261  }
262  configs = [ ":libinput-third_config" ]
263
264  public_configs = [ ":libinput-third_public_config" ]
265
266  deps = [ "//third_party/libinput/patch:apply_patch" ]
267
268  public_external_deps = [
269    "input:mmi_libudev",
270    "libevdev:libevdev",
271    "mtdev:libmtdev-third-mmi",
272  ]
273}
274
275ohos_executable("libinput-tablet-mmi") {
276  install_enable = true
277
278  sources = []
279  branch_protector_ret = "pac_ret"
280  sanitize = {
281    cfi = true
282    cfi_cross_dso = true
283    debug = false
284  }
285  configs = [ ":libinput-third_config" ]
286
287  public_configs = [ ":libinput-third_public_config" ]
288
289  deps = [
290    ":libinput-third-mmi",
291    ":patch_gen_libinput-tablet",
292  ]
293
294  public_external_deps = [
295    "input:mmi_libudev",
296    "libevdev:libevdev",
297    "mtdev:libmtdev-third-mmi",
298  ]
299
300  part_name = "input"
301  subsystem_name = "multimodalinput"
302}
303
304ohos_source_set("patch_gen_libinput-record") {
305  part_name = "input"
306  subsystem_name = "multimodalinput"
307  sources = [
308    "$gen_dst_dir/hm_src/hm_missing.c",
309    "$gen_dst_dir/tools/libinput-record.c",
310    "$gen_dst_dir/tools/shared.c",
311    "$gen_dst_dir/tools/shared.h",
312  ]
313  branch_protector_ret = "pac_ret"
314  sanitize = {
315    cfi = true
316    cfi_cross_dso = true
317    debug = false
318  }
319  configs = [ ":libinput-third_config" ]
320
321  public_configs = [ ":libinput-third_public_config" ]
322
323  deps = [ "//third_party/libinput/patch:apply_patch" ]
324
325  public_external_deps = [
326    "input:mmi_libudev",
327    "libevdev:libevdev",
328    "mtdev:libmtdev-third-mmi",
329  ]
330}
331
332ohos_executable("libinput-record-mmi") {
333  install_enable = true
334
335  sources = []
336  branch_protector_ret = "pac_ret"
337  sanitize = {
338    cfi = true
339    cfi_cross_dso = true
340    debug = false
341  }
342  configs = [ ":libinput-third_config" ]
343
344  public_configs = [ ":libinput-third_public_config" ]
345
346  deps = [
347    ":libinput-third-mmi",
348    ":patch_gen_libinput-record",
349  ]
350
351  public_external_deps = [
352    "input:mmi_libudev",
353    "libevdev:libevdev",
354    "mtdev:libmtdev-third-mmi",
355  ]
356
357  part_name = "input"
358  subsystem_name = "multimodalinput"
359}
360
361ohos_source_set("patch_gen_libinput-analyze") {
362  part_name = "input"
363  subsystem_name = "multimodalinput"
364  sources = [
365    "$gen_dst_dir/tools/libinput-analyze.c",
366    "$gen_dst_dir/tools/shared.c",
367    "$gen_dst_dir/tools/shared.h",
368  ]
369  branch_protector_ret = "pac_ret"
370  sanitize = {
371    cfi = true
372    cfi_cross_dso = true
373    debug = false
374  }
375  configs = [ ":libinput-third_config" ]
376
377  public_configs = [ ":libinput-third_public_config" ]
378
379  deps = [ "//third_party/libinput/patch:apply_patch" ]
380
381  public_external_deps = [
382    "input:mmi_libudev",
383    "libevdev:libevdev",
384    "mtdev:libmtdev-third-mmi",
385  ]
386}
387
388ohos_executable("libinput-analyze-mmi") {
389  install_enable = true
390
391  sources = []
392  branch_protector_ret = "pac_ret"
393  sanitize = {
394    cfi = true
395    cfi_cross_dso = true
396    debug = false
397  }
398  configs = [ ":libinput-third_config" ]
399
400  public_configs = [ ":libinput-third_public_config" ]
401
402  deps = [
403    ":libinput-third-mmi",
404    ":patch_gen_libinput-analyze",
405  ]
406
407  public_external_deps = [
408    "input:mmi_libudev",
409    "libevdev:libevdev",
410    "mtdev:libmtdev-third-mmi",
411  ]
412
413  part_name = "input"
414  subsystem_name = "multimodalinput"
415}
416
417ohos_source_set("patch_gen_libinput-measure") {
418  part_name = "input"
419  subsystem_name = "multimodalinput"
420  sources = [
421    "$gen_dst_dir/tools/libinput-measure.c",
422    "$gen_dst_dir/tools/shared.c",
423    "$gen_dst_dir/tools/shared.h",
424  ]
425  branch_protector_ret = "pac_ret"
426  sanitize = {
427    cfi = true
428    cfi_cross_dso = true
429    debug = false
430  }
431  configs = [ ":libinput-third_config" ]
432
433  public_configs = [ ":libinput-third_public_config" ]
434
435  deps = [ "//third_party/libinput/patch:apply_patch" ]
436
437  public_external_deps = [
438    "input:mmi_libudev",
439    "libevdev:libevdev",
440    "mtdev:libmtdev-third-mmi",
441  ]
442}
443
444ohos_executable("libinput-measure-mmi") {
445  install_enable = true
446
447  sources = []
448  branch_protector_ret = "pac_ret"
449  sanitize = {
450    cfi = true
451    cfi_cross_dso = true
452    debug = false
453  }
454  configs = [ ":libinput-third_config" ]
455
456  public_configs = [ ":libinput-third_public_config" ]
457
458  deps = [
459    ":libinput-third-mmi",
460    ":patch_gen_libinput-measure",
461  ]
462
463  public_external_deps = [
464    "input:mmi_libudev",
465    "libevdev:libevdev",
466    "mtdev:libmtdev-third-mmi",
467  ]
468
469  part_name = "input"
470  subsystem_name = "multimodalinput"
471}
472
473ohos_source_set("patch_gen_libinput-quirks") {
474  part_name = "input"
475  subsystem_name = "multimodalinput"
476  sources = [
477    "$gen_dst_dir/tools/libinput-quirks.c",
478    "$gen_dst_dir/tools/shared.c",
479    "$gen_dst_dir/tools/shared.h",
480  ]
481  branch_protector_ret = "pac_ret"
482  sanitize = {
483    cfi = true
484    cfi_cross_dso = true
485    debug = false
486  }
487  configs = [ ":libinput-third_config" ]
488
489  public_configs = [ ":libinput-third_public_config" ]
490
491  deps = [ "//third_party/libinput/patch:apply_patch" ]
492
493  public_external_deps = [
494    "input:mmi_libudev",
495    "libevdev:libevdev",
496    "mtdev:libmtdev-third-mmi",
497  ]
498}
499
500ohos_executable("libinput-quirks-mmi") {
501  install_enable = true
502
503  sources = []
504  branch_protector_ret = "pac_ret"
505  sanitize = {
506    cfi = true
507    cfi_cross_dso = true
508    debug = false
509  }
510  configs = [ ":libinput-third_config" ]
511
512  public_configs = [ ":libinput-third_public_config" ]
513
514  deps = [
515    ":libinput-third-mmi",
516    ":patch_gen_libinput-quirks",
517  ]
518
519  public_external_deps = [
520    "input:mmi_libudev",
521    "libevdev:libevdev",
522    "mtdev:libmtdev-third-mmi",
523  ]
524
525  part_name = "input"
526  subsystem_name = "multimodalinput"
527}
528