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