1e73bd0a1SAndrew Jefferyconf_data = configuration_data() 2e73bd0a1SAndrew Jefferyconf_data.set10('VALIDATION_UNSECURE_FEATURE', get_option('validate-unsecure-feature').enabled()) 3e73bd0a1SAndrew Jefferyconf_data.set10('INSECURE_UNRESTRICTED_SENSOR_OVERRIDE', get_option('insecure-sensor-override').enabled()) 4e73bd0a1SAndrew Jefferyconfigure_file(input: 'dbus-sensor_config.h.in', 5e73bd0a1SAndrew Jeffery output: 'dbus-sensor_config.h', 6e73bd0a1SAndrew Jeffery configuration: conf_data) 7e73bd0a1SAndrew Jeffery 8e73bd0a1SAndrew Jefferythresholds_a = static_library( 9e73bd0a1SAndrew Jeffery 'thresholds_a', 10e73bd0a1SAndrew Jeffery 'Thresholds.cpp', 11e73bd0a1SAndrew Jeffery dependencies: default_deps, 12e73bd0a1SAndrew Jeffery) 13e73bd0a1SAndrew Jeffery 14e73bd0a1SAndrew Jefferythresholds_dep = declare_dependency( 15e73bd0a1SAndrew Jeffery link_with: [ thresholds_a ], 16e73bd0a1SAndrew Jeffery dependencies: default_deps, 17e73bd0a1SAndrew Jeffery) 18e73bd0a1SAndrew Jeffery 19e73bd0a1SAndrew Jefferyutils_a = static_library( 20e73bd0a1SAndrew Jeffery 'utils_a', 21e73bd0a1SAndrew Jeffery [ 22e73bd0a1SAndrew Jeffery 'FileHandle.cpp', 23e73bd0a1SAndrew Jeffery 'SensorPaths.cpp', 24e73bd0a1SAndrew Jeffery 'Utils.cpp', 25e73bd0a1SAndrew Jeffery ], 26e73bd0a1SAndrew Jeffery dependencies: default_deps, 27e73bd0a1SAndrew Jeffery) 28e73bd0a1SAndrew Jeffery 29e73bd0a1SAndrew Jefferyutils_dep = declare_dependency( 30e73bd0a1SAndrew Jeffery link_with: [ utils_a ], 31e73bd0a1SAndrew Jeffery dependencies: [ sdbusplus ], 32e73bd0a1SAndrew Jeffery) 33e73bd0a1SAndrew Jeffery 34e73bd0a1SAndrew Jefferydevicemgmt_a = static_library( 35e73bd0a1SAndrew Jeffery 'devicemgmt_a', 36e73bd0a1SAndrew Jeffery [ 37e73bd0a1SAndrew Jeffery 'DeviceMgmt.cpp', 38e73bd0a1SAndrew Jeffery ], 39e73bd0a1SAndrew Jeffery dependencies: default_deps, 40e73bd0a1SAndrew Jeffery) 41e73bd0a1SAndrew Jeffery 42e73bd0a1SAndrew Jefferydevicemgmt_dep = declare_dependency( 43e73bd0a1SAndrew Jeffery link_with: [ devicemgmt_a ], 44e73bd0a1SAndrew Jeffery dependencies: default_deps, 45e73bd0a1SAndrew Jeffery) 46e73bd0a1SAndrew Jeffery 47e73bd0a1SAndrew Jefferypwmsensor_a = static_library( 48e73bd0a1SAndrew Jeffery 'pwmsensor_a', 49e73bd0a1SAndrew Jeffery 'PwmSensor.cpp', 50e73bd0a1SAndrew Jeffery dependencies: [ default_deps, thresholds_dep ], 51e73bd0a1SAndrew Jeffery) 52e73bd0a1SAndrew Jeffery 53e73bd0a1SAndrew Jefferypwmsensor_dep = declare_dependency( 54e73bd0a1SAndrew Jeffery link_with: [ pwmsensor_a ], 55e73bd0a1SAndrew Jeffery dependencies: [ default_deps, thresholds_dep ], 56e73bd0a1SAndrew Jeffery) 57e73bd0a1SAndrew Jeffery 58feb19ef0SBrad Bishoppeci_incdirs = [] 59feb19ef0SBrad Bishopif not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h') 60feb19ef0SBrad Bishop peci_incdirs = ['../include'] 61feb19ef0SBrad Bishopendif 62feb19ef0SBrad Bishop 63*77141acbSOleksandr Shulzhenkoif get_option('intel-cpu').enabled() 64*77141acbSOleksandr Shulzhenko peci_dep = meson.get_compiler('cpp').find_library('libpeci', required : false) 65*77141acbSOleksandr Shulzhenko if not peci_dep.found() 66*77141acbSOleksandr Shulzhenko cmake = import('cmake') 67*77141acbSOleksandr Shulzhenko opt = cmake.subproject_options() 68*77141acbSOleksandr Shulzhenko opt.append_compile_args('c', '-Wno-pedantic') 69*77141acbSOleksandr Shulzhenko peci_proj = cmake.subproject('libpeci', options : opt) 70*77141acbSOleksandr Shulzhenko peci_dep = peci_proj.dependency('peci') 71*77141acbSOleksandr Shulzhenko endif 72*77141acbSOleksandr Shulzhenkoendif 73*77141acbSOleksandr Shulzhenko 74feb19ef0SBrad Bishopif get_option('adc').enabled() 75feb19ef0SBrad Bishop executable( 76feb19ef0SBrad Bishop 'adcsensor', 77feb19ef0SBrad Bishop 'ADCSensor.cpp', 78feb19ef0SBrad Bishop 'ADCSensorMain.cpp', 79feb19ef0SBrad Bishop dependencies: [ 80302a61a5SPatrick Williams default_deps, 81feb19ef0SBrad Bishop gpiodcxx, 828b8f606fSPatrick Williams thresholds_dep, 838b8f606fSPatrick Williams utils_dep, 84feb19ef0SBrad Bishop ], 8516966b55SEd Tanous cpp_args: uring_args, 86feb19ef0SBrad Bishop install: true, 87feb19ef0SBrad Bishop ) 88feb19ef0SBrad Bishopendif 89feb19ef0SBrad Bishop 90255da6b4SThu Nguyenif get_option('intel-cpu').enabled() 91feb19ef0SBrad Bishop executable( 92255da6b4SThu Nguyen 'intelcpusensor', 93255da6b4SThu Nguyen 'IntelCPUSensorMain.cpp', 94255da6b4SThu Nguyen 'IntelCPUSensor.cpp', 95feb19ef0SBrad Bishop dependencies: [ 96302a61a5SPatrick Williams default_deps, 97feb19ef0SBrad Bishop gpiodcxx, 988b8f606fSPatrick Williams thresholds_dep, 998b8f606fSPatrick Williams utils_dep, 100*77141acbSOleksandr Shulzhenko peci_dep, 101feb19ef0SBrad Bishop ], 102e73bd0a1SAndrew Jeffery include_directories: peci_incdirs, 103feb19ef0SBrad Bishop install: true, 104feb19ef0SBrad Bishop ) 105feb19ef0SBrad Bishopendif 106feb19ef0SBrad Bishop 107feb19ef0SBrad Bishopif get_option('exit-air').enabled() 108feb19ef0SBrad Bishop executable( 109feb19ef0SBrad Bishop 'exitairtempsensor', 110feb19ef0SBrad Bishop 'ExitAirTempSensor.cpp', 111feb19ef0SBrad Bishop dependencies: [ 112302a61a5SPatrick Williams default_deps, 1138b8f606fSPatrick Williams thresholds_dep, 1148b8f606fSPatrick Williams utils_dep, 115feb19ef0SBrad Bishop ], 11616966b55SEd Tanous cpp_args: uring_args, 117feb19ef0SBrad Bishop install: true, 118feb19ef0SBrad Bishop ) 119feb19ef0SBrad Bishopendif 120feb19ef0SBrad Bishop 121feb19ef0SBrad Bishopif get_option('fan').enabled() 122feb19ef0SBrad Bishop executable( 123feb19ef0SBrad Bishop 'fansensor', 124feb19ef0SBrad Bishop 'FanMain.cpp', 125feb19ef0SBrad Bishop 'TachSensor.cpp', 126feb19ef0SBrad Bishop 'PwmSensor.cpp', 127feb19ef0SBrad Bishop dependencies: [ 128302a61a5SPatrick Williams default_deps, 1298b8f606fSPatrick Williams gpiodcxx, 1308b8f606fSPatrick Williams thresholds_dep, 1318b8f606fSPatrick Williams utils_dep, 132feb19ef0SBrad Bishop ], 13316966b55SEd Tanous cpp_args: uring_args, 134feb19ef0SBrad Bishop install: true, 135feb19ef0SBrad Bishop ) 136feb19ef0SBrad Bishopendif 137feb19ef0SBrad Bishop 138feb19ef0SBrad Bishopif get_option('hwmon-temp').enabled() 139feb19ef0SBrad Bishop executable( 140feb19ef0SBrad Bishop 'hwmontempsensor', 141feb19ef0SBrad Bishop 'HwmonTempMain.cpp', 142feb19ef0SBrad Bishop 'HwmonTempSensor.cpp', 143feb19ef0SBrad Bishop dependencies: [ 144302a61a5SPatrick Williams default_deps, 145a1456c4aSZev Weiss devicemgmt_dep, 1468b8f606fSPatrick Williams thresholds_dep, 1478b8f606fSPatrick Williams utils_dep, 148feb19ef0SBrad Bishop ], 14916966b55SEd Tanous cpp_args: uring_args, 150feb19ef0SBrad Bishop install: true, 151feb19ef0SBrad Bishop ) 152feb19ef0SBrad Bishopendif 153feb19ef0SBrad Bishop 154feb19ef0SBrad Bishopif get_option('intrusion').enabled() 155feb19ef0SBrad Bishop executable( 156feb19ef0SBrad Bishop 'intrusionsensor', 157feb19ef0SBrad Bishop 'ChassisIntrusionSensor.cpp', 158feb19ef0SBrad Bishop 'IntrusionSensorMain.cpp', 159feb19ef0SBrad Bishop dependencies: [ 160302a61a5SPatrick Williams default_deps, 1618b8f606fSPatrick Williams gpiodcxx, 162feb19ef0SBrad Bishop i2c, 1638b8f606fSPatrick Williams utils_dep, 164feb19ef0SBrad Bishop ], 16516966b55SEd Tanous cpp_args: uring_args, 166feb19ef0SBrad Bishop install: true, 167feb19ef0SBrad Bishop ) 168feb19ef0SBrad Bishopendif 169feb19ef0SBrad Bishop 170feb19ef0SBrad Bishopif get_option('ipmb').enabled() 171feb19ef0SBrad Bishop executable( 172feb19ef0SBrad Bishop 'ipmbsensor', 173feb19ef0SBrad Bishop 'IpmbSensor.cpp', 1743746c553SJayashree Dhanapal 'IpmbSDRSensor.cpp', 175feb19ef0SBrad Bishop dependencies: [ 176302a61a5SPatrick Williams default_deps, 1778b8f606fSPatrick Williams thresholds_dep, 1788b8f606fSPatrick Williams utils_dep, 179feb19ef0SBrad Bishop ], 18016966b55SEd Tanous cpp_args: uring_args, 181feb19ef0SBrad Bishop install: true, 182feb19ef0SBrad Bishop ) 183feb19ef0SBrad Bishopendif 184feb19ef0SBrad Bishop 18549d12d89SEd Tanousif get_option('mcu').enabled() 186feb19ef0SBrad Bishop executable( 187feb19ef0SBrad Bishop 'mcutempsensor', 188feb19ef0SBrad Bishop 'MCUTempSensor.cpp', 189feb19ef0SBrad Bishop dependencies: [ 190302a61a5SPatrick Williams default_deps, 191feb19ef0SBrad Bishop i2c, 1928b8f606fSPatrick Williams thresholds_dep, 1938b8f606fSPatrick Williams utils_dep, 194feb19ef0SBrad Bishop ], 19516966b55SEd Tanous cpp_args: uring_args, 196feb19ef0SBrad Bishop install: true, 197feb19ef0SBrad Bishop ) 198feb19ef0SBrad Bishopendif 199feb19ef0SBrad Bishop 200feb19ef0SBrad Bishopif get_option('nvme').enabled() 201e3e3c97aSAndrew Jeffery nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp') 202e3e3c97aSAndrew Jeffery nvme_srcs += files('NVMeBasicContext.cpp') 203e3e3c97aSAndrew Jeffery 2046f25e7e0SAndrew Jeffery nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ] 2056f25e7e0SAndrew Jeffery 206feb19ef0SBrad Bishop executable( 207feb19ef0SBrad Bishop 'nvmesensor', 208e3e3c97aSAndrew Jeffery sources: nvme_srcs, 209e3e3c97aSAndrew Jeffery dependencies: nvme_deps, 21016966b55SEd Tanous cpp_args: uring_args, 211feb19ef0SBrad Bishop install: true, 212feb19ef0SBrad Bishop ) 213feb19ef0SBrad Bishopendif 214feb19ef0SBrad Bishop 2153a18b860SLei YUif get_option('psu').enabled() 216feb19ef0SBrad Bishop executable( 2173a18b860SLei YU 'psusensor', 218feb19ef0SBrad Bishop 'PSUEvent.cpp', 219feb19ef0SBrad Bishop 'PSUSensor.cpp', 220feb19ef0SBrad Bishop 'PSUSensorMain.cpp', 221feb19ef0SBrad Bishop dependencies: [ 222302a61a5SPatrick Williams default_deps, 223786efb80SMatt Simmering devicemgmt_dep, 2248b8f606fSPatrick Williams pwmsensor_dep, 2258b8f606fSPatrick Williams thresholds_dep, 2268b8f606fSPatrick Williams utils_dep, 227feb19ef0SBrad Bishop ], 22816966b55SEd Tanous cpp_args: uring_args, 229feb19ef0SBrad Bishop install: true, 230feb19ef0SBrad Bishop ) 231feb19ef0SBrad Bishopendif 232feb19ef0SBrad Bishop 233feb19ef0SBrad Bishopif get_option('external').enabled() 234feb19ef0SBrad Bishop executable( 235feb19ef0SBrad Bishop 'externalsensor', 236feb19ef0SBrad Bishop 'ExternalSensor.cpp', 237feb19ef0SBrad Bishop 'ExternalSensorMain.cpp', 238feb19ef0SBrad Bishop dependencies: [ 239302a61a5SPatrick Williams default_deps, 2408b8f606fSPatrick Williams thresholds_dep, 2418b8f606fSPatrick Williams utils_dep, 242feb19ef0SBrad Bishop ], 24316966b55SEd Tanous cpp_args: uring_args, 244feb19ef0SBrad Bishop install: true, 245feb19ef0SBrad Bishop ) 246feb19ef0SBrad Bishopendif 247