unify build systems of buffyboard and unl0kr
This commit is contained in:
parent
20b084c0b4
commit
ec21e5ead9
14 changed files with 120 additions and 147 deletions
|
|
@ -1,68 +1,26 @@
|
|||
# Copyright 2021 Johannes Marbach
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
||||
buffyboard_sources = [
|
||||
'command_line.c',
|
||||
'config.c',
|
||||
'main.c',
|
||||
'sq2lv_layouts.c',
|
||||
'terminal.c',
|
||||
'uinput_device.c',
|
||||
]
|
||||
|
||||
shared_sources = [
|
||||
'../shared/cursor/cursor.c',
|
||||
'../shared/fonts/font_32.c',
|
||||
'../shared/config.c',
|
||||
'../shared/indev.c',
|
||||
'../shared/log.c',
|
||||
'../shared/theme.c',
|
||||
'../shared/themes.c',
|
||||
]
|
||||
|
||||
squeek2lvgl_sources = [
|
||||
'../squeek2lvgl/sq2lv.c',
|
||||
]
|
||||
|
||||
man_files = [
|
||||
'doc/buffyboard.1',
|
||||
'doc/buffyboard.conf.5',
|
||||
]
|
||||
|
||||
lvgl_sources = run_command('../find-lvgl-sources.sh', '../lvgl', check: true).stdout().strip().split('\n')
|
||||
|
||||
install_data(sources: 'buffyboard.conf', install_dir : get_option('sysconfdir'))
|
||||
|
||||
executable(
|
||||
'buffyboard',
|
||||
sources: buffyboard_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
||||
include_directories: ['..'],
|
||||
dependencies: [
|
||||
dependency('inih'),
|
||||
dependency('libinput'),
|
||||
dependency('libudev'),
|
||||
meson.get_compiler('c').find_library('m', required: false),
|
||||
],
|
||||
install: true
|
||||
buffyboard_sources = files(
|
||||
'command_line.c',
|
||||
'config.c',
|
||||
'main.c',
|
||||
'sq2lv_layouts.c',
|
||||
'terminal.c',
|
||||
'uinput_device.c'
|
||||
)
|
||||
|
||||
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)
|
||||
buffyboard_dependencies = [
|
||||
common_dependencies,
|
||||
meson.get_compiler('c').find_library('m', required: false)
|
||||
]
|
||||
|
||||
executable('buffyboard',
|
||||
include_directories: common_include_dirs,
|
||||
sources: buffyboard_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
||||
dependencies: buffyboard_dependencies,
|
||||
install: true
|
||||
)
|
||||
|
||||
install_data('buffyboard.conf', install_dir: get_option('sysconfdir'))
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue