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 \
60 conditions/buffer-usage.cpp \
61 conditions/condition.cpp \
62 conditions/event-rule-matches.cpp \
63 conditions/session-consumed-size.cpp \
64 conditions/session-rotation.cpp \
65 credentials.cpp credentials.hpp \
68 dynamic-array.cpp dynamic-array.hpp \
69 dynamic-buffer.cpp dynamic-buffer.hpp \
75 event-expr/event-expr.cpp \
76 event-field-value.cpp \
77 event-rule/event-rule.cpp \
78 event-rule/kernel-kprobe.cpp \
79 event-rule/kernel-syscall.cpp \
80 event-rule/kernel-uprobe.cpp \
81 event-rule/kernel-tracepoint.cpp \
82 event-rule/user-tracepoint.cpp \
83 event-rule/log4j-logging.cpp \
84 event-rule/jul-logging.cpp \
85 event-rule/python-logging.cpp \
86 exception.cpp exception.hpp \
87 fd-handle.cpp fd-handle.hpp\
93 make-unique-wrapper.hpp \
94 mi-lttng.cpp mi-lttng.hpp \
96 payload.cpp payload.hpp \
97 payload-view.cpp payload-view.hpp \
99 readwrite.cpp readwrite.hpp \
100 runas.cpp runas.hpp \
101 session-descriptor.cpp \
102 snapshot.cpp snapshot.hpp \
103 spawn-viewer.cpp spawn-viewer.hpp \
104 thread.cpp thread.hpp \
106 tracker.cpp tracker.hpp \
110 userspace-probe.cpp \
115 libcommon_lgpl_la_SOURCES += \
116 lttng-elf.cpp lttng-elf.hpp
119 libcommon_lgpl_la_LIBADD = \
124 libhashtable-lgpl.la \
125 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
128 # The libpath static archive contains GPLv2 compatible code. It is
129 # meant to be used by GPL executables.
130 noinst_LTLIBRARIES += libpath.la
131 libpath_la_SOURCES = \
135 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
136 # meant to be used by GPL executables.
137 noinst_LTLIBRARIES += libcommon-gpl.la
138 libcommon_gpl_la_SOURCES = \
140 context.cpp context.hpp \
141 daemonize.cpp daemonize.hpp \
142 filter.cpp filter.hpp \
143 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
144 futex.cpp futex.hpp \
145 index-allocator.cpp index-allocator.hpp \
149 trace-chunk.cpp trace-chunk.hpp \
150 trace-chunk-registry.hpp \
152 waiter.cpp waiter.hpp
154 libcommon_gpl_la_LIBADD = \
158 libhashtable-gpl.la \
163 noinst_LTLIBRARIES += libcompat.la
164 libcompat_la_SOURCES = \
165 compat/compat-fcntl.cpp \
166 compat/directory-handle.cpp \
167 compat/directory-handle.hpp \
187 noinst_LTLIBRARIES += libconfig.la
188 libconfig_la_SOURCES = \
189 config/config-internal.hpp \
190 config/config-session-abi.hpp \
191 config/session-config.cpp \
192 config/session-config.hpp
194 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
195 libconfig_la_LIBADD = ${libxml2_LIBS}
198 if BUILD_LIB_CONSUMER
199 noinst_LTLIBRARIES += libconsumer.la
201 libconsumer_la_SOURCES = \
202 consumer/consumer.cpp \
203 consumer/consumer.hpp \
204 consumer/consumer-metadata-cache.cpp \
205 consumer/consumer-metadata-cache.hpp \
206 consumer/consumer-stream.cpp \
207 consumer/consumer-stream.hpp \
208 consumer/consumer-testpoint.hpp \
209 consumer/consumer-timer.cpp \
210 consumer/consumer-timer.hpp \
211 consumer/metadata-bucket.cpp \
212 consumer/metadata-bucket.hpp
214 libconsumer_la_LIBADD = \
215 libkernel-consumer.la \
219 if HAVE_LIBLTTNG_UST_CTL
220 libconsumer_la_LIBADD += \
223 endif # BUILD_LIB_CONSUMER
227 noinst_LTLIBRARIES += libfd-tracker.la
228 libfd_tracker_la_SOURCES = \
229 fd-tracker/fd-tracker.cpp \
230 fd-tracker/fd-tracker.hpp \
231 fd-tracker/inode.cpp \
232 fd-tracker/inode.hpp \
233 fd-tracker/utils.cpp \
234 fd-tracker/utils.hpp \
235 fd-tracker/utils-poll.cpp
239 noinst_LTLIBRARIES += libfilter.la
241 libfilter_la_SOURCES = \
242 filter/filter-ast.hpp \
243 filter/filter-ir.hpp \
244 filter/filter-lexer.lpp \
245 filter/filter-parser.ypp \
246 filter/filter-symbols.hpp \
247 filter/filter-visitor-generate-bytecode.cpp \
248 filter/filter-visitor-generate-ir.cpp \
249 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
250 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
251 filter/filter-visitor-ir-validate-globbing.cpp \
252 filter/filter-visitor-ir-validate-string.cpp \
253 filter/filter-visitor-xml.cpp \
256 BUILT_SOURCES += filter/filter-parser.hpp
258 # Disable some warning flags for generated sources.
259 FILTER_WARN_FLAGS = \
260 -Wno-null-dereference \
261 -Wno-redundant-decls \
262 -Wno-unused-parameter
264 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
265 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
266 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
267 libfilter_la_LIBADD = libstring-utils.la
269 AM_YFLAGS = -t -d -v -Wno-yacc
271 # start with empty files to clean
275 # we have bison: we can clean the generated parser files
277 filter/filter-parser.cpp \
278 filter/filter-parser.hpp \
279 filter/filter-parser.output
281 # create target used to stop the build if we want to build the parser,
282 # but we don't have the necessary tool to do so
283 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
284 @echo "Error: Cannot build target because bison is missing."
285 @echo "Make sure bison is installed and run the configure script again."
288 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
292 # we have flex: we can clean the generated lexer files
293 CLEANFILES += filter/filter-lexer.cpp
295 # create target used to stop the build if we want to build the lexer,
296 # but we don't have the necessary tool to do so
297 filter/filter-lexer.cpp: filter/filter-lexer.lpp
298 @echo "Error: Cannot build target because flex is missing."
299 @echo "Make sure flex is installed and run the configure script again."
302 BUILT_SOURCES += filter/filter-lexer.cpp
306 noinst_LTLIBRARIES += libhashtable-lgpl.la
307 libhashtable_lgpl_la_SOURCES = \
309 hashtable/utils.cpp \
313 noinst_LTLIBRARIES += libhashtable-gpl.la
314 libhashtable_gpl_la_SOURCES = \
315 hashtable/hashtable.cpp \
316 hashtable/hashtable.hpp \
317 hashtable/hashtable-symbols.hpp
319 libhashtable_gpl_la_LIBADD = \
325 noinst_LTLIBRARIES += libhealth.la
327 libhealth_la_SOURCES = \
333 noinst_LTLIBRARIES += libini-config.la
334 libini_config_la_SOURCES = \
337 ini-config/ini-config.cpp \
338 ini-config/ini-config.hpp
342 noinst_LTLIBRARIES += libindex.la
344 libindex_la_SOURCES = \
345 index/ctf-index.hpp \
351 if BUILD_LIB_KERNEL_CTL
352 noinst_LTLIBRARIES += libkernel-ctl.la
354 libkernel_ctl_la_SOURCES = \
355 kernel-ctl/kernel-ctl.cpp \
356 kernel-ctl/kernel-ctl.hpp \
357 kernel-ctl/kernel-ioctl.hpp
360 if BUILD_LIB_SESSIOND_COMM
361 noinst_LTLIBRARIES += libsessiond-comm.la
363 libsessiond_comm_la_SOURCES = \
364 sessiond-comm/agent.hpp \
365 sessiond-comm/inet.cpp \
366 sessiond-comm/inet.hpp \
367 sessiond-comm/inet6.cpp \
368 sessiond-comm/inet6.hpp \
369 sessiond-comm/relayd.hpp \
370 sessiond-comm/sessiond-comm.cpp \
371 sessiond-comm/sessiond-comm.hpp
375 noinst_LTLIBRARIES += librelayd.la
377 librelayd_la_SOURCES = \
381 librelayd_la_LIBADD = libsessiond-comm.la
385 if BUILD_LIB_KERNEL_CONSUMER
386 noinst_LTLIBRARIES += libkernel-consumer.la
388 libkernel_consumer_la_SOURCES = \
389 kernel-consumer/kernel-consumer.cpp \
390 kernel-consumer/kernel-consumer.hpp
392 libkernel_consumer_la_LIBADD = \
396 if BUILD_LIB_UST_CONSUMER
397 if HAVE_LIBLTTNG_UST_CTL
398 noinst_LTLIBRARIES += libust-consumer.la
400 libust_consumer_la_SOURCES = \
401 ust-consumer/ust-consumer.cpp \
402 ust-consumer/ust-consumer.hpp
404 libust_consumer_la_LIBADD = \
409 if BUILD_LIB_TESTPOINT
410 noinst_LTLIBRARIES += libtestpoint.la
412 libtestpoint_la_SOURCES = \
413 testpoint/testpoint.cpp \
414 testpoint/testpoint.hpp
416 libtestpoint_la_LIBADD = $(DL_LIBS)
421 noinst_LTLIBRARIES += libstring-utils.la
422 libstring_utils_la_SOURCES = \
423 string-utils/format.hpp \
424 string-utils/string-utils.cpp \
425 string-utils/string-utils.hpp
428 noinst_PROGRAMS = filter-grammar-test
429 filter_grammar_test_SOURCES = filter-grammar-test.cpp
430 filter_grammar_test_LDADD = libcommon-gpl.la
436 xmldir = $(datadir)/xml/lttng
437 dist_xml_DATA = session.xsd
439 # Copy EXTRA_DIST files to the build directory
441 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
442 for script in $(EXTRA_DIST); do \
443 cp -f $(srcdir)/$$script $(builddir); \
448 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
449 for script in $(EXTRA_DIST); do \
450 rm -f $(builddir)/$$script; \