blob: 96f437ed545ad2e567084ff9d7f5e63320188da6 [file] [log] [blame]
Andrew Jeffery1d72cfa2022-01-20 07:53:37 +10301project('debug-trigger', 'c',
2 license: 'Apache-2.0',
3 version: '0.1',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
7 'c_std=gnu18',
8 ])
Andrew Jeffery11cd2542021-05-03 11:03:30 +09309executable('debug-trigger', 'main.c', install: true)
10
11if get_option('systemd')
12 systemd = dependency('systemd')
13 unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
14 configure_file(input: 'systemd/system/debug-trigger@.service',
15 output: 'debug-trigger@.service',
16 copy: true,
17 install_dir: unitdir)
18endif
19
20udev = dependency('udev')
21udevdir = udev.get_pkgconfig_variable('udevdir')
Andrew Jeffery11cd2542021-05-03 11:03:30 +093022
Andrew Jeffery20017152021-06-10 11:16:58 +093023triggers = get_option('triggers')
24foreach trigger : triggers
25 src = 'udev/rules.d/debug-trigger-' + trigger + '.rules'
26 dst = 'debug-trigger-' + trigger + '.rules'
27 rulesdir = udevdir + '/rules.d'
28 configure_file(input: src, output: dst, copy: true, install_dir: rulesdir)
Andrew Jeffery11cd2542021-05-03 11:03:30 +093029endforeach