1ac730af2SWilliam A. Kennington IIIproject( 2ac730af2SWilliam A. Kennington III 'google-ipmi-sys', 3ac730af2SWilliam A. Kennington III 'cpp', 4ac730af2SWilliam A. Kennington III version: '0.1', 599413410SPatrick Williams meson_version: '>=1.1.1', 6ac730af2SWilliam A. Kennington III default_options: [ 799413410SPatrick Williams 'cpp_std=c++23', 8ac730af2SWilliam A. Kennington III 'warning_level=3', 9ac730af2SWilliam A. Kennington III 'werror=true', 10ac730af2SWilliam A. Kennington III ]) 11ac730af2SWilliam A. Kennington III 126c71b0f9SWilly Turoot_inc = include_directories('.') 136c71b0f9SWilly Tu 146c71b0f9SWilly Tuconf_data = configuration_data() 156c71b0f9SWilly Tuconf_data.set_quoted('STATIC_BIFURCATION_CONFIG', get_option('static-bifurcation')) 166c71b0f9SWilly Tuconf_h = configure_file( 176c71b0f9SWilly Tu output: 'config.h', 186c71b0f9SWilly Tu configuration: conf_data) 196c71b0f9SWilly Tu 205e70dc8cSNikhil Namjoshibm_conf_data = configuration_data() 215e70dc8cSNikhil Namjoshibm_conf_data.set10('BARE_METAL', get_option('bare_metal')) 223f3ca035SBrandon Kimbm_conf_data.set_quoted('BM_SIGNAL_PATH', get_option('bm-signal-path')) 235e70dc8cSNikhil Namjoshibm_conf_h = configure_file( 245e70dc8cSNikhil Namjoshi output: 'bm_config.h', 255e70dc8cSNikhil Namjoshi configuration: bm_conf_data) 265e70dc8cSNikhil Namjoshi 27ac730af2SWilliam A. Kennington IIImeson.get_compiler('cpp').has_header_symbol( 28ac730af2SWilliam A. Kennington III 'ipmid/api.h', 29ac730af2SWilliam A. Kennington III 'ipmid_get_sd_bus_connection') 30ac730af2SWilliam A. Kennington III 31ac730af2SWilliam A. Kennington IIIjson_dep = dependency('nlohmann_json', required: false) 32ac730af2SWilliam A. Kennington IIImeson.get_compiler('cpp').has_header_symbol( 33ac730af2SWilliam A. Kennington III 'nlohmann/json.hpp', 34ac730af2SWilliam A. Kennington III 'nlohmann::json', 35ac730af2SWilliam A. Kennington III dependencies: json_dep) 36ac730af2SWilliam A. Kennington III 37c5b55232SWilly Tustdplus = dependency('stdplus') 386c71b0f9SWilly Tusubdir('bifurcation') 396c71b0f9SWilly Tu 40ac730af2SWilliam A. Kennington IIIsys_pre = declare_dependency( 416c71b0f9SWilly Tu include_directories: root_inc, 42ac730af2SWilliam A. Kennington III dependencies: [ 43ac730af2SWilliam A. Kennington III json_dep, 44ac730af2SWilliam A. Kennington III dependency('phosphor-dbus-interfaces'), 45ac730af2SWilliam A. Kennington III dependency('phosphor-logging'), 46ac730af2SWilliam A. Kennington III dependency('sdbusplus'), 47c5b55232SWilly Tu stdplus, 486c71b0f9SWilly Tu bifurcation_dep, 49ac730af2SWilliam A. Kennington III ]) 50ac730af2SWilliam A. Kennington III 51ac730af2SWilliam A. Kennington IIIsys_lib = static_library( 52ac730af2SWilliam A. Kennington III 'sys', 535e70dc8cSNikhil Namjoshi 'bmc_mode.cpp', 54ac730af2SWilliam A. Kennington III 'cable.cpp', 55ac730af2SWilliam A. Kennington III 'cpld.cpp', 56ac730af2SWilliam A. Kennington III 'entity_name.cpp', 57ac730af2SWilliam A. Kennington III 'eth.cpp', 58ac730af2SWilliam A. Kennington III 'flash_size.cpp', 59ac730af2SWilliam A. Kennington III 'handler.cpp', 60ac730af2SWilliam A. Kennington III 'host_power_off.cpp', 61ac730af2SWilliam A. Kennington III 'ipmi.cpp', 62a92d0e6bSJohn Wedig 'linux_boot_done.cpp', 63ac730af2SWilliam A. Kennington III 'machine_name.cpp', 64ac730af2SWilliam A. Kennington III 'pcie_i2c.cpp', 654f0d1de6SSteve Foreman 'google_accel_oob.cpp', 666c71b0f9SWilly Tu 'pcie_bifurcation.cpp', 6715d4d21cSHao Zhou 'file_system_wrapper.cpp', 68ac730af2SWilliam A. Kennington III 'psu.cpp', 69ac730af2SWilliam A. Kennington III 'util.cpp', 70ac730af2SWilliam A. Kennington III implicit_include_directories: false, 71ac730af2SWilliam A. Kennington III dependencies: sys_pre) 72ac730af2SWilliam A. Kennington III 73ac730af2SWilliam A. Kennington IIIsys_dep = declare_dependency( 74ac730af2SWilliam A. Kennington III link_with: sys_lib, 75ac730af2SWilliam A. Kennington III dependencies: sys_pre) 76ac730af2SWilliam A. Kennington III 77ac730af2SWilliam A. Kennington IIIif not get_option('tests').disabled() 78ac730af2SWilliam A. Kennington III subdir('test') 79ac730af2SWilliam A. Kennington IIIendif 80ac730af2SWilliam A. Kennington III 81ac730af2SWilliam A. Kennington IIIshared_module( 82ac730af2SWilliam A. Kennington III 'googlesys', 83ac730af2SWilliam A. Kennington III 'main.cpp', 84ac730af2SWilliam A. Kennington III implicit_include_directories: false, 85ac730af2SWilliam A. Kennington III dependencies: [ 86ac730af2SWilliam A. Kennington III dependency('libipmid'), 87ac730af2SWilliam A. Kennington III sys_dep, 88ac730af2SWilliam A. Kennington III ], 89ac730af2SWilliam A. Kennington III install: true, 90ac730af2SWilliam A. Kennington III install_dir: get_option('libdir') / 'ipmid-providers') 91ac730af2SWilliam A. Kennington III 92ac730af2SWilliam A. Kennington IIIsystemd_dep = dependency('systemd') 93ac730af2SWilliam A. Kennington IIIif systemd_dep.found() 94ac730af2SWilliam A. Kennington III install_data( 95a92d0e6bSJohn Wedig 'gbmc-bare-metal-active.target', 96ac730af2SWilliam A. Kennington III 'gbmc-host-poweroff.target', 97ac730af2SWilliam A. Kennington III 'gbmc-psu-hardreset.target', 980e22d32aSWilliam A. Kennington III 'gbmc-psu-hardreset-pre.target', 990e22d32aSWilliam A. Kennington III 'gbmc-psu-hardreset-time.service', 1001209ccc6SWilly Tu install_dir: systemd_dep.get_variable('systemdsystemunitdir')) 101ac730af2SWilliam A. Kennington IIIendif 102*40b2a0ccSWilly Tu 103*40b2a0ccSWilly Tuinstall_data( 104*40b2a0ccSWilly Tu 'gbmc-enqueue-powercycle.sh', 105*40b2a0ccSWilly Tu install_dir: get_option('bindir'), 106*40b2a0ccSWilly Tu install_mode: 'rwxr-xr-x' 107*40b2a0ccSWilly Tu) 108