]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/meson.build
meson: use a convenience lib for journal user sources
[thirdparty/systemd.git] / src / network / meson.build
CommitLineData
3a726fcd
ZJS
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
5c23128d 18sources = files('''
37efbbd8
ZJS
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
9dfed8dd
SS
45 netdev/geneve.c
46 netdev/geneve.h
d6df583c
SS
47 netdev/vxcan.c
48 netdev/vxcan.h
c23ae61e
SS
49 networkd-address-label.c
50 networkd-address-label.h
37efbbd8
ZJS
51 networkd-address-pool.c
52 networkd-address-pool.h
53 networkd-address.c
54 networkd-address.h
55 networkd-brvlan.c
56 networkd-brvlan.h
57 networkd-conf.c
58 networkd-conf.h
59 networkd-dhcp4.c
60 networkd-dhcp6.c
61 networkd-fdb.c
62 networkd-fdb.h
63 networkd-ipv4ll.c
64 networkd-ipv6-proxy-ndp.c
65 networkd-ipv6-proxy-ndp.h
66 networkd-link-bus.c
67 networkd-link.c
68 networkd-link.h
69 networkd-lldp-tx.c
70 networkd-lldp-tx.h
71 networkd-manager-bus.c
72 networkd-manager.c
73 networkd-manager.h
74 networkd-ndisc.c
75 networkd-ndisc.h
4a24ba71
ZJS
76 networkd-radv.c
77 networkd-radv.h
37efbbd8
ZJS
78 networkd-network-bus.c
79 networkd-network.c
80 networkd-network.h
81 networkd-route.c
82 networkd-route.h
bce67bbe
SS
83 networkd-routing-policy-rule.c
84 networkd-routing-policy-rule.h
37efbbd8
ZJS
85 networkd-util.c
86 networkd-util.h
5c23128d
ZJS
87'''.split())
88
89systemd_networkd_sources = files('networkd.c')
90
91systemd_networkd_wait_online_sources = files('''
37efbbd8
ZJS
92 wait-online/link.c
93 wait-online/link.h
94 wait-online/manager.c
95 wait-online/manager.h
96 wait-online/wait-online.c
5c23128d
ZJS
97'''.split()) + network_internal_h
98
99networkctl_sources = files('networkctl.c')
100
69e96427
ZJS
101network_include_dir = include_directories('.')
102
349cc4a5 103if conf.get('ENABLE_NETWORKD') == 1
37efbbd8
ZJS
104 networkd_gperf_c = custom_target(
105 'networkd-gperf.c',
106 input : 'networkd-gperf.gperf',
107 output : 'networkd-gperf.c',
108 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d 109
37efbbd8
ZJS
110 networkd_network_gperf_c = custom_target(
111 'networkd-network-gperf.c',
112 input : 'networkd-network-gperf.gperf',
113 output : 'networkd-network-gperf.c',
114 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d 115
37efbbd8
ZJS
116 netdev_gperf_c = custom_target(
117 'netdev-gperf.c',
118 input : 'netdev/netdev-gperf.gperf',
119 output : 'netdev-gperf.c',
120 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d 121
37efbbd8
ZJS
122 libnetworkd_core = static_library(
123 'networkd-core',
124 sources,
125 network_internal_h,
126 networkd_gperf_c,
127 networkd_network_gperf_c,
128 netdev_gperf_c,
129 include_directories : includes,
130 link_with : [libshared])
5c23128d 131
37efbbd8
ZJS
132 install_data('org.freedesktop.network1.conf',
133 install_dir : dbuspolicydir)
134 install_data('org.freedesktop.network1.service',
135 install_dir : dbussystemservicedir)
136 if install_polkit
137 install_data('systemd-networkd.rules',
138 install_dir : polkitrulesdir)
139 endif
140 if install_polkit_pkla
141 install_data('systemd-networkd.pkla',
142 install_dir : polkitpkladir)
143 endif
69e96427 144
37efbbd8 145 tests += [
f0bd7cc7
ZJS
146 [['src/network/test-networkd-conf.c'],
147 [libnetworkd_core,
148 libsystemd_network,
149 libudev],
150 []],
69e96427 151
f0bd7cc7
ZJS
152 [['src/network/test-network.c'],
153 [libnetworkd_core,
154 libudev_internal,
155 libsystemd_network,
c3045943 156 libshared],
4b57a272 157 [threads]],
69e96427 158
7379f3de
ZJS
159 [['src/network/test-routing-policy-rule.c'],
160 [libnetworkd_core,
161 libsystemd_network,
162 libudev],
163 []],
164
f0bd7cc7
ZJS
165 [['src/network/test-network-tables.c',
166 'src/network/test-network-tables.c',
167 test_tables_h],
168 [libnetworkd_core,
169 libudev_internal,
170 libudev_core,
171 libsystemd_network,
c3045943 172 libshared],
4b57a272 173 [threads],
f0bd7cc7
ZJS
174 '', '', [],
175 [network_include_dir] + libudev_core_includes],
69e96427 176 ]
f0bd7cc7 177endif