1 # SPDX-License-Identifier: GPL-2.0-only
3 AUTOMAKE_OPTIONS = subdir-objects
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.h
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.h 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.h \
68 dynamic-array.cpp dynamic-array.h \
69 dynamic-buffer.cpp dynamic-buffer.h \
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 fd-handle.cpp fd-handle.h \
90 mi-lttng.cpp mi-lttng.h \
92 payload.cpp payload.h \
93 payload-view.cpp payload-view.h \
94 readwrite.cpp readwrite.h \
96 session-descriptor.cpp \
97 snapshot.cpp snapshot.h \
98 spawn-viewer.cpp spawn-viewer.h \
101 tracker.cpp tracker.h \
105 userspace-probe.cpp \
109 libcommon_lgpl_la_SOURCES += \
110 lttng-elf.cpp lttng-elf.h
113 libcommon_lgpl_la_LIBADD = \
118 libhashtable-lgpl.la \
119 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
122 # The libpath static archive contains GPLv2 compatible code. It is
123 # meant to be used by GPL executables.
124 noinst_LTLIBRARIES += libpath.la
125 libpath_la_SOURCES = \
129 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
130 # meant to be used by GPL executables.
131 noinst_LTLIBRARIES += libcommon-gpl.la
132 libcommon_gpl_la_SOURCES = \
134 context.cpp context.h \
135 daemonize.cpp daemonize.h \
136 filter.cpp filter.h \
137 fs-handle.cpp fs-handle.h fs-handle-internal.h \
139 index-allocator.cpp index-allocator.h \
143 trace-chunk.cpp trace-chunk.h \
144 trace-chunk-registry.h \
148 libcommon_gpl_la_LIBADD = \
152 libhashtable-gpl.la \
157 noinst_LTLIBRARIES += libcompat.la
158 libcompat_la_SOURCES = \
159 compat/compat-fcntl.cpp \
160 compat/directory-handle.cpp \
161 compat/directory-handle.h \
181 noinst_LTLIBRARIES += libconfig.la
182 libconfig_la_SOURCES = \
183 config/config-internal.h \
184 config/config-session-abi.h \
185 config/session-config.cpp \
186 config/session-config.h
188 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
189 libconfig_la_LIBADD = ${libxml2_LIBS}
192 if BUILD_LIB_CONSUMER
193 noinst_LTLIBRARIES += libconsumer.la
195 libconsumer_la_SOURCES = \
196 consumer/consumer.cpp \
197 consumer/consumer.h \
198 consumer/consumer-metadata-cache.cpp \
199 consumer/consumer-metadata-cache.h \
200 consumer/consumer-stream.cpp \
201 consumer/consumer-stream.h \
202 consumer/consumer-testpoint.h \
203 consumer/consumer-timer.cpp \
204 consumer/consumer-timer.h \
205 consumer/metadata-bucket.cpp \
206 consumer/metadata-bucket.h
208 libconsumer_la_LIBADD = \
209 libkernel-consumer.la \
213 if HAVE_LIBLTTNG_UST_CTL
214 libconsumer_la_LIBADD += \
217 endif # BUILD_LIB_CONSUMER
221 noinst_LTLIBRARIES += libfd-tracker.la
222 libfd_tracker_la_SOURCES = \
223 fd-tracker/fd-tracker.cpp \
224 fd-tracker/fd-tracker.h \
225 fd-tracker/inode.cpp \
227 fd-tracker/utils.cpp \
229 fd-tracker/utils-poll.cpp
233 noinst_LTLIBRARIES += libfilter.la
235 libfilter_la_SOURCES = \
236 filter/filter-ast.h \
238 filter/filter-lexer.lpp \
239 filter/filter-parser.ypp \
240 filter/filter-symbols.h \
241 filter/filter-visitor-generate-bytecode.cpp \
242 filter/filter-visitor-generate-ir.cpp \
243 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
244 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
245 filter/filter-visitor-ir-validate-globbing.cpp \
246 filter/filter-visitor-ir-validate-string.cpp \
247 filter/filter-visitor-xml.cpp \
250 BUILT_SOURCES += filter/filter-parser.hpp
252 # Disable some warning flags for generated sources.
253 FILTER_WARN_FLAGS = \
254 -Wno-null-dereference \
257 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
258 libfilter_la_CXXFLAGS = -include filter-symbols.h $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
259 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
260 libfilter_la_LIBADD = libstring-utils.la
262 AM_YFLAGS = -t -d -v -Wno-yacc
264 # start with empty files to clean
268 # we have bison: we can clean the generated parser files
270 filter/filter-parser.cpp \
271 filter/filter-parser.hpp \
272 filter/filter-parser.output
274 # create target used to stop the build if we want to build the parser,
275 # but we don't have the necessary tool to do so
276 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
277 @echo "Error: Cannot build target because bison is missing."
278 @echo "Make sure bison is installed and run the configure script again."
281 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
285 # we have flex: we can clean the generated lexer files
286 CLEANFILES += filter/filter-lexer.cpp
288 # create target used to stop the build if we want to build the lexer,
289 # but we don't have the necessary tool to do so
290 filter/filter-lexer.cpp: filter/filter-lexer.lpp
291 @echo "Error: Cannot build target because flex is missing."
292 @echo "Make sure flex is installed and run the configure script again."
295 BUILT_SOURCES += filter/filter-lexer.cpp
299 noinst_LTLIBRARIES += libhashtable-lgpl.la
300 libhashtable_lgpl_la_SOURCES = \
302 hashtable/utils.cpp \
306 noinst_LTLIBRARIES += libhashtable-gpl.la
307 libhashtable_gpl_la_SOURCES = \
308 hashtable/hashtable.cpp \
309 hashtable/hashtable.h \
310 hashtable/hashtable-symbols.h
312 libhashtable_gpl_la_LIBADD = \
318 noinst_LTLIBRARIES += libhealth.la
320 libhealth_la_SOURCES = \
326 noinst_LTLIBRARIES += libini-config.la
327 libini_config_la_SOURCES = \
330 ini-config/ini-config.cpp \
331 ini-config/ini-config.h
335 noinst_LTLIBRARIES += libindex.la
337 libindex_la_SOURCES = \
344 if BUILD_LIB_KERNEL_CTL
345 noinst_LTLIBRARIES += libkernel-ctl.la
347 libkernel_ctl_la_SOURCES = \
348 kernel-ctl/kernel-ctl.cpp \
349 kernel-ctl/kernel-ctl.h \
350 kernel-ctl/kernel-ioctl.h
353 if BUILD_LIB_SESSIOND_COMM
354 noinst_LTLIBRARIES += libsessiond-comm.la
356 libsessiond_comm_la_SOURCES = \
357 sessiond-comm/agent.h \
358 sessiond-comm/inet.cpp \
359 sessiond-comm/inet.h \
360 sessiond-comm/inet6.cpp \
361 sessiond-comm/inet6.h \
362 sessiond-comm/relayd.h \
363 sessiond-comm/sessiond-comm.cpp \
364 sessiond-comm/sessiond-comm.h
368 noinst_LTLIBRARIES += librelayd.la
370 librelayd_la_SOURCES = \
374 librelayd_la_LIBADD = libsessiond-comm.la
378 if BUILD_LIB_KERNEL_CONSUMER
379 noinst_LTLIBRARIES += libkernel-consumer.la
381 libkernel_consumer_la_SOURCES = \
382 kernel-consumer/kernel-consumer.cpp \
383 kernel-consumer/kernel-consumer.h
385 libkernel_consumer_la_LIBADD = \
389 if BUILD_LIB_UST_CONSUMER
390 if HAVE_LIBLTTNG_UST_CTL
391 noinst_LTLIBRARIES += libust-consumer.la
393 libust_consumer_la_SOURCES = \
394 ust-consumer/ust-consumer.cpp \
395 ust-consumer/ust-consumer.h
397 libust_consumer_la_LIBADD = \
402 if BUILD_LIB_TESTPOINT
403 noinst_LTLIBRARIES += libtestpoint.la
405 libtestpoint_la_SOURCES = \
406 testpoint/testpoint.cpp \
407 testpoint/testpoint.h
409 libtestpoint_la_LIBADD = $(DL_LIBS)
414 noinst_LTLIBRARIES += libstring-utils.la
415 libstring_utils_la_SOURCES = \
416 string-utils/format.h \
417 string-utils/string-utils.cpp \
418 string-utils/string-utils.h
421 noinst_PROGRAMS = filter-grammar-test
422 filter_grammar_test_SOURCES = filter-grammar-test.cpp
423 filter_grammar_test_LDADD = libcommon-gpl.la
429 xmldir = $(datadir)/xml/lttng
430 dist_xml_DATA = session.xsd
432 # Copy EXTRA_DIST files to the build directory
434 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
435 for script in $(EXTRA_DIST); do \
436 cp -f $(srcdir)/$$script $(builddir); \
441 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
442 for script in $(EXTRA_DIST); do \
443 rm -f $(builddir)/$$script; \