summaryrefslogtreecommitdiffstats
path: root/src/network/meson.build
blob: a717152e203c0705300d007d26df23e5b5aa49a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek

sources = files('''
        netdev/bond.c
        netdev/bond.h
        netdev/bridge.c
        netdev/bridge.h
        netdev/dummy.c
        netdev/dummy.h
        netdev/ipvlan.c
        netdev/ipvlan.h
        netdev/macvlan.c
        netdev/macvlan.h
        netdev/netdev.c
        netdev/netdev.h
        netdev/tunnel.c
        netdev/tunnel.h
        netdev/tuntap.c
        netdev/tuntap.h
        netdev/vcan.c
        netdev/vcan.h
        netdev/veth.c
        netdev/veth.h
        netdev/vlan.c
        netdev/vlan.h
        netdev/vrf.c
        netdev/vrf.h
        netdev/vxlan.c
        netdev/vxlan.h
        netdev/geneve.c
        netdev/geneve.h
        netdev/vxcan.c
        netdev/vxcan.h
        netdev/wireguard.c
        netdev/wireguard.h
        netdev/netdevsim.c
        netdev/netdevsim.h
        networkd-address-label.c
        networkd-address-label.h
        networkd-address-pool.c
        networkd-address-pool.h
        networkd-address.c
        networkd-address.h
        networkd-brvlan.c
        networkd-brvlan.h
        networkd-conf.c
        networkd-conf.h
        networkd-dhcp4.c
        networkd-dhcp6.c
        networkd-fdb.c
        networkd-fdb.h
        networkd-ipv4ll.c
        networkd-ipv6-proxy-ndp.c
        networkd-ipv6-proxy-ndp.h
        networkd-link-bus.c
        networkd-link.c
        networkd-link.h
        networkd-lldp-tx.c
        networkd-lldp-tx.h
        networkd-manager-bus.c
        networkd-manager.c
        networkd-manager.h
        networkd-ndisc.c
        networkd-ndisc.h
        networkd-radv.c
        networkd-radv.h
        networkd-network-bus.c
        networkd-network.c
        networkd-network.h
        networkd-route.c
        networkd-route.h
        networkd-routing-policy-rule.c
        networkd-routing-policy-rule.h
        networkd-util.c
        networkd-util.h
'''.split())

systemd_networkd_sources = files('networkd.c')

systemd_networkd_wait_online_sources = files('''
        wait-online/link.c
        wait-online/link.h
        wait-online/manager.c
        wait-online/manager.h
        wait-online/wait-online.c
'''.split()) + network_internal_h

networkctl_sources = files('networkctl.c')

network_include_dir = include_directories('.')

if conf.get('ENABLE_NETWORKD') == 1
        networkd_gperf_c = custom_target(
                'networkd-gperf.c',
                input : 'networkd-gperf.gperf',
                output : 'networkd-gperf.c',
                command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])

        networkd_network_gperf_c = custom_target(
                'networkd-network-gperf.c',
                input : 'networkd-network-gperf.gperf',
                output : 'networkd-network-gperf.c',
                command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])

        netdev_gperf_c = custom_target(
                'netdev-gperf.c',
                input : 'netdev/netdev-gperf.gperf',
                output : 'netdev-gperf.c',
                command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])

        libnetworkd_core = static_library(
                'networkd-core',
                sources,
                network_internal_h,
                networkd_gperf_c,
                networkd_network_gperf_c,
                netdev_gperf_c,
                include_directories : includes,
                link_with : [libshared])

        install_data('org.freedesktop.network1.conf',
                     install_dir : dbuspolicydir)
        install_data('org.freedesktop.network1.service',
                     install_dir : dbussystemservicedir)
        if install_polkit
                install_data('systemd-networkd.rules',
                             install_dir : polkitrulesdir)
        endif
        if install_polkit_pkla
                install_data('systemd-networkd.pkla',
                             install_dir : polkitpkladir)
        endif

        tests += [
    [['src/network/test-networkd-conf.c'],
     [libnetworkd_core,
      libsystemd_network,
      libudev],
     []],

    [['src/network/test-network.c'],
     [libnetworkd_core,
      libudev_static,
      libsystemd_network,
      libshared],
     [threads]],

    [['src/network/test-routing-policy-rule.c'],
     [libnetworkd_core,
      libsystemd_network,
      libudev],
     []],

    [['src/network/test-network-tables.c',
      'src/network/test-network-tables.c',
      test_tables_h],
     [libnetworkd_core,
      libudev_static,
      libudev_core,
      libsystemd_network,
      libshared],
     [threads],
     '', '', [],
     [network_include_dir] + libudev_core_includes],
  ]
endif