blob: e420b2789be4b0e6f4ea2b0b5c33c3094e6916cd [file] [log] [blame]
Brad Bishopfeb19ef2019-11-07 18:02:16 -05001peci_incdirs = []
2if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h')
3 peci_incdirs = ['../include']
4endif
5
6if get_option('adc').enabled()
7 executable(
8 'adcsensor',
9 'ADCSensor.cpp',
10 'ADCSensorMain.cpp',
11 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050012 default_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050013 gpiodcxx,
Patrick Williams8b8f6062021-08-27 14:53:50 -050014 thresholds_dep,
15 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050016 ],
Ed Tanous16966b52021-09-15 15:06:59 -070017 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050018 implicit_include_directories: false,
19 include_directories: '../include',
20 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050021 )
22endif
23
Thu Nguyen255da6b2022-07-29 10:05:52 +070024if get_option('intel-cpu').enabled()
Brad Bishopfeb19ef2019-11-07 18:02:16 -050025 executable(
Thu Nguyen255da6b2022-07-29 10:05:52 +070026 'intelcpusensor',
27 'IntelCPUSensorMain.cpp',
28 'IntelCPUSensor.cpp',
Brad Bishopfeb19ef2019-11-07 18:02:16 -050029 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050030 default_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050031 gpiodcxx,
Patrick Williams8b8f6062021-08-27 14:53:50 -050032 thresholds_dep,
33 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050034 ],
35 implicit_include_directories: false,
36 include_directories: [
37 '../include'
38 ] + peci_incdirs,
39 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050040 )
41endif
42
43if get_option('exit-air').enabled()
44 executable(
45 'exitairtempsensor',
46 'ExitAirTempSensor.cpp',
47 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050048 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -050049 thresholds_dep,
50 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050051 ],
Ed Tanous16966b52021-09-15 15:06:59 -070052 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050053 implicit_include_directories: false,
54 include_directories: '../include',
55 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050056 )
57endif
58
59if get_option('fan').enabled()
60 executable(
61 'fansensor',
62 'FanMain.cpp',
63 'TachSensor.cpp',
64 'PwmSensor.cpp',
65 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050066 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -050067 gpiodcxx,
Patrick Williams8b8f6062021-08-27 14:53:50 -050068 thresholds_dep,
69 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050070 ],
Ed Tanous16966b52021-09-15 15:06:59 -070071 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050072 implicit_include_directories: false,
73 include_directories: '../include',
74 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050075 )
76endif
77
78if get_option('hwmon-temp').enabled()
79 executable(
80 'hwmontempsensor',
81 'HwmonTempMain.cpp',
82 'HwmonTempSensor.cpp',
83 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050084 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -050085 thresholds_dep,
86 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050087 ],
Ed Tanous16966b52021-09-15 15:06:59 -070088 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050089 implicit_include_directories: false,
90 include_directories: '../include',
91 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050092 )
93endif
94
95if get_option('intrusion').enabled()
96 executable(
97 'intrusionsensor',
98 'ChassisIntrusionSensor.cpp',
99 'IntrusionSensorMain.cpp',
100 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500101 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500102 gpiodcxx,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500103 i2c,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500104 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500105 ],
Ed Tanous16966b52021-09-15 15:06:59 -0700106 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500107 implicit_include_directories: false,
108 include_directories: '../include',
109 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500110 )
111endif
112
113if get_option('ipmb').enabled()
114 executable(
115 'ipmbsensor',
116 'IpmbSensor.cpp',
117 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500118 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500119 thresholds_dep,
120 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500121 ],
Ed Tanous16966b52021-09-15 15:06:59 -0700122 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500123 implicit_include_directories: false,
124 include_directories: '../include',
125 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500126 )
127endif
128
Ed Tanous49d12d82021-02-11 13:44:15 -0800129if get_option('mcu').enabled()
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500130 executable(
131 'mcutempsensor',
132 'MCUTempSensor.cpp',
133 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500134 default_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500135 i2c,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500136 thresholds_dep,
137 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500138 ],
Ed Tanous16966b52021-09-15 15:06:59 -0700139 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500140 implicit_include_directories: false,
141 include_directories: '../include',
142 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500143 )
144endif
145
146if get_option('nvme').enabled()
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930147 nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp')
148 nvme_srcs += files('NVMeBasicContext.cpp')
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930149
Andrew Jeffery6f25e7e2021-05-24 12:52:53 +0930150 nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ]
151
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500152 executable(
153 'nvmesensor',
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930154 sources: nvme_srcs,
155 dependencies: nvme_deps,
Ed Tanous16966b52021-09-15 15:06:59 -0700156 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500157 implicit_include_directories: false,
158 include_directories: '../include',
159 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500160 )
161endif
162
Lei YU3a18b862021-02-05 13:55:08 +0800163if get_option('psu').enabled()
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500164 executable(
Lei YU3a18b862021-02-05 13:55:08 +0800165 'psusensor',
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500166 'PSUEvent.cpp',
167 'PSUSensor.cpp',
168 'PSUSensorMain.cpp',
169 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500170 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500171 pwmsensor_dep,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500172 thresholds_dep,
173 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500174 ],
Ed Tanous16966b52021-09-15 15:06:59 -0700175 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500176 implicit_include_directories: false,
177 include_directories: '../include',
178 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500179 )
180endif
181
182if get_option('external').enabled()
183 executable(
184 'externalsensor',
185 'ExternalSensor.cpp',
186 'ExternalSensorMain.cpp',
187 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500188 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500189 thresholds_dep,
190 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500191 ],
Ed Tanous16966b52021-09-15 15:06:59 -0700192 cpp_args: uring_args,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500193 implicit_include_directories: false,
194 include_directories: '../include',
195 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500196 )
197endif