blob: e60bd8b485527422a084b19e41c53de07bdeb2f2 [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 = [
16 'p10bmc-debug-trigger-kcs1',
17 'p10bmc-debug-trigger-kcs2',
18 'p10bmc-debug-trigger-kcs3',
19 'p10bmc-debug-trigger-kcs4',
20]
21
22foreach rule : udevrules
23 if get_option(rule)
24 src = 'udev/rules.d/' + rule + '.rules'
25 dst = rule + '.rules'
26 rulesdir = udevdir + '/rules.d'
27 configure_file(input: src, output: dst, copy: true, install_dir: rulesdir)
28 endif
29endforeach