blob: ee9778d831f43124c620d473ee06fc63e6f4ca40 [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'),
Jagpal Singh Gilld423beb2023-04-18 11:28:03 -070015 dependency('phosphor-logging'),
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -070016 stdplus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070017 ],
18 install: true,
19 install_dir: get_option('bindir'))
20
William A. Kennington III0b111d42022-10-04 18:06:11 -070021main_deps = []
22main_srcs = []
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070023if get_option('sync-mac')
William A. Kennington III0b111d42022-10-04 18:06:11 -070024 main_srcs += [
25 'inventory_mac.cpp',
26 ]
William A. Kennington III0b111d42022-10-04 18:06:11 -070027 main_deps += [
Patrick Williams1f0052f2023-12-07 17:08:49 -060028 dependency('nlohmann_json', include_type: 'system')
William A. Kennington III0b111d42022-10-04 18:06:11 -070029 ]
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070030endif
31
32networkd_deps = [
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070033 phosphor_dbus_interfaces_dep,
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -070034 dependency('phosphor-logging'),
William A. Kennington III37cf66c2021-05-17 14:56:54 -070035 networkd_dbus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070036 sdbusplus_dep,
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -070037 stdplus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070038]
39
40conf_header = configure_file(
41 output: 'config.h',
42 configuration: conf_data)
43
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070044networkd_lib = static_library(
45 'networkd',
William A. Kennington III37cf66c2021-05-17 14:56:54 -070046 conf_header,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070047 'ethernet_interface.cpp',
48 'neighbor.cpp',
49 'ipaddress.cpp',
50 'netlink.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070051 'network_manager.cpp',
William A. Kennington IIIa7344c32022-10-31 14:12:27 -070052 'rtnetlink.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070053 'system_configuration.cpp',
William A. Kennington III2e09d272022-10-14 17:15:00 -070054 'system_queries.cpp',
William A. Kennington IIIbb0eacc2022-10-21 15:22:06 -070055 'types.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070056 'util.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070057 'config_parser.cpp',
58 'dhcp_configuration.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070059 'dns_updater.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070060 implicit_include_directories: false,
William A. Kennington III37cf66c2021-05-17 14:56:54 -070061 include_directories: src_includes,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070062 dependencies: networkd_deps)
63
64networkd_dep = declare_dependency(
William A. Kennington III37cf66c2021-05-17 14:56:54 -070065 sources: conf_header,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070066 dependencies: networkd_deps,
William A. Kennington III37cf66c2021-05-17 14:56:54 -070067 include_directories: src_includes,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070068 link_with: networkd_lib)
69
70executable(
71 'phosphor-network-manager',
72 'network_manager_main.cpp',
William A. Kennington IIIde70ccf2022-11-20 17:18:01 -080073 'rtnetlink_server.cpp',
William A. Kennington III0b111d42022-10-04 18:06:11 -070074 main_srcs,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070075 implicit_include_directories: false,
William A. Kennington IIIde70ccf2022-11-20 17:18:01 -080076 dependencies: main_deps + [
77 networkd_dep,
78 dependency('sdeventplus'),
79 ],
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070080 install: true,
81 install_dir: get_option('bindir'))
Asmitha Karunanithibe2bdec2021-05-13 02:54:29 -050082
83if (get_option('hyp-nw-config') == true)
84 subdir('ibm')
85endif