Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 1 | peci_incdirs = [] |
| 2 | if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h') |
| 3 | peci_incdirs = ['../include'] |
| 4 | endif |
| 5 | |
| 6 | if get_option('adc').enabled() |
| 7 | executable( |
| 8 | 'adcsensor', |
| 9 | 'ADCSensor.cpp', |
| 10 | 'ADCSensorMain.cpp', |
| 11 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 12 | default_deps, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 13 | gpiodcxx, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 14 | thresholds_dep, |
| 15 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 16 | ], |
| 17 | implicit_include_directories: false, |
| 18 | include_directories: '../include', |
| 19 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 20 | ) |
| 21 | endif |
| 22 | |
| 23 | if get_option('cpu').enabled() |
| 24 | executable( |
| 25 | 'cpusensor', |
| 26 | 'CPUSensorMain.cpp', |
| 27 | 'CPUSensor.cpp', |
| 28 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 29 | default_deps, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 30 | gpiodcxx, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 31 | thresholds_dep, |
| 32 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 33 | ], |
| 34 | implicit_include_directories: false, |
| 35 | include_directories: [ |
| 36 | '../include' |
| 37 | ] + peci_incdirs, |
| 38 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 39 | ) |
| 40 | endif |
| 41 | |
| 42 | if get_option('exit-air').enabled() |
| 43 | executable( |
| 44 | 'exitairtempsensor', |
| 45 | 'ExitAirTempSensor.cpp', |
| 46 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 47 | default_deps, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 48 | thresholds_dep, |
| 49 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 50 | ], |
| 51 | implicit_include_directories: false, |
| 52 | include_directories: '../include', |
| 53 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 54 | ) |
| 55 | endif |
| 56 | |
| 57 | if get_option('fan').enabled() |
| 58 | executable( |
| 59 | 'fansensor', |
| 60 | 'FanMain.cpp', |
| 61 | 'TachSensor.cpp', |
| 62 | 'PwmSensor.cpp', |
| 63 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 64 | default_deps, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 65 | gpiodcxx, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 66 | thresholds_dep, |
| 67 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 68 | ], |
| 69 | implicit_include_directories: false, |
| 70 | include_directories: '../include', |
| 71 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 72 | ) |
| 73 | endif |
| 74 | |
| 75 | if get_option('hwmon-temp').enabled() |
| 76 | executable( |
| 77 | 'hwmontempsensor', |
| 78 | 'HwmonTempMain.cpp', |
| 79 | 'HwmonTempSensor.cpp', |
| 80 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 81 | default_deps, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 82 | thresholds_dep, |
| 83 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 84 | ], |
| 85 | implicit_include_directories: false, |
| 86 | include_directories: '../include', |
| 87 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 88 | ) |
| 89 | endif |
| 90 | |
| 91 | if get_option('intrusion').enabled() |
| 92 | executable( |
| 93 | 'intrusionsensor', |
| 94 | 'ChassisIntrusionSensor.cpp', |
| 95 | 'IntrusionSensorMain.cpp', |
| 96 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 97 | default_deps, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 98 | gpiodcxx, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 99 | i2c, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 100 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 101 | ], |
| 102 | implicit_include_directories: false, |
| 103 | include_directories: '../include', |
| 104 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 105 | ) |
| 106 | endif |
| 107 | |
| 108 | if get_option('ipmb').enabled() |
| 109 | executable( |
| 110 | 'ipmbsensor', |
| 111 | 'IpmbSensor.cpp', |
| 112 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 113 | default_deps, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 114 | thresholds_dep, |
| 115 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 116 | ], |
| 117 | implicit_include_directories: false, |
| 118 | include_directories: '../include', |
| 119 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 120 | ) |
| 121 | endif |
| 122 | |
Ed Tanous | 49d12d8 | 2021-02-11 13:44:15 -0800 | [diff] [blame] | 123 | if get_option('mcu').enabled() |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 124 | executable( |
| 125 | 'mcutempsensor', |
| 126 | 'MCUTempSensor.cpp', |
| 127 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 128 | default_deps, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 129 | i2c, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 130 | thresholds_dep, |
| 131 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 132 | ], |
| 133 | implicit_include_directories: false, |
| 134 | include_directories: '../include', |
| 135 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 136 | ) |
| 137 | endif |
| 138 | |
| 139 | if get_option('nvme').enabled() |
Andrew Jeffery | e3e3c97 | 2021-05-26 14:37:07 +0930 | [diff] [blame] | 140 | nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp') |
| 141 | nvme_srcs += files('NVMeBasicContext.cpp') |
Andrew Jeffery | e3e3c97 | 2021-05-26 14:37:07 +0930 | [diff] [blame] | 142 | |
Andrew Jeffery | 6f25e7e | 2021-05-24 12:52:53 +0930 | [diff] [blame^] | 143 | nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ] |
| 144 | |
| 145 | mi_mctp = get_option('nvme-mi-mctp') |
| 146 | if mi_mctp.enabled() |
| 147 | nvme_srcs += files('NVMeMCTPContext.cpp') |
| 148 | nvme_deps += meson.get_compiler('cpp').find_library('libmctp') |
| 149 | conf_data = configuration_data() |
| 150 | conf_data.set('HAVE_NVME_MI_MCTP', true) |
| 151 | endif |
Andrew Jeffery | e3e3c97 | 2021-05-26 14:37:07 +0930 | [diff] [blame] | 152 | |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 153 | executable( |
| 154 | 'nvmesensor', |
Andrew Jeffery | e3e3c97 | 2021-05-26 14:37:07 +0930 | [diff] [blame] | 155 | sources: nvme_srcs, |
| 156 | dependencies: nvme_deps, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 157 | implicit_include_directories: false, |
| 158 | include_directories: '../include', |
| 159 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 160 | ) |
| 161 | endif |
| 162 | |
Lei YU | 3a18b86 | 2021-02-05 13:55:08 +0800 | [diff] [blame] | 163 | if get_option('psu').enabled() |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 164 | executable( |
Lei YU | 3a18b86 | 2021-02-05 13:55:08 +0800 | [diff] [blame] | 165 | 'psusensor', |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 166 | 'PSUEvent.cpp', |
| 167 | 'PSUSensor.cpp', |
| 168 | 'PSUSensorMain.cpp', |
| 169 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 170 | default_deps, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 171 | pwmsensor_dep, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 172 | thresholds_dep, |
| 173 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 174 | ], |
| 175 | implicit_include_directories: false, |
| 176 | include_directories: '../include', |
| 177 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 178 | ) |
| 179 | endif |
| 180 | |
| 181 | if get_option('external').enabled() |
| 182 | executable( |
| 183 | 'externalsensor', |
| 184 | 'ExternalSensor.cpp', |
| 185 | 'ExternalSensorMain.cpp', |
| 186 | dependencies: [ |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 187 | default_deps, |
Patrick Williams | 8b8f606 | 2021-08-27 14:53:50 -0500 | [diff] [blame] | 188 | thresholds_dep, |
| 189 | utils_dep, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 190 | ], |
| 191 | implicit_include_directories: false, |
| 192 | include_directories: '../include', |
| 193 | install: true, |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 194 | ) |
| 195 | endif |