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