Provide an idiomatic c++ interface for action lists
[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 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 locked-reference.hpp \
97 logging-utils.hpp logging-utils.cpp \
98 log-level-rule.cpp \
99 make-unique.hpp \
100 make-unique-wrapper.hpp \
101 mi-lttng.cpp mi-lttng.hpp \
102 notification.cpp \
103 payload.cpp payload.hpp \
104 payload-view.cpp payload-view.hpp \
105 pthread-lock.hpp \
106 random.cpp random.hpp \
107 readwrite.cpp readwrite.hpp \
108 runas.cpp runas.hpp \
109 scope-exit.hpp \
110 session-descriptor.cpp \
111 snapshot.cpp snapshot.hpp \
112 spawn-viewer.cpp spawn-viewer.hpp \
113 thread.cpp thread.hpp \
114 time.cpp \
115 tracker.cpp tracker.hpp \
116 trigger.cpp \
117 unix.cpp unix.hpp \
118 uri.cpp uri.hpp \
119 userspace-probe.cpp \
120 urcu.hpp \
121 utils.cpp utils.hpp
122
123 if IS_LINUX
124 libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp
125 endif
126
127 if HAVE_ELF_H
128 libcommon_lgpl_la_SOURCES += \
129 lttng-elf.cpp lttng-elf.hpp
130 endif
131
132 libcommon_lgpl_la_LIBADD = \
133 libbytecode.la \
134 libcompat.la \
135 libconfig.la \
136 libfilter.la \
137 libhashtable-lgpl.la \
138 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
139
140
141 # The libpath static archive contains GPLv2 compatible code. It is
142 # meant to be used by GPL executables.
143 noinst_LTLIBRARIES += libpath.la
144 libpath_la_SOURCES = \
145 path.cpp path.hpp
146
147
148 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
149 # meant to be used by GPL executables.
150 noinst_LTLIBRARIES += libcommon-gpl.la
151 libcommon_gpl_la_SOURCES = \
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
166
167 libcommon_gpl_la_LIBADD = \
168 libcommon-lgpl.la \
169 libpath.la \
170 libini-config.la \
171 libhashtable-gpl.la \
172 libfd-tracker.la
173
174
175 # libcompat
176 noinst_LTLIBRARIES += libcompat.la
177 libcompat_la_SOURCES = \
178 compat/directory-handle.cpp \
179 compat/directory-handle.hpp \
180 compat/dirent.hpp \
181 compat/endian.hpp \
182 compat/errno.hpp \
183 compat/getenv.hpp \
184 compat/mman.hpp \
185 compat/netdb.hpp \
186 compat/path.hpp \
187 compat/paths.hpp \
188 compat/poll.cpp \
189 compat/poll.hpp \
190 compat/pthread.hpp \
191 compat/socket.hpp \
192 compat/string.hpp \
193 compat/tid.hpp \
194 compat/time.hpp
195
196
197 # libconfig
198 noinst_LTLIBRARIES += libconfig.la
199 libconfig_la_SOURCES = \
200 config/config-internal.hpp \
201 config/config-session-abi.hpp \
202 config/session-config.cpp \
203 config/session-config.hpp
204
205 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
206 libconfig_la_LIBADD = ${libxml2_LIBS}
207
208
209 if BUILD_LIB_CONSUMER
210 noinst_LTLIBRARIES += libconsumer.la
211
212 libconsumer_la_SOURCES = \
213 consumer/consumer.cpp \
214 consumer/consumer.hpp \
215 consumer/consumer-metadata-cache.cpp \
216 consumer/consumer-metadata-cache.hpp \
217 consumer/consumer-stream.cpp \
218 consumer/consumer-stream.hpp \
219 consumer/consumer-testpoint.hpp \
220 consumer/consumer-timer.cpp \
221 consumer/consumer-timer.hpp \
222 consumer/metadata-bucket.cpp \
223 consumer/metadata-bucket.hpp
224
225 libconsumer_la_LIBADD = \
226 libkernel-consumer.la \
227 librelayd.la \
228 libsessiond-comm.la
229
230 if HAVE_LIBLTTNG_UST_CTL
231 libconsumer_la_LIBADD += \
232 libust-consumer.la
233 endif
234 endif # BUILD_LIB_CONSUMER
235
236
237 # libfd-tracker
238 noinst_LTLIBRARIES += libfd-tracker.la
239 libfd_tracker_la_SOURCES = \
240 fd-tracker/fd-tracker.cpp \
241 fd-tracker/fd-tracker.hpp \
242 fd-tracker/inode.cpp \
243 fd-tracker/inode.hpp \
244 fd-tracker/utils.cpp \
245 fd-tracker/utils.hpp \
246 fd-tracker/utils-poll.cpp
247
248
249 # libfilter
250 noinst_LTLIBRARIES += libfilter.la
251
252 libfilter_la_SOURCES = \
253 filter/filter-ast.hpp \
254 filter/filter-ir.hpp \
255 filter/filter-lexer.lpp \
256 filter/filter-parser.ypp \
257 filter/filter-symbols.hpp \
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 \
265 filter/memstream.hpp
266
267 BUILT_SOURCES += filter/filter-parser.hpp
268
269 # Disable some warning flags for generated sources.
270 FILTER_WARN_FLAGS = \
271 -Wno-null-dereference \
272 -Wno-redundant-decls \
273 -Wno-unused-parameter
274
275 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
276 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
277 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
278 libfilter_la_LIBADD = libstring-utils.la
279
280 AM_YFLAGS = -t -d -v -Wno-yacc
281
282 # start with empty files to clean
283 CLEANFILES =
284
285 if HAVE_BISON
286 # we have bison: we can clean the generated parser files
287 CLEANFILES += \
288 filter/filter-parser.cpp \
289 filter/filter-parser.hpp \
290 filter/filter-parser.output
291 else # 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
294 filter/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
299 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
300 endif # HAVE_BISON
301
302 if HAVE_FLEX
303 # we have flex: we can clean the generated lexer files
304 CLEANFILES += filter/filter-lexer.cpp
305 else # 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
308 filter/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
313 BUILT_SOURCES += filter/filter-lexer.cpp
314 endif # HAVE_FLEX
315
316
317 noinst_LTLIBRARIES += libhashtable-lgpl.la
318 libhashtable_lgpl_la_SOURCES = \
319 hashtable/seed.cpp \
320 hashtable/utils.cpp \
321 hashtable/utils.hpp
322
323
324 noinst_LTLIBRARIES += libhashtable-gpl.la
325 libhashtable_gpl_la_SOURCES = \
326 hashtable/hashtable.cpp \
327 hashtable/hashtable.hpp \
328 hashtable/hashtable-symbols.hpp
329
330 libhashtable_gpl_la_LIBADD = \
331 $(URCU_LIBS) \
332 $(URCU_CDS_LIBS)
333
334
335 if BUILD_LIB_HEALTH
336 noinst_LTLIBRARIES += libhealth.la
337
338 libhealth_la_SOURCES = \
339 health/health.cpp
340 endif
341
342
343 # libini-config
344 noinst_LTLIBRARIES += libini-config.la
345 libini_config_la_SOURCES = \
346 ini-config/ini.cpp \
347 ini-config/ini.hpp \
348 ini-config/ini-config.cpp \
349 ini-config/ini-config.hpp
350
351
352 if BUILD_LIB_INDEX
353 noinst_LTLIBRARIES += libindex.la
354
355 libindex_la_SOURCES = \
356 index/ctf-index.hpp \
357 index/index.cpp \
358 index/index.hpp
359 endif
360
361
362 if BUILD_LIB_KERNEL_CTL
363 noinst_LTLIBRARIES += libkernel-ctl.la
364
365 libkernel_ctl_la_SOURCES = \
366 kernel-ctl/kernel-ctl.cpp \
367 kernel-ctl/kernel-ctl.hpp \
368 kernel-ctl/kernel-ioctl.hpp
369 endif
370
371 if BUILD_LIB_SESSIOND_COMM
372 noinst_LTLIBRARIES += libsessiond-comm.la
373
374 libsessiond_comm_la_SOURCES = \
375 sessiond-comm/agent.hpp \
376 sessiond-comm/inet.cpp \
377 sessiond-comm/inet.hpp \
378 sessiond-comm/inet6.cpp \
379 sessiond-comm/inet6.hpp \
380 sessiond-comm/relayd.hpp \
381 sessiond-comm/sessiond-comm.cpp \
382 sessiond-comm/sessiond-comm.hpp
383 endif
384
385 if BUILD_LIB_RELAYD
386 noinst_LTLIBRARIES += librelayd.la
387
388 librelayd_la_SOURCES = \
389 relayd/relayd.cpp \
390 relayd/relayd.hpp
391
392 librelayd_la_LIBADD = libsessiond-comm.la
393 endif
394
395
396 if BUILD_LIB_KERNEL_CONSUMER
397 noinst_LTLIBRARIES += libkernel-consumer.la
398
399 libkernel_consumer_la_SOURCES = \
400 kernel-consumer/kernel-consumer.cpp \
401 kernel-consumer/kernel-consumer.hpp
402
403 libkernel_consumer_la_LIBADD = \
404 libkernel-ctl.la
405 endif
406
407 if BUILD_LIB_UST_CONSUMER
408 if HAVE_LIBLTTNG_UST_CTL
409 noinst_LTLIBRARIES += libust-consumer.la
410
411 libust_consumer_la_SOURCES = \
412 ust-consumer/ust-consumer.cpp \
413 ust-consumer/ust-consumer.hpp
414
415 libust_consumer_la_LIBADD = \
416 $(UST_CTL_LIBS)
417 endif
418 endif
419
420 if BUILD_LIB_TESTPOINT
421 noinst_LTLIBRARIES += libtestpoint.la
422
423 libtestpoint_la_SOURCES = \
424 testpoint/testpoint.cpp \
425 testpoint/testpoint.hpp
426
427 libtestpoint_la_LIBADD = $(DL_LIBS)
428 endif
429
430
431 # libstring-utils
432 noinst_LTLIBRARIES += libstring-utils.la
433 libstring_utils_la_SOURCES = \
434 string-utils/format.hpp \
435 string-utils/string-utils.cpp \
436 string-utils/string-utils.hpp
437
438
439 noinst_PROGRAMS = filter-grammar-test
440 filter_grammar_test_SOURCES = filter-grammar-test.cpp
441 filter_grammar_test_LDADD = libcommon-gpl.la
442
443 EXTRA_DIST = \
444 mi-lttng-4.1.xsd \
445 session.xsd
446
447 xmldir = $(datadir)/xml/lttng
448 dist_xml_DATA = session.xsd
449
450 # Copy EXTRA_DIST files to the build directory
451 all-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
458 clean-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.038648 seconds and 5 git commands to generate.