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\
91 make-unique-wrapper.hpp \
92 mi-lttng.cpp mi-lttng.hpp \
94 payload.cpp payload.hpp \
95 payload-view.cpp payload-view.hpp \
96 readwrite.cpp readwrite.hpp \
98 session-descriptor.cpp \
99 snapshot.cpp snapshot.hpp \
100 spawn-viewer.cpp spawn-viewer.hpp \
101 thread.cpp thread.hpp \
103 tracker.cpp tracker.hpp \
107 userspace-probe.cpp \
111 libcommon_lgpl_la_SOURCES += \
112 lttng-elf.cpp lttng-elf.hpp
115 libcommon_lgpl_la_LIBADD = \
120 libhashtable-lgpl.la \
121 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
124 # The libpath static archive contains GPLv2 compatible code. It is
125 # meant to be used by GPL executables.
126 noinst_LTLIBRARIES += libpath.la
127 libpath_la_SOURCES = \
131 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
132 # meant to be used by GPL executables.
133 noinst_LTLIBRARIES += libcommon-gpl.la
134 libcommon_gpl_la_SOURCES = \
136 context.cpp context.hpp \
137 daemonize.cpp daemonize.hpp \
138 filter.cpp filter.hpp \
139 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
140 futex.cpp futex.hpp \
141 index-allocator.cpp index-allocator.hpp \
145 trace-chunk.cpp trace-chunk.hpp \
146 trace-chunk-registry.hpp \
148 waiter.cpp waiter.hpp
150 libcommon_gpl_la_LIBADD = \
154 libhashtable-gpl.la \
159 noinst_LTLIBRARIES += libcompat.la
160 libcompat_la_SOURCES = \
161 compat/compat-fcntl.cpp \
162 compat/directory-handle.cpp \
163 compat/directory-handle.hpp \
183 noinst_LTLIBRARIES += libconfig.la
184 libconfig_la_SOURCES = \
185 config/config-internal.hpp \
186 config/config-session-abi.hpp \
187 config/session-config.cpp \
188 config/session-config.hpp
190 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
191 libconfig_la_LIBADD = ${libxml2_LIBS}
194 if BUILD_LIB_CONSUMER
195 noinst_LTLIBRARIES += libconsumer.la
197 libconsumer_la_SOURCES = \
198 consumer/consumer.cpp \
199 consumer/consumer.hpp \
200 consumer/consumer-metadata-cache.cpp \
201 consumer/consumer-metadata-cache.hpp \
202 consumer/consumer-stream.cpp \
203 consumer/consumer-stream.hpp \
204 consumer/consumer-testpoint.hpp \
205 consumer/consumer-timer.cpp \
206 consumer/consumer-timer.hpp \
207 consumer/metadata-bucket.cpp \
208 consumer/metadata-bucket.hpp
210 libconsumer_la_LIBADD = \
211 libkernel-consumer.la \
215 if HAVE_LIBLTTNG_UST_CTL
216 libconsumer_la_LIBADD += \
219 endif # BUILD_LIB_CONSUMER
223 noinst_LTLIBRARIES += libfd-tracker.la
224 libfd_tracker_la_SOURCES = \
225 fd-tracker/fd-tracker.cpp \
226 fd-tracker/fd-tracker.hpp \
227 fd-tracker/inode.cpp \
228 fd-tracker/inode.hpp \
229 fd-tracker/utils.cpp \
230 fd-tracker/utils.hpp \
231 fd-tracker/utils-poll.cpp
235 noinst_LTLIBRARIES += libfilter.la
237 libfilter_la_SOURCES = \
238 filter/filter-ast.hpp \
239 filter/filter-ir.hpp \
240 filter/filter-lexer.lpp \
241 filter/filter-parser.ypp \
242 filter/filter-symbols.hpp \
243 filter/filter-visitor-generate-bytecode.cpp \
244 filter/filter-visitor-generate-ir.cpp \
245 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
246 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
247 filter/filter-visitor-ir-validate-globbing.cpp \
248 filter/filter-visitor-ir-validate-string.cpp \
249 filter/filter-visitor-xml.cpp \
252 BUILT_SOURCES += filter/filter-parser.hpp
254 # Disable some warning flags for generated sources.
255 FILTER_WARN_FLAGS = \
256 -Wno-null-dereference \
257 -Wno-redundant-decls \
258 -Wno-unused-parameter
260 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
261 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
262 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
263 libfilter_la_LIBADD = libstring-utils.la
265 AM_YFLAGS = -t -d -v -Wno-yacc
267 # start with empty files to clean
271 # we have bison: we can clean the generated parser files
273 filter/filter-parser.cpp \
274 filter/filter-parser.hpp \
275 filter/filter-parser.output
277 # create target used to stop the build if we want to build the parser,
278 # but we don't have the necessary tool to do so
279 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
280 @echo "Error: Cannot build target because bison is missing."
281 @echo "Make sure bison is installed and run the configure script again."
284 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
288 # we have flex: we can clean the generated lexer files
289 CLEANFILES += filter/filter-lexer.cpp
291 # create target used to stop the build if we want to build the lexer,
292 # but we don't have the necessary tool to do so
293 filter/filter-lexer.cpp: filter/filter-lexer.lpp
294 @echo "Error: Cannot build target because flex is missing."
295 @echo "Make sure flex is installed and run the configure script again."
298 BUILT_SOURCES += filter/filter-lexer.cpp
302 noinst_LTLIBRARIES += libhashtable-lgpl.la
303 libhashtable_lgpl_la_SOURCES = \
305 hashtable/utils.cpp \
309 noinst_LTLIBRARIES += libhashtable-gpl.la
310 libhashtable_gpl_la_SOURCES = \
311 hashtable/hashtable.cpp \
312 hashtable/hashtable.hpp \
313 hashtable/hashtable-symbols.hpp
315 libhashtable_gpl_la_LIBADD = \
321 noinst_LTLIBRARIES += libhealth.la
323 libhealth_la_SOURCES = \
329 noinst_LTLIBRARIES += libini-config.la
330 libini_config_la_SOURCES = \
333 ini-config/ini-config.cpp \
334 ini-config/ini-config.hpp
338 noinst_LTLIBRARIES += libindex.la
340 libindex_la_SOURCES = \
341 index/ctf-index.hpp \
347 if BUILD_LIB_KERNEL_CTL
348 noinst_LTLIBRARIES += libkernel-ctl.la
350 libkernel_ctl_la_SOURCES = \
351 kernel-ctl/kernel-ctl.cpp \
352 kernel-ctl/kernel-ctl.hpp \
353 kernel-ctl/kernel-ioctl.hpp
356 if BUILD_LIB_SESSIOND_COMM
357 noinst_LTLIBRARIES += libsessiond-comm.la
359 libsessiond_comm_la_SOURCES = \
360 sessiond-comm/agent.hpp \
361 sessiond-comm/inet.cpp \
362 sessiond-comm/inet.hpp \
363 sessiond-comm/inet6.cpp \
364 sessiond-comm/inet6.hpp \
365 sessiond-comm/relayd.hpp \
366 sessiond-comm/sessiond-comm.cpp \
367 sessiond-comm/sessiond-comm.hpp
371 noinst_LTLIBRARIES += librelayd.la
373 librelayd_la_SOURCES = \
377 librelayd_la_LIBADD = libsessiond-comm.la
381 if BUILD_LIB_KERNEL_CONSUMER
382 noinst_LTLIBRARIES += libkernel-consumer.la
384 libkernel_consumer_la_SOURCES = \
385 kernel-consumer/kernel-consumer.cpp \
386 kernel-consumer/kernel-consumer.hpp
388 libkernel_consumer_la_LIBADD = \
392 if BUILD_LIB_UST_CONSUMER
393 if HAVE_LIBLTTNG_UST_CTL
394 noinst_LTLIBRARIES += libust-consumer.la
396 libust_consumer_la_SOURCES = \
397 ust-consumer/ust-consumer.cpp \
398 ust-consumer/ust-consumer.hpp
400 libust_consumer_la_LIBADD = \
405 if BUILD_LIB_TESTPOINT
406 noinst_LTLIBRARIES += libtestpoint.la
408 libtestpoint_la_SOURCES = \
409 testpoint/testpoint.cpp \
410 testpoint/testpoint.hpp
412 libtestpoint_la_LIBADD = $(DL_LIBS)
417 noinst_LTLIBRARIES += libstring-utils.la
418 libstring_utils_la_SOURCES = \
419 string-utils/format.hpp \
420 string-utils/string-utils.cpp \
421 string-utils/string-utils.hpp
424 noinst_PROGRAMS = filter-grammar-test
425 filter_grammar_test_SOURCES = filter-grammar-test.cpp
426 filter_grammar_test_LDADD = libcommon-gpl.la
432 xmldir = $(datadir)/xml/lttng
433 dist_xml_DATA = session.xsd
435 # Copy EXTRA_DIST files to the build directory
437 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
438 for script in $(EXTRA_DIST); do \
439 cp -f $(srcdir)/$$script $(builddir); \
444 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
445 for script in $(EXTRA_DIST); do \
446 rm -f $(builddir)/$$script; \