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