1 # SPDX-License-Identifier: GPL-2.0-only
3 AUTOMAKE_OPTIONS = subdir-objects
14 lttng-kernel-old.hpp \
22 noinst_LTLIBRARIES += libargpar.la
23 libargpar_la_SOURCES = \
29 noinst_LTLIBRARIES += libargpar-utils.la
30 libargpar_utils_la_SOURCES = \
31 argpar-utils/argpar-utils.cpp \
32 argpar-utils/argpar-utils.hpp
36 noinst_LTLIBRARIES += libbytecode.la
37 libbytecode_la_SOURCES = \
38 bytecode/bytecode.cpp \
43 noinst_LTLIBRARIES += libcommon.la
44 libcommon_la_SOURCES = \
49 actions/rotate-session.cpp \
50 actions/snapshot-session.cpp \
51 actions/start-session.cpp \
52 actions/stop-session.cpp \
53 actions/rate-policy.cpp \
54 buffer-view.hpp buffer-view.cpp \
56 conditions/buffer-usage.cpp \
57 conditions/condition.cpp \
58 conditions/event-rule-matches.cpp \
59 conditions/session-consumed-size.cpp \
60 conditions/session-rotation.cpp \
61 context.cpp context.hpp \
62 credentials.cpp credentials.hpp \
63 daemonize.cpp daemonize.hpp \
66 dynamic-array.cpp dynamic-array.hpp \
67 dynamic-buffer.cpp dynamic-buffer.hpp \
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 filter.cpp filter.hpp \
85 fd-handle.cpp fd-handle.hpp \
86 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
89 index-allocator.cpp index-allocator.hpp \
92 mi-lttng.cpp mi-lttng.hpp \
95 payload.cpp payload.hpp \
96 payload-view.cpp payload-view.hpp \
98 readwrite.cpp readwrite.hpp \
101 session-descriptor.cpp \
102 snapshot.cpp snapshot.hpp \
103 spawn-viewer.cpp spawn-viewer.hpp \
105 trace-chunk.cpp trace-chunk.hpp \
106 trace-chunk-registry.hpp \
110 userspace-probe.cpp \
111 utils.cpp utils.hpp \
113 thread.cpp thread.hpp \
114 tracker.cpp tracker.hpp \
115 waiter.cpp waiter.hpp
118 libcommon_la_SOURCES += \
119 lttng-elf.cpp lttng-elf.hpp
122 libcommon_la_LIBADD = \
131 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
135 noinst_LTLIBRARIES += libcompat.la
136 libcompat_la_SOURCES = \
137 compat/compat-fcntl.cpp \
138 compat/directory-handle.cpp \
139 compat/directory-handle.hpp \
159 noinst_LTLIBRARIES += libconfig.la
160 libconfig_la_SOURCES = \
161 config/config-internal.hpp \
162 config/config-session-abi.hpp \
163 config/session-config.cpp \
164 config/session-config.hpp
166 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
167 libconfig_la_LIBADD = ${libxml2_LIBS}
170 if BUILD_LIB_CONSUMER
171 noinst_LTLIBRARIES += libconsumer.la
173 libconsumer_la_SOURCES = \
174 consumer/consumer.cpp \
175 consumer/consumer.hpp \
176 consumer/consumer-metadata-cache.cpp \
177 consumer/consumer-metadata-cache.hpp \
178 consumer/consumer-stream.cpp \
179 consumer/consumer-stream.hpp \
180 consumer/consumer-testpoint.hpp \
181 consumer/consumer-timer.cpp \
182 consumer/consumer-timer.hpp \
183 consumer/metadata-bucket.cpp \
184 consumer/metadata-bucket.hpp
186 libconsumer_la_LIBADD = \
189 libkernel-consumer.la \
193 if HAVE_LIBLTTNG_UST_CTL
194 libconsumer_la_LIBADD += \
197 endif # BUILD_LIB_CONSUMER
201 noinst_LTLIBRARIES += libfd-tracker.la
202 libfd_tracker_la_SOURCES = \
203 fd-tracker/fd-tracker.cpp \
204 fd-tracker/fd-tracker.hpp \
205 fd-tracker/inode.cpp \
206 fd-tracker/inode.hpp \
207 fd-tracker/utils.cpp \
208 fd-tracker/utils.hpp \
209 fd-tracker/utils-poll.cpp
212 noinst_LTLIBRARIES += libfilter.la
214 libfilter_la_SOURCES = \
215 filter/filter-ast.hpp \
216 filter/filter-ir.hpp \
217 filter/filter-lexer.lpp \
218 filter/filter-parser.ypp \
219 filter/filter-symbols.hpp \
220 filter/filter-visitor-generate-bytecode.cpp \
221 filter/filter-visitor-generate-ir.cpp \
222 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
223 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
224 filter/filter-visitor-ir-validate-globbing.cpp \
225 filter/filter-visitor-ir-validate-string.cpp \
226 filter/filter-visitor-xml.cpp \
229 BUILT_SOURCES = filter/filter-parser.hpp
231 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS)
232 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
234 AM_YFLAGS = -t -d -v -Wno-yacc
236 # start with empty files to clean
240 # we have bison: we can clean the generated parser files
242 filter/filter-parser.cpp \
243 filter/filter-parser.hpp \
244 filter/filter-parser.output
246 # create target used to stop the build if we want to build the parser,
247 # but we don't have the necessary tool to do so
248 ERR_MSG = "Error: Cannot build target because bison is missing."
249 ERR_MSG += "Make sure bison is installed and run the configure script again."
251 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
255 all-local: filter/filter-parser.cpp filter/filter-parser.hpp
259 # we have flex: we can clean the generated lexer files
260 CLEANFILES += filter/filter-lexer.cpp
262 # create target used to stop the build if we want to build the lexer,
263 # but we don't have the necessary tool to do so
264 ERR_MSG = "Error: Cannot build target because flex is missing."
265 ERR_MSG += "Make sure flex is installed and run the configure script again."
267 filter/filter-lexer.cpp: filter/filter-lexer.lpp
271 all-local: filter/filter-lexer.cpp
276 noinst_LTLIBRARIES += libhashtable.la
277 libhashtable_la_SOURCES = \
278 hashtable/hashtable.cpp \
279 hashtable/hashtable.hpp \
280 hashtable/hashtable-symbols.hpp \
281 hashtable/utils.cpp \
284 libhashtable_la_LIBADD = $(URCU_LIBS) $(URCU_CDS_LIBS)
288 noinst_LTLIBRARIES += libhealth.la
290 libhealth_la_SOURCES = \
296 noinst_LTLIBRARIES += libini-config.la
297 libini_config_la_SOURCES = \
300 ini-config/ini-config.cpp \
301 ini-config/ini-config.hpp
305 noinst_LTLIBRARIES += libindex.la
307 libindex_la_SOURCES = \
308 index/ctf-index.hpp \
314 if BUILD_LIB_KERNEL_CTL
315 noinst_LTLIBRARIES += libkernel-ctl.la
317 libkernel_ctl_la_SOURCES = \
318 kernel-ctl/kernel-ctl.cpp \
319 kernel-ctl/kernel-ctl.hpp \
320 kernel-ctl/kernel-ioctl.hpp
323 if BUILD_LIB_SESSIOND_COMM
324 noinst_LTLIBRARIES += libsessiond-comm.la
326 libsessiond_comm_la_SOURCES = \
327 sessiond-comm/agent.hpp \
328 sessiond-comm/inet.cpp \
329 sessiond-comm/inet.hpp \
330 sessiond-comm/inet6.cpp \
331 sessiond-comm/inet6.hpp \
332 sessiond-comm/relayd.hpp \
333 sessiond-comm/sessiond-comm.cpp \
334 sessiond-comm/sessiond-comm.hpp
338 noinst_LTLIBRARIES += librelayd.la
340 librelayd_la_SOURCES = \
344 librelayd_la_LIBADD = libsessiond-comm.la
348 if BUILD_LIB_KERNEL_CONSUMER
349 noinst_LTLIBRARIES += libkernel-consumer.la
351 libkernel_consumer_la_SOURCES = \
352 kernel-consumer/kernel-consumer.cpp \
353 kernel-consumer/kernel-consumer.hpp
355 libkernel_consumer_la_LIBADD = \
360 if BUILD_LIB_UST_CONSUMER
361 if HAVE_LIBLTTNG_UST_CTL
362 noinst_LTLIBRARIES += libust-consumer.la
364 libust_consumer_la_SOURCES = \
365 ust-consumer/ust-consumer.cpp \
366 ust-consumer/ust-consumer.hpp
368 libust_consumer_la_LIBADD = \
374 if BUILD_LIB_TESTPOINT
375 noinst_LTLIBRARIES += libtestpoint.la
377 libtestpoint_la_SOURCES = \
378 testpoint/testpoint.cpp \
379 testpoint/testpoint.hpp
381 libtestpoint_la_LIBADD = $(DL_LIBS)
386 noinst_LTLIBRARIES += libstring-utils.la
387 libstring_utils_la_SOURCES = \
388 string-utils/format.hpp \
389 string-utils/string-utils.cpp \
390 string-utils/string-utils.hpp
393 noinst_PROGRAMS = filter-grammar-test
394 filter_grammar_test_SOURCES = filter-grammar-test.cpp
395 filter_grammar_test_LDADD = \
402 xmldir = $(datadir)/xml/lttng
403 dist_xml_DATA = session.xsd
405 # Copy EXTRA_DIST files to the build directory
407 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
408 for script in $(EXTRA_DIST); do \
409 cp -f $(srcdir)/$$script $(builddir); \
414 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
415 for script in $(EXTRA_DIST); do \
416 rm -f $(builddir)/$$script; \