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 | |
Jagpal Singh Gill | 15dde86 | 2024-10-16 09:42:54 -0700 | [diff] [blame] | 64 | systemdinterface_src = files('SystemdInterface.cpp') |
| 65 | |
| 66 | gpiointerface_a = static_library( |
| 67 | 'gpiointerface_a', |
| 68 | 'GPIOInterface.cpp', |
| 69 | dependencies: default_deps, |
| 70 | ) |
| 71 | |
| 72 | gpiointerface_dep = declare_dependency( |
| 73 | include_directories: ['.'], |
| 74 | link_with: [gpiointerface_a], |
| 75 | dependencies: default_deps, |
| 76 | ) |
| 77 | |
| 78 | entitymanagerinterface_a = static_library( |
| 79 | 'entitymanagerinterface_a', |
| 80 | 'EntityManagerInterface.cpp', |
| 81 | dependencies: default_deps, |
| 82 | ) |
| 83 | |
| 84 | entitymanagerinterface_dep = declare_dependency( |
| 85 | include_directories: ['.'], |
| 86 | link_with: [entitymanagerinterface_a], |
| 87 | dependencies: default_deps, |
| 88 | ) |
| 89 | |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 90 | peci_incdirs = [] |
| 91 | if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h') |
| 92 | peci_incdirs = ['../include'] |
| 93 | endif |
| 94 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 95 | if get_option('intel-cpu').allowed() |
Andrew Jeffery | ab8b045 | 2024-01-11 09:55:51 +1030 | [diff] [blame] | 96 | peci_dep = dependency('libpeci', required: true) |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 97 | subdir('intel-cpu') |
Oleksandr Shulzhenko | 77141ac | 2023-03-14 14:52:36 +0100 | [diff] [blame] | 98 | endif |
| 99 | |
Aushim Nagarkatti | 021261c | 2024-12-12 10:12:16 -0800 | [diff] [blame] | 100 | if get_option('smbpbi').allowed() |
| 101 | subdir('smbpbi') |
| 102 | endif |
| 103 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 104 | if get_option('adc').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 105 | subdir('adc') |
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('exit-air').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 109 | subdir('exit-air') |
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('fan').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 113 | subdir('fan') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 114 | endif |
| 115 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 116 | if get_option('hwmon-temp').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 117 | subdir('hwmon-temp') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 118 | endif |
| 119 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 120 | if get_option('intrusion').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 121 | subdir('intrusion') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 122 | endif |
| 123 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 124 | if get_option('ipmb').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 125 | subdir('ipmb') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 126 | endif |
| 127 | |
Andrew Jeffery | 275f7c3 | 2024-01-31 12:41:14 +1030 | [diff] [blame] | 128 | if get_option('mctp').allowed() |
| 129 | subdir('mctp') |
| 130 | endif |
| 131 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 132 | if get_option('mcu').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 133 | subdir('mcu') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 134 | endif |
| 135 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 136 | if get_option('nvme').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 137 | subdir('nvme') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 138 | endif |
| 139 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 140 | if get_option('psu').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 141 | subdir('psu') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 142 | endif |
| 143 | |
Harshit Aghera | 82d4a62 | 2025-04-21 19:09:02 +0530 | [diff] [blame] | 144 | if get_option('nvidia-gpu').allowed() |
| 145 | subdir('nvidia-gpu') |
| 146 | endif |
| 147 | |
Patrick Williams | 5bc307f | 2023-11-29 06:44:23 -0600 | [diff] [blame] | 148 | if get_option('external').allowed() |
George Liu | d7be555 | 2024-09-20 10:39:09 +0800 | [diff] [blame] | 149 | subdir('external') |
| 150 | endif |
| 151 | |
| 152 | if get_option('tests').allowed() |
| 153 | subdir('tests') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 154 | endif |
Jagpal Singh Gill | 15dde86 | 2024-10-16 09:42:54 -0700 | [diff] [blame] | 155 | |
| 156 | if get_option('leakdetector').allowed() |
| 157 | subdir('leakdetector') |
| 158 | endif |