1
2phosphor_fan_presence_include_directories = include_directories(
3    '.',
4    '..'
5)
6
7sources=[
8    'anyof.cpp',
9    'error_reporter.cpp',
10    'fallback.cpp',
11    'fan.cpp',
12    'get_power_state.cpp',
13    'gpio.cpp',
14    'json_parser.cpp',
15    'logging.cpp',
16    'psensor.cpp',
17    'tach.cpp',
18    'tach_detect.cpp'
19]
20
21deps=[
22    libevdev_dep,
23    phosphor_dbus_interfaces_dep,
24    phosphor_logging_dep,
25    sdbusplus_dep,
26    sdeventplus_dep
27]
28
29# Only needed for YAML config
30if get_option('json-config').disabled()
31    generated_hpp_dep = custom_target(
32        'generated.hpp',
33        input: files(
34            './pfpgen.py',
35            conf.get_unquoted('PRESENCE_YAML_FILE')
36        ),
37        command: [
38            python_prog, '@INPUT0@',
39            'generate-cpp',
40            '-i', '@INPUT1@'
41        ],
42        capture: true,
43        output: 'generated.hpp'
44    )
45
46    sources += generated_hpp_dep
47endif
48
49phosphor_fan_presence = executable(
50    'phosphor-fan-presence-tach',
51    sources,
52    dependencies : deps,
53    implicit_include_directories: false,
54    include_directories: phosphor_fan_presence_include_directories,
55    install: true
56)
57
58