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 # 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. 29 main_deps += [ 30 dependency('nlohmann_json', allow_fallback: true, required: false), 31 ] 32endif 33 34networkd_deps = [ 35 phosphor_dbus_interfaces_dep, 36 dependency('phosphor-logging'), 37 networkd_dbus_dep, 38 sdbusplus_dep, 39 stdplus_dep, 40] 41 42conf_header = configure_file( 43 output: 'config.h', 44 configuration: conf_data) 45 46networkd_lib = static_library( 47 'networkd', 48 conf_header, 49 'ethernet_interface.cpp', 50 'neighbor.cpp', 51 'ipaddress.cpp', 52 'netlink.cpp', 53 'network_manager.cpp', 54 'rtnetlink.cpp', 55 'system_configuration.cpp', 56 'system_queries.cpp', 57 'types.cpp', 58 'util.cpp', 59 'config_parser.cpp', 60 'dhcp_configuration.cpp', 61 'dns_updater.cpp', 62 implicit_include_directories: false, 63 include_directories: src_includes, 64 dependencies: networkd_deps) 65 66networkd_dep = declare_dependency( 67 sources: conf_header, 68 dependencies: networkd_deps, 69 include_directories: src_includes, 70 link_with: networkd_lib) 71 72executable( 73 'phosphor-network-manager', 74 'network_manager_main.cpp', 75 'rtnetlink_server.cpp', 76 main_srcs, 77 implicit_include_directories: false, 78 dependencies: main_deps + [ 79 networkd_dep, 80 dependency('sdeventplus'), 81 ], 82 install: true, 83 install_dir: get_option('bindir')) 84 85if (get_option('hyp-nw-config') == true) 86 subdir('ibm') 87endif 88