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 \
59 conditions/buffer-usage.cpp \
60 conditions/condition.cpp \
61 conditions/event-rule-matches.cpp \
62 conditions/session-consumed-size.cpp \
63 conditions/session-rotation.cpp \
64 credentials.cpp credentials.h \
67 dynamic-array.cpp dynamic-array.h \
68 dynamic-buffer.cpp dynamic-buffer.h \
73 event-expr/event-expr.cpp \
74 event-field-value.cpp \
75 event-rule/event-rule.cpp \
76 event-rule/kernel-kprobe.cpp \
77 event-rule/kernel-syscall.cpp \
78 event-rule/kernel-uprobe.cpp \
79 event-rule/kernel-tracepoint.cpp \
80 event-rule/user-tracepoint.cpp \
81 event-rule/log4j-logging.cpp \
82 event-rule/jul-logging.cpp \
83 event-rule/python-logging.cpp \
84 fd-handle.cpp fd-handle.h \
88 mi-lttng.cpp mi-lttng.h \
90 payload.cpp payload.h \
91 payload-view.cpp payload-view.h \
92 readwrite.cpp readwrite.h \
94 session-descriptor.cpp \
95 snapshot.cpp snapshot.h \
96 spawn-viewer.cpp spawn-viewer.h \
99 tracker.cpp tracker.h \
103 userspace-probe.cpp \
107 libcommon_lgpl_la_SOURCES += \
108 lttng-elf.cpp lttng-elf.h
111 libcommon_lgpl_la_LIBADD = \
116 libhashtable-lgpl.la \
117 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
120 # The libpath static archive contains GPLv2 compatible code. It is
121 # meant to be used by GPL executables.
122 noinst_LTLIBRARIES += libpath.la
123 libpath_la_SOURCES = \
127 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
128 # meant to be used by GPL executables.
129 noinst_LTLIBRARIES += libcommon-gpl.la
130 libcommon_gpl_la_SOURCES = \
132 context.cpp context.h \
133 daemonize.cpp daemonize.h \
135 filter.cpp filter.h \
136 fs-handle.cpp fs-handle.h fs-handle-internal.h \
138 index-allocator.cpp index-allocator.h \
142 trace-chunk.cpp trace-chunk.h \
143 trace-chunk-registry.h \
147 libcommon_gpl_la_LIBADD = \
151 libhashtable-gpl.la \
156 noinst_LTLIBRARIES += libcompat.la
157 libcompat_la_SOURCES = \
158 compat/compat-fcntl.cpp \
159 compat/directory-handle.cpp \
160 compat/directory-handle.h \
180 noinst_LTLIBRARIES += libconfig.la
181 libconfig_la_SOURCES = \
182 config/config-internal.h \
183 config/config-session-abi.h \
184 config/session-config.cpp \
185 config/session-config.h
187 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
188 libconfig_la_LIBADD = ${libxml2_LIBS}
191 if BUILD_LIB_CONSUMER
192 noinst_LTLIBRARIES += libconsumer.la
194 libconsumer_la_SOURCES = \
195 consumer/consumer.cpp \
196 consumer/consumer.h \
197 consumer/consumer-metadata-cache.cpp \
198 consumer/consumer-metadata-cache.h \
199 consumer/consumer-stream.cpp \
200 consumer/consumer-stream.h \
201 consumer/consumer-testpoint.h \
202 consumer/consumer-timer.cpp \
203 consumer/consumer-timer.h \
204 consumer/metadata-bucket.cpp \
205 consumer/metadata-bucket.h
207 libconsumer_la_LIBADD = \
208 libkernel-consumer.la \
212 if HAVE_LIBLTTNG_UST_CTL
213 libconsumer_la_LIBADD += \
216 endif # BUILD_LIB_CONSUMER
220 noinst_LTLIBRARIES += libfd-tracker.la
221 libfd_tracker_la_SOURCES = \
222 fd-tracker/fd-tracker.cpp \
223 fd-tracker/fd-tracker.h \
224 fd-tracker/inode.cpp \
226 fd-tracker/utils.cpp \
228 fd-tracker/utils-poll.cpp
232 noinst_LTLIBRARIES += libfilter.la
234 libfilter_la_SOURCES = \
235 filter/filter-ast.h \
237 filter/filter-lexer.lpp \
238 filter/filter-parser.ypp \
239 filter/filter-symbols.h \
240 filter/filter-visitor-generate-bytecode.cpp \
241 filter/filter-visitor-generate-ir.cpp \
242 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
243 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
244 filter/filter-visitor-ir-validate-globbing.cpp \
245 filter/filter-visitor-ir-validate-string.cpp \
246 filter/filter-visitor-xml.cpp \
249 BUILT_SOURCES += filter/filter-parser.hpp
251 libfilter_la_CXXFLAGS = -include filter-symbols.h $(AM_CXXFLAGS)
252 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
253 libfilter_la_LIBADD = libstring-utils.la
255 AM_YFLAGS = -t -d -v -Wno-yacc
257 # start with empty files to clean
261 # we have bison: we can clean the generated parser files
263 filter/filter-parser.cpp \
264 filter/filter-parser.hpp \
265 filter/filter-parser.output
267 # create target used to stop the build if we want to build the parser,
268 # but we don't have the necessary tool to do so
269 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
270 @echo "Error: Cannot build target because bison is missing."
271 @echo "Make sure bison is installed and run the configure script again."
274 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
278 # we have flex: we can clean the generated lexer files
279 CLEANFILES += filter/filter-lexer.cpp
281 # create target used to stop the build if we want to build the lexer,
282 # but we don't have the necessary tool to do so
283 filter/filter-lexer.cpp: filter/filter-lexer.lpp
284 @echo "Error: Cannot build target because flex is missing."
285 @echo "Make sure flex is installed and run the configure script again."
288 BUILT_SOURCES += filter/filter-lexer.cpp
292 noinst_LTLIBRARIES += libhashtable-lgpl.la
293 libhashtable_lgpl_la_SOURCES = \
295 hashtable/utils.cpp \
299 noinst_LTLIBRARIES += libhashtable-gpl.la
300 libhashtable_gpl_la_SOURCES = \
301 hashtable/hashtable.cpp \
302 hashtable/hashtable.h \
303 hashtable/hashtable-symbols.h
305 libhashtable_gpl_la_LIBADD = \
311 noinst_LTLIBRARIES += libhealth.la
313 libhealth_la_SOURCES = \
319 noinst_LTLIBRARIES += libini-config.la
320 libini_config_la_SOURCES = \
323 ini-config/ini-config.cpp \
324 ini-config/ini-config.h
328 noinst_LTLIBRARIES += libindex.la
330 libindex_la_SOURCES = \
337 if BUILD_LIB_KERNEL_CTL
338 noinst_LTLIBRARIES += libkernel-ctl.la
340 libkernel_ctl_la_SOURCES = \
341 kernel-ctl/kernel-ctl.cpp \
342 kernel-ctl/kernel-ctl.h \
343 kernel-ctl/kernel-ioctl.h
346 if BUILD_LIB_SESSIOND_COMM
347 noinst_LTLIBRARIES += libsessiond-comm.la
349 libsessiond_comm_la_SOURCES = \
350 sessiond-comm/agent.h \
351 sessiond-comm/inet.cpp \
352 sessiond-comm/inet.h \
353 sessiond-comm/inet6.cpp \
354 sessiond-comm/inet6.h \
355 sessiond-comm/relayd.h \
356 sessiond-comm/sessiond-comm.cpp \
357 sessiond-comm/sessiond-comm.h
361 noinst_LTLIBRARIES += librelayd.la
363 librelayd_la_SOURCES = \
367 librelayd_la_LIBADD = libsessiond-comm.la
371 if BUILD_LIB_KERNEL_CONSUMER
372 noinst_LTLIBRARIES += libkernel-consumer.la
374 libkernel_consumer_la_SOURCES = \
375 kernel-consumer/kernel-consumer.cpp \
376 kernel-consumer/kernel-consumer.h
378 libkernel_consumer_la_LIBADD = \
382 if BUILD_LIB_UST_CONSUMER
383 if HAVE_LIBLTTNG_UST_CTL
384 noinst_LTLIBRARIES += libust-consumer.la
386 libust_consumer_la_SOURCES = \
387 ust-consumer/ust-consumer.cpp \
388 ust-consumer/ust-consumer.h
390 libust_consumer_la_LIBADD = \
395 if BUILD_LIB_TESTPOINT
396 noinst_LTLIBRARIES += libtestpoint.la
398 libtestpoint_la_SOURCES = \
399 testpoint/testpoint.cpp \
400 testpoint/testpoint.h
402 libtestpoint_la_LIBADD = $(DL_LIBS)
407 noinst_LTLIBRARIES += libstring-utils.la
408 libstring_utils_la_SOURCES = \
409 string-utils/format.h \
410 string-utils/string-utils.cpp \
411 string-utils/string-utils.h
414 noinst_PROGRAMS = filter-grammar-test
415 filter_grammar_test_SOURCES = filter-grammar-test.cpp
416 filter_grammar_test_LDADD = libcommon-gpl.la
422 xmldir = $(datadir)/xml/lttng
423 dist_xml_DATA = session.xsd
425 # Copy EXTRA_DIST files to the build directory
427 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
428 for script in $(EXTRA_DIST); do \
429 cp -f $(srcdir)/$$script $(builddir); \
434 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
435 for script in $(EXTRA_DIST); do \
436 rm -f $(builddir)/$$script; \