blob: 9529d425e5d8b37754a062ccabcd4306716d4a82 [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 III1bbe3d12021-05-13 23:45:09 -070027 # 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 III0b111d42022-10-04 18:06:11 -070029 main_deps += [
30 dependency('nlohmann_json', allow_fallback: true, required: false),
31 ]
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070032endif
33
34networkd_deps = [
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070035 phosphor_dbus_interfaces_dep,
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -070036 dependency('phosphor-logging'),
William A. Kennington III37cf66c2021-05-17 14:56:54 -070037 networkd_dbus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070038 sdbusplus_dep,
William A. Kennington IIIe7c5aaa2022-10-06 13:17:15 -070039 stdplus_dep,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070040]
41
42conf_header = configure_file(
43 output: 'config.h',
44 configuration: conf_data)
45
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070046networkd_lib = static_library(
47 'networkd',
William A. Kennington III37cf66c2021-05-17 14:56:54 -070048 conf_header,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070049 'ethernet_interface.cpp',
50 'neighbor.cpp',
51 'ipaddress.cpp',
52 'netlink.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070053 'network_manager.cpp',
William A. Kennington IIIa7344c32022-10-31 14:12:27 -070054 'rtnetlink.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070055 'system_configuration.cpp',
William A. Kennington III2e09d272022-10-14 17:15:00 -070056 'system_queries.cpp',
William A. Kennington IIIbb0eacc2022-10-21 15:22:06 -070057 'types.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070058 'util.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070059 'config_parser.cpp',
60 'dhcp_configuration.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070061 'dns_updater.cpp',
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070062 implicit_include_directories: false,
William A. Kennington III37cf66c2021-05-17 14:56:54 -070063 include_directories: src_includes,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070064 dependencies: networkd_deps)
65
66networkd_dep = declare_dependency(
William A. Kennington III37cf66c2021-05-17 14:56:54 -070067 sources: conf_header,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070068 dependencies: networkd_deps,
William A. Kennington III37cf66c2021-05-17 14:56:54 -070069 include_directories: src_includes,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070070 link_with: networkd_lib)
71
72executable(
73 'phosphor-network-manager',
74 'network_manager_main.cpp',
William A. Kennington IIIde70ccf2022-11-20 17:18:01 -080075 'rtnetlink_server.cpp',
William A. Kennington III0b111d42022-10-04 18:06:11 -070076 main_srcs,
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070077 implicit_include_directories: false,
William A. Kennington IIIde70ccf2022-11-20 17:18:01 -080078 dependencies: main_deps + [
79 networkd_dep,
80 dependency('sdeventplus'),
81 ],
William A. Kennington III1bbe3d12021-05-13 23:45:09 -070082 install: true,
83 install_dir: get_option('bindir'))
Asmitha Karunanithibe2bdec2021-05-13 02:54:29 -050084
85if (get_option('hyp-nw-config') == true)
86 subdir('ibm')
87endif