blob: ca995e5e84ab6cddb5ca1180cba0b7111274bcb6 [file] [log] [blame]
Andrew Jefferye73bd0a2023-01-25 10:39:57 +10301conf_data = configuration_data()
Andrew Jefferyab8b0452024-01-11 09:55:51 +10302conf_data.set10(
3 'VALIDATION_UNSECURE_FEATURE',
4 get_option('validate-unsecure-feature').allowed(),
5)
6conf_data.set10(
7 'INSECURE_UNRESTRICTED_SENSOR_OVERRIDE',
8 get_option('insecure-sensor-override').allowed(),
9)
10configure_file(
11 input: 'dbus-sensor_config.h.in',
12 output: 'dbus-sensor_config.h',
13 configuration: conf_data,
14)
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103015
16thresholds_a = static_library(
17 'thresholds_a',
18 'Thresholds.cpp',
19 dependencies: default_deps,
20)
21
22thresholds_dep = declare_dependency(
Andrew Jeffery9ce5fe42024-12-04 10:59:33 +103023 include_directories: ['.'],
Andrew Jefferyab8b0452024-01-11 09:55:51 +103024 link_with: [thresholds_a],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103025 dependencies: default_deps,
26)
27
28utils_a = static_library(
29 'utils_a',
Patrick Williamsff8c90e2025-02-01 08:37:02 -050030 ['FileHandle.cpp', 'SensorPaths.cpp', 'Utils.cpp'],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103031 dependencies: default_deps,
32)
33
34utils_dep = declare_dependency(
Andrew Jeffery9ce5fe42024-12-04 10:59:33 +103035 include_directories: ['.'],
Andrew Jefferyab8b0452024-01-11 09:55:51 +103036 link_with: [utils_a],
37 dependencies: [sdbusplus],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103038)
39
40devicemgmt_a = static_library(
41 'devicemgmt_a',
Patrick Williamsff8c90e2025-02-01 08:37:02 -050042 ['DeviceMgmt.cpp'],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103043 dependencies: default_deps,
44)
45
46devicemgmt_dep = declare_dependency(
Andrew Jeffery9ce5fe42024-12-04 10:59:33 +103047 include_directories: ['.'],
Andrew Jefferyab8b0452024-01-11 09:55:51 +103048 link_with: [devicemgmt_a],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103049 dependencies: default_deps,
50)
51
52pwmsensor_a = static_library(
53 'pwmsensor_a',
54 'PwmSensor.cpp',
Andrew Jefferyab8b0452024-01-11 09:55:51 +103055 dependencies: [default_deps, thresholds_dep],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103056)
57
58pwmsensor_dep = declare_dependency(
Andrew Jeffery9ce5fe42024-12-04 10:59:33 +103059 include_directories: ['.'],
Andrew Jefferyab8b0452024-01-11 09:55:51 +103060 link_with: [pwmsensor_a],
61 dependencies: [default_deps, thresholds_dep],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103062)
63
Brad Bishopfeb19ef2019-11-07 18:02:16 -050064peci_incdirs = []
65if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h')
66 peci_incdirs = ['../include']
67endif
68
Patrick Williams5bc307f2023-11-29 06:44:23 -060069if get_option('intel-cpu').allowed()
Andrew Jefferyab8b0452024-01-11 09:55:51 +103070 peci_dep = dependency('libpeci', required: true)
George Liud7be5552024-09-20 10:39:09 +080071 subdir('intel-cpu')
Oleksandr Shulzhenko77141ac2023-03-14 14:52:36 +010072endif
73
Patrick Williams5bc307f2023-11-29 06:44:23 -060074if get_option('adc').allowed()
George Liud7be5552024-09-20 10:39:09 +080075 subdir('adc')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050076endif
77
Patrick Williams5bc307f2023-11-29 06:44:23 -060078if get_option('exit-air').allowed()
George Liud7be5552024-09-20 10:39:09 +080079 subdir('exit-air')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050080endif
81
Patrick Williams5bc307f2023-11-29 06:44:23 -060082if get_option('fan').allowed()
George Liud7be5552024-09-20 10:39:09 +080083 subdir('fan')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050084endif
85
Patrick Williams5bc307f2023-11-29 06:44:23 -060086if get_option('hwmon-temp').allowed()
George Liud7be5552024-09-20 10:39:09 +080087 subdir('hwmon-temp')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050088endif
89
Patrick Williams5bc307f2023-11-29 06:44:23 -060090if get_option('intrusion').allowed()
George Liud7be5552024-09-20 10:39:09 +080091 subdir('intrusion')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050092endif
93
Patrick Williams5bc307f2023-11-29 06:44:23 -060094if get_option('ipmb').allowed()
George Liud7be5552024-09-20 10:39:09 +080095 subdir('ipmb')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050096endif
97
Andrew Jeffery275f7c32024-01-31 12:41:14 +103098if get_option('mctp').allowed()
99 subdir('mctp')
100endif
101
Patrick Williams5bc307f2023-11-29 06:44:23 -0600102if get_option('mcu').allowed()
George Liud7be5552024-09-20 10:39:09 +0800103 subdir('mcu')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500104endif
105
Patrick Williams5bc307f2023-11-29 06:44:23 -0600106if get_option('nvme').allowed()
George Liud7be5552024-09-20 10:39:09 +0800107 subdir('nvme')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500108endif
109
Patrick Williams5bc307f2023-11-29 06:44:23 -0600110if get_option('psu').allowed()
George Liud7be5552024-09-20 10:39:09 +0800111 subdir('psu')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500112endif
113
Patrick Williams5bc307f2023-11-29 06:44:23 -0600114if get_option('external').allowed()
George Liud7be5552024-09-20 10:39:09 +0800115 subdir('external')
116endif
117
118if get_option('tests').allowed()
119 subdir('tests')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500120endif