blob: e1033e737e8ae88c7591ea13ce1235ff7ecb4073 [file] [log] [blame]
William A. Kennington III1bbe3d12021-05-13 23:45:09 -07001src_includes = include_directories('.')
2
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -07003stdplus_dep = dependency('stdplus')
William A. Kennington IIIa68ab4b2021-10-07 19:16:16 -07004
William A. Kennington III1bbe3d12021-05-13 23:45:09 -07005executable(
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 IIIe7c5aaa2022-10-06 13:17:15 -070015 stdplus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070016 ],
17 install: true,
18 install_dir: get_option('bindir'))
19
William A. Kennington III0b111d42022-10-04 18:06:11 -070020main_deps = []
21main_srcs = []
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070022if get_option('sync-mac')
William A. Kennington III0b111d42022-10-04 18:06:11 -070023 main_srcs += [
24 'inventory_mac.cpp',
25 ]
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070026 # nlohmann_json might not have a pkg-config. It is header only so just make
27 # sure we can access the needed symbols from the header.
William A. Kennington III0b111d42022-10-04 18:06:11 -070028 main_deps += [
29 dependency('nlohmann_json', allow_fallback: true, required: false),
30 ]
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070031endif
32
33networkd_deps = [
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070034 phosphor_dbus_interfaces_dep,
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -070035 dependency('phosphor-logging'),
William A. Kennington III37cf66c2021-05-17 14:56:54 -070036 networkd_dbus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070037 sdbusplus_dep,
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -070038 stdplus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070039]
40
41conf_header = configure_file(
42 output: 'config.h',
43 configuration: conf_data)
44
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070045networkd_lib = static_library(
46 'networkd',
William A. Kennington III37cf66c2021-05-17 14:56:54 -070047 conf_header,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070048 'ethernet_interface.cpp',
49 'neighbor.cpp',
50 'ipaddress.cpp',
51 'netlink.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070052 'network_manager.cpp',
William A. Kennington IIIa7344c32022-10-31 14:12:27 -070053 'rtnetlink.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070054 'system_configuration.cpp',
William A. Kennington III2e09d272022-10-14 17:15:00 -070055 'system_queries.cpp',
William A. Kennington IIIbb0eacc2022-10-21 15:22:06 -070056 'types.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070057 'util.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070058 'config_parser.cpp',
59 'dhcp_configuration.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070060 'dns_updater.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070061 implicit_include_directories: false,
William A. Kennington III37cf66c2021-05-17 14:56:54 -070062 include_directories: src_includes,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070063 dependencies: networkd_deps)
64
65networkd_dep = declare_dependency(
William A. Kennington III37cf66c2021-05-17 14:56:54 -070066 sources: conf_header,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070067 dependencies: networkd_deps,
William A. Kennington III37cf66c2021-05-17 14:56:54 -070068 include_directories: src_includes,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070069 link_with: networkd_lib)
70
71executable(
72 'phosphor-network-manager',
73 'network_manager_main.cpp',
William A. Kennington IIIde70ccf2022-11-20 17:18:01 -080074 'rtnetlink_server.cpp',
William A. Kennington III0b111d42022-10-04 18:06:11 -070075 main_srcs,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070076 implicit_include_directories: false,
William A. Kennington IIIde70ccf2022-11-20 17:18:01 -080077 dependencies: main_deps + [
78 networkd_dep,
79 dependency('sdeventplus'),
80 ],
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070081 install: true,
82 install_dir: get_option('bindir'))
Asmitha Karunanithibe2bdec2021-05-13 02:54:29 -050083
84if (get_option('hyp-nw-config') == true)
85 subdir('ibm')
86endif