]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
license: LGPL-2.1+ -> LGPL-2.1-or-later
[thirdparty/systemd.git] / src / network / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 sources = files('''
4 netdev/bareudp.c
5 netdev/bareudp.h
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/ifb.c
13 netdev/ifb.h
14 netdev/ipvlan.c
15 netdev/ipvlan.h
16 netdev/macvlan.c
17 netdev/macvlan.h
18 netdev/netdev.c
19 netdev/netdev.h
20 netdev/nlmon.c
21 netdev/nlmon.h
22 netdev/tunnel.c
23 netdev/tunnel.h
24 netdev/tuntap.c
25 netdev/tuntap.h
26 netdev/vcan.c
27 netdev/vcan.h
28 netdev/veth.c
29 netdev/veth.h
30 netdev/vlan.c
31 netdev/vlan.h
32 netdev/vrf.c
33 netdev/vrf.h
34 netdev/vxlan.c
35 netdev/vxlan.h
36 netdev/geneve.c
37 netdev/geneve.h
38 netdev/vxcan.c
39 netdev/vxcan.h
40 netdev/wireguard.c
41 netdev/wireguard.h
42 netdev/netdevsim.c
43 netdev/netdevsim.h
44 netdev/fou-tunnel.c
45 netdev/fou-tunnel.h
46 netdev/l2tp-tunnel.c
47 netdev/l2tp-tunnel.h
48 netdev/macsec.c
49 netdev/macsec.h
50 netdev/xfrm.c
51 netdev/xfrm.h
52 networkd-address-label.c
53 networkd-address-label.h
54 networkd-address-pool.c
55 networkd-address-pool.h
56 networkd-address.c
57 networkd-address.h
58 networkd-brvlan.c
59 networkd-brvlan.h
60 networkd-can.c
61 networkd-can.h
62 networkd-conf.c
63 networkd-conf.h
64 networkd-dhcp-common.c
65 networkd-dhcp-common.h
66 networkd-dhcp-server-bus.c
67 networkd-dhcp-server-bus.h
68 networkd-dhcp-server.c
69 networkd-dhcp-server.h
70 networkd-dhcp4.c
71 networkd-dhcp4.h
72 networkd-dhcp6.c
73 networkd-dhcp6.h
74 networkd-fdb.c
75 networkd-fdb.h
76 networkd-ipv4ll.c
77 networkd-ipv4ll.h
78 networkd-ipv6-proxy-ndp.c
79 networkd-ipv6-proxy-ndp.h
80 networkd-link-bus.c
81 networkd-link-bus.h
82 networkd-link.c
83 networkd-link.h
84 networkd-lldp-rx.c
85 networkd-lldp-rx.h
86 networkd-lldp-tx.c
87 networkd-lldp-tx.h
88 networkd-manager-bus.c
89 networkd-manager-bus.h
90 networkd-manager.c
91 networkd-manager.h
92 networkd-mdb.c
93 networkd-mdb.h
94 networkd-ndisc.c
95 networkd-ndisc.h
96 networkd-neighbor.c
97 networkd-neighbor.h
98 networkd-radv.c
99 networkd-radv.h
100 networkd-network-bus.c
101 networkd-network-bus.h
102 networkd-network.c
103 networkd-network.h
104 networkd-nexthop.c
105 networkd-nexthop.h
106 networkd-route.c
107 networkd-route.h
108 networkd-routing-policy-rule.c
109 networkd-routing-policy-rule.h
110 networkd-speed-meter.c
111 networkd-speed-meter.h
112 networkd-sriov.c
113 networkd-sriov.h
114 networkd-sysctl.c
115 networkd-sysctl.h
116 networkd-util.c
117 networkd-util.h
118 networkd-wifi.c
119 networkd-wifi.h
120 tc/cake.c
121 tc/cake.h
122 tc/codel.c
123 tc/codel.h
124 tc/drr.c
125 tc/drr.h
126 tc/ets.c
127 tc/ets.h
128 tc/fifo.c
129 tc/fifo.h
130 tc/fq.c
131 tc/fq.h
132 tc/fq-codel.c
133 tc/fq-codel.h
134 tc/fq-pie.c
135 tc/fq-pie.h
136 tc/gred.c
137 tc/gred.h
138 tc/hhf.c
139 tc/hhf.h
140 tc/htb.c
141 tc/htb.h
142 tc/netem.c
143 tc/netem.h
144 tc/pie.c
145 tc/pie.h
146 tc/qdisc.c
147 tc/qdisc.h
148 tc/qfq.c
149 tc/qfq.h
150 tc/sfb.c
151 tc/sfb.h
152 tc/sfq.c
153 tc/sfq.h
154 tc/tbf.c
155 tc/tbf.h
156 tc/tc-util.c
157 tc/tc-util.h
158 tc/tc.c
159 tc/tc.h
160 tc/tclass.c
161 tc/tclass.h
162 tc/teql.c
163 tc/teql.h
164 '''.split())
165
166 systemd_networkd_sources = files('networkd.c')
167
168 systemd_networkd_wait_online_sources = files('''
169 wait-online/link.c
170 wait-online/link.h
171 wait-online/manager.c
172 wait-online/manager.h
173 wait-online/wait-online.c
174 '''.split()) + network_internal_h
175
176 networkctl_sources = files('networkctl.c')
177
178 network_generator_sources = files('''
179 generator/main.c
180 generator/network-generator.c
181 generator/network-generator.h
182 '''.split())
183
184 network_include_dir = [includes, include_directories(['.', 'netdev', 'tc'])]
185
186 if conf.get('ENABLE_NETWORKD') == 1
187 if get_option('link-networkd-shared')
188 networkd_link_with = [libshared]
189 else
190 networkd_link_with = [libsystemd_static,
191 libshared_static,
192 libjournal_client,
193 libbasic_gcrypt]
194 endif
195
196 networkd_gperf_c = custom_target(
197 'networkd-gperf.c',
198 input : 'networkd-gperf.gperf',
199 output : 'networkd-gperf.c',
200 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
201
202 networkd_network_gperf_c = custom_target(
203 'networkd-network-gperf.c',
204 input : 'networkd-network-gperf.gperf',
205 output : 'networkd-network-gperf.c',
206 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
207
208 netdev_gperf_c = custom_target(
209 'netdev-gperf.c',
210 input : 'netdev/netdev-gperf.gperf',
211 output : 'netdev-gperf.c',
212 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
213
214 libnetworkd_core = static_library(
215 'networkd-core',
216 sources,
217 network_internal_h,
218 networkd_gperf_c,
219 networkd_network_gperf_c,
220 netdev_gperf_c,
221 include_directories : network_include_dir,
222 link_with : [networkd_link_with])
223
224 install_data('org.freedesktop.network1.conf',
225 install_dir : dbuspolicydir)
226 install_data('org.freedesktop.network1.service',
227 install_dir : dbussystemservicedir)
228 install_data('org.freedesktop.network1.policy',
229 install_dir : polkitpolicydir)
230 if install_polkit
231 install_data('systemd-networkd.rules',
232 install_dir : polkitrulesdir)
233 endif
234 if install_polkit_pkla
235 install_data('systemd-networkd.pkla',
236 install_dir : polkitpkladir)
237 endif
238
239 install_data('networkd.conf',
240 install_dir : pkgsysconfdir)
241
242 fuzzers += [
243 [['src/network/fuzz-netdev-parser.c',
244 'src/fuzz/fuzz.h'],
245 [libnetworkd_core,
246 libudev_static,
247 libsystemd_network,
248 networkd_link_with],
249 [threads],
250 [],
251 network_include_dir],
252
253 [['src/network/fuzz-network-parser.c',
254 'src/fuzz/fuzz.h'],
255 [libnetworkd_core,
256 libudev_static,
257 libsystemd_network,
258 networkd_link_with],
259 [threads],
260 [],
261 network_include_dir],
262 ]
263
264 tests += [
265 [['src/network/test-networkd-conf.c'],
266 [libnetworkd_core,
267 libsystemd_network,
268 libudev],
269 [], '', '', [], network_include_dir],
270
271 [['src/network/test-network.c'],
272 [libnetworkd_core,
273 libudev_static,
274 libsystemd_network,
275 networkd_link_with],
276 [threads],
277 '', '', [], network_include_dir],
278
279 [['src/network/test-routing-policy-rule.c'],
280 [libnetworkd_core,
281 libsystemd_network,
282 libudev],
283 [], '', '', [], network_include_dir],
284
285 [['src/network/test-network-tables.c',
286 test_tables_h],
287 [libnetworkd_core,
288 libudev_static,
289 libsystemd_network,
290 networkd_link_with],
291 [threads],
292 '', '', [],
293 [network_include_dir]],
294
295 [['src/network/generator/test-network-generator.c',
296 'src/network/generator/network-generator.c',
297 'src/network/generator/network-generator.h'],
298 [networkd_link_with],
299 [], '', '', [], network_include_dir],
300 ]
301 endif