]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/meson.build
Merge pull request #8676 from keszybz/drop-license-boilerplate
[thirdparty/systemd.git] / src / shared / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
4
5 shared_sources = '''
6 acl-util.h
7 acpi-fpdt.c
8 acpi-fpdt.h
9 apparmor-util.c
10 apparmor-util.h
11 ask-password-api.c
12 ask-password-api.h
13 base-filesystem.c
14 base-filesystem.h
15 boot-timestamps.c
16 boot-timestamps.h
17 bootspec.c
18 bootspec.h
19 bus-unit-util.c
20 bus-unit-util.h
21 bus-util.c
22 bus-util.h
23 cgroup-show.c
24 cgroup-show.h
25 clean-ipc.c
26 clean-ipc.h
27 condition.c
28 condition.h
29 conf-parser.c
30 conf-parser.h
31 dev-setup.c
32 dev-setup.h
33 dissect-image.c
34 dissect-image.h
35 dns-domain.c
36 dns-domain.h
37 dropin.c
38 dropin.h
39 efivars.c
40 efivars.h
41 fdset.c
42 fdset.h
43 firewall-util.h
44 fstab-util.c
45 fstab-util.h
46 generator.c
47 generator.h
48 gpt.h
49 ima-util.c
50 ima-util.h
51 import-util.c
52 import-util.h
53 initreq.h
54 install.c
55 install.h
56 install-printf.c
57 install-printf.h
58 journal-util.c
59 journal-util.h
60 logs-show.c
61 logs-show.h
62 loop-util.c
63 loop-util.h
64 machine-image.c
65 machine-image.h
66 machine-pool.c
67 machine-pool.h
68 nsflags.c
69 nsflags.h
70 output-mode.c
71 output-mode.h
72 pager.c
73 pager.h
74 path-lookup.c
75 path-lookup.h
76 ptyfwd.c
77 ptyfwd.h
78 resolve-util.c
79 resolve-util.h
80 seccomp-util.h
81 sleep-config.c
82 sleep-config.h
83 spawn-ask-password-agent.c
84 spawn-ask-password-agent.h
85 spawn-polkit-agent.c
86 spawn-polkit-agent.h
87 specifier.c
88 specifier.h
89 switch-root.c
90 switch-root.h
91 sysctl-util.c
92 sysctl-util.h
93 tests.c
94 tests.h
95 tomoyo-util.c
96 tomoyo-util.h
97 udev-util.h
98 udev-util.c
99 uid-range.c
100 uid-range.h
101 utmp-wtmp.h
102 vlan-util.c
103 vlan-util.h
104 volatile-util.c
105 volatile-util.h
106 watchdog.c
107 watchdog.h
108 wireguard-netlink.h
109 '''.split()
110
111 test_tables_h = files('test-tables.h')
112 shared_sources += [test_tables_h]
113
114 if conf.get('HAVE_ACL') == 1
115 shared_sources += ['acl-util.c']
116 endif
117
118 if conf.get('ENABLE_UTMP') == 1
119 shared_sources += ['utmp-wtmp.c']
120 endif
121
122 if conf.get('HAVE_SECCOMP') == 1
123 shared_sources += ['seccomp-util.c']
124 endif
125
126 if conf.get('HAVE_LIBIPTC') == 1
127 shared_sources += ['firewall-util.c']
128 endif
129
130 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
131
132 libshared_deps = [threads,
133 librt,
134 libcap,
135 libacl,
136 libcryptsetup,
137 libgcrypt,
138 libiptc,
139 libseccomp,
140 libselinux,
141 libidn,
142 libxz,
143 liblz4,
144 libblkid]
145
146 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
147
148 libshared_static = static_library(
149 libshared_name,
150 shared_sources,
151 include_directories : includes,
152 dependencies : libshared_deps,
153 c_args : ['-fvisibility=default'])
154
155 libshared = shared_library(
156 libshared_name,
157 libudev_sources,
158 include_directories : includes,
159 link_args : ['-shared',
160 '-Wl,--version-script=' + libshared_sym_path],
161 link_whole : [libshared_static,
162 libbasic,
163 libbasic_gcrypt,
164 libsystemd_static,
165 libjournal_client],
166 c_args : ['-fvisibility=default'],
167 dependencies : libshared_deps,
168 install : true,
169 install_dir : rootlibexecdir)