sessiond: open_packets: use user_space_consumer_channel_keys util
[lttng-tools.git] / src / common / Makefile.am
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 AUTOMAKE_OPTIONS = subdir-objects
4 noinst_LTLIBRARIES =
5
6 BUILT_SOURCES =
7
8 noinst_HEADERS = \
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
20
21
22 # libargpar
23 noinst_LTLIBRARIES += libargpar.la
24 libargpar_la_SOURCES = \
25 argpar/argpar.c \
26 argpar/argpar.h
27
28
29 # libargpar-utils
30 noinst_LTLIBRARIES += libargpar-utils.la
31 libargpar_utils_la_SOURCES = \
32 argpar-utils/argpar-utils.cpp \
33 argpar-utils/argpar-utils.hpp
34
35
36 # libbytecode
37 noinst_LTLIBRARIES += libbytecode.la
38 libbytecode_la_SOURCES = \
39 bytecode/bytecode.cpp \
40 bytecode/bytecode.hpp
41
42
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
47 noinst_LTLIBRARIES += libcommon-lgpl.la
48 libcommon_lgpl_la_SOURCES = \
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 \
58 buffer-view.hpp buffer-view.cpp \
59 channel.cpp \
60 ctl/format.hpp \
61 compiler.hpp \
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 \
67 container-wrapper.hpp \
68 credentials.cpp credentials.hpp \
69 defaults.cpp \
70 domain.cpp \
71 dynamic-array.cpp dynamic-array.hpp \
72 dynamic-buffer.cpp dynamic-buffer.hpp \
73 endpoint.cpp \
74 error.cpp error.hpp \
75 error-query.cpp \
76 evaluation.cpp \
77 event.cpp \
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 \
89 exception.cpp exception.hpp \
90 file-descriptor.hpp file-descriptor.cpp \
91 fd-handle.cpp fd-handle.hpp \
92 format.hpp \
93 io-hint.cpp \
94 io-hint.hpp \
95 kernel-probe.cpp \
96 location.cpp \
97 lockfile.cpp lockfile.hpp \
98 locked-reference.hpp \
99 logging-utils.hpp logging-utils.cpp \
100 log-level-rule.cpp \
101 make-unique.hpp \
102 make-unique-wrapper.hpp \
103 meta-helpers.hpp \
104 mi-lttng.cpp mi-lttng.hpp \
105 notification.cpp \
106 payload.cpp payload.hpp \
107 payload-view.cpp payload-view.hpp \
108 pthread-lock.hpp \
109 random.cpp random.hpp \
110 readwrite.cpp readwrite.hpp \
111 reference.hpp \
112 runas.cpp runas.hpp \
113 scope-exit.hpp \
114 session-descriptor.cpp \
115 snapshot.cpp snapshot.hpp \
116 spawn-viewer.cpp spawn-viewer.hpp \
117 thread.cpp thread.hpp \
118 time.cpp \
119 tracker.cpp tracker.hpp \
120 trigger.cpp \
121 type-traits.hpp \
122 unix.cpp unix.hpp \
123 uri.cpp uri.hpp \
124 userspace-probe.cpp \
125 urcu.hpp \
126 utils.cpp utils.hpp
127
128 if IS_LINUX
129 libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp
130 endif
131
132 if HAVE_ELF_H
133 libcommon_lgpl_la_SOURCES += \
134 lttng-elf.cpp lttng-elf.hpp
135 endif
136
137 libcommon_lgpl_la_LIBADD = \
138 libbytecode.la \
139 libcompat.la \
140 libconfig.la \
141 libfilter.la \
142 libhashtable-lgpl.la \
143 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
144
145
146 # The libpath static archive contains GPLv2 compatible code. It is
147 # meant to be used by GPL executables.
148 noinst_LTLIBRARIES += libpath.la
149 libpath_la_SOURCES = \
150 path.cpp path.hpp
151
152
153 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
154 # meant to be used by GPL executables.
155 noinst_LTLIBRARIES += libcommon-gpl.la
156 libcommon_gpl_la_SOURCES = \
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
171
172 libcommon_gpl_la_LIBADD = \
173 libcommon-lgpl.la \
174 libpath.la \
175 libini-config.la \
176 libhashtable-gpl.la \
177 libfd-tracker.la
178
179
180 # libcompat
181 noinst_LTLIBRARIES += libcompat.la
182 libcompat_la_SOURCES = \
183 compat/directory-handle.cpp \
184 compat/directory-handle.hpp \
185 compat/dirent.hpp \
186 compat/endian.hpp \
187 compat/errno.hpp \
188 compat/getenv.hpp \
189 compat/mman.hpp \
190 compat/netdb.hpp \
191 compat/path.hpp \
192 compat/paths.hpp \
193 compat/poll.cpp \
194 compat/poll.hpp \
195 compat/pthread.hpp \
196 compat/socket.hpp \
197 compat/string.hpp \
198 compat/tid.hpp \
199 compat/time.hpp
200
201
202 # libconfig
203 noinst_LTLIBRARIES += libconfig.la
204 libconfig_la_SOURCES = \
205 config/config-internal.hpp \
206 config/config-session-abi.hpp \
207 config/session-config.cpp \
208 config/session-config.hpp
209
210 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
211 libconfig_la_LIBADD = ${libxml2_LIBS}
212
213
214 if BUILD_LIB_CONSUMER
215 noinst_LTLIBRARIES += libconsumer.la
216
217 libconsumer_la_SOURCES = \
218 consumer/consumer.cpp \
219 consumer/consumer.hpp \
220 consumer/consumer-metadata-cache.cpp \
221 consumer/consumer-metadata-cache.hpp \
222 consumer/consumer-stream.cpp \
223 consumer/consumer-stream.hpp \
224 consumer/consumer-testpoint.hpp \
225 consumer/consumer-timer.cpp \
226 consumer/consumer-timer.hpp \
227 consumer/metadata-bucket.cpp \
228 consumer/metadata-bucket.hpp
229
230 libconsumer_la_LIBADD = \
231 libkernel-consumer.la \
232 librelayd.la \
233 libsessiond-comm.la
234
235 if HAVE_LIBLTTNG_UST_CTL
236 libconsumer_la_LIBADD += \
237 libust-consumer.la
238 endif
239 endif # BUILD_LIB_CONSUMER
240
241
242 # libfd-tracker
243 noinst_LTLIBRARIES += libfd-tracker.la
244 libfd_tracker_la_SOURCES = \
245 fd-tracker/fd-tracker.cpp \
246 fd-tracker/fd-tracker.hpp \
247 fd-tracker/inode.cpp \
248 fd-tracker/inode.hpp \
249 fd-tracker/utils.cpp \
250 fd-tracker/utils.hpp \
251 fd-tracker/utils-poll.cpp
252
253
254 # libfilter
255 noinst_LTLIBRARIES += libfilter.la
256
257 libfilter_la_SOURCES = \
258 filter/filter-ast.hpp \
259 filter/filter-ir.hpp \
260 filter/filter-lexer.lpp \
261 filter/filter-parser.ypp \
262 filter/filter-symbols.hpp \
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 \
270 filter/memstream.hpp
271
272 BUILT_SOURCES += filter/filter-parser.hpp
273
274 # Disable some warning flags for generated sources.
275 FILTER_WARN_FLAGS = \
276 -Wno-null-dereference \
277 -Wno-redundant-decls \
278 -Wno-unused-parameter
279
280 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
281 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
282 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
283 libfilter_la_LIBADD = libstring-utils.la
284
285 AM_YFLAGS = -t -d -v -Wno-yacc
286
287 # start with empty files to clean
288 CLEANFILES =
289
290 if HAVE_BISON
291 # we have bison: we can clean the generated parser files
292 CLEANFILES += \
293 filter/filter-parser.cpp \
294 filter/filter-parser.hpp \
295 filter/filter-parser.output
296 else # 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
299 filter/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
304 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
305 endif # HAVE_BISON
306
307 if HAVE_FLEX
308 # we have flex: we can clean the generated lexer files
309 CLEANFILES += filter/filter-lexer.cpp
310 else # 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
313 filter/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
318 BUILT_SOURCES += filter/filter-lexer.cpp
319 endif # HAVE_FLEX
320
321
322 noinst_LTLIBRARIES += libhashtable-lgpl.la
323 libhashtable_lgpl_la_SOURCES = \
324 hashtable/seed.cpp \
325 hashtable/utils.cpp \
326 hashtable/utils.hpp
327
328
329 noinst_LTLIBRARIES += libhashtable-gpl.la
330 libhashtable_gpl_la_SOURCES = \
331 hashtable/hashtable.cpp \
332 hashtable/hashtable.hpp \
333 hashtable/hashtable-symbols.hpp
334
335 libhashtable_gpl_la_LIBADD = \
336 $(URCU_LIBS) \
337 $(URCU_CDS_LIBS)
338
339
340 if BUILD_LIB_HEALTH
341 noinst_LTLIBRARIES += libhealth.la
342
343 libhealth_la_SOURCES = \
344 health/health.cpp
345 endif
346
347
348 # libini-config
349 noinst_LTLIBRARIES += libini-config.la
350 libini_config_la_SOURCES = \
351 ini-config/ini.cpp \
352 ini-config/ini.hpp \
353 ini-config/ini-config.cpp \
354 ini-config/ini-config.hpp
355
356
357 if BUILD_LIB_INDEX
358 noinst_LTLIBRARIES += libindex.la
359
360 libindex_la_SOURCES = \
361 index/ctf-index.hpp \
362 index/index.cpp \
363 index/index.hpp
364 endif
365
366
367 if BUILD_LIB_KERNEL_CTL
368 noinst_LTLIBRARIES += libkernel-ctl.la
369
370 libkernel_ctl_la_SOURCES = \
371 kernel-ctl/kernel-ctl.cpp \
372 kernel-ctl/kernel-ctl.hpp \
373 kernel-ctl/kernel-ioctl.hpp
374 endif
375
376 if BUILD_LIB_SESSIOND_COMM
377 noinst_LTLIBRARIES += libsessiond-comm.la
378
379 libsessiond_comm_la_SOURCES = \
380 sessiond-comm/agent.hpp \
381 sessiond-comm/inet.cpp \
382 sessiond-comm/inet.hpp \
383 sessiond-comm/inet6.cpp \
384 sessiond-comm/inet6.hpp \
385 sessiond-comm/relayd.hpp \
386 sessiond-comm/sessiond-comm.cpp \
387 sessiond-comm/sessiond-comm.hpp
388 endif
389
390 if BUILD_LIB_RELAYD
391 noinst_LTLIBRARIES += librelayd.la
392
393 librelayd_la_SOURCES = \
394 relayd/relayd.cpp \
395 relayd/relayd.hpp
396
397 librelayd_la_LIBADD = libsessiond-comm.la
398 endif
399
400
401 if BUILD_LIB_KERNEL_CONSUMER
402 noinst_LTLIBRARIES += libkernel-consumer.la
403
404 libkernel_consumer_la_SOURCES = \
405 kernel-consumer/kernel-consumer.cpp \
406 kernel-consumer/kernel-consumer.hpp
407
408 libkernel_consumer_la_LIBADD = \
409 libkernel-ctl.la
410 endif
411
412 if BUILD_LIB_UST_CONSUMER
413 if HAVE_LIBLTTNG_UST_CTL
414 noinst_LTLIBRARIES += libust-consumer.la
415
416 libust_consumer_la_SOURCES = \
417 ust-consumer/ust-consumer.cpp \
418 ust-consumer/ust-consumer.hpp
419
420 libust_consumer_la_LIBADD = \
421 $(UST_CTL_LIBS)
422 endif
423 endif
424
425 if BUILD_LIB_TESTPOINT
426 noinst_LTLIBRARIES += libtestpoint.la
427
428 libtestpoint_la_SOURCES = \
429 testpoint/testpoint.cpp \
430 testpoint/testpoint.hpp
431
432 libtestpoint_la_LIBADD = $(DL_LIBS)
433 endif
434
435
436 # libstring-utils
437 noinst_LTLIBRARIES += libstring-utils.la
438 libstring_utils_la_SOURCES = \
439 string-utils/c-string-view.hpp \
440 string-utils/format.hpp \
441 string-utils/string-utils.cpp \
442 string-utils/string-utils.hpp
443
444
445 noinst_PROGRAMS = filter-grammar-test
446 filter_grammar_test_SOURCES = filter-grammar-test.cpp
447 filter_grammar_test_LDADD = libcommon-gpl.la
448
449 EXTRA_DIST = \
450 mi-lttng-4.1.xsd \
451 session.xsd
452
453 xmldir = $(datadir)/xml/lttng
454 dist_xml_DATA = session.xsd
455
456 # Copy EXTRA_DIST files to the build directory
457 all-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
464 clean-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.041406 seconds and 4 git commands to generate.