1*e73bd0a1SAndrew Jefferyconf_data = configuration_data() 2*e73bd0a1SAndrew Jefferyconf_data.set10('VALIDATION_UNSECURE_FEATURE', get_option('validate-unsecure-feature').enabled()) 3*e73bd0a1SAndrew Jefferyconf_data.set10('INSECURE_UNRESTRICTED_SENSOR_OVERRIDE', get_option('insecure-sensor-override').enabled()) 4*e73bd0a1SAndrew Jefferyconfigure_file(input: 'dbus-sensor_config.h.in', 5*e73bd0a1SAndrew Jeffery output: 'dbus-sensor_config.h', 6*e73bd0a1SAndrew Jeffery configuration: conf_data) 7*e73bd0a1SAndrew Jeffery 8*e73bd0a1SAndrew Jefferythresholds_a = static_library( 9*e73bd0a1SAndrew Jeffery 'thresholds_a', 10*e73bd0a1SAndrew Jeffery 'Thresholds.cpp', 11*e73bd0a1SAndrew Jeffery dependencies: default_deps, 12*e73bd0a1SAndrew Jeffery) 13*e73bd0a1SAndrew Jeffery 14*e73bd0a1SAndrew Jefferythresholds_dep = declare_dependency( 15*e73bd0a1SAndrew Jeffery link_with: [ thresholds_a ], 16*e73bd0a1SAndrew Jeffery dependencies: default_deps, 17*e73bd0a1SAndrew Jeffery) 18*e73bd0a1SAndrew Jeffery 19*e73bd0a1SAndrew Jefferyutils_a = static_library( 20*e73bd0a1SAndrew Jeffery 'utils_a', 21*e73bd0a1SAndrew Jeffery [ 22*e73bd0a1SAndrew Jeffery 'FileHandle.cpp', 23*e73bd0a1SAndrew Jeffery 'SensorPaths.cpp', 24*e73bd0a1SAndrew Jeffery 'Utils.cpp', 25*e73bd0a1SAndrew Jeffery ], 26*e73bd0a1SAndrew Jeffery dependencies: default_deps, 27*e73bd0a1SAndrew Jeffery) 28*e73bd0a1SAndrew Jeffery 29*e73bd0a1SAndrew Jefferyutils_dep = declare_dependency( 30*e73bd0a1SAndrew Jeffery link_with: [ utils_a ], 31*e73bd0a1SAndrew Jeffery dependencies: [ sdbusplus ], 32*e73bd0a1SAndrew Jeffery) 33*e73bd0a1SAndrew Jeffery 34*e73bd0a1SAndrew Jefferydevicemgmt_a = static_library( 35*e73bd0a1SAndrew Jeffery 'devicemgmt_a', 36*e73bd0a1SAndrew Jeffery [ 37*e73bd0a1SAndrew Jeffery 'DeviceMgmt.cpp', 38*e73bd0a1SAndrew Jeffery ], 39*e73bd0a1SAndrew Jeffery dependencies: default_deps, 40*e73bd0a1SAndrew Jeffery) 41*e73bd0a1SAndrew Jeffery 42*e73bd0a1SAndrew Jefferydevicemgmt_dep = declare_dependency( 43*e73bd0a1SAndrew Jeffery link_with: [ devicemgmt_a ], 44*e73bd0a1SAndrew Jeffery dependencies: default_deps, 45*e73bd0a1SAndrew Jeffery) 46*e73bd0a1SAndrew Jeffery 47*e73bd0a1SAndrew Jefferypwmsensor_a = static_library( 48*e73bd0a1SAndrew Jeffery 'pwmsensor_a', 49*e73bd0a1SAndrew Jeffery 'PwmSensor.cpp', 50*e73bd0a1SAndrew Jeffery dependencies: [ default_deps, thresholds_dep ], 51*e73bd0a1SAndrew Jeffery) 52*e73bd0a1SAndrew Jeffery 53*e73bd0a1SAndrew Jefferypwmsensor_dep = declare_dependency( 54*e73bd0a1SAndrew Jeffery link_with: [ pwmsensor_a ], 55*e73bd0a1SAndrew Jeffery dependencies: [ default_deps, thresholds_dep ], 56*e73bd0a1SAndrew Jeffery) 57*e73bd0a1SAndrew 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 63feb19ef0SBrad Bishopif get_option('adc').enabled() 64feb19ef0SBrad Bishop executable( 65feb19ef0SBrad Bishop 'adcsensor', 66feb19ef0SBrad Bishop 'ADCSensor.cpp', 67feb19ef0SBrad Bishop 'ADCSensorMain.cpp', 68feb19ef0SBrad Bishop dependencies: [ 69302a61a5SPatrick Williams default_deps, 70feb19ef0SBrad Bishop gpiodcxx, 718b8f606fSPatrick Williams thresholds_dep, 728b8f606fSPatrick Williams utils_dep, 73feb19ef0SBrad Bishop ], 7416966b55SEd Tanous cpp_args: uring_args, 75feb19ef0SBrad Bishop install: true, 76feb19ef0SBrad Bishop ) 77feb19ef0SBrad Bishopendif 78feb19ef0SBrad Bishop 79255da6b4SThu Nguyenif get_option('intel-cpu').enabled() 80feb19ef0SBrad Bishop executable( 81255da6b4SThu Nguyen 'intelcpusensor', 82255da6b4SThu Nguyen 'IntelCPUSensorMain.cpp', 83255da6b4SThu Nguyen 'IntelCPUSensor.cpp', 84feb19ef0SBrad Bishop dependencies: [ 85302a61a5SPatrick Williams default_deps, 86feb19ef0SBrad Bishop gpiodcxx, 878b8f606fSPatrick Williams thresholds_dep, 888b8f606fSPatrick Williams utils_dep, 89feb19ef0SBrad Bishop ], 90*e73bd0a1SAndrew Jeffery include_directories: peci_incdirs, 91feb19ef0SBrad Bishop install: true, 92feb19ef0SBrad Bishop ) 93feb19ef0SBrad Bishopendif 94feb19ef0SBrad Bishop 95feb19ef0SBrad Bishopif get_option('exit-air').enabled() 96feb19ef0SBrad Bishop executable( 97feb19ef0SBrad Bishop 'exitairtempsensor', 98feb19ef0SBrad Bishop 'ExitAirTempSensor.cpp', 99feb19ef0SBrad Bishop dependencies: [ 100302a61a5SPatrick Williams default_deps, 1018b8f606fSPatrick Williams thresholds_dep, 1028b8f606fSPatrick Williams utils_dep, 103feb19ef0SBrad Bishop ], 10416966b55SEd Tanous cpp_args: uring_args, 105feb19ef0SBrad Bishop install: true, 106feb19ef0SBrad Bishop ) 107feb19ef0SBrad Bishopendif 108feb19ef0SBrad Bishop 109feb19ef0SBrad Bishopif get_option('fan').enabled() 110feb19ef0SBrad Bishop executable( 111feb19ef0SBrad Bishop 'fansensor', 112feb19ef0SBrad Bishop 'FanMain.cpp', 113feb19ef0SBrad Bishop 'TachSensor.cpp', 114feb19ef0SBrad Bishop 'PwmSensor.cpp', 115feb19ef0SBrad Bishop dependencies: [ 116302a61a5SPatrick Williams default_deps, 1178b8f606fSPatrick Williams gpiodcxx, 1188b8f606fSPatrick Williams thresholds_dep, 1198b8f606fSPatrick Williams utils_dep, 120feb19ef0SBrad Bishop ], 12116966b55SEd Tanous cpp_args: uring_args, 122feb19ef0SBrad Bishop install: true, 123feb19ef0SBrad Bishop ) 124feb19ef0SBrad Bishopendif 125feb19ef0SBrad Bishop 126feb19ef0SBrad Bishopif get_option('hwmon-temp').enabled() 127feb19ef0SBrad Bishop executable( 128feb19ef0SBrad Bishop 'hwmontempsensor', 129feb19ef0SBrad Bishop 'HwmonTempMain.cpp', 130feb19ef0SBrad Bishop 'HwmonTempSensor.cpp', 131feb19ef0SBrad Bishop dependencies: [ 132302a61a5SPatrick Williams default_deps, 133a1456c4aSZev Weiss devicemgmt_dep, 1348b8f606fSPatrick Williams thresholds_dep, 1358b8f606fSPatrick Williams utils_dep, 136feb19ef0SBrad Bishop ], 13716966b55SEd Tanous cpp_args: uring_args, 138feb19ef0SBrad Bishop install: true, 139feb19ef0SBrad Bishop ) 140feb19ef0SBrad Bishopendif 141feb19ef0SBrad Bishop 142feb19ef0SBrad Bishopif get_option('intrusion').enabled() 143feb19ef0SBrad Bishop executable( 144feb19ef0SBrad Bishop 'intrusionsensor', 145feb19ef0SBrad Bishop 'ChassisIntrusionSensor.cpp', 146feb19ef0SBrad Bishop 'IntrusionSensorMain.cpp', 147feb19ef0SBrad Bishop dependencies: [ 148302a61a5SPatrick Williams default_deps, 1498b8f606fSPatrick Williams gpiodcxx, 150feb19ef0SBrad Bishop i2c, 1518b8f606fSPatrick Williams utils_dep, 152feb19ef0SBrad Bishop ], 15316966b55SEd Tanous cpp_args: uring_args, 154feb19ef0SBrad Bishop install: true, 155feb19ef0SBrad Bishop ) 156feb19ef0SBrad Bishopendif 157feb19ef0SBrad Bishop 158feb19ef0SBrad Bishopif get_option('ipmb').enabled() 159feb19ef0SBrad Bishop executable( 160feb19ef0SBrad Bishop 'ipmbsensor', 161feb19ef0SBrad Bishop 'IpmbSensor.cpp', 1623746c553SJayashree Dhanapal 'IpmbSDRSensor.cpp', 163feb19ef0SBrad Bishop dependencies: [ 164302a61a5SPatrick Williams default_deps, 1658b8f606fSPatrick Williams thresholds_dep, 1668b8f606fSPatrick Williams utils_dep, 167feb19ef0SBrad Bishop ], 16816966b55SEd Tanous cpp_args: uring_args, 169feb19ef0SBrad Bishop install: true, 170feb19ef0SBrad Bishop ) 171feb19ef0SBrad Bishopendif 172feb19ef0SBrad Bishop 17349d12d89SEd Tanousif get_option('mcu').enabled() 174feb19ef0SBrad Bishop executable( 175feb19ef0SBrad Bishop 'mcutempsensor', 176feb19ef0SBrad Bishop 'MCUTempSensor.cpp', 177feb19ef0SBrad Bishop dependencies: [ 178302a61a5SPatrick Williams default_deps, 179feb19ef0SBrad Bishop i2c, 1808b8f606fSPatrick Williams thresholds_dep, 1818b8f606fSPatrick Williams utils_dep, 182feb19ef0SBrad Bishop ], 18316966b55SEd Tanous cpp_args: uring_args, 184feb19ef0SBrad Bishop install: true, 185feb19ef0SBrad Bishop ) 186feb19ef0SBrad Bishopendif 187feb19ef0SBrad Bishop 188feb19ef0SBrad Bishopif get_option('nvme').enabled() 189e3e3c97aSAndrew Jeffery nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp') 190e3e3c97aSAndrew Jeffery nvme_srcs += files('NVMeBasicContext.cpp') 191e3e3c97aSAndrew Jeffery 1926f25e7e0SAndrew Jeffery nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ] 1936f25e7e0SAndrew Jeffery 194feb19ef0SBrad Bishop executable( 195feb19ef0SBrad Bishop 'nvmesensor', 196e3e3c97aSAndrew Jeffery sources: nvme_srcs, 197e3e3c97aSAndrew Jeffery dependencies: nvme_deps, 19816966b55SEd Tanous cpp_args: uring_args, 199feb19ef0SBrad Bishop install: true, 200feb19ef0SBrad Bishop ) 201feb19ef0SBrad Bishopendif 202feb19ef0SBrad Bishop 2033a18b860SLei YUif get_option('psu').enabled() 204feb19ef0SBrad Bishop executable( 2053a18b860SLei YU 'psusensor', 206feb19ef0SBrad Bishop 'PSUEvent.cpp', 207feb19ef0SBrad Bishop 'PSUSensor.cpp', 208feb19ef0SBrad Bishop 'PSUSensorMain.cpp', 209feb19ef0SBrad Bishop dependencies: [ 210302a61a5SPatrick Williams default_deps, 2118b8f606fSPatrick Williams pwmsensor_dep, 2128b8f606fSPatrick Williams thresholds_dep, 2138b8f606fSPatrick Williams utils_dep, 214feb19ef0SBrad Bishop ], 21516966b55SEd Tanous cpp_args: uring_args, 216feb19ef0SBrad Bishop install: true, 217feb19ef0SBrad Bishop ) 218feb19ef0SBrad Bishopendif 219feb19ef0SBrad Bishop 220feb19ef0SBrad Bishopif get_option('external').enabled() 221feb19ef0SBrad Bishop executable( 222feb19ef0SBrad Bishop 'externalsensor', 223feb19ef0SBrad Bishop 'ExternalSensor.cpp', 224feb19ef0SBrad Bishop 'ExternalSensorMain.cpp', 225feb19ef0SBrad Bishop dependencies: [ 226302a61a5SPatrick Williams default_deps, 2278b8f606fSPatrick Williams thresholds_dep, 2288b8f606fSPatrick Williams utils_dep, 229feb19ef0SBrad Bishop ], 23016966b55SEd Tanous cpp_args: uring_args, 231feb19ef0SBrad Bishop install: true, 232feb19ef0SBrad Bishop ) 233feb19ef0SBrad Bishopendif 234