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\
92 make-unique-wrapper.hpp \
93 mi-lttng.cpp mi-lttng.hpp \
95 payload.cpp payload.hpp \
96 payload-view.cpp payload-view.hpp \
97 readwrite.cpp readwrite.hpp \
99 session-descriptor.cpp \
100 snapshot.cpp snapshot.hpp \
101 spawn-viewer.cpp spawn-viewer.hpp \
102 thread.cpp thread.hpp \
104 tracker.cpp tracker.hpp \
108 userspace-probe.cpp \
112 libcommon_lgpl_la_SOURCES += \
113 lttng-elf.cpp lttng-elf.hpp
116 libcommon_lgpl_la_LIBADD = \
121 libhashtable-lgpl.la \
122 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
125 # The libpath static archive contains GPLv2 compatible code. It is
126 # meant to be used by GPL executables.
127 noinst_LTLIBRARIES += libpath.la
128 libpath_la_SOURCES = \
132 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
133 # meant to be used by GPL executables.
134 noinst_LTLIBRARIES += libcommon-gpl.la
135 libcommon_gpl_la_SOURCES = \
137 context.cpp context.hpp \
138 daemonize.cpp daemonize.hpp \
139 filter.cpp filter.hpp \
140 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
141 futex.cpp futex.hpp \
142 index-allocator.cpp index-allocator.hpp \
146 trace-chunk.cpp trace-chunk.hpp \
147 trace-chunk-registry.hpp \
149 waiter.cpp waiter.hpp
151 libcommon_gpl_la_LIBADD = \
155 libhashtable-gpl.la \
160 noinst_LTLIBRARIES += libcompat.la
161 libcompat_la_SOURCES = \
162 compat/compat-fcntl.cpp \
163 compat/directory-handle.cpp \
164 compat/directory-handle.hpp \
184 noinst_LTLIBRARIES += libconfig.la
185 libconfig_la_SOURCES = \
186 config/config-internal.hpp \
187 config/config-session-abi.hpp \
188 config/session-config.cpp \
189 config/session-config.hpp
191 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
192 libconfig_la_LIBADD = ${libxml2_LIBS}
195 if BUILD_LIB_CONSUMER
196 noinst_LTLIBRARIES += libconsumer.la
198 libconsumer_la_SOURCES = \
199 consumer/consumer.cpp \
200 consumer/consumer.hpp \
201 consumer/consumer-metadata-cache.cpp \
202 consumer/consumer-metadata-cache.hpp \
203 consumer/consumer-stream.cpp \
204 consumer/consumer-stream.hpp \
205 consumer/consumer-testpoint.hpp \
206 consumer/consumer-timer.cpp \
207 consumer/consumer-timer.hpp \
208 consumer/metadata-bucket.cpp \
209 consumer/metadata-bucket.hpp
211 libconsumer_la_LIBADD = \
212 libkernel-consumer.la \
216 if HAVE_LIBLTTNG_UST_CTL
217 libconsumer_la_LIBADD += \
220 endif # BUILD_LIB_CONSUMER
224 noinst_LTLIBRARIES += libfd-tracker.la
225 libfd_tracker_la_SOURCES = \
226 fd-tracker/fd-tracker.cpp \
227 fd-tracker/fd-tracker.hpp \
228 fd-tracker/inode.cpp \
229 fd-tracker/inode.hpp \
230 fd-tracker/utils.cpp \
231 fd-tracker/utils.hpp \
232 fd-tracker/utils-poll.cpp
236 noinst_LTLIBRARIES += libfilter.la
238 libfilter_la_SOURCES = \
239 filter/filter-ast.hpp \
240 filter/filter-ir.hpp \
241 filter/filter-lexer.lpp \
242 filter/filter-parser.ypp \
243 filter/filter-symbols.hpp \
244 filter/filter-visitor-generate-bytecode.cpp \
245 filter/filter-visitor-generate-ir.cpp \
246 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
247 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
248 filter/filter-visitor-ir-validate-globbing.cpp \
249 filter/filter-visitor-ir-validate-string.cpp \
250 filter/filter-visitor-xml.cpp \
253 BUILT_SOURCES += filter/filter-parser.hpp
255 # Disable some warning flags for generated sources.
256 FILTER_WARN_FLAGS = \
257 -Wno-null-dereference \
258 -Wno-redundant-decls \
259 -Wno-unused-parameter
261 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
262 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
263 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
264 libfilter_la_LIBADD = libstring-utils.la
266 AM_YFLAGS = -t -d -v -Wno-yacc
268 # start with empty files to clean
272 # we have bison: we can clean the generated parser files
274 filter/filter-parser.cpp \
275 filter/filter-parser.hpp \
276 filter/filter-parser.output
278 # create target used to stop the build if we want to build the parser,
279 # but we don't have the necessary tool to do so
280 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
281 @echo "Error: Cannot build target because bison is missing."
282 @echo "Make sure bison is installed and run the configure script again."
285 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
289 # we have flex: we can clean the generated lexer files
290 CLEANFILES += filter/filter-lexer.cpp
292 # create target used to stop the build if we want to build the lexer,
293 # but we don't have the necessary tool to do so
294 filter/filter-lexer.cpp: filter/filter-lexer.lpp
295 @echo "Error: Cannot build target because flex is missing."
296 @echo "Make sure flex is installed and run the configure script again."
299 BUILT_SOURCES += filter/filter-lexer.cpp
303 noinst_LTLIBRARIES += libhashtable-lgpl.la
304 libhashtable_lgpl_la_SOURCES = \
306 hashtable/utils.cpp \
310 noinst_LTLIBRARIES += libhashtable-gpl.la
311 libhashtable_gpl_la_SOURCES = \
312 hashtable/hashtable.cpp \
313 hashtable/hashtable.hpp \
314 hashtable/hashtable-symbols.hpp
316 libhashtable_gpl_la_LIBADD = \
322 noinst_LTLIBRARIES += libhealth.la
324 libhealth_la_SOURCES = \
330 noinst_LTLIBRARIES += libini-config.la
331 libini_config_la_SOURCES = \
334 ini-config/ini-config.cpp \
335 ini-config/ini-config.hpp
339 noinst_LTLIBRARIES += libindex.la
341 libindex_la_SOURCES = \
342 index/ctf-index.hpp \
348 if BUILD_LIB_KERNEL_CTL
349 noinst_LTLIBRARIES += libkernel-ctl.la
351 libkernel_ctl_la_SOURCES = \
352 kernel-ctl/kernel-ctl.cpp \
353 kernel-ctl/kernel-ctl.hpp \
354 kernel-ctl/kernel-ioctl.hpp
357 if BUILD_LIB_SESSIOND_COMM
358 noinst_LTLIBRARIES += libsessiond-comm.la
360 libsessiond_comm_la_SOURCES = \
361 sessiond-comm/agent.hpp \
362 sessiond-comm/inet.cpp \
363 sessiond-comm/inet.hpp \
364 sessiond-comm/inet6.cpp \
365 sessiond-comm/inet6.hpp \
366 sessiond-comm/relayd.hpp \
367 sessiond-comm/sessiond-comm.cpp \
368 sessiond-comm/sessiond-comm.hpp
372 noinst_LTLIBRARIES += librelayd.la
374 librelayd_la_SOURCES = \
378 librelayd_la_LIBADD = libsessiond-comm.la
382 if BUILD_LIB_KERNEL_CONSUMER
383 noinst_LTLIBRARIES += libkernel-consumer.la
385 libkernel_consumer_la_SOURCES = \
386 kernel-consumer/kernel-consumer.cpp \
387 kernel-consumer/kernel-consumer.hpp
389 libkernel_consumer_la_LIBADD = \
393 if BUILD_LIB_UST_CONSUMER
394 if HAVE_LIBLTTNG_UST_CTL
395 noinst_LTLIBRARIES += libust-consumer.la
397 libust_consumer_la_SOURCES = \
398 ust-consumer/ust-consumer.cpp \
399 ust-consumer/ust-consumer.hpp
401 libust_consumer_la_LIBADD = \
406 if BUILD_LIB_TESTPOINT
407 noinst_LTLIBRARIES += libtestpoint.la
409 libtestpoint_la_SOURCES = \
410 testpoint/testpoint.cpp \
411 testpoint/testpoint.hpp
413 libtestpoint_la_LIBADD = $(DL_LIBS)
418 noinst_LTLIBRARIES += libstring-utils.la
419 libstring_utils_la_SOURCES = \
420 string-utils/format.hpp \
421 string-utils/string-utils.cpp \
422 string-utils/string-utils.hpp
425 noinst_PROGRAMS = filter-grammar-test
426 filter_grammar_test_SOURCES = filter-grammar-test.cpp
427 filter_grammar_test_LDADD = libcommon-gpl.la
433 xmldir = $(datadir)/xml/lttng
434 dist_xml_DATA = session.xsd
436 # Copy EXTRA_DIST files to the build directory
438 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
439 for script in $(EXTRA_DIST); do \
440 cp -f $(srcdir)/$$script $(builddir); \
445 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
446 for script in $(EXTRA_DIST); do \
447 rm -f $(builddir)/$$script; \