]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/meson.build
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / src / network / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
4
5 sources = files('''
6 netdev/bond.c
7 netdev/bond.h
8 netdev/bridge.c
9 netdev/bridge.h
10 netdev/dummy.c
11 netdev/dummy.h
12 netdev/ipvlan.c
13 netdev/ipvlan.h
14 netdev/macvlan.c
15 netdev/macvlan.h
16 netdev/netdev.c
17 netdev/netdev.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 networkd-address-label.c
39 networkd-address-label.h
40 networkd-address-pool.c
41 networkd-address-pool.h
42 networkd-address.c
43 networkd-address.h
44 networkd-brvlan.c
45 networkd-brvlan.h
46 networkd-conf.c
47 networkd-conf.h
48 networkd-dhcp4.c
49 networkd-dhcp6.c
50 networkd-fdb.c
51 networkd-fdb.h
52 networkd-ipv4ll.c
53 networkd-ipv6-proxy-ndp.c
54 networkd-ipv6-proxy-ndp.h
55 networkd-link-bus.c
56 networkd-link.c
57 networkd-link.h
58 networkd-lldp-tx.c
59 networkd-lldp-tx.h
60 networkd-manager-bus.c
61 networkd-manager.c
62 networkd-manager.h
63 networkd-ndisc.c
64 networkd-ndisc.h
65 networkd-radv.c
66 networkd-radv.h
67 networkd-network-bus.c
68 networkd-network.c
69 networkd-network.h
70 networkd-route.c
71 networkd-route.h
72 networkd-routing-policy-rule.c
73 networkd-routing-policy-rule.h
74 networkd-util.c
75 networkd-util.h
76 '''.split())
77
78 systemd_networkd_sources = files('networkd.c')
79
80 systemd_networkd_wait_online_sources = files('''
81 wait-online/link.c
82 wait-online/link.h
83 wait-online/manager.c
84 wait-online/manager.h
85 wait-online/wait-online.c
86 '''.split()) + network_internal_h
87
88 networkctl_sources = files('networkctl.c')
89
90 network_include_dir = include_directories('.')
91
92 if conf.get('ENABLE_NETWORKD') == 1
93 networkd_gperf_c = custom_target(
94 'networkd-gperf.c',
95 input : 'networkd-gperf.gperf',
96 output : 'networkd-gperf.c',
97 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
98
99 networkd_network_gperf_c = custom_target(
100 'networkd-network-gperf.c',
101 input : 'networkd-network-gperf.gperf',
102 output : 'networkd-network-gperf.c',
103 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
104
105 netdev_gperf_c = custom_target(
106 'netdev-gperf.c',
107 input : 'netdev/netdev-gperf.gperf',
108 output : 'netdev-gperf.c',
109 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
110
111 libnetworkd_core = static_library(
112 'networkd-core',
113 sources,
114 network_internal_h,
115 networkd_gperf_c,
116 networkd_network_gperf_c,
117 netdev_gperf_c,
118 include_directories : includes,
119 link_with : [libshared])
120
121 install_data('org.freedesktop.network1.conf',
122 install_dir : dbuspolicydir)
123 install_data('org.freedesktop.network1.service',
124 install_dir : dbussystemservicedir)
125 if install_polkit
126 install_data('systemd-networkd.rules',
127 install_dir : polkitrulesdir)
128 endif
129 if install_polkit_pkla
130 install_data('systemd-networkd.pkla',
131 install_dir : polkitpkladir)
132 endif
133
134 tests += [
135 [['src/network/test-networkd-conf.c'],
136 [libnetworkd_core,
137 libsystemd_network,
138 libudev],
139 []],
140
141 [['src/network/test-network.c'],
142 [libnetworkd_core,
143 libudev_static,
144 libsystemd_network,
145 libshared],
146 [threads]],
147
148 [['src/network/test-routing-policy-rule.c'],
149 [libnetworkd_core,
150 libsystemd_network,
151 libudev],
152 []],
153
154 [['src/network/test-network-tables.c',
155 'src/network/test-network-tables.c',
156 test_tables_h],
157 [libnetworkd_core,
158 libudev_static,
159 libudev_core,
160 libsystemd_network,
161 libshared],
162 [threads],
163 '', '', [],
164 [network_include_dir] + libudev_core_includes],
165 ]
166 endif