]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
a7192e2a2e6a65880c69a60d4667f1f43c996382
[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-rx.c
65 networkd-lldp-rx.h
66 networkd-lldp-tx.c
67 networkd-lldp-tx.h
68 networkd-manager-bus.c
69 networkd-manager.c
70 networkd-manager.h
71 networkd-ndisc.c
72 networkd-ndisc.h
73 networkd-neighbor.c
74 networkd-neighbor.h
75 networkd-radv.c
76 networkd-radv.h
77 networkd-network-bus.c
78 networkd-network.c
79 networkd-network.h
80 networkd-route.c
81 networkd-route.h
82 networkd-routing-policy-rule.c
83 networkd-routing-policy-rule.h
84 networkd-util.c
85 networkd-util.h
86 '''.split())
87
88 systemd_networkd_sources = files('networkd.c')
89
90 systemd_networkd_wait_online_sources = files('''
91 wait-online/link.c
92 wait-online/link.h
93 wait-online/manager.c
94 wait-online/manager.h
95 wait-online/wait-online.c
96 '''.split()) + network_internal_h
97
98 networkctl_sources = files('networkctl.c')
99
100 network_include_dir = include_directories('.')
101
102 if conf.get('ENABLE_NETWORKD') == 1
103 networkd_gperf_c = custom_target(
104 'networkd-gperf.c',
105 input : 'networkd-gperf.gperf',
106 output : 'networkd-gperf.c',
107 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
108
109 networkd_network_gperf_c = custom_target(
110 'networkd-network-gperf.c',
111 input : 'networkd-network-gperf.gperf',
112 output : 'networkd-network-gperf.c',
113 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
114
115 netdev_gperf_c = custom_target(
116 'netdev-gperf.c',
117 input : 'netdev/netdev-gperf.gperf',
118 output : 'netdev-gperf.c',
119 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
120
121 libnetworkd_core = static_library(
122 'networkd-core',
123 sources,
124 network_internal_h,
125 networkd_gperf_c,
126 networkd_network_gperf_c,
127 netdev_gperf_c,
128 include_directories : includes,
129 link_with : [libshared])
130
131 install_data('org.freedesktop.network1.conf',
132 install_dir : dbuspolicydir)
133 install_data('org.freedesktop.network1.service',
134 install_dir : dbussystemservicedir)
135 if install_polkit
136 install_data('systemd-networkd.rules',
137 install_dir : polkitrulesdir)
138 endif
139 if install_polkit_pkla
140 install_data('systemd-networkd.pkla',
141 install_dir : polkitpkladir)
142 endif
143
144 install_data('networkd.conf',
145 install_dir : pkgsysconfdir)
146
147 fuzzers += [
148 [['src/network/fuzz-netdev-parser.c',
149 'src/fuzz/fuzz.h'],
150 [libnetworkd_core,
151 libudev_static,
152 libsystemd_network,
153 libshared],
154 [threads]],
155
156 [['src/network/fuzz-network-parser.c',
157 'src/fuzz/fuzz.h'],
158 [libnetworkd_core,
159 libudev_static,
160 libsystemd_network,
161 libshared],
162 [threads]]
163 ]
164
165 tests += [
166 [['src/network/test-networkd-conf.c'],
167 [libnetworkd_core,
168 libsystemd_network,
169 libudev],
170 []],
171
172 [['src/network/test-network.c'],
173 [libnetworkd_core,
174 libudev_static,
175 libsystemd_network,
176 libshared],
177 [threads]],
178
179 [['src/network/test-routing-policy-rule.c'],
180 [libnetworkd_core,
181 libsystemd_network,
182 libudev],
183 []],
184
185 [['src/network/test-network-tables.c',
186 'src/network/test-network-tables.c',
187 test_tables_h],
188 [libnetworkd_core,
189 libudev_static,
190 libudev_core,
191 libsystemd_network,
192 libshared],
193 [threads],
194 '', '', [],
195 [network_include_dir] + libudev_core_includes],
196 ]
197 endif