Add make_unique_wrapper()
[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 = \
c9e313bc
SM
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
4ae04234
MJ
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 \
c9e313bc 33 argpar-utils/argpar-utils.hpp
4ae04234
MJ
34
35
36# libbytecode
37noinst_LTLIBRARIES += libbytecode.la
38libbytecode_la_SOURCES = \
39 bytecode/bytecode.cpp \
c9e313bc 40 bytecode/bytecode.hpp
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 \
c9e313bc 58 buffer-view.hpp 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 \
c9e313bc 65 credentials.cpp credentials.hpp \
a6bc4ca9
SM
66 defaults.cpp \
67 domain.cpp \
c9e313bc
SM
68 dynamic-array.cpp dynamic-array.hpp \
69 dynamic-buffer.cpp dynamic-buffer.hpp \
a6bc4ca9 70 endpoint.cpp \
c9e313bc 71 error.cpp error.hpp \
a6bc4ca9
SM
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 \
c9e313bc 86 fd-handle.cpp fd-handle.hpp\
a6bc4ca9 87 kernel-probe.cpp \
a6bc4ca9
SM
88 location.cpp \
89 log-level-rule.cpp \
8802d23b 90 make-unique-wrapper.hpp \
c9e313bc 91 mi-lttng.cpp mi-lttng.hpp \
a6bc4ca9 92 notification.cpp \
c9e313bc
SM
93 payload.cpp payload.hpp \
94 payload-view.cpp payload-view.hpp \
95 readwrite.cpp readwrite.hpp \
96 runas.cpp runas.hpp \
a6bc4ca9 97 session-descriptor.cpp \
c9e313bc
SM
98 snapshot.cpp snapshot.hpp \
99 spawn-viewer.cpp spawn-viewer.hpp \
100 thread.cpp thread.hpp \
a6bc4ca9 101 time.cpp \
c9e313bc 102 tracker.cpp tracker.hpp \
a6bc4ca9 103 trigger.cpp \
c9e313bc
SM
104 unix.cpp unix.hpp \
105 uri.cpp uri.hpp \
a6bc4ca9 106 userspace-probe.cpp \
c9e313bc 107 utils.cpp utils.hpp
b3f35e02 108
b1b34226 109if HAVE_ELF_H
93903fd5 110libcommon_lgpl_la_SOURCES += \
c9e313bc 111 lttng-elf.cpp lttng-elf.hpp
b1b34226
MJ
112endif
113
93903fd5 114libcommon_lgpl_la_LIBADD = \
4ae04234
MJ
115 libbytecode.la \
116 libcompat.la \
117 libconfig.la \
118 libfilter.la \
119 libhashtable-lgpl.la \
116a02e3 120 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
b3f35e02 121
4ae04234 122
4971b7f0
MD
123# The libpath static archive contains GPLv2 compatible code. It is
124# meant to be used by GPL executables.
4ae04234 125noinst_LTLIBRARIES += libpath.la
4971b7f0 126libpath_la_SOURCES = \
c9e313bc 127 path.cpp path.hpp
4971b7f0 128
4ae04234 129
93903fd5
MD
130# The libcommon-gpl static archive contains GPLv2 compatible code. It is
131# meant to be used by GPL executables.
4ae04234 132noinst_LTLIBRARIES += libcommon-gpl.la
93903fd5 133libcommon_gpl_la_SOURCES = \
c9e313bc
SM
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
93903fd5
MD
148
149libcommon_gpl_la_LIBADD = \
150 libcommon-lgpl.la \
4971b7f0 151 libpath.la \
4ae04234
MJ
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 \
c9e313bc
SM
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 \
4ae04234 172 compat/poll.cpp \
c9e313bc
SM
173 compat/poll.hpp \
174 compat/pthread.hpp \
175 compat/socket.hpp \
176 compat/string.hpp \
177 compat/tid.hpp \
178 compat/time.hpp
4ae04234
MJ
179
180
181# libconfig
182noinst_LTLIBRARIES += libconfig.la
183libconfig_la_SOURCES = \
c9e313bc
SM
184 config/config-internal.hpp \
185 config/config-session-abi.hpp \
4ae04234 186 config/session-config.cpp \
c9e313bc 187 config/session-config.hpp
4ae04234
MJ
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 \
c9e313bc 198 consumer/consumer.hpp \
4ae04234 199 consumer/consumer-metadata-cache.cpp \
c9e313bc 200 consumer/consumer-metadata-cache.hpp \
4ae04234 201 consumer/consumer-stream.cpp \
c9e313bc
SM
202 consumer/consumer-stream.hpp \
203 consumer/consumer-testpoint.hpp \
4ae04234 204 consumer/consumer-timer.cpp \
c9e313bc 205 consumer/consumer-timer.hpp \
4ae04234 206 consumer/metadata-bucket.cpp \
c9e313bc 207 consumer/metadata-bucket.hpp
4ae04234
MJ
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 \
c9e313bc 225 fd-tracker/fd-tracker.hpp \
4ae04234 226 fd-tracker/inode.cpp \
c9e313bc 227 fd-tracker/inode.hpp \
4ae04234 228 fd-tracker/utils.cpp \
c9e313bc 229 fd-tracker/utils.hpp \
4ae04234
MJ
230 fd-tracker/utils-poll.cpp
231
232
233# libfilter
234noinst_LTLIBRARIES += libfilter.la
235
236libfilter_la_SOURCES = \
c9e313bc
SM
237 filter/filter-ast.hpp \
238 filter/filter-ir.hpp \
4ae04234
MJ
239 filter/filter-lexer.lpp \
240 filter/filter-parser.ypp \
c9e313bc 241 filter/filter-symbols.hpp \
4ae04234
MJ
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 \
c9e313bc 249 filter/memstream.hpp
4ae04234
MJ
250
251BUILT_SOURCES += filter/filter-parser.hpp
252
6ce1601f
MJ
253# Disable some warning flags for generated sources.
254FILTER_WARN_FLAGS = \
19708280 255 -Wno-null-dereference \
f46376a1
MJ
256 -Wno-redundant-decls \
257 -Wno-unused-parameter
6ce1601f
MJ
258
259libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
c9e313bc 260libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
4ae04234
MJ
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 \
c9e313bc 305 hashtable/utils.hpp
4ae04234
MJ
306
307
308noinst_LTLIBRARIES += libhashtable-gpl.la
309libhashtable_gpl_la_SOURCES = \
310 hashtable/hashtable.cpp \
c9e313bc
SM
311 hashtable/hashtable.hpp \
312 hashtable/hashtable-symbols.hpp
4ae04234
MJ
313
314libhashtable_gpl_la_LIBADD = \
315 $(URCU_LIBS) \
316 $(URCU_CDS_LIBS)
317
93903fd5 318
87fb9fc0 319if BUILD_LIB_HEALTH
4ae04234
MJ
320noinst_LTLIBRARIES += libhealth.la
321
322libhealth_la_SOURCES = \
323 health/health.cpp
87fb9fc0
JR
324endif
325
4ae04234
MJ
326
327# libini-config
328noinst_LTLIBRARIES += libini-config.la
329libini_config_la_SOURCES = \
330 ini-config/ini.cpp \
c9e313bc 331 ini-config/ini.hpp \
4ae04234 332 ini-config/ini-config.cpp \
c9e313bc 333 ini-config/ini-config.hpp
4ae04234
MJ
334
335
336if BUILD_LIB_INDEX
337noinst_LTLIBRARIES += libindex.la
338
339libindex_la_SOURCES = \
c9e313bc 340 index/ctf-index.hpp \
4ae04234 341 index/index.cpp \
c9e313bc 342 index/index.hpp
4ae04234
MJ
343endif
344
345
87fb9fc0 346if BUILD_LIB_KERNEL_CTL
4ae04234
MJ
347noinst_LTLIBRARIES += libkernel-ctl.la
348
349libkernel_ctl_la_SOURCES = \
350 kernel-ctl/kernel-ctl.cpp \
c9e313bc
SM
351 kernel-ctl/kernel-ctl.hpp \
352 kernel-ctl/kernel-ioctl.hpp
87fb9fc0
JR
353endif
354
355if BUILD_LIB_SESSIOND_COMM
4ae04234
MJ
356noinst_LTLIBRARIES += libsessiond-comm.la
357
358libsessiond_comm_la_SOURCES = \
c9e313bc 359 sessiond-comm/agent.hpp \
4ae04234 360 sessiond-comm/inet.cpp \
c9e313bc 361 sessiond-comm/inet.hpp \
4ae04234 362 sessiond-comm/inet6.cpp \
c9e313bc
SM
363 sessiond-comm/inet6.hpp \
364 sessiond-comm/relayd.hpp \
4ae04234 365 sessiond-comm/sessiond-comm.cpp \
c9e313bc 366 sessiond-comm/sessiond-comm.hpp
87fb9fc0
JR
367endif
368
369if BUILD_LIB_RELAYD
4ae04234
MJ
370noinst_LTLIBRARIES += librelayd.la
371
372librelayd_la_SOURCES = \
373 relayd/relayd.cpp \
c9e313bc 374 relayd/relayd.hpp
4ae04234
MJ
375
376librelayd_la_LIBADD = libsessiond-comm.la
aa360a35
JG
377endif
378
87fb9fc0
JR
379
380if BUILD_LIB_KERNEL_CONSUMER
4ae04234
MJ
381noinst_LTLIBRARIES += libkernel-consumer.la
382
383libkernel_consumer_la_SOURCES = \
384 kernel-consumer/kernel-consumer.cpp \
c9e313bc 385 kernel-consumer/kernel-consumer.hpp
4ae04234
MJ
386
387libkernel_consumer_la_LIBADD = \
388 libkernel-ctl.la
87fb9fc0
JR
389endif
390
391if BUILD_LIB_UST_CONSUMER
4ae04234
MJ
392if HAVE_LIBLTTNG_UST_CTL
393noinst_LTLIBRARIES += libust-consumer.la
394
395libust_consumer_la_SOURCES = \
396 ust-consumer/ust-consumer.cpp \
c9e313bc 397 ust-consumer/ust-consumer.hpp
4ae04234
MJ
398
399libust_consumer_la_LIBADD = \
400 $(UST_CTL_LIBS)
401endif
87fb9fc0
JR
402endif
403
404if BUILD_LIB_TESTPOINT
4ae04234 405noinst_LTLIBRARIES += libtestpoint.la
87fb9fc0 406
4ae04234
MJ
407libtestpoint_la_SOURCES = \
408 testpoint/testpoint.cpp \
c9e313bc 409 testpoint/testpoint.hpp
87fb9fc0 410
4ae04234 411libtestpoint_la_LIBADD = $(DL_LIBS)
87fb9fc0 412endif
10a8a223 413
4ae04234
MJ
414
415# libstring-utils
416noinst_LTLIBRARIES += libstring-utils.la
417libstring_utils_la_SOURCES = \
c9e313bc 418 string-utils/format.hpp \
4ae04234 419 string-utils/string-utils.cpp \
c9e313bc 420 string-utils/string-utils.hpp
4ae04234 421
1c39da61 422
e358ddd5 423noinst_PROGRAMS = filter-grammar-test
740da7d5 424filter_grammar_test_SOURCES = filter-grammar-test.cpp
93903fd5 425filter_grammar_test_LDADD = libcommon-gpl.la
e358ddd5 426
4ae04234
MJ
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
c49fc5e4
JR
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.080306 seconds and 4 git commands to generate.