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 \
94 make-unique-wrapper.hpp \
95 mi-lttng.cpp mi-lttng.hpp \
97 payload.cpp payload.hpp \
98 payload-view.cpp payload-view.hpp \
100 readwrite.cpp readwrite.hpp \
101 runas.cpp runas.hpp \
102 session-descriptor.cpp \
103 snapshot.cpp snapshot.hpp \
104 spawn-viewer.cpp spawn-viewer.hpp \
105 thread.cpp thread.hpp \
107 tracker.cpp tracker.hpp \
111 userspace-probe.cpp \
116 libcommon_lgpl_la_SOURCES += \
117 lttng-elf.cpp lttng-elf.hpp
120 libcommon_lgpl_la_LIBADD = \
125 libhashtable-lgpl.la \
126 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
129 # The libpath static archive contains GPLv2 compatible code. It is
130 # meant to be used by GPL executables.
131 noinst_LTLIBRARIES += libpath.la
132 libpath_la_SOURCES = \
136 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
137 # meant to be used by GPL executables.
138 noinst_LTLIBRARIES += libcommon-gpl.la
139 libcommon_gpl_la_SOURCES = \
141 context.cpp context.hpp \
142 daemonize.cpp daemonize.hpp \
143 filter.cpp filter.hpp \
144 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
145 futex.cpp futex.hpp \
146 index-allocator.cpp index-allocator.hpp \
150 trace-chunk.cpp trace-chunk.hpp \
151 trace-chunk-registry.hpp \
153 waiter.cpp waiter.hpp
155 libcommon_gpl_la_LIBADD = \
159 libhashtable-gpl.la \
164 noinst_LTLIBRARIES += libcompat.la
165 libcompat_la_SOURCES = \
166 compat/compat-fcntl.cpp \
167 compat/directory-handle.cpp \
168 compat/directory-handle.hpp \
188 noinst_LTLIBRARIES += libconfig.la
189 libconfig_la_SOURCES = \
190 config/config-internal.hpp \
191 config/config-session-abi.hpp \
192 config/session-config.cpp \
193 config/session-config.hpp
195 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
196 libconfig_la_LIBADD = ${libxml2_LIBS}
199 if BUILD_LIB_CONSUMER
200 noinst_LTLIBRARIES += libconsumer.la
202 libconsumer_la_SOURCES = \
203 consumer/consumer.cpp \
204 consumer/consumer.hpp \
205 consumer/consumer-metadata-cache.cpp \
206 consumer/consumer-metadata-cache.hpp \
207 consumer/consumer-stream.cpp \
208 consumer/consumer-stream.hpp \
209 consumer/consumer-testpoint.hpp \
210 consumer/consumer-timer.cpp \
211 consumer/consumer-timer.hpp \
212 consumer/metadata-bucket.cpp \
213 consumer/metadata-bucket.hpp
215 libconsumer_la_LIBADD = \
216 libkernel-consumer.la \
220 if HAVE_LIBLTTNG_UST_CTL
221 libconsumer_la_LIBADD += \
224 endif # BUILD_LIB_CONSUMER
228 noinst_LTLIBRARIES += libfd-tracker.la
229 libfd_tracker_la_SOURCES = \
230 fd-tracker/fd-tracker.cpp \
231 fd-tracker/fd-tracker.hpp \
232 fd-tracker/inode.cpp \
233 fd-tracker/inode.hpp \
234 fd-tracker/utils.cpp \
235 fd-tracker/utils.hpp \
236 fd-tracker/utils-poll.cpp
240 noinst_LTLIBRARIES += libfilter.la
242 libfilter_la_SOURCES = \
243 filter/filter-ast.hpp \
244 filter/filter-ir.hpp \
245 filter/filter-lexer.lpp \
246 filter/filter-parser.ypp \
247 filter/filter-symbols.hpp \
248 filter/filter-visitor-generate-bytecode.cpp \
249 filter/filter-visitor-generate-ir.cpp \
250 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
251 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
252 filter/filter-visitor-ir-validate-globbing.cpp \
253 filter/filter-visitor-ir-validate-string.cpp \
254 filter/filter-visitor-xml.cpp \
257 BUILT_SOURCES += filter/filter-parser.hpp
259 # Disable some warning flags for generated sources.
260 FILTER_WARN_FLAGS = \
261 -Wno-null-dereference \
262 -Wno-redundant-decls \
263 -Wno-unused-parameter
265 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
266 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
267 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
268 libfilter_la_LIBADD = libstring-utils.la
270 AM_YFLAGS = -t -d -v -Wno-yacc
272 # start with empty files to clean
276 # we have bison: we can clean the generated parser files
278 filter/filter-parser.cpp \
279 filter/filter-parser.hpp \
280 filter/filter-parser.output
282 # create target used to stop the build if we want to build the parser,
283 # but we don't have the necessary tool to do so
284 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
285 @echo "Error: Cannot build target because bison is missing."
286 @echo "Make sure bison is installed and run the configure script again."
289 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
293 # we have flex: we can clean the generated lexer files
294 CLEANFILES += filter/filter-lexer.cpp
296 # create target used to stop the build if we want to build the lexer,
297 # but we don't have the necessary tool to do so
298 filter/filter-lexer.cpp: filter/filter-lexer.lpp
299 @echo "Error: Cannot build target because flex is missing."
300 @echo "Make sure flex is installed and run the configure script again."
303 BUILT_SOURCES += filter/filter-lexer.cpp
307 noinst_LTLIBRARIES += libhashtable-lgpl.la
308 libhashtable_lgpl_la_SOURCES = \
310 hashtable/utils.cpp \
314 noinst_LTLIBRARIES += libhashtable-gpl.la
315 libhashtable_gpl_la_SOURCES = \
316 hashtable/hashtable.cpp \
317 hashtable/hashtable.hpp \
318 hashtable/hashtable-symbols.hpp
320 libhashtable_gpl_la_LIBADD = \
326 noinst_LTLIBRARIES += libhealth.la
328 libhealth_la_SOURCES = \
334 noinst_LTLIBRARIES += libini-config.la
335 libini_config_la_SOURCES = \
338 ini-config/ini-config.cpp \
339 ini-config/ini-config.hpp
343 noinst_LTLIBRARIES += libindex.la
345 libindex_la_SOURCES = \
346 index/ctf-index.hpp \
352 if BUILD_LIB_KERNEL_CTL
353 noinst_LTLIBRARIES += libkernel-ctl.la
355 libkernel_ctl_la_SOURCES = \
356 kernel-ctl/kernel-ctl.cpp \
357 kernel-ctl/kernel-ctl.hpp \
358 kernel-ctl/kernel-ioctl.hpp
361 if BUILD_LIB_SESSIOND_COMM
362 noinst_LTLIBRARIES += libsessiond-comm.la
364 libsessiond_comm_la_SOURCES = \
365 sessiond-comm/agent.hpp \
366 sessiond-comm/inet.cpp \
367 sessiond-comm/inet.hpp \
368 sessiond-comm/inet6.cpp \
369 sessiond-comm/inet6.hpp \
370 sessiond-comm/relayd.hpp \
371 sessiond-comm/sessiond-comm.cpp \
372 sessiond-comm/sessiond-comm.hpp
376 noinst_LTLIBRARIES += librelayd.la
378 librelayd_la_SOURCES = \
382 librelayd_la_LIBADD = libsessiond-comm.la
386 if BUILD_LIB_KERNEL_CONSUMER
387 noinst_LTLIBRARIES += libkernel-consumer.la
389 libkernel_consumer_la_SOURCES = \
390 kernel-consumer/kernel-consumer.cpp \
391 kernel-consumer/kernel-consumer.hpp
393 libkernel_consumer_la_LIBADD = \
397 if BUILD_LIB_UST_CONSUMER
398 if HAVE_LIBLTTNG_UST_CTL
399 noinst_LTLIBRARIES += libust-consumer.la
401 libust_consumer_la_SOURCES = \
402 ust-consumer/ust-consumer.cpp \
403 ust-consumer/ust-consumer.hpp
405 libust_consumer_la_LIBADD = \
410 if BUILD_LIB_TESTPOINT
411 noinst_LTLIBRARIES += libtestpoint.la
413 libtestpoint_la_SOURCES = \
414 testpoint/testpoint.cpp \
415 testpoint/testpoint.hpp
417 libtestpoint_la_LIBADD = $(DL_LIBS)
422 noinst_LTLIBRARIES += libstring-utils.la
423 libstring_utils_la_SOURCES = \
424 string-utils/format.hpp \
425 string-utils/string-utils.cpp \
426 string-utils/string-utils.hpp
429 noinst_PROGRAMS = filter-grammar-test
430 filter_grammar_test_SOURCES = filter-grammar-test.cpp
431 filter_grammar_test_LDADD = libcommon-gpl.la
437 xmldir = $(datadir)/xml/lttng
438 dist_xml_DATA = session.xsd
440 # Copy EXTRA_DIST files to the build directory
442 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
443 for script in $(EXTRA_DIST); do \
444 cp -f $(srcdir)/$$script $(builddir); \
449 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
450 for script in $(EXTRA_DIST); do \
451 rm -f $(builddir)/$$script; \