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