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