1 # SPDX-License-Identifier: GPL-2.0-only
3 AUTOMAKE_OPTIONS = subdir-objects
15 lttng-kernel-old.hpp \
23 noinst_LTLIBRARIES += libargpar.la
24 libargpar_la_SOURCES = \
30 noinst_LTLIBRARIES += libargpar-utils.la
31 libargpar_utils_la_SOURCES = \
32 argpar-utils/argpar-utils.cpp \
33 argpar-utils/argpar-utils.hpp
37 noinst_LTLIBRARIES += libbytecode.la
38 libbytecode_la_SOURCES = \
39 bytecode/bytecode.cpp \
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.
47 noinst_LTLIBRARIES += libcommon-lgpl.la
48 libcommon_lgpl_la_SOURCES = \
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 \
58 buffer-view.hpp buffer-view.cpp \
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 \
66 container-wrapper.hpp \
67 credentials.cpp credentials.hpp \
70 dynamic-array.cpp dynamic-array.hpp \
71 dynamic-buffer.cpp dynamic-buffer.hpp \
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 \
88 exception.cpp exception.hpp \
89 file-descriptor.hpp file-descriptor.cpp \
90 fd-handle.cpp fd-handle.hpp \
96 lockfile.cpp lockfile.hpp \
97 locked-reference.hpp \
98 logging-utils.hpp logging-utils.cpp \
101 make-unique-wrapper.hpp \
102 mi-lttng.cpp mi-lttng.hpp \
104 payload.cpp payload.hpp \
105 payload-view.cpp payload-view.hpp \
107 random.cpp random.hpp \
108 readwrite.cpp readwrite.hpp \
109 runas.cpp runas.hpp \
111 session-descriptor.cpp \
112 snapshot.cpp snapshot.hpp \
113 spawn-viewer.cpp spawn-viewer.hpp \
114 thread.cpp thread.hpp \
116 tracker.cpp tracker.hpp \
121 userspace-probe.cpp \
126 libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp
130 libcommon_lgpl_la_SOURCES += \
131 lttng-elf.cpp lttng-elf.hpp
134 libcommon_lgpl_la_LIBADD = \
139 libhashtable-lgpl.la \
140 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
143 # The libpath static archive contains GPLv2 compatible code. It is
144 # meant to be used by GPL executables.
145 noinst_LTLIBRARIES += libpath.la
146 libpath_la_SOURCES = \
150 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
151 # meant to be used by GPL executables.
152 noinst_LTLIBRARIES += libcommon-gpl.la
153 libcommon_gpl_la_SOURCES = \
155 context.cpp context.hpp \
156 daemonize.cpp daemonize.hpp \
157 filter.cpp filter.hpp \
158 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
159 futex.cpp futex.hpp \
160 index-allocator.cpp index-allocator.hpp \
164 trace-chunk.cpp trace-chunk.hpp \
165 trace-chunk-registry.hpp \
167 waiter.cpp waiter.hpp
169 libcommon_gpl_la_LIBADD = \
173 libhashtable-gpl.la \
178 noinst_LTLIBRARIES += libcompat.la
179 libcompat_la_SOURCES = \
180 compat/directory-handle.cpp \
181 compat/directory-handle.hpp \
200 noinst_LTLIBRARIES += libconfig.la
201 libconfig_la_SOURCES = \
202 config/config-internal.hpp \
203 config/config-session-abi.hpp \
204 config/session-config.cpp \
205 config/session-config.hpp
207 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
208 libconfig_la_LIBADD = ${libxml2_LIBS}
211 if BUILD_LIB_CONSUMER
212 noinst_LTLIBRARIES += libconsumer.la
214 libconsumer_la_SOURCES = \
215 consumer/consumer.cpp \
216 consumer/consumer.hpp \
217 consumer/consumer-metadata-cache.cpp \
218 consumer/consumer-metadata-cache.hpp \
219 consumer/consumer-stream.cpp \
220 consumer/consumer-stream.hpp \
221 consumer/consumer-testpoint.hpp \
222 consumer/consumer-timer.cpp \
223 consumer/consumer-timer.hpp \
224 consumer/metadata-bucket.cpp \
225 consumer/metadata-bucket.hpp
227 libconsumer_la_LIBADD = \
228 libkernel-consumer.la \
232 if HAVE_LIBLTTNG_UST_CTL
233 libconsumer_la_LIBADD += \
236 endif # BUILD_LIB_CONSUMER
240 noinst_LTLIBRARIES += libfd-tracker.la
241 libfd_tracker_la_SOURCES = \
242 fd-tracker/fd-tracker.cpp \
243 fd-tracker/fd-tracker.hpp \
244 fd-tracker/inode.cpp \
245 fd-tracker/inode.hpp \
246 fd-tracker/utils.cpp \
247 fd-tracker/utils.hpp \
248 fd-tracker/utils-poll.cpp
252 noinst_LTLIBRARIES += libfilter.la
254 libfilter_la_SOURCES = \
255 filter/filter-ast.hpp \
256 filter/filter-ir.hpp \
257 filter/filter-lexer.lpp \
258 filter/filter-parser.ypp \
259 filter/filter-symbols.hpp \
260 filter/filter-visitor-generate-bytecode.cpp \
261 filter/filter-visitor-generate-ir.cpp \
262 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
263 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
264 filter/filter-visitor-ir-validate-globbing.cpp \
265 filter/filter-visitor-ir-validate-string.cpp \
266 filter/filter-visitor-xml.cpp \
269 BUILT_SOURCES += filter/filter-parser.hpp
271 # Disable some warning flags for generated sources.
272 FILTER_WARN_FLAGS = \
273 -Wno-null-dereference \
274 -Wno-redundant-decls \
275 -Wno-unused-parameter
277 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
278 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
279 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
280 libfilter_la_LIBADD = libstring-utils.la
282 AM_YFLAGS = -t -d -v -Wno-yacc
284 # start with empty files to clean
288 # we have bison: we can clean the generated parser files
290 filter/filter-parser.cpp \
291 filter/filter-parser.hpp \
292 filter/filter-parser.output
294 # create target used to stop the build if we want to build the parser,
295 # but we don't have the necessary tool to do so
296 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
297 @echo "Error: Cannot build target because bison is missing."
298 @echo "Make sure bison is installed and run the configure script again."
301 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
305 # we have flex: we can clean the generated lexer files
306 CLEANFILES += filter/filter-lexer.cpp
308 # create target used to stop the build if we want to build the lexer,
309 # but we don't have the necessary tool to do so
310 filter/filter-lexer.cpp: filter/filter-lexer.lpp
311 @echo "Error: Cannot build target because flex is missing."
312 @echo "Make sure flex is installed and run the configure script again."
315 BUILT_SOURCES += filter/filter-lexer.cpp
319 noinst_LTLIBRARIES += libhashtable-lgpl.la
320 libhashtable_lgpl_la_SOURCES = \
322 hashtable/utils.cpp \
326 noinst_LTLIBRARIES += libhashtable-gpl.la
327 libhashtable_gpl_la_SOURCES = \
328 hashtable/hashtable.cpp \
329 hashtable/hashtable.hpp \
330 hashtable/hashtable-symbols.hpp
332 libhashtable_gpl_la_LIBADD = \
338 noinst_LTLIBRARIES += libhealth.la
340 libhealth_la_SOURCES = \
346 noinst_LTLIBRARIES += libini-config.la
347 libini_config_la_SOURCES = \
350 ini-config/ini-config.cpp \
351 ini-config/ini-config.hpp
355 noinst_LTLIBRARIES += libindex.la
357 libindex_la_SOURCES = \
358 index/ctf-index.hpp \
364 if BUILD_LIB_KERNEL_CTL
365 noinst_LTLIBRARIES += libkernel-ctl.la
367 libkernel_ctl_la_SOURCES = \
368 kernel-ctl/kernel-ctl.cpp \
369 kernel-ctl/kernel-ctl.hpp \
370 kernel-ctl/kernel-ioctl.hpp
373 if BUILD_LIB_SESSIOND_COMM
374 noinst_LTLIBRARIES += libsessiond-comm.la
376 libsessiond_comm_la_SOURCES = \
377 sessiond-comm/agent.hpp \
378 sessiond-comm/inet.cpp \
379 sessiond-comm/inet.hpp \
380 sessiond-comm/inet6.cpp \
381 sessiond-comm/inet6.hpp \
382 sessiond-comm/relayd.hpp \
383 sessiond-comm/sessiond-comm.cpp \
384 sessiond-comm/sessiond-comm.hpp
388 noinst_LTLIBRARIES += librelayd.la
390 librelayd_la_SOURCES = \
394 librelayd_la_LIBADD = libsessiond-comm.la
398 if BUILD_LIB_KERNEL_CONSUMER
399 noinst_LTLIBRARIES += libkernel-consumer.la
401 libkernel_consumer_la_SOURCES = \
402 kernel-consumer/kernel-consumer.cpp \
403 kernel-consumer/kernel-consumer.hpp
405 libkernel_consumer_la_LIBADD = \
409 if BUILD_LIB_UST_CONSUMER
410 if HAVE_LIBLTTNG_UST_CTL
411 noinst_LTLIBRARIES += libust-consumer.la
413 libust_consumer_la_SOURCES = \
414 ust-consumer/ust-consumer.cpp \
415 ust-consumer/ust-consumer.hpp
417 libust_consumer_la_LIBADD = \
422 if BUILD_LIB_TESTPOINT
423 noinst_LTLIBRARIES += libtestpoint.la
425 libtestpoint_la_SOURCES = \
426 testpoint/testpoint.cpp \
427 testpoint/testpoint.hpp
429 libtestpoint_la_LIBADD = $(DL_LIBS)
434 noinst_LTLIBRARIES += libstring-utils.la
435 libstring_utils_la_SOURCES = \
436 string-utils/c-string-view.hpp \
437 string-utils/format.hpp \
438 string-utils/string-utils.cpp \
439 string-utils/string-utils.hpp
442 noinst_PROGRAMS = filter-grammar-test
443 filter_grammar_test_SOURCES = filter-grammar-test.cpp
444 filter_grammar_test_LDADD = libcommon-gpl.la
450 xmldir = $(datadir)/xml/lttng
451 dist_xml_DATA = session.xsd
453 # Copy EXTRA_DIST files to the build directory
455 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
456 for script in $(EXTRA_DIST); do \
457 cp -f $(srcdir)/$$script $(builddir); \
462 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
463 for script in $(EXTRA_DIST); do \
464 rm -f $(builddir)/$$script; \