blob: 85b754b68508959418fe356365cfcbe97fc26429 [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',
30 [
31 'FileHandle.cpp',
32 'SensorPaths.cpp',
33 'Utils.cpp',
34 ],
35 dependencies: default_deps,
36)
37
38utils_dep = declare_dependency(
Andrew Jeffery9ce5fe42024-12-04 10:59:33 +103039 include_directories: ['.'],
Andrew Jefferyab8b0452024-01-11 09:55:51 +103040 link_with: [utils_a],
41 dependencies: [sdbusplus],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103042)
43
44devicemgmt_a = static_library(
45 'devicemgmt_a',
46 [
47 'DeviceMgmt.cpp',
48 ],
49 dependencies: default_deps,
50)
51
52devicemgmt_dep = declare_dependency(
Andrew Jeffery9ce5fe42024-12-04 10:59:33 +103053 include_directories: ['.'],
Andrew Jefferyab8b0452024-01-11 09:55:51 +103054 link_with: [devicemgmt_a],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103055 dependencies: default_deps,
56)
57
58pwmsensor_a = static_library(
59 'pwmsensor_a',
60 'PwmSensor.cpp',
Andrew Jefferyab8b0452024-01-11 09:55:51 +103061 dependencies: [default_deps, thresholds_dep],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103062)
63
64pwmsensor_dep = declare_dependency(
Andrew Jeffery9ce5fe42024-12-04 10:59:33 +103065 include_directories: ['.'],
Andrew Jefferyab8b0452024-01-11 09:55:51 +103066 link_with: [pwmsensor_a],
67 dependencies: [default_deps, thresholds_dep],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103068)
69
Brad Bishopfeb19ef2019-11-07 18:02:16 -050070peci_incdirs = []
71if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h')
72 peci_incdirs = ['../include']
73endif
74
Patrick Williams5bc307f2023-11-29 06:44:23 -060075if get_option('intel-cpu').allowed()
Andrew Jefferyab8b0452024-01-11 09:55:51 +103076 peci_dep = dependency('libpeci', required: true)
George Liud7be5552024-09-20 10:39:09 +080077 subdir('intel-cpu')
Oleksandr Shulzhenko77141ac2023-03-14 14:52:36 +010078endif
79
Patrick Williams5bc307f2023-11-29 06:44:23 -060080if get_option('adc').allowed()
George Liud7be5552024-09-20 10:39:09 +080081 subdir('adc')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050082endif
83
Patrick Williams5bc307f2023-11-29 06:44:23 -060084if get_option('exit-air').allowed()
George Liud7be5552024-09-20 10:39:09 +080085 subdir('exit-air')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050086endif
87
Patrick Williams5bc307f2023-11-29 06:44:23 -060088if get_option('fan').allowed()
George Liud7be5552024-09-20 10:39:09 +080089 subdir('fan')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050090endif
91
Patrick Williams5bc307f2023-11-29 06:44:23 -060092if get_option('hwmon-temp').allowed()
George Liud7be5552024-09-20 10:39:09 +080093 subdir('hwmon-temp')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050094endif
95
Patrick Williams5bc307f2023-11-29 06:44:23 -060096if get_option('intrusion').allowed()
George Liud7be5552024-09-20 10:39:09 +080097 subdir('intrusion')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050098endif
99
Patrick Williams5bc307f2023-11-29 06:44:23 -0600100if get_option('ipmb').allowed()
George Liud7be5552024-09-20 10:39:09 +0800101 subdir('ipmb')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500102endif
103
Andrew Jeffery275f7c32024-01-31 12:41:14 +1030104if get_option('mctp').allowed()
105 subdir('mctp')
106endif
107
Patrick Williams5bc307f2023-11-29 06:44:23 -0600108if get_option('mcu').allowed()
George Liud7be5552024-09-20 10:39:09 +0800109 subdir('mcu')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500110endif
111
Patrick Williams5bc307f2023-11-29 06:44:23 -0600112if get_option('nvme').allowed()
George Liud7be5552024-09-20 10:39:09 +0800113 subdir('nvme')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500114endif
115
Patrick Williams5bc307f2023-11-29 06:44:23 -0600116if get_option('psu').allowed()
George Liud7be5552024-09-20 10:39:09 +0800117 subdir('psu')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500118endif
119
Patrick Williams5bc307f2023-11-29 06:44:23 -0600120if get_option('external').allowed()
George Liud7be5552024-09-20 10:39:09 +0800121 subdir('external')
122endif
123
124if get_option('tests').allowed()
125 subdir('tests')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500126endif