sessiond: open_packets: use user_space_consumer_channel_keys util
[lttng-tools.git] / src / common / Makefile.am
CommitLineData
ab5be9fa
MJ
1# SPDX-License-Identifier: GPL-2.0-only
2
26821431 3AUTOMAKE_OPTIONS = subdir-objects
4ae04234
MJ
4noinst_LTLIBRARIES =
5
6BUILT_SOURCES =
7
8noinst_HEADERS = \
c9e313bc
SM
9 align.hpp \
10 bug.hpp \
11 defaults.hpp \
12 error.hpp \
13 futex.hpp \
14 lttng-kernel.hpp \
15 lttng-kernel-old.hpp \
16 macros.hpp \
17 time.hpp \
18 uri.hpp \
19 utils.hpp
4ae04234
MJ
20
21
22# libargpar
23noinst_LTLIBRARIES += libargpar.la
24libargpar_la_SOURCES = \
25 argpar/argpar.c \
26 argpar/argpar.h
27
28
29# libargpar-utils
30noinst_LTLIBRARIES += libargpar-utils.la
31libargpar_utils_la_SOURCES = \
32 argpar-utils/argpar-utils.cpp \
c9e313bc 33 argpar-utils/argpar-utils.hpp
4ae04234
MJ
34
35
36# libbytecode
37noinst_LTLIBRARIES += libbytecode.la
38libbytecode_la_SOURCES = \
39 bytecode/bytecode.cpp \
c9e313bc 40 bytecode/bytecode.hpp
26821431 41
b3f35e02 42
93903fd5
MD
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.
46
4ae04234 47noinst_LTLIBRARIES += libcommon-lgpl.la
93903fd5 48libcommon_lgpl_la_SOURCES = \
a6bc4ca9
SM
49 actions/action.cpp \
50 actions/list.cpp \
51 actions/notify.cpp \
52 actions/path.cpp \
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 \
c9e313bc 58 buffer-view.hpp buffer-view.cpp \
999af9c1 59 channel.cpp \
16d64977 60 ctl/format.hpp \
40ebe219 61 compiler.hpp \
a6bc4ca9
SM
62 conditions/buffer-usage.cpp \
63 conditions/condition.cpp \
64 conditions/event-rule-matches.cpp \
65 conditions/session-consumed-size.cpp \
66 conditions/session-rotation.cpp \
b17ed2ad 67 container-wrapper.hpp \
c9e313bc 68 credentials.cpp credentials.hpp \
a6bc4ca9
SM
69 defaults.cpp \
70 domain.cpp \
c9e313bc
SM
71 dynamic-array.cpp dynamic-array.hpp \
72 dynamic-buffer.cpp dynamic-buffer.hpp \
a6bc4ca9 73 endpoint.cpp \
c9e313bc 74 error.cpp error.hpp \
a6bc4ca9
SM
75 error-query.cpp \
76 evaluation.cpp \
038ab50b 77 event.cpp \
a6bc4ca9
SM
78 event-expr/event-expr.cpp \
79 event-field-value.cpp \
80 event-rule/event-rule.cpp \
81 event-rule/kernel-kprobe.cpp \
82 event-rule/kernel-syscall.cpp \
83 event-rule/kernel-uprobe.cpp \
84 event-rule/kernel-tracepoint.cpp \
85 event-rule/user-tracepoint.cpp \
86 event-rule/log4j-logging.cpp \
87 event-rule/jul-logging.cpp \
88 event-rule/python-logging.cpp \
53cd1e22 89 exception.cpp exception.hpp \
20c734f5 90 file-descriptor.hpp file-descriptor.cpp \
bac9f49c 91 fd-handle.cpp fd-handle.hpp \
05aa7e19 92 format.hpp \
671e39d7
MJ
93 io-hint.cpp \
94 io-hint.hpp \
a6bc4ca9 95 kernel-probe.cpp \
a6bc4ca9 96 location.cpp \
51379287 97 lockfile.cpp lockfile.hpp \
a3a56255 98 locked-reference.hpp \
e35e95ea 99 logging-utils.hpp logging-utils.cpp \
a6bc4ca9 100 log-level-rule.cpp \
1823e905 101 make-unique.hpp \
8802d23b 102 make-unique-wrapper.hpp \
a0a4f314 103 meta-helpers.hpp \
c9e313bc 104 mi-lttng.cpp mi-lttng.hpp \
a6bc4ca9 105 notification.cpp \
c9e313bc
SM
106 payload.cpp payload.hpp \
107 payload-view.cpp payload-view.hpp \
0a325f4d 108 pthread-lock.hpp \
57b90af7 109 random.cpp random.hpp \
c9e313bc 110 readwrite.cpp readwrite.hpp \
a0a4f314 111 reference.hpp \
c9e313bc 112 runas.cpp runas.hpp \
b6bbb1d6 113 scope-exit.hpp \
a6bc4ca9 114 session-descriptor.cpp \
c9e313bc
SM
115 snapshot.cpp snapshot.hpp \
116 spawn-viewer.cpp spawn-viewer.hpp \
117 thread.cpp thread.hpp \
a6bc4ca9 118 time.cpp \
c9e313bc 119 tracker.cpp tracker.hpp \
a6bc4ca9 120 trigger.cpp \
a6df2497 121 type-traits.hpp \
c9e313bc
SM
122 unix.cpp unix.hpp \
123 uri.cpp uri.hpp \
a6bc4ca9 124 userspace-probe.cpp \
0a325f4d 125 urcu.hpp \
c9e313bc 126 utils.cpp utils.hpp
b3f35e02 127
f053e837
JG
128if IS_LINUX
129libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp
130endif
131
b1b34226 132if HAVE_ELF_H
93903fd5 133libcommon_lgpl_la_SOURCES += \
c9e313bc 134 lttng-elf.cpp lttng-elf.hpp
b1b34226
MJ
135endif
136
93903fd5 137libcommon_lgpl_la_LIBADD = \
4ae04234
MJ
138 libbytecode.la \
139 libcompat.la \
140 libconfig.la \
141 libfilter.la \
142 libhashtable-lgpl.la \
116a02e3 143 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
b3f35e02 144
4ae04234 145
4971b7f0
MD
146# The libpath static archive contains GPLv2 compatible code. It is
147# meant to be used by GPL executables.
4ae04234 148noinst_LTLIBRARIES += libpath.la
4971b7f0 149libpath_la_SOURCES = \
c9e313bc 150 path.cpp path.hpp
4971b7f0 151
4ae04234 152
93903fd5
MD
153# The libcommon-gpl static archive contains GPLv2 compatible code. It is
154# meant to be used by GPL executables.
4ae04234 155noinst_LTLIBRARIES += libcommon-gpl.la
93903fd5 156libcommon_gpl_la_SOURCES = \
c9e313bc
SM
157 common.hpp \
158 context.cpp context.hpp \
159 daemonize.cpp daemonize.hpp \
160 filter.cpp filter.hpp \
161 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
162 futex.cpp futex.hpp \
163 index-allocator.cpp index-allocator.hpp \
164 optional.hpp \
165 pipe.cpp pipe.hpp \
166 shm.cpp shm.hpp \
167 trace-chunk.cpp trace-chunk.hpp \
168 trace-chunk-registry.hpp \
169 uuid.cpp uuid.hpp \
170 waiter.cpp waiter.hpp
93903fd5
MD
171
172libcommon_gpl_la_LIBADD = \
173 libcommon-lgpl.la \
4971b7f0 174 libpath.la \
4ae04234
MJ
175 libini-config.la \
176 libhashtable-gpl.la \
177 libfd-tracker.la
178
179
180# libcompat
181noinst_LTLIBRARIES += libcompat.la
182libcompat_la_SOURCES = \
4ae04234 183 compat/directory-handle.cpp \
c9e313bc
SM
184 compat/directory-handle.hpp \
185 compat/dirent.hpp \
186 compat/endian.hpp \
187 compat/errno.hpp \
c9e313bc
SM
188 compat/getenv.hpp \
189 compat/mman.hpp \
190 compat/netdb.hpp \
191 compat/path.hpp \
192 compat/paths.hpp \
4ae04234 193 compat/poll.cpp \
c9e313bc
SM
194 compat/poll.hpp \
195 compat/pthread.hpp \
196 compat/socket.hpp \
197 compat/string.hpp \
198 compat/tid.hpp \
199 compat/time.hpp
4ae04234
MJ
200
201
202# libconfig
203noinst_LTLIBRARIES += libconfig.la
204libconfig_la_SOURCES = \
c9e313bc
SM
205 config/config-internal.hpp \
206 config/config-session-abi.hpp \
4ae04234 207 config/session-config.cpp \
c9e313bc 208 config/session-config.hpp
4ae04234
MJ
209
210libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
211libconfig_la_LIBADD = ${libxml2_LIBS}
212
213
214if BUILD_LIB_CONSUMER
215noinst_LTLIBRARIES += libconsumer.la
216
217libconsumer_la_SOURCES = \
218 consumer/consumer.cpp \
c9e313bc 219 consumer/consumer.hpp \
4ae04234 220 consumer/consumer-metadata-cache.cpp \
c9e313bc 221 consumer/consumer-metadata-cache.hpp \
4ae04234 222 consumer/consumer-stream.cpp \
c9e313bc
SM
223 consumer/consumer-stream.hpp \
224 consumer/consumer-testpoint.hpp \
4ae04234 225 consumer/consumer-timer.cpp \
c9e313bc 226 consumer/consumer-timer.hpp \
4ae04234 227 consumer/metadata-bucket.cpp \
c9e313bc 228 consumer/metadata-bucket.hpp
4ae04234
MJ
229
230libconsumer_la_LIBADD = \
231 libkernel-consumer.la \
232 librelayd.la \
233 libsessiond-comm.la
234
235if HAVE_LIBLTTNG_UST_CTL
236libconsumer_la_LIBADD += \
237 libust-consumer.la
238endif
239endif # BUILD_LIB_CONSUMER
240
241
242# libfd-tracker
243noinst_LTLIBRARIES += libfd-tracker.la
244libfd_tracker_la_SOURCES = \
245 fd-tracker/fd-tracker.cpp \
c9e313bc 246 fd-tracker/fd-tracker.hpp \
4ae04234 247 fd-tracker/inode.cpp \
c9e313bc 248 fd-tracker/inode.hpp \
4ae04234 249 fd-tracker/utils.cpp \
c9e313bc 250 fd-tracker/utils.hpp \
4ae04234
MJ
251 fd-tracker/utils-poll.cpp
252
253
254# libfilter
255noinst_LTLIBRARIES += libfilter.la
256
257libfilter_la_SOURCES = \
c9e313bc
SM
258 filter/filter-ast.hpp \
259 filter/filter-ir.hpp \
4ae04234
MJ
260 filter/filter-lexer.lpp \
261 filter/filter-parser.ypp \
c9e313bc 262 filter/filter-symbols.hpp \
4ae04234
MJ
263 filter/filter-visitor-generate-bytecode.cpp \
264 filter/filter-visitor-generate-ir.cpp \
265 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
266 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
267 filter/filter-visitor-ir-validate-globbing.cpp \
268 filter/filter-visitor-ir-validate-string.cpp \
269 filter/filter-visitor-xml.cpp \
c9e313bc 270 filter/memstream.hpp
4ae04234
MJ
271
272BUILT_SOURCES += filter/filter-parser.hpp
273
6ce1601f
MJ
274# Disable some warning flags for generated sources.
275FILTER_WARN_FLAGS = \
19708280 276 -Wno-null-dereference \
f46376a1
MJ
277 -Wno-redundant-decls \
278 -Wno-unused-parameter
6ce1601f
MJ
279
280libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
c9e313bc 281libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
4ae04234
MJ
282libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
283libfilter_la_LIBADD = libstring-utils.la
284
285AM_YFLAGS = -t -d -v -Wno-yacc
286
287# start with empty files to clean
288CLEANFILES =
289
290if HAVE_BISON
291# we have bison: we can clean the generated parser files
292CLEANFILES += \
293 filter/filter-parser.cpp \
294 filter/filter-parser.hpp \
295 filter/filter-parser.output
296else # HAVE_BISON
297# create target used to stop the build if we want to build the parser,
298# but we don't have the necessary tool to do so
299filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
300 @echo "Error: Cannot build target because bison is missing."
301 @echo "Make sure bison is installed and run the configure script again."
302 @false
303
304BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
305endif # HAVE_BISON
306
307if HAVE_FLEX
308# we have flex: we can clean the generated lexer files
309CLEANFILES += filter/filter-lexer.cpp
310else # HAVE_FLEX
311# create target used to stop the build if we want to build the lexer,
312# but we don't have the necessary tool to do so
313filter/filter-lexer.cpp: filter/filter-lexer.lpp
314 @echo "Error: Cannot build target because flex is missing."
315 @echo "Make sure flex is installed and run the configure script again."
316 @false
317
318BUILT_SOURCES += filter/filter-lexer.cpp
319endif # HAVE_FLEX
320
321
322noinst_LTLIBRARIES += libhashtable-lgpl.la
323libhashtable_lgpl_la_SOURCES = \
324 hashtable/seed.cpp \
325 hashtable/utils.cpp \
c9e313bc 326 hashtable/utils.hpp
4ae04234
MJ
327
328
329noinst_LTLIBRARIES += libhashtable-gpl.la
330libhashtable_gpl_la_SOURCES = \
331 hashtable/hashtable.cpp \
c9e313bc
SM
332 hashtable/hashtable.hpp \
333 hashtable/hashtable-symbols.hpp
4ae04234
MJ
334
335libhashtable_gpl_la_LIBADD = \
336 $(URCU_LIBS) \
337 $(URCU_CDS_LIBS)
338
93903fd5 339
87fb9fc0 340if BUILD_LIB_HEALTH
4ae04234
MJ
341noinst_LTLIBRARIES += libhealth.la
342
343libhealth_la_SOURCES = \
344 health/health.cpp
87fb9fc0
JR
345endif
346
4ae04234
MJ
347
348# libini-config
349noinst_LTLIBRARIES += libini-config.la
350libini_config_la_SOURCES = \
351 ini-config/ini.cpp \
c9e313bc 352 ini-config/ini.hpp \
4ae04234 353 ini-config/ini-config.cpp \
c9e313bc 354 ini-config/ini-config.hpp
4ae04234
MJ
355
356
357if BUILD_LIB_INDEX
358noinst_LTLIBRARIES += libindex.la
359
360libindex_la_SOURCES = \
c9e313bc 361 index/ctf-index.hpp \
4ae04234 362 index/index.cpp \
c9e313bc 363 index/index.hpp
4ae04234
MJ
364endif
365
366
87fb9fc0 367if BUILD_LIB_KERNEL_CTL
4ae04234
MJ
368noinst_LTLIBRARIES += libkernel-ctl.la
369
370libkernel_ctl_la_SOURCES = \
371 kernel-ctl/kernel-ctl.cpp \
c9e313bc
SM
372 kernel-ctl/kernel-ctl.hpp \
373 kernel-ctl/kernel-ioctl.hpp
87fb9fc0
JR
374endif
375
376if BUILD_LIB_SESSIOND_COMM
4ae04234
MJ
377noinst_LTLIBRARIES += libsessiond-comm.la
378
379libsessiond_comm_la_SOURCES = \
c9e313bc 380 sessiond-comm/agent.hpp \
4ae04234 381 sessiond-comm/inet.cpp \
c9e313bc 382 sessiond-comm/inet.hpp \
4ae04234 383 sessiond-comm/inet6.cpp \
c9e313bc
SM
384 sessiond-comm/inet6.hpp \
385 sessiond-comm/relayd.hpp \
4ae04234 386 sessiond-comm/sessiond-comm.cpp \
c9e313bc 387 sessiond-comm/sessiond-comm.hpp
87fb9fc0
JR
388endif
389
390if BUILD_LIB_RELAYD
4ae04234
MJ
391noinst_LTLIBRARIES += librelayd.la
392
393librelayd_la_SOURCES = \
394 relayd/relayd.cpp \
c9e313bc 395 relayd/relayd.hpp
4ae04234
MJ
396
397librelayd_la_LIBADD = libsessiond-comm.la
aa360a35
JG
398endif
399
87fb9fc0
JR
400
401if BUILD_LIB_KERNEL_CONSUMER
4ae04234
MJ
402noinst_LTLIBRARIES += libkernel-consumer.la
403
404libkernel_consumer_la_SOURCES = \
405 kernel-consumer/kernel-consumer.cpp \
c9e313bc 406 kernel-consumer/kernel-consumer.hpp
4ae04234
MJ
407
408libkernel_consumer_la_LIBADD = \
409 libkernel-ctl.la
87fb9fc0
JR
410endif
411
412if BUILD_LIB_UST_CONSUMER
4ae04234
MJ
413if HAVE_LIBLTTNG_UST_CTL
414noinst_LTLIBRARIES += libust-consumer.la
415
416libust_consumer_la_SOURCES = \
417 ust-consumer/ust-consumer.cpp \
c9e313bc 418 ust-consumer/ust-consumer.hpp
4ae04234
MJ
419
420libust_consumer_la_LIBADD = \
421 $(UST_CTL_LIBS)
422endif
87fb9fc0
JR
423endif
424
425if BUILD_LIB_TESTPOINT
4ae04234 426noinst_LTLIBRARIES += libtestpoint.la
87fb9fc0 427
4ae04234
MJ
428libtestpoint_la_SOURCES = \
429 testpoint/testpoint.cpp \
c9e313bc 430 testpoint/testpoint.hpp
87fb9fc0 431
4ae04234 432libtestpoint_la_LIBADD = $(DL_LIBS)
87fb9fc0 433endif
10a8a223 434
4ae04234
MJ
435
436# libstring-utils
437noinst_LTLIBRARIES += libstring-utils.la
438libstring_utils_la_SOURCES = \
a6df2497 439 string-utils/c-string-view.hpp \
c9e313bc 440 string-utils/format.hpp \
4ae04234 441 string-utils/string-utils.cpp \
c9e313bc 442 string-utils/string-utils.hpp
4ae04234 443
1c39da61 444
e358ddd5 445noinst_PROGRAMS = filter-grammar-test
740da7d5 446filter_grammar_test_SOURCES = filter-grammar-test.cpp
93903fd5 447filter_grammar_test_LDADD = libcommon-gpl.la
e358ddd5 448
4ae04234
MJ
449EXTRA_DIST = \
450 mi-lttng-4.1.xsd \
451 session.xsd
452
453xmldir = $(datadir)/xml/lttng
454dist_xml_DATA = session.xsd
455
456# Copy EXTRA_DIST files to the build directory
c49fc5e4
JR
457all-local:
458 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
459 for script in $(EXTRA_DIST); do \
460 cp -f $(srcdir)/$$script $(builddir); \
461 done; \
462 fi
463
464clean-local:
465 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
466 for script in $(EXTRA_DIST); do \
467 rm -f $(builddir)/$$script; \
468 done; \
469 fi
This page took 0.112084 seconds and 4 git commands to generate.