Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 1 | conf_data = configuration_data() |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 2 | conf_data.set10( |
| 3 | 'VALIDATION_UNSECURE_FEATURE', |
| 4 | get_option('validate-unsecure-feature').allowed(), |
| 5 | ) |
| 6 | conf_data.set10( |
| 7 | 'INSECURE_UNRESTRICTED_SENSOR_OVERRIDE', |
| 8 | get_option('insecure-sensor-override').allowed(), |
| 9 | ) |
| 10 | configure_file( |
| 11 | input: 'dbus-sensor_config.h.in', |
| 12 | output: 'dbus-sensor_config.h', |
| 13 | configuration: conf_data, |
| 14 | ) |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 15 | |
| 16 | thresholds_a = static_library( |
| 17 | 'thresholds_a', |
| 18 | 'Thresholds.cpp', |
| 19 | dependencies: default_deps, |
| 20 | ) |
| 21 | |
| 22 | thresholds_dep = declare_dependency( |
Andrew Jeffery | 9ce5fe4 | 2024-12-04 10:59:33 +1030 | [diff] [blame] | 23 | include_directories: ['.'], |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 24 | link_with: [thresholds_a], |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 25 | dependencies: default_deps, |
| 26 | ) |
| 27 | |
| 28 | utils_a = static_library( |
| 29 | 'utils_a', |
Patrick Williams | ff8c90e | 2025-02-01 08:37:02 -0500 | [diff] [blame] | 30 | ['FileHandle.cpp', 'SensorPaths.cpp', 'Utils.cpp'], |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 31 | dependencies: default_deps, |
| 32 | ) |
| 33 | |
| 34 | utils_dep = declare_dependency( |
Andrew Jeffery | 9ce5fe4 | 2024-12-04 10:59:33 +1030 | [diff] [blame] | 35 | include_directories: ['.'], |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 36 | link_with: [utils_a], |
| 37 | dependencies: [sdbusplus], |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 38 | ) |
| 39 | |
| 40 | devicemgmt_a = static_library( |
| 41 | 'devicemgmt_a', |
Patrick Williams | ff8c90e | 2025-02-01 08:37:02 -0500 | [diff] [blame] | 42 | ['DeviceMgmt.cpp'], |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 43 | dependencies: default_deps, |
| 44 | ) |
| 45 | |
| 46 | devicemgmt_dep = declare_dependency( |
Andrew Jeffery | 9ce5fe4 | 2024-12-04 10:59:33 +1030 | [diff] [blame] | 47 | include_directories: ['.'], |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 48 | link_with: [devicemgmt_a], |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 49 | dependencies: default_deps, |
| 50 | ) |
| 51 | |
| 52 | pwmsensor_a = static_library( |
| 53 | 'pwmsensor_a', |
| 54 | 'PwmSensor.cpp', |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 55 | dependencies: [default_deps, thresholds_dep], |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 56 | ) |
| 57 | |
| 58 | pwmsensor_dep = declare_dependency( |
Andrew Jeffery | 9ce5fe4 | 2024-12-04 10:59:33 +1030 | [diff] [blame] | 59 | include_directories: ['.'], |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 60 | link_with: [pwmsensor_a], |
| 61 | dependencies: [default_deps, thresholds_dep], |
Andrew Jeffery | e73bd0a | 2023-01-25 10:39:57 +1030 | [diff] [blame] | 62 | ) |
| 63 | |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 64 | peci_incdirs = [] |
| 65 | if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h') |
| 66 | peci_incdirs = ['../include'] |
| 67 | endif |
| 68 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 69 | if get_option('intel-cpu').allowed() |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 70 | peci_dep = dependency('libpeci', required: true) |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 71 | subdir('intel-cpu') |
Oleksandr Shulzhenko | 77141ac | 2023-03-14 14:52:36 +0100 | [diff] [blame] | 72 | endif |
| 73 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 74 | if get_option('adc').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 75 | subdir('adc') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 76 | endif |
| 77 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 78 | if get_option('exit-air').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 79 | subdir('exit-air') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 80 | endif |
| 81 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 82 | if get_option('fan').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 83 | subdir('fan') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 84 | endif |
| 85 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 86 | if get_option('hwmon-temp').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 87 | subdir('hwmon-temp') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 88 | endif |
| 89 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 90 | if get_option('intrusion').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 91 | subdir('intrusion') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 92 | endif |
| 93 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 94 | if get_option('ipmb').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 95 | subdir('ipmb') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 96 | endif |
| 97 | |
Andrew Jeffery | 275f7c3 | 2024-01-31 12:41:14 +1030 | [diff] [blame] | 98 | if get_option('mctp').allowed() |
| 99 | subdir('mctp') |
| 100 | endif |
| 101 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 102 | if get_option('mcu').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 103 | subdir('mcu') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 104 | endif |
| 105 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 106 | if get_option('nvme').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 107 | subdir('nvme') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 108 | endif |
| 109 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 110 | if get_option('psu').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 111 | subdir('psu') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 112 | endif |
| 113 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 114 | if get_option('external').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 115 | subdir('external') |
| 116 | endif |
| 117 | |
| 118 | if get_option('tests').allowed() |
| 119 | subdir('tests') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 120 | endif |