]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
2acbe858bb5a52b44937a4ad87af405c5c77893a
[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/tunnel.c
17 netdev/tunnel.h
18 netdev/tuntap.c
19 netdev/tuntap.h
20 netdev/vcan.c
21 netdev/vcan.h
22 netdev/veth.c
23 netdev/veth.h
24 netdev/vlan.c
25 netdev/vlan.h
26 netdev/vrf.c
27 netdev/vrf.h
28 netdev/vxlan.c
29 netdev/vxlan.h
30 netdev/geneve.c
31 netdev/geneve.h
32 netdev/vxcan.c
33 netdev/vxcan.h
34 netdev/wireguard.c
35 netdev/wireguard.h
36 netdev/netdevsim.c
37 netdev/netdevsim.h
38 netdev/fou-tunnel.c
39 netdev/fou-tunnel.h
40 netdev/l2tp-tunnel.c
41 netdev/l2tp-tunnel.h
42 netdev/macsec.c
43 netdev/macsec.h
44 networkd-address-label.c
45 networkd-address-label.h
46 networkd-address-pool.c
47 networkd-address-pool.h
48 networkd-address.c
49 networkd-address.h
50 networkd-brvlan.c
51 networkd-brvlan.h
52 networkd-conf.c
53 networkd-conf.h
54 networkd-dhcp4.c
55 networkd-dhcp6.c
56 networkd-fdb.c
57 networkd-fdb.h
58 networkd-ipv4ll.c
59 networkd-ipv6-proxy-ndp.c
60 networkd-ipv6-proxy-ndp.h
61 networkd-link-bus.c
62 networkd-link.c
63 networkd-link.h
64 networkd-lldp-tx.c
65 networkd-lldp-tx.h
66 networkd-manager-bus.c
67 networkd-manager.c
68 networkd-manager.h
69 networkd-ndisc.c
70 networkd-ndisc.h
71 networkd-neighbor.c
72 networkd-neighbor.h
73 networkd-radv.c
74 networkd-radv.h
75 networkd-network-bus.c
76 networkd-network.c
77 networkd-network.h
78 networkd-route.c
79 networkd-route.h
80 networkd-routing-policy-rule.c
81 networkd-routing-policy-rule.h
82 networkd-util.c
83 networkd-util.h
84 '''.split())
85
86 systemd_networkd_sources = files('networkd.c')
87
88 systemd_networkd_wait_online_sources = files('''
89 wait-online/link.c
90 wait-online/link.h
91 wait-online/manager.c
92 wait-online/manager.h
93 wait-online/wait-online.c
94 '''.split()) + network_internal_h
95
96 networkctl_sources = files('networkctl.c')
97
98 network_include_dir = include_directories('.')
99
100 if conf.get('ENABLE_NETWORKD') == 1
101 networkd_gperf_c = custom_target(
102 'networkd-gperf.c',
103 input : 'networkd-gperf.gperf',
104 output : 'networkd-gperf.c',
105 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
106
107 networkd_network_gperf_c = custom_target(
108 'networkd-network-gperf.c',
109 input : 'networkd-network-gperf.gperf',
110 output : 'networkd-network-gperf.c',
111 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
112
113 netdev_gperf_c = custom_target(
114 'netdev-gperf.c',
115 input : 'netdev/netdev-gperf.gperf',
116 output : 'netdev-gperf.c',
117 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
118
119 libnetworkd_core = static_library(
120 'networkd-core',
121 sources,
122 network_internal_h,
123 networkd_gperf_c,
124 networkd_network_gperf_c,
125 netdev_gperf_c,
126 include_directories : includes,
127 link_with : [libshared])
128
129 install_data('org.freedesktop.network1.conf',
130 install_dir : dbuspolicydir)
131 install_data('org.freedesktop.network1.service',
132 install_dir : dbussystemservicedir)
133 if install_polkit
134 install_data('systemd-networkd.rules',
135 install_dir : polkitrulesdir)
136 endif
137 if install_polkit_pkla
138 install_data('systemd-networkd.pkla',
139 install_dir : polkitpkladir)
140 endif
141
142 install_data('networkd.conf',
143 install_dir : pkgsysconfdir)
144
145 fuzzers += [
146 [['src/network/fuzz-netdev-parser.c',
147 'src/fuzz/fuzz.h'],
148 [libnetworkd_core,
149 libudev_static,
150 libsystemd_network,
151 libshared],
152 [threads]],
153
154 [['src/network/fuzz-network-parser.c',
155 'src/fuzz/fuzz.h'],
156 [libnetworkd_core,
157 libudev_static,
158 libsystemd_network,
159 libshared],
160 [threads]]
161 ]
162
163 tests += [
164 [['src/network/test-networkd-conf.c'],
165 [libnetworkd_core,
166 libsystemd_network,
167 libudev],
168 []],
169
170 [['src/network/test-network.c'],
171 [libnetworkd_core,
172 libudev_static,
173 libsystemd_network,
174 libshared],
175 [threads]],
176
177 [['src/network/test-routing-policy-rule.c'],
178 [libnetworkd_core,
179 libsystemd_network,
180 libudev],
181 []],
182
183 [['src/network/test-network-tables.c',
184 'src/network/test-network-tables.c',
185 test_tables_h],
186 [libnetworkd_core,
187 libudev_static,
188 libudev_core,
189 libsystemd_network,
190 libshared],
191 [threads],
192 '', '', [],
193 [network_include_dir] + libudev_core_includes],
194 ]
195 endif