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