]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/journal/meson.build
Merge pull request #29586 from poettering/read-stripped-line
[thirdparty/systemd.git] / src / journal / meson.build
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
3a726fcd 2
f1b98127
ZJS
3sources = files(
4 'journald-audit.c',
87a13dab 5 'journald-client.c',
f1b98127 6 'journald-console.c',
f1b98127 7 'journald-context.c',
f1b98127 8 'journald-kmsg.c',
f1b98127 9 'journald-native.c',
f1b98127 10 'journald-rate-limit.c',
f1b98127 11 'journald-server.c',
f1b98127 12 'journald-stream.c',
f1b98127 13 'journald-syslog.c',
f1b98127 14 'journald-wall.c',
2f492a73 15)
5c23128d 16
52964293 17sources += custom_target(
37efbbd8
ZJS
18 'journald-gperf.c',
19 input : 'journald-gperf.gperf',
20 output : 'journald-gperf.c',
21 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d 22
52964293
YW
23libjournal_core = static_library(
24 'journal-core',
25 sources,
26 include_directories : includes,
92148283
JJ
27 dependencies: [threads,
28 userspace],
03f7ddf0 29 build_by_default : false)
52964293 30
dd1f738e
YW
31if get_option('link-journalctl-shared')
32 journalctl_link_with = [libshared]
33else
34 journalctl_link_with = [
35 libbasic_gcrypt,
36 libshared_static,
37 libsystemd_static,
38 ]
39endif
5c23128d 40
130c87b1
YW
41journal_test_template = test_template + {
42 'link_with' : [
43 libjournal_core,
44 libshared,
45 ],
46}
47
cbc55c4c
YW
48journal_fuzz_template = fuzz_template + {
49 'link_with' : [
50 libjournal_core,
51 libshared,
52 ],
53 'dependencies' : libselinux,
54}
55
dd1f738e
YW
56executables += [
57 libexec_template + {
58 'name' : 'systemd-journald',
59 'sources' : files('journald.c'),
60 'link_with' : [
61 libjournal_core,
62 libshared,
63 ],
64 'dependencies' : [
65 liblz4,
66 libselinux,
67 libxz,
68 libzstd,
69 threads,
70 ],
71 },
5ae58e8f
OJ
72 libexec_template + {
73 'name' : 'systemd-bsod',
c3c885a7 74 'public' : true,
5ae58e8f
OJ
75 'conditions' : ['HAVE_QRENCODE'],
76 'sources' : files('bsod.c'),
77 'link_with' : libshared,
78 'dependencies' : libqrencode,
79 },
dd1f738e
YW
80 executable_template + {
81 'name' : 'systemd-cat',
82 'public' : true,
83 'sources' : files('cat.c'),
84 'link_with' : [
85 libjournal_core,
86 libshared,
87 ],
88 'dependencies' : threads,
89 },
90 executable_template + {
91 'name' : 'journalctl',
92 'public' : true,
93 'sources' : files('journalctl.c'),
94 'link_with' : journalctl_link_with,
95 'dependencies' : [
96 libdl,
97 liblz4,
98 libxz,
99 libzstd,
100 threads,
101 ],
102 },
130c87b1 103 journal_test_template + {
1d3ef11d 104 'sources' : files('test-journald-config.c'),
130c87b1
YW
105 'dependencies' : [
106 liblz4,
107 libselinux,
108 libxz,
109 ],
110 },
111 journal_test_template + {
1d3ef11d 112 'sources' : files('test-journald-syslog.c'),
130c87b1
YW
113 'dependencies' : [
114 liblz4,
115 libselinux,
116 libxz,
117 threads,
118 ],
119 },
d287ece7
YW
120 journal_test_template + {
121 'sources' : files('test-journald-tables.c'),
122 'dependencies' : [
123 libselinux,
124 ],
125 },
cbc55c4c 126 journal_fuzz_template + {
2ed35b2f
JJ
127 'sources' : files(
128 'fuzz-journald-audit.c',
129 'fuzz-journald.c',
130 ),
2ed35b2f 131 },
cbc55c4c 132 journal_fuzz_template + {
2ed35b2f
JJ
133 'sources' : files(
134 'fuzz-journald-kmsg.c',
135 'fuzz-journald.c',
136 ),
2ed35b2f 137 },
cbc55c4c 138 journal_fuzz_template + {
2ed35b2f
JJ
139 'sources' : files(
140 'fuzz-journald-native.c',
141 'fuzz-journald.c',
142 ),
2ed35b2f 143 },
cbc55c4c 144 journal_fuzz_template + {
2ed35b2f
JJ
145 'sources' : files(
146 'fuzz-journald-native-fd.c',
147 'fuzz-journald.c',
148 ),
2ed35b2f 149 },
cbc55c4c 150 journal_fuzz_template + {
2ed35b2f
JJ
151 'sources' : files(
152 'fuzz-journald-stream.c',
153 'fuzz-journald.c',
154 ),
2ed35b2f 155 },
cbc55c4c 156 journal_fuzz_template + {
2ed35b2f
JJ
157 'sources' : files(
158 'fuzz-journald-syslog.c',
159 'fuzz-journald.c',
160 ),
2ed35b2f 161 },
e025c9df 162]
cbc55c4c
YW
163
164if install_sysconfdir_samples
165 install_data('journald.conf',
6495361c 166 install_dir : pkgconfigfiledir)
cbc55c4c
YW
167endif
168
169if get_option('create-log-dirs')
9289e093 170 install_emptydir('/var/log/journal',
44fcb9a7 171 install_mode : 'rwxr-xr-x')
cbc55c4c
YW
172 if get_option('adm-group')
173 meson.add_install_script(
c31ba5cf 174 sh, '-c',
cbc55c4c
YW
175 'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
176 endif
177 if get_option('wheel-group')
178 meson.add_install_script(
c31ba5cf 179 sh, '-c',
cbc55c4c
YW
180 'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
181 endif
182endif