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'), |
William A. Kennington III | e7c5aaa | 2022-10-06 13:17:15 -0700 | [diff] [blame] | 15 | stdplus_dep, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 16 | ], |
| 17 | install: true, |
| 18 | install_dir: get_option('bindir')) |
| 19 | |
| 20 | json_dep = declare_dependency() |
| 21 | if get_option('sync-mac') |
| 22 | # nlohmann_json might not have a pkg-config. It is header only so just make |
| 23 | # sure we can access the needed symbols from the header. |
| 24 | has_json = meson.get_compiler('cpp').has_header_symbol( |
| 25 | 'nlohmann/json.hpp', |
| 26 | 'nlohmann::json::string_t', |
| 27 | required: false) |
| 28 | if not has_json |
Patrick Williams | 3397be3 | 2022-03-21 09:52:57 -0500 | [diff] [blame] | 29 | json_dep = dependency('nlohmann_json') |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 30 | endif |
| 31 | endif |
| 32 | |
| 33 | networkd_deps = [ |
| 34 | json_dep, |
| 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, |
Patrick Williams | 3397be3 | 2022-03-21 09:52:57 -0500 | [diff] [blame] | 39 | dependency('sdeventplus'), |
William A. Kennington III | e7c5aaa | 2022-10-06 13:17:15 -0700 | [diff] [blame] | 40 | stdplus_dep, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 41 | ] |
| 42 | |
| 43 | conf_header = configure_file( |
| 44 | output: 'config.h', |
| 45 | configuration: conf_data) |
| 46 | |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 47 | networkd_lib = static_library( |
| 48 | 'networkd', |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 49 | conf_header, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 50 | 'ethernet_interface.cpp', |
| 51 | 'neighbor.cpp', |
| 52 | 'ipaddress.cpp', |
| 53 | 'netlink.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 54 | 'network_manager.cpp', |
William A. Kennington III | a7344c3 | 2022-10-31 14:12:27 -0700 | [diff] [blame] | 55 | 'rtnetlink.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 56 | 'system_configuration.cpp', |
William A. Kennington III | 2e09d27 | 2022-10-14 17:15:00 -0700 | [diff] [blame] | 57 | 'system_queries.cpp', |
William A. Kennington III | bb0eacc | 2022-10-21 15:22:06 -0700 | [diff] [blame] | 58 | 'types.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 59 | 'util.cpp', |
| 60 | 'routing_table.cpp', |
| 61 | 'config_parser.cpp', |
| 62 | 'dhcp_configuration.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 63 | 'rtnetlink_server.cpp', |
| 64 | 'dns_updater.cpp', |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 65 | implicit_include_directories: false, |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 66 | include_directories: src_includes, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 67 | dependencies: networkd_deps) |
| 68 | |
| 69 | networkd_dep = declare_dependency( |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 70 | sources: conf_header, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 71 | dependencies: networkd_deps, |
William A. Kennington III | 37cf66c | 2021-05-17 14:56:54 -0700 | [diff] [blame] | 72 | include_directories: src_includes, |
William A. Kennington III | 1bbe3d1 | 2021-05-13 23:45:09 -0700 | [diff] [blame] | 73 | link_with: networkd_lib) |
| 74 | |
| 75 | executable( |
| 76 | 'phosphor-network-manager', |
| 77 | 'network_manager_main.cpp', |
| 78 | implicit_include_directories: false, |
| 79 | dependencies: networkd_dep, |
| 80 | install: true, |
| 81 | install_dir: get_option('bindir')) |
Asmitha Karunanithi | be2bdec | 2021-05-13 02:54:29 -0500 | [diff] [blame] | 82 | |
| 83 | if (get_option('hyp-nw-config') == true) |
| 84 | subdir('ibm') |
| 85 | endif |