2021-09-23 14:42:48 +02:00
|
|
|
# Copyright 2021 Johannes Marbach
|
2024-01-12 09:51:43 +01:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2021-09-23 14:42:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
buffyboard_sources = [
|
2021-11-23 20:04:23 +01:00
|
|
|
'command_line.c',
|
2024-03-30 08:06:29 +01:00
|
|
|
'config.c',
|
2021-09-23 14:42:48 +02:00
|
|
|
'main.c',
|
|
|
|
|
'sq2lv_layouts.c',
|
|
|
|
|
'terminal.c',
|
|
|
|
|
'uinput_device.c',
|
|
|
|
|
]
|
|
|
|
|
|
2024-03-28 13:27:01 +01:00
|
|
|
shared_sources = [
|
2024-03-28 14:31:27 +01:00
|
|
|
'../shared/cursor/cursor.c',
|
2024-03-30 19:35:29 +00:00
|
|
|
'../shared/fonts/font_32.c',
|
2024-03-30 21:12:37 +01:00
|
|
|
'../shared/config.c',
|
2024-03-28 14:31:27 +01:00
|
|
|
'../shared/indev.c',
|
|
|
|
|
'../shared/log.c',
|
2024-03-30 08:06:29 +01:00
|
|
|
'../shared/theme.c',
|
|
|
|
|
'../shared/themes.c',
|
2024-03-28 13:27:01 +01:00
|
|
|
]
|
|
|
|
|
|
2021-09-23 14:42:48 +02:00
|
|
|
squeek2lvgl_sources = [
|
2023-11-20 21:03:32 +01:00
|
|
|
'../squeek2lvgl/sq2lv.c',
|
2021-09-23 14:42:48 +02:00
|
|
|
]
|
|
|
|
|
|
2024-07-26 16:40:49 +00:00
|
|
|
man_files = [
|
|
|
|
|
'doc/buffyboard.1',
|
|
|
|
|
'doc/buffyboard.conf.5',
|
|
|
|
|
]
|
|
|
|
|
|
2024-02-22 12:14:28 +00:00
|
|
|
lvgl_sources = run_command('../find-lvgl-sources.sh', '../lvgl', check: true).stdout().strip().split('\n')
|
2021-09-23 14:42:48 +02:00
|
|
|
|
2024-08-24 06:17:03 +00:00
|
|
|
install_data(sources: 'buffyboard.conf', install_dir : get_option('sysconfdir'))
|
|
|
|
|
|
2021-09-23 14:42:48 +02:00
|
|
|
executable(
|
|
|
|
|
'buffyboard',
|
2024-03-28 13:27:01 +01:00
|
|
|
sources: buffyboard_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
2024-02-22 12:14:28 +00:00
|
|
|
include_directories: ['..'],
|
2021-09-23 14:42:48 +02:00
|
|
|
dependencies: [
|
2024-03-30 08:06:29 +01:00
|
|
|
dependency('inih'),
|
2021-09-23 14:42:48 +02:00
|
|
|
dependency('libinput'),
|
2024-03-28 14:31:27 +01:00
|
|
|
dependency('libudev'),
|
2021-09-23 14:42:48 +02:00
|
|
|
meson.get_compiler('c').find_library('m', required: false),
|
2021-11-18 21:15:26 +01:00
|
|
|
],
|
|
|
|
|
install: true
|
2021-09-23 14:42:48 +02:00
|
|
|
)
|
2024-07-26 16:40:49 +00:00
|
|
|
|
|
|
|
|
scdoc = dependency('scdoc')
|
|
|
|
|
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native : true)
|
|
|
|
|
sh = find_program('sh', native : true)
|
|
|
|
|
foreach file : man_files
|
|
|
|
|
filename = file + '.scd'
|
|
|
|
|
section = file.split('.')[-1]
|
|
|
|
|
topic = file.split('.' + section)[-2].split('/')[-1]
|
|
|
|
|
output = '@0@.@1@'.format(topic, section)
|
|
|
|
|
|
|
|
|
|
custom_target(
|
|
|
|
|
output,
|
|
|
|
|
input : filename,
|
|
|
|
|
output : output,
|
|
|
|
|
capture : true,
|
|
|
|
|
command : [sh, '-c', scdoc_prog.path() + ' < @INPUT@'],
|
|
|
|
|
install : true,
|
|
|
|
|
install_dir : get_option('mandir') / 'man' + section
|
|
|
|
|
)
|
|
|
|
|
endforeach
|