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 credentials.cpp credentials.hpp \
69 dynamic-array.cpp dynamic-array.hpp \
70 dynamic-buffer.cpp dynamic-buffer.hpp \
76 event-expr/event-expr.cpp \
77 event-field-value.cpp \
78 event-rule/event-rule.cpp \
79 event-rule/kernel-kprobe.cpp \
80 event-rule/kernel-syscall.cpp \
81 event-rule/kernel-uprobe.cpp \
82 event-rule/kernel-tracepoint.cpp \
83 event-rule/user-tracepoint.cpp \
84 event-rule/log4j-logging.cpp \
85 event-rule/jul-logging.cpp \
86 event-rule/python-logging.cpp \
87 exception.cpp exception.hpp \
88 file-descriptor.hpp file-descriptor.cpp \
89 fd-handle.cpp fd-handle.hpp\
95 locked-reference.hpp \
96 logging-utils.hpp logging-utils.cpp \
99 make-unique-wrapper.hpp \
100 mi-lttng.cpp mi-lttng.hpp \
102 payload.cpp payload.hpp \
103 payload-view.cpp payload-view.hpp \
105 random.cpp random.hpp \
106 readwrite.cpp readwrite.hpp \
107 runas.cpp runas.hpp \
109 session-descriptor.cpp \
110 snapshot.cpp snapshot.hpp \
111 spawn-viewer.cpp spawn-viewer.hpp \
112 thread.cpp thread.hpp \
114 tracker.cpp tracker.hpp \
118 userspace-probe.cpp \
123 libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp
127 libcommon_lgpl_la_SOURCES += \
128 lttng-elf.cpp lttng-elf.hpp
131 libcommon_lgpl_la_LIBADD = \
136 libhashtable-lgpl.la \
137 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
140 # The libpath static archive contains GPLv2 compatible code. It is
141 # meant to be used by GPL executables.
142 noinst_LTLIBRARIES += libpath.la
143 libpath_la_SOURCES = \
147 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
148 # meant to be used by GPL executables.
149 noinst_LTLIBRARIES += libcommon-gpl.la
150 libcommon_gpl_la_SOURCES = \
152 context.cpp context.hpp \
153 daemonize.cpp daemonize.hpp \
154 filter.cpp filter.hpp \
155 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
156 futex.cpp futex.hpp \
157 index-allocator.cpp index-allocator.hpp \
161 trace-chunk.cpp trace-chunk.hpp \
162 trace-chunk-registry.hpp \
164 waiter.cpp waiter.hpp
166 libcommon_gpl_la_LIBADD = \
170 libhashtable-gpl.la \
175 noinst_LTLIBRARIES += libcompat.la
176 libcompat_la_SOURCES = \
177 compat/directory-handle.cpp \
178 compat/directory-handle.hpp \
197 noinst_LTLIBRARIES += libconfig.la
198 libconfig_la_SOURCES = \
199 config/config-internal.hpp \
200 config/config-session-abi.hpp \
201 config/session-config.cpp \
202 config/session-config.hpp
204 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
205 libconfig_la_LIBADD = ${libxml2_LIBS}
208 if BUILD_LIB_CONSUMER
209 noinst_LTLIBRARIES += libconsumer.la
211 libconsumer_la_SOURCES = \
212 consumer/consumer.cpp \
213 consumer/consumer.hpp \
214 consumer/consumer-metadata-cache.cpp \
215 consumer/consumer-metadata-cache.hpp \
216 consumer/consumer-stream.cpp \
217 consumer/consumer-stream.hpp \
218 consumer/consumer-testpoint.hpp \
219 consumer/consumer-timer.cpp \
220 consumer/consumer-timer.hpp \
221 consumer/metadata-bucket.cpp \
222 consumer/metadata-bucket.hpp
224 libconsumer_la_LIBADD = \
225 libkernel-consumer.la \
229 if HAVE_LIBLTTNG_UST_CTL
230 libconsumer_la_LIBADD += \
233 endif # BUILD_LIB_CONSUMER
237 noinst_LTLIBRARIES += libfd-tracker.la
238 libfd_tracker_la_SOURCES = \
239 fd-tracker/fd-tracker.cpp \
240 fd-tracker/fd-tracker.hpp \
241 fd-tracker/inode.cpp \
242 fd-tracker/inode.hpp \
243 fd-tracker/utils.cpp \
244 fd-tracker/utils.hpp \
245 fd-tracker/utils-poll.cpp
249 noinst_LTLIBRARIES += libfilter.la
251 libfilter_la_SOURCES = \
252 filter/filter-ast.hpp \
253 filter/filter-ir.hpp \
254 filter/filter-lexer.lpp \
255 filter/filter-parser.ypp \
256 filter/filter-symbols.hpp \
257 filter/filter-visitor-generate-bytecode.cpp \
258 filter/filter-visitor-generate-ir.cpp \
259 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
260 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
261 filter/filter-visitor-ir-validate-globbing.cpp \
262 filter/filter-visitor-ir-validate-string.cpp \
263 filter/filter-visitor-xml.cpp \
266 BUILT_SOURCES += filter/filter-parser.hpp
268 # Disable some warning flags for generated sources.
269 FILTER_WARN_FLAGS = \
270 -Wno-null-dereference \
271 -Wno-redundant-decls \
272 -Wno-unused-parameter
274 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
275 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
276 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
277 libfilter_la_LIBADD = libstring-utils.la
279 AM_YFLAGS = -t -d -v -Wno-yacc
281 # start with empty files to clean
285 # we have bison: we can clean the generated parser files
287 filter/filter-parser.cpp \
288 filter/filter-parser.hpp \
289 filter/filter-parser.output
291 # create target used to stop the build if we want to build the parser,
292 # but we don't have the necessary tool to do so
293 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
294 @echo "Error: Cannot build target because bison is missing."
295 @echo "Make sure bison is installed and run the configure script again."
298 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
302 # we have flex: we can clean the generated lexer files
303 CLEANFILES += filter/filter-lexer.cpp
305 # create target used to stop the build if we want to build the lexer,
306 # but we don't have the necessary tool to do so
307 filter/filter-lexer.cpp: filter/filter-lexer.lpp
308 @echo "Error: Cannot build target because flex is missing."
309 @echo "Make sure flex is installed and run the configure script again."
312 BUILT_SOURCES += filter/filter-lexer.cpp
316 noinst_LTLIBRARIES += libhashtable-lgpl.la
317 libhashtable_lgpl_la_SOURCES = \
319 hashtable/utils.cpp \
323 noinst_LTLIBRARIES += libhashtable-gpl.la
324 libhashtable_gpl_la_SOURCES = \
325 hashtable/hashtable.cpp \
326 hashtable/hashtable.hpp \
327 hashtable/hashtable-symbols.hpp
329 libhashtable_gpl_la_LIBADD = \
335 noinst_LTLIBRARIES += libhealth.la
337 libhealth_la_SOURCES = \
343 noinst_LTLIBRARIES += libini-config.la
344 libini_config_la_SOURCES = \
347 ini-config/ini-config.cpp \
348 ini-config/ini-config.hpp
352 noinst_LTLIBRARIES += libindex.la
354 libindex_la_SOURCES = \
355 index/ctf-index.hpp \
361 if BUILD_LIB_KERNEL_CTL
362 noinst_LTLIBRARIES += libkernel-ctl.la
364 libkernel_ctl_la_SOURCES = \
365 kernel-ctl/kernel-ctl.cpp \
366 kernel-ctl/kernel-ctl.hpp \
367 kernel-ctl/kernel-ioctl.hpp
370 if BUILD_LIB_SESSIOND_COMM
371 noinst_LTLIBRARIES += libsessiond-comm.la
373 libsessiond_comm_la_SOURCES = \
374 sessiond-comm/agent.hpp \
375 sessiond-comm/inet.cpp \
376 sessiond-comm/inet.hpp \
377 sessiond-comm/inet6.cpp \
378 sessiond-comm/inet6.hpp \
379 sessiond-comm/relayd.hpp \
380 sessiond-comm/sessiond-comm.cpp \
381 sessiond-comm/sessiond-comm.hpp
385 noinst_LTLIBRARIES += librelayd.la
387 librelayd_la_SOURCES = \
391 librelayd_la_LIBADD = libsessiond-comm.la
395 if BUILD_LIB_KERNEL_CONSUMER
396 noinst_LTLIBRARIES += libkernel-consumer.la
398 libkernel_consumer_la_SOURCES = \
399 kernel-consumer/kernel-consumer.cpp \
400 kernel-consumer/kernel-consumer.hpp
402 libkernel_consumer_la_LIBADD = \
406 if BUILD_LIB_UST_CONSUMER
407 if HAVE_LIBLTTNG_UST_CTL
408 noinst_LTLIBRARIES += libust-consumer.la
410 libust_consumer_la_SOURCES = \
411 ust-consumer/ust-consumer.cpp \
412 ust-consumer/ust-consumer.hpp
414 libust_consumer_la_LIBADD = \
419 if BUILD_LIB_TESTPOINT
420 noinst_LTLIBRARIES += libtestpoint.la
422 libtestpoint_la_SOURCES = \
423 testpoint/testpoint.cpp \
424 testpoint/testpoint.hpp
426 libtestpoint_la_LIBADD = $(DL_LIBS)
431 noinst_LTLIBRARIES += libstring-utils.la
432 libstring_utils_la_SOURCES = \
433 string-utils/format.hpp \
434 string-utils/string-utils.cpp \
435 string-utils/string-utils.hpp
438 noinst_PROGRAMS = filter-grammar-test
439 filter_grammar_test_SOURCES = filter-grammar-test.cpp
440 filter_grammar_test_LDADD = libcommon-gpl.la
446 xmldir = $(datadir)/xml/lttng
447 dist_xml_DATA = session.xsd
449 # Copy EXTRA_DIST files to the build directory
451 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
452 for script in $(EXTRA_DIST); do \
453 cp -f $(srcdir)/$$script $(builddir); \
458 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
459 for script in $(EXTRA_DIST); do \
460 rm -f $(builddir)/$$script; \