sessiond: propagate the use of ltt_session::locked_ref
[lttng-tools.git] / src / common / Makefile.am
CommitLineData
ab5be9fa
MJ
1# SPDX-License-Identifier: GPL-2.0-only
2
26821431 3AUTOMAKE_OPTIONS = subdir-objects
4ae04234
MJ
4noinst_LTLIBRARIES =
5
6BUILT_SOURCES =
7
8noinst_HEADERS = \
c9e313bc
SM
9 align.hpp \
10 bug.hpp \
11 defaults.hpp \
12 error.hpp \
13 futex.hpp \
14 lttng-kernel.hpp \
15 lttng-kernel-old.hpp \
16 macros.hpp \
17 time.hpp \
18 uri.hpp \
19 utils.hpp
4ae04234
MJ
20
21
22# libargpar
23noinst_LTLIBRARIES += libargpar.la
24libargpar_la_SOURCES = \
25 argpar/argpar.c \
26 argpar/argpar.h
27
28
29# libargpar-utils
30noinst_LTLIBRARIES += libargpar-utils.la
31libargpar_utils_la_SOURCES = \
32 argpar-utils/argpar-utils.cpp \
c9e313bc 33 argpar-utils/argpar-utils.hpp
4ae04234
MJ
34
35
36# libbytecode
37noinst_LTLIBRARIES += libbytecode.la
38libbytecode_la_SOURCES = \
39 bytecode/bytecode.cpp \
c9e313bc 40 bytecode/bytecode.hpp
26821431 41
b3f35e02 42
93903fd5
MD
43# The libcommon-lgpl static archive contains only LGPLv2.1 code. It is
44# meant to be used by LGPLv2.1 libraries such as liblttng-ctl. It also
45# contains libcommon-lgpl.la.
46
4ae04234 47noinst_LTLIBRARIES += libcommon-lgpl.la
93903fd5 48libcommon_lgpl_la_SOURCES = \
a6bc4ca9
SM
49 actions/action.cpp \
50 actions/list.cpp \
51 actions/notify.cpp \
52 actions/path.cpp \
53 actions/rotate-session.cpp \
54 actions/snapshot-session.cpp \
55 actions/start-session.cpp \
56 actions/stop-session.cpp \
57 actions/rate-policy.cpp \
c9e313bc 58 buffer-view.hpp buffer-view.cpp \
999af9c1 59 channel.cpp \
40ebe219 60 compiler.hpp \
a6bc4ca9
SM
61 conditions/buffer-usage.cpp \
62 conditions/condition.cpp \
63 conditions/event-rule-matches.cpp \
64 conditions/session-consumed-size.cpp \
65 conditions/session-rotation.cpp \
b17ed2ad 66 container-wrapper.hpp \
c9e313bc 67 credentials.cpp credentials.hpp \
a6bc4ca9
SM
68 defaults.cpp \
69 domain.cpp \
c9e313bc
SM
70 dynamic-array.cpp dynamic-array.hpp \
71 dynamic-buffer.cpp dynamic-buffer.hpp \
a6bc4ca9 72 endpoint.cpp \
c9e313bc 73 error.cpp error.hpp \
a6bc4ca9
SM
74 error-query.cpp \
75 evaluation.cpp \
038ab50b 76 event.cpp \
a6bc4ca9
SM
77 event-expr/event-expr.cpp \
78 event-field-value.cpp \
79 event-rule/event-rule.cpp \
80 event-rule/kernel-kprobe.cpp \
81 event-rule/kernel-syscall.cpp \
82 event-rule/kernel-uprobe.cpp \
83 event-rule/kernel-tracepoint.cpp \
84 event-rule/user-tracepoint.cpp \
85 event-rule/log4j-logging.cpp \
86 event-rule/jul-logging.cpp \
87 event-rule/python-logging.cpp \
53cd1e22 88 exception.cpp exception.hpp \
20c734f5 89 file-descriptor.hpp file-descriptor.cpp \
bac9f49c 90 fd-handle.cpp fd-handle.hpp \
05aa7e19 91 format.hpp \
671e39d7
MJ
92 io-hint.cpp \
93 io-hint.hpp \
a6bc4ca9 94 kernel-probe.cpp \
a6bc4ca9 95 location.cpp \
51379287 96 lockfile.cpp lockfile.hpp \
a3a56255 97 locked-reference.hpp \
e35e95ea 98 logging-utils.hpp logging-utils.cpp \
a6bc4ca9 99 log-level-rule.cpp \
1823e905 100 make-unique.hpp \
8802d23b 101 make-unique-wrapper.hpp \
a0a4f314 102 meta-helpers.hpp \
c9e313bc 103 mi-lttng.cpp mi-lttng.hpp \
a6bc4ca9 104 notification.cpp \
c9e313bc
SM
105 payload.cpp payload.hpp \
106 payload-view.cpp payload-view.hpp \
0a325f4d 107 pthread-lock.hpp \
57b90af7 108 random.cpp random.hpp \
c9e313bc 109 readwrite.cpp readwrite.hpp \
a0a4f314 110 reference.hpp \
c9e313bc 111 runas.cpp runas.hpp \
b6bbb1d6 112 scope-exit.hpp \
a6bc4ca9 113 session-descriptor.cpp \
c9e313bc
SM
114 snapshot.cpp snapshot.hpp \
115 spawn-viewer.cpp spawn-viewer.hpp \
116 thread.cpp thread.hpp \
a6bc4ca9 117 time.cpp \
c9e313bc 118 tracker.cpp tracker.hpp \
a6bc4ca9 119 trigger.cpp \
a6df2497 120 type-traits.hpp \
c9e313bc
SM
121 unix.cpp unix.hpp \
122 uri.cpp uri.hpp \
a6bc4ca9 123 userspace-probe.cpp \
0a325f4d 124 urcu.hpp \
c9e313bc 125 utils.cpp utils.hpp
b3f35e02 126
f053e837
JG
127if IS_LINUX
128libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp
129endif
130
b1b34226 131if HAVE_ELF_H
93903fd5 132libcommon_lgpl_la_SOURCES += \
c9e313bc 133 lttng-elf.cpp lttng-elf.hpp
b1b34226
MJ
134endif
135
93903fd5 136libcommon_lgpl_la_LIBADD = \
4ae04234
MJ
137 libbytecode.la \
138 libcompat.la \
139 libconfig.la \
140 libfilter.la \
141 libhashtable-lgpl.la \
116a02e3 142 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
b3f35e02 143
4ae04234 144
4971b7f0
MD
145# The libpath static archive contains GPLv2 compatible code. It is
146# meant to be used by GPL executables.
4ae04234 147noinst_LTLIBRARIES += libpath.la
4971b7f0 148libpath_la_SOURCES = \
c9e313bc 149 path.cpp path.hpp
4971b7f0 150
4ae04234 151
93903fd5
MD
152# The libcommon-gpl static archive contains GPLv2 compatible code. It is
153# meant to be used by GPL executables.
4ae04234 154noinst_LTLIBRARIES += libcommon-gpl.la
93903fd5 155libcommon_gpl_la_SOURCES = \
c9e313bc
SM
156 common.hpp \
157 context.cpp context.hpp \
158 daemonize.cpp daemonize.hpp \
159 filter.cpp filter.hpp \
160 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
161 futex.cpp futex.hpp \
162 index-allocator.cpp index-allocator.hpp \
163 optional.hpp \
164 pipe.cpp pipe.hpp \
165 shm.cpp shm.hpp \
166 trace-chunk.cpp trace-chunk.hpp \
167 trace-chunk-registry.hpp \
168 uuid.cpp uuid.hpp \
169 waiter.cpp waiter.hpp
93903fd5
MD
170
171libcommon_gpl_la_LIBADD = \
172 libcommon-lgpl.la \
4971b7f0 173 libpath.la \
4ae04234
MJ
174 libini-config.la \
175 libhashtable-gpl.la \
176 libfd-tracker.la
177
178
179# libcompat
180noinst_LTLIBRARIES += libcompat.la
181libcompat_la_SOURCES = \
4ae04234 182 compat/directory-handle.cpp \
c9e313bc
SM
183 compat/directory-handle.hpp \
184 compat/dirent.hpp \
185 compat/endian.hpp \
186 compat/errno.hpp \
c9e313bc
SM
187 compat/getenv.hpp \
188 compat/mman.hpp \
189 compat/netdb.hpp \
190 compat/path.hpp \
191 compat/paths.hpp \
4ae04234 192 compat/poll.cpp \
c9e313bc
SM
193 compat/poll.hpp \
194 compat/pthread.hpp \
195 compat/socket.hpp \
196 compat/string.hpp \
197 compat/tid.hpp \
198 compat/time.hpp
4ae04234
MJ
199
200
201# libconfig
202noinst_LTLIBRARIES += libconfig.la
203libconfig_la_SOURCES = \
c9e313bc
SM
204 config/config-internal.hpp \
205 config/config-session-abi.hpp \
4ae04234 206 config/session-config.cpp \
c9e313bc 207 config/session-config.hpp
4ae04234
MJ
208
209libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
210libconfig_la_LIBADD = ${libxml2_LIBS}
211
212
213if BUILD_LIB_CONSUMER
214noinst_LTLIBRARIES += libconsumer.la
215
216libconsumer_la_SOURCES = \
217 consumer/consumer.cpp \
c9e313bc 218 consumer/consumer.hpp \
4ae04234 219 consumer/consumer-metadata-cache.cpp \
c9e313bc 220 consumer/consumer-metadata-cache.hpp \
4ae04234 221 consumer/consumer-stream.cpp \
c9e313bc
SM
222 consumer/consumer-stream.hpp \
223 consumer/consumer-testpoint.hpp \
4ae04234 224 consumer/consumer-timer.cpp \
c9e313bc 225 consumer/consumer-timer.hpp \
4ae04234 226 consumer/metadata-bucket.cpp \
c9e313bc 227 consumer/metadata-bucket.hpp
4ae04234
MJ
228
229libconsumer_la_LIBADD = \
230 libkernel-consumer.la \
231 librelayd.la \
232 libsessiond-comm.la
233
234if HAVE_LIBLTTNG_UST_CTL
235libconsumer_la_LIBADD += \
236 libust-consumer.la
237endif
238endif # BUILD_LIB_CONSUMER
239
240
241# libfd-tracker
242noinst_LTLIBRARIES += libfd-tracker.la
243libfd_tracker_la_SOURCES = \
244 fd-tracker/fd-tracker.cpp \
c9e313bc 245 fd-tracker/fd-tracker.hpp \
4ae04234 246 fd-tracker/inode.cpp \
c9e313bc 247 fd-tracker/inode.hpp \
4ae04234 248 fd-tracker/utils.cpp \
c9e313bc 249 fd-tracker/utils.hpp \
4ae04234
MJ
250 fd-tracker/utils-poll.cpp
251
252
253# libfilter
254noinst_LTLIBRARIES += libfilter.la
255
256libfilter_la_SOURCES = \
c9e313bc
SM
257 filter/filter-ast.hpp \
258 filter/filter-ir.hpp \
4ae04234
MJ
259 filter/filter-lexer.lpp \
260 filter/filter-parser.ypp \
c9e313bc 261 filter/filter-symbols.hpp \
4ae04234
MJ
262 filter/filter-visitor-generate-bytecode.cpp \
263 filter/filter-visitor-generate-ir.cpp \
264 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
265 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
266 filter/filter-visitor-ir-validate-globbing.cpp \
267 filter/filter-visitor-ir-validate-string.cpp \
268 filter/filter-visitor-xml.cpp \
c9e313bc 269 filter/memstream.hpp
4ae04234
MJ
270
271BUILT_SOURCES += filter/filter-parser.hpp
272
6ce1601f
MJ
273# Disable some warning flags for generated sources.
274FILTER_WARN_FLAGS = \
19708280 275 -Wno-null-dereference \
f46376a1
MJ
276 -Wno-redundant-decls \
277 -Wno-unused-parameter
6ce1601f
MJ
278
279libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
c9e313bc 280libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
4ae04234
MJ
281libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
282libfilter_la_LIBADD = libstring-utils.la
283
284AM_YFLAGS = -t -d -v -Wno-yacc
285
286# start with empty files to clean
287CLEANFILES =
288
289if HAVE_BISON
290# we have bison: we can clean the generated parser files
291CLEANFILES += \
292 filter/filter-parser.cpp \
293 filter/filter-parser.hpp \
294 filter/filter-parser.output
295else # HAVE_BISON
296# create target used to stop the build if we want to build the parser,
297# but we don't have the necessary tool to do so
298filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
299 @echo "Error: Cannot build target because bison is missing."
300 @echo "Make sure bison is installed and run the configure script again."
301 @false
302
303BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
304endif # HAVE_BISON
305
306if HAVE_FLEX
307# we have flex: we can clean the generated lexer files
308CLEANFILES += filter/filter-lexer.cpp
309else # HAVE_FLEX
310# create target used to stop the build if we want to build the lexer,
311# but we don't have the necessary tool to do so
312filter/filter-lexer.cpp: filter/filter-lexer.lpp
313 @echo "Error: Cannot build target because flex is missing."
314 @echo "Make sure flex is installed and run the configure script again."
315 @false
316
317BUILT_SOURCES += filter/filter-lexer.cpp
318endif # HAVE_FLEX
319
320
321noinst_LTLIBRARIES += libhashtable-lgpl.la
322libhashtable_lgpl_la_SOURCES = \
323 hashtable/seed.cpp \
324 hashtable/utils.cpp \
c9e313bc 325 hashtable/utils.hpp
4ae04234
MJ
326
327
328noinst_LTLIBRARIES += libhashtable-gpl.la
329libhashtable_gpl_la_SOURCES = \
330 hashtable/hashtable.cpp \
c9e313bc
SM
331 hashtable/hashtable.hpp \
332 hashtable/hashtable-symbols.hpp
4ae04234
MJ
333
334libhashtable_gpl_la_LIBADD = \
335 $(URCU_LIBS) \
336 $(URCU_CDS_LIBS)
337
93903fd5 338
87fb9fc0 339if BUILD_LIB_HEALTH
4ae04234
MJ
340noinst_LTLIBRARIES += libhealth.la
341
342libhealth_la_SOURCES = \
343 health/health.cpp
87fb9fc0
JR
344endif
345
4ae04234
MJ
346
347# libini-config
348noinst_LTLIBRARIES += libini-config.la
349libini_config_la_SOURCES = \
350 ini-config/ini.cpp \
c9e313bc 351 ini-config/ini.hpp \
4ae04234 352 ini-config/ini-config.cpp \
c9e313bc 353 ini-config/ini-config.hpp
4ae04234
MJ
354
355
356if BUILD_LIB_INDEX
357noinst_LTLIBRARIES += libindex.la
358
359libindex_la_SOURCES = \
c9e313bc 360 index/ctf-index.hpp \
4ae04234 361 index/index.cpp \
c9e313bc 362 index/index.hpp
4ae04234
MJ
363endif
364
365
87fb9fc0 366if BUILD_LIB_KERNEL_CTL
4ae04234
MJ
367noinst_LTLIBRARIES += libkernel-ctl.la
368
369libkernel_ctl_la_SOURCES = \
370 kernel-ctl/kernel-ctl.cpp \
c9e313bc
SM
371 kernel-ctl/kernel-ctl.hpp \
372 kernel-ctl/kernel-ioctl.hpp
87fb9fc0
JR
373endif
374
375if BUILD_LIB_SESSIOND_COMM
4ae04234
MJ
376noinst_LTLIBRARIES += libsessiond-comm.la
377
378libsessiond_comm_la_SOURCES = \
c9e313bc 379 sessiond-comm/agent.hpp \
4ae04234 380 sessiond-comm/inet.cpp \
c9e313bc 381 sessiond-comm/inet.hpp \
4ae04234 382 sessiond-comm/inet6.cpp \
c9e313bc
SM
383 sessiond-comm/inet6.hpp \
384 sessiond-comm/relayd.hpp \
4ae04234 385 sessiond-comm/sessiond-comm.cpp \
c9e313bc 386 sessiond-comm/sessiond-comm.hpp
87fb9fc0
JR
387endif
388
389if BUILD_LIB_RELAYD
4ae04234
MJ
390noinst_LTLIBRARIES += librelayd.la
391
392librelayd_la_SOURCES = \
393 relayd/relayd.cpp \
c9e313bc 394 relayd/relayd.hpp
4ae04234
MJ
395
396librelayd_la_LIBADD = libsessiond-comm.la
aa360a35
JG
397endif
398
87fb9fc0
JR
399
400if BUILD_LIB_KERNEL_CONSUMER
4ae04234
MJ
401noinst_LTLIBRARIES += libkernel-consumer.la
402
403libkernel_consumer_la_SOURCES = \
404 kernel-consumer/kernel-consumer.cpp \
c9e313bc 405 kernel-consumer/kernel-consumer.hpp
4ae04234
MJ
406
407libkernel_consumer_la_LIBADD = \
408 libkernel-ctl.la
87fb9fc0
JR
409endif
410
411if BUILD_LIB_UST_CONSUMER
4ae04234
MJ
412if HAVE_LIBLTTNG_UST_CTL
413noinst_LTLIBRARIES += libust-consumer.la
414
415libust_consumer_la_SOURCES = \
416 ust-consumer/ust-consumer.cpp \
c9e313bc 417 ust-consumer/ust-consumer.hpp
4ae04234
MJ
418
419libust_consumer_la_LIBADD = \
420 $(UST_CTL_LIBS)
421endif
87fb9fc0
JR
422endif
423
424if BUILD_LIB_TESTPOINT
4ae04234 425noinst_LTLIBRARIES += libtestpoint.la
87fb9fc0 426
4ae04234
MJ
427libtestpoint_la_SOURCES = \
428 testpoint/testpoint.cpp \
c9e313bc 429 testpoint/testpoint.hpp
87fb9fc0 430
4ae04234 431libtestpoint_la_LIBADD = $(DL_LIBS)
87fb9fc0 432endif
10a8a223 433
4ae04234
MJ
434
435# libstring-utils
436noinst_LTLIBRARIES += libstring-utils.la
437libstring_utils_la_SOURCES = \
a6df2497 438 string-utils/c-string-view.hpp \
c9e313bc 439 string-utils/format.hpp \
4ae04234 440 string-utils/string-utils.cpp \
c9e313bc 441 string-utils/string-utils.hpp
4ae04234 442
1c39da61 443
e358ddd5 444noinst_PROGRAMS = filter-grammar-test
740da7d5 445filter_grammar_test_SOURCES = filter-grammar-test.cpp
93903fd5 446filter_grammar_test_LDADD = libcommon-gpl.la
e358ddd5 447
4ae04234
MJ
448EXTRA_DIST = \
449 mi-lttng-4.1.xsd \
450 session.xsd
451
452xmldir = $(datadir)/xml/lttng
453dist_xml_DATA = session.xsd
454
455# Copy EXTRA_DIST files to the build directory
c49fc5e4
JR
456all-local:
457 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
458 for script in $(EXTRA_DIST); do \
459 cp -f $(srcdir)/$$script $(builddir); \
460 done; \
461 fi
462
463clean-local:
464 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
465 for script in $(EXTRA_DIST); do \
466 rm -f $(builddir)/$$script; \
467 done; \
468 fi
This page took 0.113832 seconds and 4 git commands to generate.