blob: b6b8708cdc6ae67274cb6595a28e4e5f748994a8 [file] [log] [blame]
Andrew Jeffery11cd2542021-05-03 11:03:30 +09301project('debug-trigger', 'c', license: 'Apache-2.0', version: '0.1')
2executable('debug-trigger', 'main.c', install: true)
3
4if get_option('systemd')
5 systemd = dependency('systemd')
6 unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
7 configure_file(input: 'systemd/system/debug-trigger@.service',
8 output: 'debug-trigger@.service',
9 copy: true,
10 install_dir: unitdir)
11endif
12
13udev = dependency('udev')
14udevdir = udev.get_pkgconfig_variable('udevdir')
15udevrules = [
Andrew Jeffery20017152021-06-10 11:16:58 +093016 'debug-trigger-kcs1',
17 'debug-trigger-kcs2',
18 'debug-trigger-kcs3',
19 'debug-trigger-kcs4',
Andrew Jeffery11cd2542021-05-03 11:03:30 +093020]
21
Andrew Jeffery20017152021-06-10 11:16:58 +093022triggers = get_option('triggers')
23foreach trigger : triggers
24 src = 'udev/rules.d/debug-trigger-' + trigger + '.rules'
25 dst = 'debug-trigger-' + trigger + '.rules'
26 rulesdir = udevdir + '/rules.d'
27 configure_file(input: src, output: dst, copy: true, install_dir: rulesdir)
Andrew Jeffery11cd2542021-05-03 11:03:30 +093028endforeach