]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
network-generator: introduce new tool systemd-network-generator
[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/ipvlan.c
11 netdev/ipvlan.h
12 netdev/macvlan.c
13 netdev/macvlan.h
14 netdev/netdev.c
15 netdev/netdev.h
16 netdev/nlmon.c
17 netdev/nlmon.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 netdev/fou-tunnel.c
41 netdev/fou-tunnel.h
42 netdev/l2tp-tunnel.c
43 netdev/l2tp-tunnel.h
44 netdev/macsec.c
45 netdev/macsec.h
46 netdev/xfrm.c
47 netdev/xfrm.h
48 networkd-address-label.c
49 networkd-address-label.h
50 networkd-address-pool.c
51 networkd-address-pool.h
52 networkd-address.c
53 networkd-address.h
54 networkd-brvlan.c
55 networkd-brvlan.h
56 networkd-can.c
57 networkd-can.h
58 networkd-conf.c
59 networkd-conf.h
60 networkd-dhcp-common.c
61 networkd-dhcp-common.h
62 networkd-dhcp-server.c
63 networkd-dhcp-server.h
64 networkd-dhcp4.c
65 networkd-dhcp4.h
66 networkd-dhcp6.c
67 networkd-dhcp6.h
68 networkd-fdb.c
69 networkd-fdb.h
70 networkd-ipv4ll.c
71 networkd-ipv4ll.h
72 networkd-ipv6-proxy-ndp.c
73 networkd-ipv6-proxy-ndp.h
74 networkd-link-bus.c
75 networkd-link-bus.h
76 networkd-link.c
77 networkd-link.h
78 networkd-lldp-rx.c
79 networkd-lldp-rx.h
80 networkd-lldp-tx.c
81 networkd-lldp-tx.h
82 networkd-manager-bus.c
83 networkd-manager.c
84 networkd-manager.h
85 networkd-ndisc.c
86 networkd-ndisc.h
87 networkd-neighbor.c
88 networkd-neighbor.h
89 networkd-radv.c
90 networkd-radv.h
91 networkd-network-bus.c
92 networkd-network-bus.h
93 networkd-network.c
94 networkd-network.h
95 networkd-route.c
96 networkd-route.h
97 networkd-routing-policy-rule.c
98 networkd-routing-policy-rule.h
99 networkd-speed-meter.c
100 networkd-speed-meter.h
101 networkd-util.c
102 networkd-util.h
103 '''.split())
104
105 systemd_networkd_sources = files('networkd.c')
106
107 systemd_networkd_wait_online_sources = files('''
108 wait-online/link.c
109 wait-online/link.h
110 wait-online/manager.c
111 wait-online/manager.h
112 wait-online/wait-online.c
113 '''.split()) + network_internal_h
114
115 networkctl_sources = files('networkctl.c')
116
117 network_generator_sources = files('''
118 generator/main.c
119 generator/network-generator.c
120 generator/network-generator.h
121 '''.split())
122
123 network_include_dir = include_directories('.')
124
125 if conf.get('ENABLE_NETWORKD') == 1
126 networkd_gperf_c = 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 networkd_network_gperf_c = 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 netdev_gperf_c = custom_target(
139 'netdev-gperf.c',
140 input : 'netdev/netdev-gperf.gperf',
141 output : 'netdev-gperf.c',
142 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
143
144 libnetworkd_core = static_library(
145 'networkd-core',
146 sources,
147 network_internal_h,
148 networkd_gperf_c,
149 networkd_network_gperf_c,
150 netdev_gperf_c,
151 include_directories : includes,
152 link_with : [libshared])
153
154 install_data('org.freedesktop.network1.conf',
155 install_dir : dbuspolicydir)
156 install_data('org.freedesktop.network1.service',
157 install_dir : dbussystemservicedir)
158 if install_polkit
159 install_data('systemd-networkd.rules',
160 install_dir : polkitrulesdir)
161 endif
162 if install_polkit_pkla
163 install_data('systemd-networkd.pkla',
164 install_dir : polkitpkladir)
165 endif
166
167 install_data('networkd.conf',
168 install_dir : pkgsysconfdir)
169
170 fuzzers += [
171 [['src/network/fuzz-netdev-parser.c',
172 'src/fuzz/fuzz.h'],
173 [libnetworkd_core,
174 libudev_static,
175 libsystemd_network,
176 libshared],
177 [threads]],
178
179 [['src/network/fuzz-network-parser.c',
180 'src/fuzz/fuzz.h'],
181 [libnetworkd_core,
182 libudev_static,
183 libsystemd_network,
184 libshared],
185 [threads]]
186 ]
187
188 tests += [
189 [['src/network/test-networkd-conf.c'],
190 [libnetworkd_core,
191 libsystemd_network,
192 libudev],
193 []],
194
195 [['src/network/test-network.c'],
196 [libnetworkd_core,
197 libudev_static,
198 libsystemd_network,
199 libshared],
200 [threads]],
201
202 [['src/network/test-routing-policy-rule.c'],
203 [libnetworkd_core,
204 libsystemd_network,
205 libudev],
206 []],
207
208 [['src/network/test-network-tables.c',
209 test_tables_h],
210 [libnetworkd_core,
211 libudev_static,
212 libudev_core,
213 libsystemd_network,
214 libshared],
215 [threads],
216 '', '', [],
217 [network_include_dir] + libudev_core_includes],
218 ]
219 endif