]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
e1ac0f13dcba14491714cb9eaf79a3850262970f
[thirdparty/systemd.git] / src / network / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
4 #
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
9 #
10 # systemd is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 sources = files('''
19 netdev/bond.c
20 netdev/bond.h
21 netdev/bridge.c
22 netdev/bridge.h
23 netdev/dummy.c
24 netdev/dummy.h
25 netdev/ipvlan.c
26 netdev/ipvlan.h
27 netdev/macvlan.c
28 netdev/macvlan.h
29 netdev/netdev.c
30 netdev/netdev.h
31 netdev/tunnel.c
32 netdev/tunnel.h
33 netdev/tuntap.c
34 netdev/tuntap.h
35 netdev/vcan.c
36 netdev/vcan.h
37 netdev/veth.c
38 netdev/veth.h
39 netdev/vlan.c
40 netdev/vlan.h
41 netdev/vrf.c
42 netdev/vrf.h
43 netdev/vxlan.c
44 netdev/vxlan.h
45 netdev/geneve.c
46 netdev/geneve.h
47 netdev/vxcan.c
48 netdev/vxcan.h
49 netdev/wireguard.c
50 netdev/wireguard.h
51 networkd-address-label.c
52 networkd-address-label.h
53 networkd-address-pool.c
54 networkd-address-pool.h
55 networkd-address.c
56 networkd-address.h
57 networkd-brvlan.c
58 networkd-brvlan.h
59 networkd-conf.c
60 networkd-conf.h
61 networkd-dhcp4.c
62 networkd-dhcp6.c
63 networkd-fdb.c
64 networkd-fdb.h
65 networkd-ipv4ll.c
66 networkd-ipv6-proxy-ndp.c
67 networkd-ipv6-proxy-ndp.h
68 networkd-link-bus.c
69 networkd-link.c
70 networkd-link.h
71 networkd-lldp-tx.c
72 networkd-lldp-tx.h
73 networkd-manager-bus.c
74 networkd-manager.c
75 networkd-manager.h
76 networkd-ndisc.c
77 networkd-ndisc.h
78 networkd-radv.c
79 networkd-radv.h
80 networkd-network-bus.c
81 networkd-network.c
82 networkd-network.h
83 networkd-route.c
84 networkd-route.h
85 networkd-routing-policy-rule.c
86 networkd-routing-policy-rule.h
87 networkd-util.c
88 networkd-util.h
89 '''.split())
90
91 systemd_networkd_sources = files('networkd.c')
92
93 systemd_networkd_wait_online_sources = files('''
94 wait-online/link.c
95 wait-online/link.h
96 wait-online/manager.c
97 wait-online/manager.h
98 wait-online/wait-online.c
99 '''.split()) + network_internal_h
100
101 networkctl_sources = files('networkctl.c')
102
103 network_include_dir = include_directories('.')
104
105 if conf.get('ENABLE_NETWORKD') == 1
106 networkd_gperf_c = custom_target(
107 'networkd-gperf.c',
108 input : 'networkd-gperf.gperf',
109 output : 'networkd-gperf.c',
110 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
111
112 networkd_network_gperf_c = custom_target(
113 'networkd-network-gperf.c',
114 input : 'networkd-network-gperf.gperf',
115 output : 'networkd-network-gperf.c',
116 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
117
118 netdev_gperf_c = custom_target(
119 'netdev-gperf.c',
120 input : 'netdev/netdev-gperf.gperf',
121 output : 'netdev-gperf.c',
122 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
123
124 libnetworkd_core = static_library(
125 'networkd-core',
126 sources,
127 network_internal_h,
128 networkd_gperf_c,
129 networkd_network_gperf_c,
130 netdev_gperf_c,
131 include_directories : includes,
132 link_with : [libshared])
133
134 install_data('org.freedesktop.network1.conf',
135 install_dir : dbuspolicydir)
136 install_data('org.freedesktop.network1.service',
137 install_dir : dbussystemservicedir)
138 if install_polkit
139 install_data('systemd-networkd.rules',
140 install_dir : polkitrulesdir)
141 endif
142 if install_polkit_pkla
143 install_data('systemd-networkd.pkla',
144 install_dir : polkitpkladir)
145 endif
146
147 tests += [
148 [['src/network/test-networkd-conf.c'],
149 [libnetworkd_core,
150 libsystemd_network,
151 libudev],
152 []],
153
154 [['src/network/test-network.c'],
155 [libnetworkd_core,
156 libudev_static,
157 libsystemd_network,
158 libshared],
159 [threads]],
160
161 [['src/network/test-routing-policy-rule.c'],
162 [libnetworkd_core,
163 libsystemd_network,
164 libudev],
165 []],
166
167 [['src/network/test-network-tables.c',
168 'src/network/test-network-tables.c',
169 test_tables_h],
170 [libnetworkd_core,
171 libudev_static,
172 libudev_core,
173 libsystemd_network,
174 libshared],
175 [threads],
176 '', '', [],
177 [network_include_dir] + libudev_core_includes],
178 ]
179 endif