William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 1 | src_includes = include_directories('.') |
| 2 | |
William A. Kennington III | e7c5aaa | 2022-10-06 13:17:15 -0700 | [diff] [blame] | 3 | stdplus_dep = dependency('stdplus') |
William A. Kennington III | a68ab4b | 2021-10-07 19:16:16 -0700 | [diff] [blame] | 4 | |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 5 | executable( |
| 6 | 'ncsi-netlink', |
| 7 | 'argument.cpp', |
| 8 | 'ncsi_netlink_main.cpp', |
| 9 | 'ncsi_util.cpp', |
| 10 | implicit_include_directories: false, |
| 11 | include_directories: src_includes, |
| 12 | dependencies: [ |
| 13 | dependency('libnl-3.0'), |
| 14 | dependency('libnl-genl-3.0'), |
Jagpal Singh Gill | d423beb | 2023-04-18 11:28:03 -0700 | [diff] [blame] | 15 | dependency('phosphor-logging'), |
William A. Kennington III | e7c5aaa | 2022-10-06 13:17:15 -0700 | [diff] [blame] | 16 | stdplus_dep, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 17 | ], |
| 18 | install: true, |
| 19 | install_dir: get_option('bindir')) |
| 20 | |
William A. Kennington III | 0b111d4 | 2022-10-04 18:06:11 -0700 | [diff] [blame] | 21 | main_deps = [] |
| 22 | main_srcs = [] |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 23 | if get_option('sync-mac') |
William A. Kennington III | 0b111d4 | 2022-10-04 18:06:11 -0700 | [diff] [blame] | 24 | main_srcs += [ |
| 25 | 'inventory_mac.cpp', |
| 26 | ] |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 27 | # nlohmann_json might not have a pkg-config. It is header only so just make |
| 28 | # sure we can access the needed symbols from the header. |
William A. Kennington III | 0b111d4 | 2022-10-04 18:06:11 -0700 | [diff] [blame] | 29 | main_deps += [ |
| 30 | dependency('nlohmann_json', allow_fallback: true, required: false), |
| 31 | ] |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 32 | endif |
| 33 | |
| 34 | networkd_deps = [ |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 35 | phosphor_dbus_interfaces_dep, |
William A. Kennington III | e7c5aaa | 2022-10-06 13:17:15 -0700 | [diff] [blame] | 36 | dependency('phosphor-logging'), |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 37 | networkd_dbus_dep, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 38 | sdbusplus_dep, |
William A. Kennington III | e7c5aaa | 2022-10-06 13:17:15 -0700 | [diff] [blame] | 39 | stdplus_dep, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 40 | ] |
| 41 | |
| 42 | conf_header = configure_file( |
| 43 | output: 'config.h', |
| 44 | configuration: conf_data) |
| 45 | |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 46 | networkd_lib = static_library( |
| 47 | 'networkd', |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 48 | conf_header, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 49 | 'ethernet_interface.cpp', |
| 50 | 'neighbor.cpp', |
| 51 | 'ipaddress.cpp', |
| 52 | 'netlink.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 53 | 'network_manager.cpp', |
William A. Kennington III | a7344c3 | 2022-10-31 14:12:27 -0700 | [diff] [blame] | 54 | 'rtnetlink.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 55 | 'system_configuration.cpp', |
William A. Kennington III | 2e09d27 | 2022-10-14 17:15:00 -0700 | [diff] [blame] | 56 | 'system_queries.cpp', |
William A. Kennington III | bb0eacc | 2022-10-21 15:22:06 -0700 | [diff] [blame] | 57 | 'types.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 58 | 'util.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 59 | 'config_parser.cpp', |
| 60 | 'dhcp_configuration.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 61 | 'dns_updater.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 62 | implicit_include_directories: false, |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 63 | include_directories: src_includes, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 64 | dependencies: networkd_deps) |
| 65 | |
| 66 | networkd_dep = declare_dependency( |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 67 | sources: conf_header, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 68 | dependencies: networkd_deps, |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 69 | include_directories: src_includes, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 70 | link_with: networkd_lib) |
| 71 | |
| 72 | executable( |
| 73 | 'phosphor-network-manager', |
| 74 | 'network_manager_main.cpp', |
William A. Kennington III | de70ccf | 2022-11-20 17:18:01 -0800 | [diff] [blame] | 75 | 'rtnetlink_server.cpp', |
William A. Kennington III | 0b111d4 | 2022-10-04 18:06:11 -0700 | [diff] [blame] | 76 | main_srcs, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 77 | implicit_include_directories: false, |
William A. Kennington III | de70ccf | 2022-11-20 17:18:01 -0800 | [diff] [blame] | 78 | dependencies: main_deps + [ |
| 79 | networkd_dep, |
| 80 | dependency('sdeventplus'), |
| 81 | ], |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 82 | install: true, |
| 83 | install_dir: get_option('bindir')) |
Asmitha Karunanithi | be2bdec | 2021-05-13 02:54:29 -0500 | [diff] [blame] | 84 | |
| 85 | if (get_option('hyp-nw-config') == true) |
| 86 | subdir('ibm') |
| 87 | endif |