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