blob: 229842f1a47ffa6d221cf62dbf3a881488d4affa [file] [log] [blame]
Jonathan Doman366546c2023-07-24 12:33:16 -07001cpp_args_smbios = boost_args
2if get_option('dimm-dbus').allowed()
3 cpp_args_smbios += ['-DDIMM_DBUS']
4endif
5
Josh Lehanabdccd32024-01-26 15:49:50 -08006if get_option('assoc-trim-path').allowed()
7 cpp_args_smbios += ['-DASSOC_TRIM_PATH']
8endif
9
Jonathan Doman366546c2023-07-24 12:33:16 -070010if get_option('dimm-only-locator').allowed()
11 cpp_args_smbios += ['-DDIMM_ONLY_LOCATOR']
12endif
13
14executable(
15 'smbiosmdrv2app',
16 'mdrv2.cpp',
17 'mdrv2_main.cpp',
18 'cpu.cpp',
19 'dimm.cpp',
20 'system.cpp',
21 'pcieslot.cpp',
22 cpp_args: cpp_args_smbios,
23 dependencies: [
24 boost_dep,
25 sdbusplus_dep,
26 phosphor_logging_dep,
27 phosphor_dbus_interfaces_dep,
28 ],
29 implicit_include_directories: false,
30 include_directories: root_inc,
31 install: true,
32)
33
34if get_option('cpuinfo').allowed()
35 cpp = meson.get_compiler('cpp')
36 # i2c-tools provides no pkgconfig so we need to find it manually
37 i2c_dep = cpp.find_library('i2c')
38
Jonathan Doman4e1cf092024-03-08 19:57:56 -080039 peci_dep = []
40 peci_flag = []
41 peci_files = []
42 if get_option('cpuinfo-peci').allowed()
43 peci_flag = '-DPECI_ENABLED=1'
44 peci_dep = dependency('libpeci')
45 peci_files = ['speed_select.cpp', 'sst_mailbox.cpp']
46 endif
Jonathan Doman366546c2023-07-24 12:33:16 -070047
48 executable(
49 'cpuinfoapp',
50 'cpuinfo_main.cpp',
Jonathan Doman366546c2023-07-24 12:33:16 -070051 'cpuinfo_utils.cpp',
Jonathan Doman4e1cf092024-03-08 19:57:56 -080052 peci_files,
53 cpp_args: boost_args + peci_flag,
Jonathan Doman366546c2023-07-24 12:33:16 -070054 dependencies: [
55 boost_dep,
56 sdbusplus_dep,
57 phosphor_logging_dep,
58 phosphor_dbus_interfaces_dep,
59 i2c_dep,
60 peci_dep,
61 ],
62 implicit_include_directories: false,
63 include_directories: root_inc,
64 install: true,
65 )
66endif
67
68if get_option('smbios-ipmi-blob').allowed()
69 subdir('smbios-ipmi-blobs')
70endif