]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
networkd: introduce netdev "Netdevsim" Driver
[thirdparty/systemd.git] / src / network / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
4
5 sources = files('''
6 netdev/bond.c
7 netdev/bond.h
8 netdev/bridge.c
9 netdev/bridge.h
10 netdev/dummy.c
11 netdev/dummy.h
12 netdev/ipvlan.c
13 netdev/ipvlan.h
14 netdev/macvlan.c
15 netdev/macvlan.h
16 netdev/netdev.c
17 netdev/netdev.h
18 netdev/tunnel.c
19 netdev/tunnel.h
20 netdev/tuntap.c
21 netdev/tuntap.h
22 netdev/vcan.c
23 netdev/vcan.h
24 netdev/veth.c
25 netdev/veth.h
26 netdev/vlan.c
27 netdev/vlan.h
28 netdev/vrf.c
29 netdev/vrf.h
30 netdev/vxlan.c
31 netdev/vxlan.h
32 netdev/geneve.c
33 netdev/geneve.h
34 netdev/vxcan.c
35 netdev/vxcan.h
36 netdev/wireguard.c
37 netdev/wireguard.h
38 netdev/netdevsim.c
39 netdev/netdevsim.h
40 networkd-address-label.c
41 networkd-address-label.h
42 networkd-address-pool.c
43 networkd-address-pool.h
44 networkd-address.c
45 networkd-address.h
46 networkd-brvlan.c
47 networkd-brvlan.h
48 networkd-conf.c
49 networkd-conf.h
50 networkd-dhcp4.c
51 networkd-dhcp6.c
52 networkd-fdb.c
53 networkd-fdb.h
54 networkd-ipv4ll.c
55 networkd-ipv6-proxy-ndp.c
56 networkd-ipv6-proxy-ndp.h
57 networkd-link-bus.c
58 networkd-link.c
59 networkd-link.h
60 networkd-lldp-tx.c
61 networkd-lldp-tx.h
62 networkd-manager-bus.c
63 networkd-manager.c
64 networkd-manager.h
65 networkd-ndisc.c
66 networkd-ndisc.h
67 networkd-radv.c
68 networkd-radv.h
69 networkd-network-bus.c
70 networkd-network.c
71 networkd-network.h
72 networkd-route.c
73 networkd-route.h
74 networkd-routing-policy-rule.c
75 networkd-routing-policy-rule.h
76 networkd-util.c
77 networkd-util.h
78 '''.split())
79
80 systemd_networkd_sources = files('networkd.c')
81
82 systemd_networkd_wait_online_sources = files('''
83 wait-online/link.c
84 wait-online/link.h
85 wait-online/manager.c
86 wait-online/manager.h
87 wait-online/wait-online.c
88 '''.split()) + network_internal_h
89
90 networkctl_sources = files('networkctl.c')
91
92 network_include_dir = include_directories('.')
93
94 if conf.get('ENABLE_NETWORKD') == 1
95 networkd_gperf_c = custom_target(
96 'networkd-gperf.c',
97 input : 'networkd-gperf.gperf',
98 output : 'networkd-gperf.c',
99 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
100
101 networkd_network_gperf_c = custom_target(
102 'networkd-network-gperf.c',
103 input : 'networkd-network-gperf.gperf',
104 output : 'networkd-network-gperf.c',
105 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
106
107 netdev_gperf_c = custom_target(
108 'netdev-gperf.c',
109 input : 'netdev/netdev-gperf.gperf',
110 output : 'netdev-gperf.c',
111 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
112
113 libnetworkd_core = static_library(
114 'networkd-core',
115 sources,
116 network_internal_h,
117 networkd_gperf_c,
118 networkd_network_gperf_c,
119 netdev_gperf_c,
120 include_directories : includes,
121 link_with : [libshared])
122
123 install_data('org.freedesktop.network1.conf',
124 install_dir : dbuspolicydir)
125 install_data('org.freedesktop.network1.service',
126 install_dir : dbussystemservicedir)
127 if install_polkit
128 install_data('systemd-networkd.rules',
129 install_dir : polkitrulesdir)
130 endif
131 if install_polkit_pkla
132 install_data('systemd-networkd.pkla',
133 install_dir : polkitpkladir)
134 endif
135
136 tests += [
137 [['src/network/test-networkd-conf.c'],
138 [libnetworkd_core,
139 libsystemd_network,
140 libudev],
141 []],
142
143 [['src/network/test-network.c'],
144 [libnetworkd_core,
145 libudev_static,
146 libsystemd_network,
147 libshared],
148 [threads]],
149
150 [['src/network/test-routing-policy-rule.c'],
151 [libnetworkd_core,
152 libsystemd_network,
153 libudev],
154 []],
155
156 [['src/network/test-network-tables.c',
157 'src/network/test-network-tables.c',
158 test_tables_h],
159 [libnetworkd_core,
160 libudev_static,
161 libudev_core,
162 libsystemd_network,
163 libshared],
164 [threads],
165 '', '', [],
166 [network_include_dir] + libudev_core_includes],
167 ]
168 endif