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