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 \
88 fd-handle.cpp fd-handle.hpp\
92 locked-reference.hpp \
93 logging-utils.hpp logging-utils.cpp \
96 make-unique-wrapper.hpp \
97 mi-lttng.cpp mi-lttng.hpp \
99 payload.cpp payload.hpp \
100 payload-view.cpp payload-view.hpp \
102 random.cpp random.hpp \
103 readwrite.cpp readwrite.hpp \
104 runas.cpp runas.hpp \
105 session-descriptor.cpp \
106 snapshot.cpp snapshot.hpp \
107 spawn-viewer.cpp spawn-viewer.hpp \
108 thread.cpp thread.hpp \
110 tracker.cpp tracker.hpp \
114 userspace-probe.cpp \
119 libcommon_lgpl_la_SOURCES += \
120 lttng-elf.cpp lttng-elf.hpp
123 libcommon_lgpl_la_LIBADD = \
128 libhashtable-lgpl.la \
129 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
132 # The libpath static archive contains GPLv2 compatible code. It is
133 # meant to be used by GPL executables.
134 noinst_LTLIBRARIES += libpath.la
135 libpath_la_SOURCES = \
139 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
140 # meant to be used by GPL executables.
141 noinst_LTLIBRARIES += libcommon-gpl.la
142 libcommon_gpl_la_SOURCES = \
144 context.cpp context.hpp \
145 daemonize.cpp daemonize.hpp \
146 filter.cpp filter.hpp \
147 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
148 futex.cpp futex.hpp \
149 index-allocator.cpp index-allocator.hpp \
153 trace-chunk.cpp trace-chunk.hpp \
154 trace-chunk-registry.hpp \
156 waiter.cpp waiter.hpp
158 libcommon_gpl_la_LIBADD = \
162 libhashtable-gpl.la \
167 noinst_LTLIBRARIES += libcompat.la
168 libcompat_la_SOURCES = \
169 compat/compat-fcntl.cpp \
170 compat/directory-handle.cpp \
171 compat/directory-handle.hpp \
191 noinst_LTLIBRARIES += libconfig.la
192 libconfig_la_SOURCES = \
193 config/config-internal.hpp \
194 config/config-session-abi.hpp \
195 config/session-config.cpp \
196 config/session-config.hpp
198 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
199 libconfig_la_LIBADD = ${libxml2_LIBS}
202 if BUILD_LIB_CONSUMER
203 noinst_LTLIBRARIES += libconsumer.la
205 libconsumer_la_SOURCES = \
206 consumer/consumer.cpp \
207 consumer/consumer.hpp \
208 consumer/consumer-metadata-cache.cpp \
209 consumer/consumer-metadata-cache.hpp \
210 consumer/consumer-stream.cpp \
211 consumer/consumer-stream.hpp \
212 consumer/consumer-testpoint.hpp \
213 consumer/consumer-timer.cpp \
214 consumer/consumer-timer.hpp \
215 consumer/metadata-bucket.cpp \
216 consumer/metadata-bucket.hpp
218 libconsumer_la_LIBADD = \
219 libkernel-consumer.la \
223 if HAVE_LIBLTTNG_UST_CTL
224 libconsumer_la_LIBADD += \
227 endif # BUILD_LIB_CONSUMER
231 noinst_LTLIBRARIES += libfd-tracker.la
232 libfd_tracker_la_SOURCES = \
233 fd-tracker/fd-tracker.cpp \
234 fd-tracker/fd-tracker.hpp \
235 fd-tracker/inode.cpp \
236 fd-tracker/inode.hpp \
237 fd-tracker/utils.cpp \
238 fd-tracker/utils.hpp \
239 fd-tracker/utils-poll.cpp
243 noinst_LTLIBRARIES += libfilter.la
245 libfilter_la_SOURCES = \
246 filter/filter-ast.hpp \
247 filter/filter-ir.hpp \
248 filter/filter-lexer.lpp \
249 filter/filter-parser.ypp \
250 filter/filter-symbols.hpp \
251 filter/filter-visitor-generate-bytecode.cpp \
252 filter/filter-visitor-generate-ir.cpp \
253 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
254 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
255 filter/filter-visitor-ir-validate-globbing.cpp \
256 filter/filter-visitor-ir-validate-string.cpp \
257 filter/filter-visitor-xml.cpp \
260 BUILT_SOURCES += filter/filter-parser.hpp
262 # Disable some warning flags for generated sources.
263 FILTER_WARN_FLAGS = \
264 -Wno-null-dereference \
265 -Wno-redundant-decls \
266 -Wno-unused-parameter
268 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
269 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
270 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
271 libfilter_la_LIBADD = libstring-utils.la
273 AM_YFLAGS = -t -d -v -Wno-yacc
275 # start with empty files to clean
279 # we have bison: we can clean the generated parser files
281 filter/filter-parser.cpp \
282 filter/filter-parser.hpp \
283 filter/filter-parser.output
285 # create target used to stop the build if we want to build the parser,
286 # but we don't have the necessary tool to do so
287 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
288 @echo "Error: Cannot build target because bison is missing."
289 @echo "Make sure bison is installed and run the configure script again."
292 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
296 # we have flex: we can clean the generated lexer files
297 CLEANFILES += filter/filter-lexer.cpp
299 # create target used to stop the build if we want to build the lexer,
300 # but we don't have the necessary tool to do so
301 filter/filter-lexer.cpp: filter/filter-lexer.lpp
302 @echo "Error: Cannot build target because flex is missing."
303 @echo "Make sure flex is installed and run the configure script again."
306 BUILT_SOURCES += filter/filter-lexer.cpp
310 noinst_LTLIBRARIES += libhashtable-lgpl.la
311 libhashtable_lgpl_la_SOURCES = \
313 hashtable/utils.cpp \
317 noinst_LTLIBRARIES += libhashtable-gpl.la
318 libhashtable_gpl_la_SOURCES = \
319 hashtable/hashtable.cpp \
320 hashtable/hashtable.hpp \
321 hashtable/hashtable-symbols.hpp
323 libhashtable_gpl_la_LIBADD = \
329 noinst_LTLIBRARIES += libhealth.la
331 libhealth_la_SOURCES = \
337 noinst_LTLIBRARIES += libini-config.la
338 libini_config_la_SOURCES = \
341 ini-config/ini-config.cpp \
342 ini-config/ini-config.hpp
346 noinst_LTLIBRARIES += libindex.la
348 libindex_la_SOURCES = \
349 index/ctf-index.hpp \
355 if BUILD_LIB_KERNEL_CTL
356 noinst_LTLIBRARIES += libkernel-ctl.la
358 libkernel_ctl_la_SOURCES = \
359 kernel-ctl/kernel-ctl.cpp \
360 kernel-ctl/kernel-ctl.hpp \
361 kernel-ctl/kernel-ioctl.hpp
364 if BUILD_LIB_SESSIOND_COMM
365 noinst_LTLIBRARIES += libsessiond-comm.la
367 libsessiond_comm_la_SOURCES = \
368 sessiond-comm/agent.hpp \
369 sessiond-comm/inet.cpp \
370 sessiond-comm/inet.hpp \
371 sessiond-comm/inet6.cpp \
372 sessiond-comm/inet6.hpp \
373 sessiond-comm/relayd.hpp \
374 sessiond-comm/sessiond-comm.cpp \
375 sessiond-comm/sessiond-comm.hpp
379 noinst_LTLIBRARIES += librelayd.la
381 librelayd_la_SOURCES = \
385 librelayd_la_LIBADD = libsessiond-comm.la
389 if BUILD_LIB_KERNEL_CONSUMER
390 noinst_LTLIBRARIES += libkernel-consumer.la
392 libkernel_consumer_la_SOURCES = \
393 kernel-consumer/kernel-consumer.cpp \
394 kernel-consumer/kernel-consumer.hpp
396 libkernel_consumer_la_LIBADD = \
400 if BUILD_LIB_UST_CONSUMER
401 if HAVE_LIBLTTNG_UST_CTL
402 noinst_LTLIBRARIES += libust-consumer.la
404 libust_consumer_la_SOURCES = \
405 ust-consumer/ust-consumer.cpp \
406 ust-consumer/ust-consumer.hpp
408 libust_consumer_la_LIBADD = \
413 if BUILD_LIB_TESTPOINT
414 noinst_LTLIBRARIES += libtestpoint.la
416 libtestpoint_la_SOURCES = \
417 testpoint/testpoint.cpp \
418 testpoint/testpoint.hpp
420 libtestpoint_la_LIBADD = $(DL_LIBS)
425 noinst_LTLIBRARIES += libstring-utils.la
426 libstring_utils_la_SOURCES = \
427 string-utils/format.hpp \
428 string-utils/string-utils.cpp \
429 string-utils/string-utils.hpp
432 noinst_PROGRAMS = filter-grammar-test
433 filter_grammar_test_SOURCES = filter-grammar-test.cpp
434 filter_grammar_test_LDADD = libcommon-gpl.la
440 xmldir = $(datadir)/xml/lttng
441 dist_xml_DATA = session.xsd
443 # Copy EXTRA_DIST files to the build directory
445 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
446 for script in $(EXTRA_DIST); do \
447 cp -f $(srcdir)/$$script $(builddir); \
452 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
453 for script in $(EXTRA_DIST); do \
454 rm -f $(builddir)/$$script; \