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