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