xref: /openbmc/phosphor-networkd/src/meson.build (revision ab27a819bee0db24233f9d0e7e142b3e3424c5b8)
1src_includes = include_directories('.')
2
3stdplus_dep = dependency('stdplus')
4
5executable(
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'),
15    dependency('phosphor-logging'),
16    stdplus_dep,
17  ],
18  install: true,
19  install_dir: get_option('bindir'))
20
21main_deps = []
22main_srcs = []
23if get_option('sync-mac')
24  main_srcs += [
25    'inventory_mac.cpp',
26  ]
27  main_deps += [
28    dependency('nlohmann_json', include_type: 'system')
29  ]
30endif
31
32networkd_deps = [
33  phosphor_dbus_interfaces_dep,
34  dependency('phosphor-logging'),
35  networkd_dbus_dep,
36  sdbusplus_dep,
37  stdplus_dep,
38]
39
40conf_header = configure_file(
41  output: 'config.h',
42  configuration: conf_data)
43
44networkd_lib = static_library(
45  'networkd',
46  conf_header,
47  'ethernet_interface.cpp',
48  'neighbor.cpp',
49  'ipaddress.cpp',
50  'static_gateway.cpp',
51  'netlink.cpp',
52  'network_manager.cpp',
53  'rtnetlink.cpp',
54  'system_configuration.cpp',
55  'system_queries.cpp',
56  'types.cpp',
57  'util.cpp',
58  'config_parser.cpp',
59  'dhcp_configuration.cpp',
60  'dns_updater.cpp',
61  implicit_include_directories: false,
62  include_directories: src_includes,
63  dependencies: networkd_deps)
64
65networkd_dep = declare_dependency(
66  sources: conf_header,
67  dependencies: networkd_deps,
68  include_directories: src_includes,
69  link_with: networkd_lib)
70
71executable(
72  'phosphor-network-manager',
73  'network_manager_main.cpp',
74  'rtnetlink_server.cpp',
75  main_srcs,
76  implicit_include_directories: false,
77  dependencies: main_deps + [
78    networkd_dep,
79    dependency('sdeventplus'),
80  ],
81  install: true,
82  install_dir: get_option('bindir'))
83
84if (get_option('hyp-nw-config') == true)
85  subdir('ibm')
86endif
87