Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 1 | cpp_args_smbios = boost_args |
| 2 | if get_option('dimm-dbus').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 3 | cpp_args_smbios += ['-DDIMM_DBUS'] |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 4 | endif |
| 5 | |
Josh Lehan | abdccd3 | 2024-01-26 15:49:50 -0800 | [diff] [blame] | 6 | if get_option('assoc-trim-path').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 7 | cpp_args_smbios += ['-DASSOC_TRIM_PATH'] |
Josh Lehan | abdccd3 | 2024-01-26 15:49:50 -0800 | [diff] [blame] | 8 | endif |
| 9 | |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 10 | if get_option('dimm-only-locator').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 11 | cpp_args_smbios += ['-DDIMM_ONLY_LOCATOR'] |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 12 | endif |
| 13 | |
Manojkiran Eda | ce89a37 | 2025-02-05 23:09:04 +0530 | [diff] [blame] | 14 | if get_option('slot-drive-presence').allowed() |
| 15 | cpp_args_smbios += ['-DSLOT_DRIVE_PRESENCE'] |
| 16 | endif |
| 17 | |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 18 | executable( |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 19 | 'smbiosmdrv2app', |
| 20 | 'mdrv2.cpp', |
| 21 | 'mdrv2_main.cpp', |
| 22 | 'cpu.cpp', |
| 23 | 'dimm.cpp', |
| 24 | 'system.cpp', |
| 25 | 'pcieslot.cpp', |
| 26 | cpp_args: cpp_args_smbios, |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 27 | dependencies: [ |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 28 | boost_dep, |
| 29 | sdbusplus_dep, |
| 30 | phosphor_logging_dep, |
| 31 | phosphor_dbus_interfaces_dep, |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 32 | ], |
| 33 | implicit_include_directories: false, |
| 34 | include_directories: root_inc, |
| 35 | install: true, |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 36 | ) |
| 37 | |
| 38 | if get_option('cpuinfo').allowed() |
| 39 | cpp = meson.get_compiler('cpp') |
| 40 | # i2c-tools provides no pkgconfig so we need to find it manually |
| 41 | i2c_dep = cpp.find_library('i2c') |
| 42 | |
| 43 | peci_dep = [] |
| 44 | peci_flag = [] |
| 45 | peci_files = [] |
| 46 | if get_option('cpuinfo-peci').allowed() |
| 47 | peci_flag = '-DPECI_ENABLED=1' |
| 48 | peci_dep = dependency('libpeci') |
| 49 | peci_files = ['speed_select.cpp', 'sst_mailbox.cpp'] |
| 50 | endif |
| 51 | |
| 52 | executable( |
| 53 | 'cpuinfoapp', |
| 54 | 'cpuinfo_main.cpp', |
| 55 | 'cpuinfo_utils.cpp', |
| 56 | peci_files, |
| 57 | cpp_args: boost_args + peci_flag, |
| 58 | dependencies: [ |
| 59 | boost_dep, |
| 60 | sdbusplus_dep, |
| 61 | phosphor_logging_dep, |
| 62 | phosphor_dbus_interfaces_dep, |
| 63 | i2c_dep, |
| 64 | peci_dep, |
| 65 | ], |
| 66 | implicit_include_directories: false, |
| 67 | include_directories: root_inc, |
| 68 | install: true, |
| 69 | ) |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 70 | endif |
| 71 | |
| 72 | if get_option('smbios-ipmi-blob').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 73 | subdir('smbios-ipmi-blobs') |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 74 | endif |