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 \
89 fd-handle.cpp fd-handle.hpp\
93 locked-reference.hpp \
94 logging-utils.hpp logging-utils.cpp \
97 make-unique-wrapper.hpp \
98 mi-lttng.cpp mi-lttng.hpp \
100 payload.cpp payload.hpp \
101 payload-view.cpp payload-view.hpp \
103 random.cpp random.hpp \
104 readwrite.cpp readwrite.hpp \
105 runas.cpp runas.hpp \
107 session-descriptor.cpp \
108 snapshot.cpp snapshot.hpp \
109 spawn-viewer.cpp spawn-viewer.hpp \
110 thread.cpp thread.hpp \
112 tracker.cpp tracker.hpp \
116 userspace-probe.cpp \
121 libcommon_lgpl_la_SOURCES += \
122 lttng-elf.cpp lttng-elf.hpp
125 libcommon_lgpl_la_LIBADD = \
130 libhashtable-lgpl.la \
131 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
134 # The libpath static archive contains GPLv2 compatible code. It is
135 # meant to be used by GPL executables.
136 noinst_LTLIBRARIES += libpath.la
137 libpath_la_SOURCES = \
141 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
142 # meant to be used by GPL executables.
143 noinst_LTLIBRARIES += libcommon-gpl.la
144 libcommon_gpl_la_SOURCES = \
146 context.cpp context.hpp \
147 daemonize.cpp daemonize.hpp \
148 filter.cpp filter.hpp \
149 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
150 futex.cpp futex.hpp \
151 index-allocator.cpp index-allocator.hpp \
155 trace-chunk.cpp trace-chunk.hpp \
156 trace-chunk-registry.hpp \
158 waiter.cpp waiter.hpp
160 libcommon_gpl_la_LIBADD = \
164 libhashtable-gpl.la \
169 noinst_LTLIBRARIES += libcompat.la
170 libcompat_la_SOURCES = \
171 compat/compat-fcntl.cpp \
172 compat/directory-handle.cpp \
173 compat/directory-handle.hpp \
193 noinst_LTLIBRARIES += libconfig.la
194 libconfig_la_SOURCES = \
195 config/config-internal.hpp \
196 config/config-session-abi.hpp \
197 config/session-config.cpp \
198 config/session-config.hpp
200 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
201 libconfig_la_LIBADD = ${libxml2_LIBS}
204 if BUILD_LIB_CONSUMER
205 noinst_LTLIBRARIES += libconsumer.la
207 libconsumer_la_SOURCES = \
208 consumer/consumer.cpp \
209 consumer/consumer.hpp \
210 consumer/consumer-metadata-cache.cpp \
211 consumer/consumer-metadata-cache.hpp \
212 consumer/consumer-stream.cpp \
213 consumer/consumer-stream.hpp \
214 consumer/consumer-testpoint.hpp \
215 consumer/consumer-timer.cpp \
216 consumer/consumer-timer.hpp \
217 consumer/metadata-bucket.cpp \
218 consumer/metadata-bucket.hpp
220 libconsumer_la_LIBADD = \
221 libkernel-consumer.la \
225 if HAVE_LIBLTTNG_UST_CTL
226 libconsumer_la_LIBADD += \
229 endif # BUILD_LIB_CONSUMER
233 noinst_LTLIBRARIES += libfd-tracker.la
234 libfd_tracker_la_SOURCES = \
235 fd-tracker/fd-tracker.cpp \
236 fd-tracker/fd-tracker.hpp \
237 fd-tracker/inode.cpp \
238 fd-tracker/inode.hpp \
239 fd-tracker/utils.cpp \
240 fd-tracker/utils.hpp \
241 fd-tracker/utils-poll.cpp
245 noinst_LTLIBRARIES += libfilter.la
247 libfilter_la_SOURCES = \
248 filter/filter-ast.hpp \
249 filter/filter-ir.hpp \
250 filter/filter-lexer.lpp \
251 filter/filter-parser.ypp \
252 filter/filter-symbols.hpp \
253 filter/filter-visitor-generate-bytecode.cpp \
254 filter/filter-visitor-generate-ir.cpp \
255 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
256 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
257 filter/filter-visitor-ir-validate-globbing.cpp \
258 filter/filter-visitor-ir-validate-string.cpp \
259 filter/filter-visitor-xml.cpp \
262 BUILT_SOURCES += filter/filter-parser.hpp
264 # Disable some warning flags for generated sources.
265 FILTER_WARN_FLAGS = \
266 -Wno-null-dereference \
267 -Wno-redundant-decls \
268 -Wno-unused-parameter
270 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
271 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
272 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
273 libfilter_la_LIBADD = libstring-utils.la
275 AM_YFLAGS = -t -d -v -Wno-yacc
277 # start with empty files to clean
281 # we have bison: we can clean the generated parser files
283 filter/filter-parser.cpp \
284 filter/filter-parser.hpp \
285 filter/filter-parser.output
287 # create target used to stop the build if we want to build the parser,
288 # but we don't have the necessary tool to do so
289 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
290 @echo "Error: Cannot build target because bison is missing."
291 @echo "Make sure bison is installed and run the configure script again."
294 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
298 # we have flex: we can clean the generated lexer files
299 CLEANFILES += filter/filter-lexer.cpp
301 # create target used to stop the build if we want to build the lexer,
302 # but we don't have the necessary tool to do so
303 filter/filter-lexer.cpp: filter/filter-lexer.lpp
304 @echo "Error: Cannot build target because flex is missing."
305 @echo "Make sure flex is installed and run the configure script again."
308 BUILT_SOURCES += filter/filter-lexer.cpp
312 noinst_LTLIBRARIES += libhashtable-lgpl.la
313 libhashtable_lgpl_la_SOURCES = \
315 hashtable/utils.cpp \
319 noinst_LTLIBRARIES += libhashtable-gpl.la
320 libhashtable_gpl_la_SOURCES = \
321 hashtable/hashtable.cpp \
322 hashtable/hashtable.hpp \
323 hashtable/hashtable-symbols.hpp
325 libhashtable_gpl_la_LIBADD = \
331 noinst_LTLIBRARIES += libhealth.la
333 libhealth_la_SOURCES = \
339 noinst_LTLIBRARIES += libini-config.la
340 libini_config_la_SOURCES = \
343 ini-config/ini-config.cpp \
344 ini-config/ini-config.hpp
348 noinst_LTLIBRARIES += libindex.la
350 libindex_la_SOURCES = \
351 index/ctf-index.hpp \
357 if BUILD_LIB_KERNEL_CTL
358 noinst_LTLIBRARIES += libkernel-ctl.la
360 libkernel_ctl_la_SOURCES = \
361 kernel-ctl/kernel-ctl.cpp \
362 kernel-ctl/kernel-ctl.hpp \
363 kernel-ctl/kernel-ioctl.hpp
366 if BUILD_LIB_SESSIOND_COMM
367 noinst_LTLIBRARIES += libsessiond-comm.la
369 libsessiond_comm_la_SOURCES = \
370 sessiond-comm/agent.hpp \
371 sessiond-comm/inet.cpp \
372 sessiond-comm/inet.hpp \
373 sessiond-comm/inet6.cpp \
374 sessiond-comm/inet6.hpp \
375 sessiond-comm/relayd.hpp \
376 sessiond-comm/sessiond-comm.cpp \
377 sessiond-comm/sessiond-comm.hpp
381 noinst_LTLIBRARIES += librelayd.la
383 librelayd_la_SOURCES = \
387 librelayd_la_LIBADD = libsessiond-comm.la
391 if BUILD_LIB_KERNEL_CONSUMER
392 noinst_LTLIBRARIES += libkernel-consumer.la
394 libkernel_consumer_la_SOURCES = \
395 kernel-consumer/kernel-consumer.cpp \
396 kernel-consumer/kernel-consumer.hpp
398 libkernel_consumer_la_LIBADD = \
402 if BUILD_LIB_UST_CONSUMER
403 if HAVE_LIBLTTNG_UST_CTL
404 noinst_LTLIBRARIES += libust-consumer.la
406 libust_consumer_la_SOURCES = \
407 ust-consumer/ust-consumer.cpp \
408 ust-consumer/ust-consumer.hpp
410 libust_consumer_la_LIBADD = \
415 if BUILD_LIB_TESTPOINT
416 noinst_LTLIBRARIES += libtestpoint.la
418 libtestpoint_la_SOURCES = \
419 testpoint/testpoint.cpp \
420 testpoint/testpoint.hpp
422 libtestpoint_la_LIBADD = $(DL_LIBS)
427 noinst_LTLIBRARIES += libstring-utils.la
428 libstring_utils_la_SOURCES = \
429 string-utils/format.hpp \
430 string-utils/string-utils.cpp \
431 string-utils/string-utils.hpp
434 noinst_PROGRAMS = filter-grammar-test
435 filter_grammar_test_SOURCES = filter-grammar-test.cpp
436 filter_grammar_test_LDADD = libcommon-gpl.la
442 xmldir = $(datadir)/xml/lttng
443 dist_xml_DATA = session.xsd
445 # Copy EXTRA_DIST files to the build directory
447 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
448 for script in $(EXTRA_DIST); do \
449 cp -f $(srcdir)/$$script $(builddir); \
454 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
455 for script in $(EXTRA_DIST); do \
456 rm -f $(builddir)/$$script; \