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