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 \
103 mi-lttng.cpp mi-lttng.hpp \
105 payload.cpp payload.hpp \
106 payload-view.cpp payload-view.hpp \
108 random.cpp random.hpp \
109 readwrite.cpp readwrite.hpp \
111 runas.cpp runas.hpp \
113 session-descriptor.cpp \
114 snapshot.cpp snapshot.hpp \
115 spawn-viewer.cpp spawn-viewer.hpp \
116 thread.cpp thread.hpp \
118 tracker.cpp tracker.hpp \
123 userspace-probe.cpp \
128 libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp
132 libcommon_lgpl_la_SOURCES += \
133 lttng-elf.cpp lttng-elf.hpp
136 libcommon_lgpl_la_LIBADD = \
141 libhashtable-lgpl.la \
142 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
145 # The libpath static archive contains GPLv2 compatible code. It is
146 # meant to be used by GPL executables.
147 noinst_LTLIBRARIES += libpath.la
148 libpath_la_SOURCES = \
152 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
153 # meant to be used by GPL executables.
154 noinst_LTLIBRARIES += libcommon-gpl.la
155 libcommon_gpl_la_SOURCES = \
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 \
166 trace-chunk.cpp trace-chunk.hpp \
167 trace-chunk-registry.hpp \
169 waiter.cpp waiter.hpp
171 libcommon_gpl_la_LIBADD = \
175 libhashtable-gpl.la \
180 noinst_LTLIBRARIES += libcompat.la
181 libcompat_la_SOURCES = \
182 compat/directory-handle.cpp \
183 compat/directory-handle.hpp \
202 noinst_LTLIBRARIES += libconfig.la
203 libconfig_la_SOURCES = \
204 config/config-internal.hpp \
205 config/config-session-abi.hpp \
206 config/session-config.cpp \
207 config/session-config.hpp
209 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
210 libconfig_la_LIBADD = ${libxml2_LIBS}
213 if BUILD_LIB_CONSUMER
214 noinst_LTLIBRARIES += libconsumer.la
216 libconsumer_la_SOURCES = \
217 consumer/consumer.cpp \
218 consumer/consumer.hpp \
219 consumer/consumer-metadata-cache.cpp \
220 consumer/consumer-metadata-cache.hpp \
221 consumer/consumer-stream.cpp \
222 consumer/consumer-stream.hpp \
223 consumer/consumer-testpoint.hpp \
224 consumer/consumer-timer.cpp \
225 consumer/consumer-timer.hpp \
226 consumer/metadata-bucket.cpp \
227 consumer/metadata-bucket.hpp
229 libconsumer_la_LIBADD = \
230 libkernel-consumer.la \
234 if HAVE_LIBLTTNG_UST_CTL
235 libconsumer_la_LIBADD += \
238 endif # BUILD_LIB_CONSUMER
242 noinst_LTLIBRARIES += libfd-tracker.la
243 libfd_tracker_la_SOURCES = \
244 fd-tracker/fd-tracker.cpp \
245 fd-tracker/fd-tracker.hpp \
246 fd-tracker/inode.cpp \
247 fd-tracker/inode.hpp \
248 fd-tracker/utils.cpp \
249 fd-tracker/utils.hpp \
250 fd-tracker/utils-poll.cpp
254 noinst_LTLIBRARIES += libfilter.la
256 libfilter_la_SOURCES = \
257 filter/filter-ast.hpp \
258 filter/filter-ir.hpp \
259 filter/filter-lexer.lpp \
260 filter/filter-parser.ypp \
261 filter/filter-symbols.hpp \
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 \
271 BUILT_SOURCES += filter/filter-parser.hpp
273 # Disable some warning flags for generated sources.
274 FILTER_WARN_FLAGS = \
275 -Wno-null-dereference \
276 -Wno-redundant-decls \
277 -Wno-unused-parameter
279 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
280 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
281 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
282 libfilter_la_LIBADD = libstring-utils.la
284 AM_YFLAGS = -t -d -v -Wno-yacc
286 # start with empty files to clean
290 # we have bison: we can clean the generated parser files
292 filter/filter-parser.cpp \
293 filter/filter-parser.hpp \
294 filter/filter-parser.output
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
298 filter/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."
303 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
307 # we have flex: we can clean the generated lexer files
308 CLEANFILES += filter/filter-lexer.cpp
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
312 filter/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."
317 BUILT_SOURCES += filter/filter-lexer.cpp
321 noinst_LTLIBRARIES += libhashtable-lgpl.la
322 libhashtable_lgpl_la_SOURCES = \
324 hashtable/utils.cpp \
328 noinst_LTLIBRARIES += libhashtable-gpl.la
329 libhashtable_gpl_la_SOURCES = \
330 hashtable/hashtable.cpp \
331 hashtable/hashtable.hpp \
332 hashtable/hashtable-symbols.hpp
334 libhashtable_gpl_la_LIBADD = \
340 noinst_LTLIBRARIES += libhealth.la
342 libhealth_la_SOURCES = \
348 noinst_LTLIBRARIES += libini-config.la
349 libini_config_la_SOURCES = \
352 ini-config/ini-config.cpp \
353 ini-config/ini-config.hpp
357 noinst_LTLIBRARIES += libindex.la
359 libindex_la_SOURCES = \
360 index/ctf-index.hpp \
366 if BUILD_LIB_KERNEL_CTL
367 noinst_LTLIBRARIES += libkernel-ctl.la
369 libkernel_ctl_la_SOURCES = \
370 kernel-ctl/kernel-ctl.cpp \
371 kernel-ctl/kernel-ctl.hpp \
372 kernel-ctl/kernel-ioctl.hpp
375 if BUILD_LIB_SESSIOND_COMM
376 noinst_LTLIBRARIES += libsessiond-comm.la
378 libsessiond_comm_la_SOURCES = \
379 sessiond-comm/agent.hpp \
380 sessiond-comm/inet.cpp \
381 sessiond-comm/inet.hpp \
382 sessiond-comm/inet6.cpp \
383 sessiond-comm/inet6.hpp \
384 sessiond-comm/relayd.hpp \
385 sessiond-comm/sessiond-comm.cpp \
386 sessiond-comm/sessiond-comm.hpp
390 noinst_LTLIBRARIES += librelayd.la
392 librelayd_la_SOURCES = \
396 librelayd_la_LIBADD = libsessiond-comm.la
400 if BUILD_LIB_KERNEL_CONSUMER
401 noinst_LTLIBRARIES += libkernel-consumer.la
403 libkernel_consumer_la_SOURCES = \
404 kernel-consumer/kernel-consumer.cpp \
405 kernel-consumer/kernel-consumer.hpp
407 libkernel_consumer_la_LIBADD = \
411 if BUILD_LIB_UST_CONSUMER
412 if HAVE_LIBLTTNG_UST_CTL
413 noinst_LTLIBRARIES += libust-consumer.la
415 libust_consumer_la_SOURCES = \
416 ust-consumer/ust-consumer.cpp \
417 ust-consumer/ust-consumer.hpp
419 libust_consumer_la_LIBADD = \
424 if BUILD_LIB_TESTPOINT
425 noinst_LTLIBRARIES += libtestpoint.la
427 libtestpoint_la_SOURCES = \
428 testpoint/testpoint.cpp \
429 testpoint/testpoint.hpp
431 libtestpoint_la_LIBADD = $(DL_LIBS)
436 noinst_LTLIBRARIES += libstring-utils.la
437 libstring_utils_la_SOURCES = \
438 string-utils/c-string-view.hpp \
439 string-utils/format.hpp \
440 string-utils/string-utils.cpp \
441 string-utils/string-utils.hpp
444 noinst_PROGRAMS = filter-grammar-test
445 filter_grammar_test_SOURCES = filter-grammar-test.cpp
446 filter_grammar_test_LDADD = libcommon-gpl.la
452 xmldir = $(datadir)/xml/lttng
453 dist_xml_DATA = session.xsd
455 # Copy EXTRA_DIST files to the build directory
457 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
458 for script in $(EXTRA_DIST); do \
459 cp -f $(srcdir)/$$script $(builddir); \
464 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
465 for script in $(EXTRA_DIST); do \
466 rm -f $(builddir)/$$script; \