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