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, |
Brandon Kim | ea65e68 | 2022-07-13 23:21:33 +0000 | [diff] [blame] | 8 | sys_dep, |
| 9 | function2_dep] |
Willy Tu | bcae900 | 2021-09-12 13:58:04 -0700 | [diff] [blame] | 10 | |
| 11 | updater_lib = static_library( |
| 12 | 'updater_lib', |
| 13 | 'updater.cpp', |
| 14 | 'handler.cpp', |
| 15 | 'helper.cpp', |
| 16 | 'bt.cpp', |
| 17 | 'lpc.cpp', |
| 18 | 'io.cpp', |
| 19 | 'net.cpp', |
| 20 | 'pci.cpp', |
| 21 | 'pciaccess.cpp', |
| 22 | 'p2a.cpp', |
| 23 | 'progress.cpp', |
| 24 | dependencies: updater_pre, |
| 25 | include_directories: root_inc) |
| 26 | |
| 27 | updater_dep = declare_dependency( |
| 28 | dependencies: updater_pre, |
| 29 | include_directories: root_inc, |
| 30 | link_with: updater_lib) |
| 31 | |
| 32 | executable( |
| 33 | 'burn_my_bmc', |
| 34 | 'main.cpp', |
| 35 | implicit_include_directories: false, |
| 36 | dependencies: updater_dep, |
| 37 | include_directories: root_inc, |
| 38 | install: true, |
| 39 | install_dir: get_option('bindir')) |
| 40 | |
| 41 | if not get_option('tests').disabled() |
| 42 | subdir('test') |
| 43 | endif |