]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
Merge pull request #30550 from yuwata/network-nexthop-cleanups-3
[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/batadv.c',
6 'netdev/bond.c',
7 'netdev/bridge.c',
8 'netdev/dummy.c',
9 'netdev/fou-tunnel.c',
10 'netdev/geneve.c',
11 'netdev/ifb.c',
12 'netdev/ipoib.c',
13 'netdev/ipvlan.c',
14 'netdev/l2tp-tunnel.c',
15 'netdev/macsec.c',
16 'netdev/macvlan.c',
17 'netdev/netdev-util.c',
18 'netdev/netdev.c',
19 'netdev/netdevsim.c',
20 'netdev/nlmon.c',
21 'netdev/tunnel.c',
22 'netdev/tuntap.c',
23 'netdev/vcan.c',
24 'netdev/veth.c',
25 'netdev/vlan.c',
26 'netdev/vrf.c',
27 'netdev/vxcan.c',
28 'netdev/vxlan.c',
29 'netdev/wireguard.c',
30 'netdev/wlan.c',
31 'netdev/xfrm.c',
32 'networkd-address-generation.c',
33 'networkd-address-label.c',
34 'networkd-address-pool.c',
35 'networkd-address.c',
36 'networkd-bridge-fdb.c',
37 'networkd-bridge-mdb.c',
38 'networkd-bridge-vlan.c',
39 'networkd-can.c',
40 'networkd-conf.c',
41 'networkd-dhcp-common.c',
42 'networkd-dhcp-prefix-delegation.c',
43 'networkd-dhcp-server-bus.c',
44 'networkd-dhcp-server-static-lease.c',
45 'networkd-dhcp-server.c',
46 'networkd-dhcp4-bus.c',
47 'networkd-dhcp4.c',
48 'networkd-dhcp6-bus.c',
49 'networkd-dhcp6.c',
50 'networkd-ipv4acd.c',
51 'networkd-ipv4ll.c',
52 'networkd-ipv6-proxy-ndp.c',
53 'networkd-ipv6ll.c',
54 'networkd-json.c',
55 'networkd-link-bus.c',
56 'networkd-link.c',
57 'networkd-lldp-rx.c',
58 'networkd-lldp-tx.c',
59 'networkd-manager.c',
60 'networkd-manager-bus.c',
61 'networkd-manager-varlink.c',
62 'networkd-ndisc.c',
63 'networkd-neighbor.c',
64 'networkd-netlabel.c',
65 'networkd-network-bus.c',
66 'networkd-network.c',
67 'networkd-nexthop.c',
68 'networkd-queue.c',
69 'networkd-radv.c',
70 'networkd-route-util.c',
71 'networkd-route.c',
72 'networkd-routing-policy-rule.c',
73 'networkd-setlink.c',
74 'networkd-speed-meter.c',
75 'networkd-sriov.c',
76 'networkd-state-file.c',
77 'networkd-sysctl.c',
78 'networkd-util.c',
79 'networkd-wifi.c',
80 'networkd-wiphy.c',
81 'tc/cake.c',
82 'tc/codel.c',
83 'tc/drr.c',
84 'tc/ets.c',
85 'tc/fifo.c',
86 'tc/fq-codel.c',
87 'tc/fq-pie.c',
88 'tc/fq.c',
89 'tc/gred.c',
90 'tc/hhf.c',
91 'tc/htb.c',
92 'tc/netem.c',
93 'tc/pie.c',
94 'tc/qdisc.c',
95 'tc/qfq.c',
96 'tc/sfb.c',
97 'tc/sfq.c',
98 'tc/tbf.c',
99 'tc/tc-util.c',
100 'tc/tc.c',
101 'tc/tclass.c',
102 'tc/teql.c',
103 )
104
105 systemd_networkd_sources = files('networkd.c')
106
107 systemd_networkd_wait_online_sources = files(
108 'wait-online/link.c',
109 'wait-online/manager.c',
110 'wait-online/wait-online.c',
111 )
112
113 networkctl_sources = files(
114 'networkctl.c',
115 'networkctl-config-file.c'
116 )
117
118 network_generator_sources = files(
119 'generator/main.c',
120 'generator/network-generator.c',
121 )
122
123 networkd_network_gperf_gperf = files('networkd-network-gperf.gperf')
124 networkd_netdev_gperf_gperf = files('netdev/netdev-gperf.gperf')
125
126 sources += custom_target(
127 'networkd-gperf.c',
128 input : 'networkd-gperf.gperf',
129 output : 'networkd-gperf.c',
130 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
131
132 sources += custom_target(
133 'networkd-network-gperf.c',
134 input : networkd_network_gperf_gperf,
135 output : 'networkd-network-gperf.c',
136 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
137
138 sources += custom_target(
139 'netdev-gperf.c',
140 input : networkd_netdev_gperf_gperf,
141 output : 'netdev-gperf.c',
142 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
143
144 if get_option('link-networkd-shared')
145 networkd_link_with = [libshared]
146 else
147 networkd_link_with = [libsystemd_static,
148 libshared_static,
149 libbasic_gcrypt]
150 endif
151
152 network_includes = [libsystemd_network_includes, include_directories(['.', 'netdev', 'tc'])]
153
154 libnetworkd_core = static_library(
155 'networkd-core',
156 sources,
157 include_directories : network_includes,
158 dependencies : userspace,
159 link_with : networkd_link_with,
160 build_by_default : false)
161
162 network_test_template = test_template + {
163 'link_with' : [
164 libnetworkd_core,
165 libsystemd_network,
166 ],
167 'include_directories' : network_includes,
168 }
169
170 network_fuzz_template = fuzz_template + {
171 'link_with' : [
172 libnetworkd_core,
173 libsystemd_network,
174 ],
175 'dependencies' : threads,
176 'include_directories' : network_includes,
177 }
178
179 executables += [
180 libexec_template + {
181 'name' : 'systemd-networkd',
182 'dbus' : true,
183 'conditions' : ['ENABLE_NETWORKD'],
184 'sources' : systemd_networkd_sources,
185 'include_directories' : network_includes,
186 'link_with' : [
187 libnetworkd_core,
188 libsystemd_network,
189 networkd_link_with,
190 ],
191 'dependencies' : threads,
192 },
193 libexec_template + {
194 'name' : 'systemd-networkd-wait-online',
195 'public' : true,
196 'conditions' : ['ENABLE_NETWORKD'],
197 'sources' : systemd_networkd_wait_online_sources,
198 'link_with' : networkd_link_with,
199 },
200 executable_template + {
201 'name' : 'networkctl',
202 'public' : true,
203 'conditions' : ['ENABLE_NETWORKD'],
204 'sources' : networkctl_sources,
205 'include_directories' : libsystemd_network_includes,
206 'link_with' : [
207 libsystemd_network,
208 networkd_link_with,
209 ],
210 },
211 libexec_template + {
212 'name' : 'systemd-network-generator',
213 'sources' : network_generator_sources,
214 'link_with' : networkd_link_with,
215 },
216 test_template + {
217 'sources' : files(
218 'generator/test-network-generator.c',
219 'generator/network-generator.c',
220 ),
221 'suite' : 'network',
222 },
223 network_test_template + {
224 'sources' : files('test-network-tables.c'),
225 'dependencies' : threads,
226 },
227 network_test_template + {
228 'sources' : files('test-network.c'),
229 'dependencies' : threads,
230 },
231 network_test_template + {
232 'sources' : files('test-networkd-address.c'),
233 'dependencies' : libatomic,
234 },
235 network_test_template + {
236 'sources' : files('test-networkd-conf.c'),
237 'dependencies' : libatomic,
238 },
239 network_test_template + {
240 'sources' : files('test-networkd-util.c'),
241 },
242 network_fuzz_template + {
243 'sources' : files('fuzz-netdev-parser.c'),
244 },
245 network_fuzz_template + {
246 'sources' : files('fuzz-network-parser.c'),
247 },
248 ]
249
250 if conf.get('ENABLE_NETWORKD') == 1
251 install_data('org.freedesktop.network1.conf',
252 install_dir : dbuspolicydir)
253 install_data('org.freedesktop.network1.service',
254 install_dir : dbussystemservicedir)
255 install_data('org.freedesktop.network1.policy',
256 install_dir : polkitpolicydir)
257 if install_polkit
258 install_data('systemd-networkd.rules',
259 install_dir : polkitrulesdir)
260 endif
261 if install_polkit_pkla
262 install_data('systemd-networkd.pkla',
263 install_dir : polkitpkladir)
264 endif
265
266 if install_sysconfdir_samples
267 install_data('networkd.conf',
268 install_dir : pkgconfigfiledir)
269 endif
270 endif