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 locked-reference.hpp \
92 logging-utils.hpp logging-utils.cpp \
95 make-unique-wrapper.hpp \
96 mi-lttng.cpp mi-lttng.hpp \
98 payload.cpp payload.hpp \
99 payload-view.cpp payload-view.hpp \
101 readwrite.cpp readwrite.hpp \
102 runas.cpp runas.hpp \
103 session-descriptor.cpp \
104 snapshot.cpp snapshot.hpp \
105 spawn-viewer.cpp spawn-viewer.hpp \
106 thread.cpp thread.hpp \
108 tracker.cpp tracker.hpp \
112 userspace-probe.cpp \
117 libcommon_lgpl_la_SOURCES += \
118 lttng-elf.cpp lttng-elf.hpp
121 libcommon_lgpl_la_LIBADD = \
126 libhashtable-lgpl.la \
127 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
130 # The libpath static archive contains GPLv2 compatible code. It is
131 # meant to be used by GPL executables.
132 noinst_LTLIBRARIES += libpath.la
133 libpath_la_SOURCES = \
137 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
138 # meant to be used by GPL executables.
139 noinst_LTLIBRARIES += libcommon-gpl.la
140 libcommon_gpl_la_SOURCES = \
142 context.cpp context.hpp \
143 daemonize.cpp daemonize.hpp \
144 filter.cpp filter.hpp \
145 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
146 futex.cpp futex.hpp \
147 index-allocator.cpp index-allocator.hpp \
151 trace-chunk.cpp trace-chunk.hpp \
152 trace-chunk-registry.hpp \
154 waiter.cpp waiter.hpp
156 libcommon_gpl_la_LIBADD = \
160 libhashtable-gpl.la \
165 noinst_LTLIBRARIES += libcompat.la
166 libcompat_la_SOURCES = \
167 compat/compat-fcntl.cpp \
168 compat/directory-handle.cpp \
169 compat/directory-handle.hpp \
189 noinst_LTLIBRARIES += libconfig.la
190 libconfig_la_SOURCES = \
191 config/config-internal.hpp \
192 config/config-session-abi.hpp \
193 config/session-config.cpp \
194 config/session-config.hpp
196 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
197 libconfig_la_LIBADD = ${libxml2_LIBS}
200 if BUILD_LIB_CONSUMER
201 noinst_LTLIBRARIES += libconsumer.la
203 libconsumer_la_SOURCES = \
204 consumer/consumer.cpp \
205 consumer/consumer.hpp \
206 consumer/consumer-metadata-cache.cpp \
207 consumer/consumer-metadata-cache.hpp \
208 consumer/consumer-stream.cpp \
209 consumer/consumer-stream.hpp \
210 consumer/consumer-testpoint.hpp \
211 consumer/consumer-timer.cpp \
212 consumer/consumer-timer.hpp \
213 consumer/metadata-bucket.cpp \
214 consumer/metadata-bucket.hpp
216 libconsumer_la_LIBADD = \
217 libkernel-consumer.la \
221 if HAVE_LIBLTTNG_UST_CTL
222 libconsumer_la_LIBADD += \
225 endif # BUILD_LIB_CONSUMER
229 noinst_LTLIBRARIES += libfd-tracker.la
230 libfd_tracker_la_SOURCES = \
231 fd-tracker/fd-tracker.cpp \
232 fd-tracker/fd-tracker.hpp \
233 fd-tracker/inode.cpp \
234 fd-tracker/inode.hpp \
235 fd-tracker/utils.cpp \
236 fd-tracker/utils.hpp \
237 fd-tracker/utils-poll.cpp
241 noinst_LTLIBRARIES += libfilter.la
243 libfilter_la_SOURCES = \
244 filter/filter-ast.hpp \
245 filter/filter-ir.hpp \
246 filter/filter-lexer.lpp \
247 filter/filter-parser.ypp \
248 filter/filter-symbols.hpp \
249 filter/filter-visitor-generate-bytecode.cpp \
250 filter/filter-visitor-generate-ir.cpp \
251 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
252 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
253 filter/filter-visitor-ir-validate-globbing.cpp \
254 filter/filter-visitor-ir-validate-string.cpp \
255 filter/filter-visitor-xml.cpp \
258 BUILT_SOURCES += filter/filter-parser.hpp
260 # Disable some warning flags for generated sources.
261 FILTER_WARN_FLAGS = \
262 -Wno-null-dereference \
263 -Wno-redundant-decls \
264 -Wno-unused-parameter
266 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
267 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
268 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
269 libfilter_la_LIBADD = libstring-utils.la
271 AM_YFLAGS = -t -d -v -Wno-yacc
273 # start with empty files to clean
277 # we have bison: we can clean the generated parser files
279 filter/filter-parser.cpp \
280 filter/filter-parser.hpp \
281 filter/filter-parser.output
283 # create target used to stop the build if we want to build the parser,
284 # but we don't have the necessary tool to do so
285 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
286 @echo "Error: Cannot build target because bison is missing."
287 @echo "Make sure bison is installed and run the configure script again."
290 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
294 # we have flex: we can clean the generated lexer files
295 CLEANFILES += filter/filter-lexer.cpp
297 # create target used to stop the build if we want to build the lexer,
298 # but we don't have the necessary tool to do so
299 filter/filter-lexer.cpp: filter/filter-lexer.lpp
300 @echo "Error: Cannot build target because flex is missing."
301 @echo "Make sure flex is installed and run the configure script again."
304 BUILT_SOURCES += filter/filter-lexer.cpp
308 noinst_LTLIBRARIES += libhashtable-lgpl.la
309 libhashtable_lgpl_la_SOURCES = \
311 hashtable/utils.cpp \
315 noinst_LTLIBRARIES += libhashtable-gpl.la
316 libhashtable_gpl_la_SOURCES = \
317 hashtable/hashtable.cpp \
318 hashtable/hashtable.hpp \
319 hashtable/hashtable-symbols.hpp
321 libhashtable_gpl_la_LIBADD = \
327 noinst_LTLIBRARIES += libhealth.la
329 libhealth_la_SOURCES = \
335 noinst_LTLIBRARIES += libini-config.la
336 libini_config_la_SOURCES = \
339 ini-config/ini-config.cpp \
340 ini-config/ini-config.hpp
344 noinst_LTLIBRARIES += libindex.la
346 libindex_la_SOURCES = \
347 index/ctf-index.hpp \
353 if BUILD_LIB_KERNEL_CTL
354 noinst_LTLIBRARIES += libkernel-ctl.la
356 libkernel_ctl_la_SOURCES = \
357 kernel-ctl/kernel-ctl.cpp \
358 kernel-ctl/kernel-ctl.hpp \
359 kernel-ctl/kernel-ioctl.hpp
362 if BUILD_LIB_SESSIOND_COMM
363 noinst_LTLIBRARIES += libsessiond-comm.la
365 libsessiond_comm_la_SOURCES = \
366 sessiond-comm/agent.hpp \
367 sessiond-comm/inet.cpp \
368 sessiond-comm/inet.hpp \
369 sessiond-comm/inet6.cpp \
370 sessiond-comm/inet6.hpp \
371 sessiond-comm/relayd.hpp \
372 sessiond-comm/sessiond-comm.cpp \
373 sessiond-comm/sessiond-comm.hpp
377 noinst_LTLIBRARIES += librelayd.la
379 librelayd_la_SOURCES = \
383 librelayd_la_LIBADD = libsessiond-comm.la
387 if BUILD_LIB_KERNEL_CONSUMER
388 noinst_LTLIBRARIES += libkernel-consumer.la
390 libkernel_consumer_la_SOURCES = \
391 kernel-consumer/kernel-consumer.cpp \
392 kernel-consumer/kernel-consumer.hpp
394 libkernel_consumer_la_LIBADD = \
398 if BUILD_LIB_UST_CONSUMER
399 if HAVE_LIBLTTNG_UST_CTL
400 noinst_LTLIBRARIES += libust-consumer.la
402 libust_consumer_la_SOURCES = \
403 ust-consumer/ust-consumer.cpp \
404 ust-consumer/ust-consumer.hpp
406 libust_consumer_la_LIBADD = \
411 if BUILD_LIB_TESTPOINT
412 noinst_LTLIBRARIES += libtestpoint.la
414 libtestpoint_la_SOURCES = \
415 testpoint/testpoint.cpp \
416 testpoint/testpoint.hpp
418 libtestpoint_la_LIBADD = $(DL_LIBS)
423 noinst_LTLIBRARIES += libstring-utils.la
424 libstring_utils_la_SOURCES = \
425 string-utils/format.hpp \
426 string-utils/string-utils.cpp \
427 string-utils/string-utils.hpp
430 noinst_PROGRAMS = filter-grammar-test
431 filter_grammar_test_SOURCES = filter-grammar-test.cpp
432 filter_grammar_test_LDADD = libcommon-gpl.la
438 xmldir = $(datadir)/xml/lttng
439 dist_xml_DATA = session.xsd
441 # Copy EXTRA_DIST files to the build directory
443 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
444 for script in $(EXTRA_DIST); do \
445 cp -f $(srcdir)/$$script $(builddir); \
450 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
451 for script in $(EXTRA_DIST); do \
452 rm -f $(builddir)/$$script; \