Willy Tu | bcae900 | 2021-09-12 13:58:04 -0700 | [diff] [blame^] | 1 | tools_inc = include_directories('.') |
| 2 | |
| 3 | updater_pre = [ |
| 4 | dependency('ipmiblob'), |
| 5 | dependency('pciaccess', fallback: ['pciaccess', 'dep_pciaccess']), |
| 6 | dependency('stdplus', fallback: ['stdplus', 'stdplus_dep']), |
| 7 | blobs_dep, |
| 8 | sys_dep] |
| 9 | |
| 10 | updater_lib = static_library( |
| 11 | 'updater_lib', |
| 12 | 'updater.cpp', |
| 13 | 'handler.cpp', |
| 14 | 'helper.cpp', |
| 15 | 'bt.cpp', |
| 16 | 'lpc.cpp', |
| 17 | 'io.cpp', |
| 18 | 'net.cpp', |
| 19 | 'pci.cpp', |
| 20 | 'pciaccess.cpp', |
| 21 | 'p2a.cpp', |
| 22 | 'progress.cpp', |
| 23 | dependencies: updater_pre, |
| 24 | include_directories: root_inc) |
| 25 | |
| 26 | updater_dep = declare_dependency( |
| 27 | dependencies: updater_pre, |
| 28 | include_directories: root_inc, |
| 29 | link_with: updater_lib) |
| 30 | |
| 31 | executable( |
| 32 | 'burn_my_bmc', |
| 33 | 'main.cpp', |
| 34 | implicit_include_directories: false, |
| 35 | dependencies: updater_dep, |
| 36 | include_directories: root_inc, |
| 37 | install: true, |
| 38 | install_dir: get_option('bindir')) |
| 39 | |
| 40 | if not get_option('tests').disabled() |
| 41 | subdir('test') |
| 42 | endif |