Add make_unique_wrapper()
[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 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
109 if HAVE_ELF_H
110 libcommon_lgpl_la_SOURCES += \
111 lttng-elf.cpp lttng-elf.hpp
112 endif
113
114 libcommon_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.
125 noinst_LTLIBRARIES += libpath.la
126 libpath_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.
132 noinst_LTLIBRARIES += libcommon-gpl.la
133 libcommon_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
149 libcommon_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
158 noinst_LTLIBRARIES += libcompat.la
159 libcompat_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
182 noinst_LTLIBRARIES += libconfig.la
183 libconfig_la_SOURCES = \
184 config/config-internal.hpp \
185 config/config-session-abi.hpp \
186 config/session-config.cpp \
187 config/session-config.hpp
188
189 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
190 libconfig_la_LIBADD = ${libxml2_LIBS}
191
192
193 if BUILD_LIB_CONSUMER
194 noinst_LTLIBRARIES += libconsumer.la
195
196 libconsumer_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
209 libconsumer_la_LIBADD = \
210 libkernel-consumer.la \
211 librelayd.la \
212 libsessiond-comm.la
213
214 if HAVE_LIBLTTNG_UST_CTL
215 libconsumer_la_LIBADD += \
216 libust-consumer.la
217 endif
218 endif # BUILD_LIB_CONSUMER
219
220
221 # libfd-tracker
222 noinst_LTLIBRARIES += libfd-tracker.la
223 libfd_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
234 noinst_LTLIBRARIES += libfilter.la
235
236 libfilter_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
251 BUILT_SOURCES += filter/filter-parser.hpp
252
253 # Disable some warning flags for generated sources.
254 FILTER_WARN_FLAGS = \
255 -Wno-null-dereference \
256 -Wno-redundant-decls \
257 -Wno-unused-parameter
258
259 libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
260 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
261 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
262 libfilter_la_LIBADD = libstring-utils.la
263
264 AM_YFLAGS = -t -d -v -Wno-yacc
265
266 # start with empty files to clean
267 CLEANFILES =
268
269 if HAVE_BISON
270 # we have bison: we can clean the generated parser files
271 CLEANFILES += \
272 filter/filter-parser.cpp \
273 filter/filter-parser.hpp \
274 filter/filter-parser.output
275 else # 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
278 filter/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
283 BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp
284 endif # HAVE_BISON
285
286 if HAVE_FLEX
287 # we have flex: we can clean the generated lexer files
288 CLEANFILES += filter/filter-lexer.cpp
289 else # 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
292 filter/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
297 BUILT_SOURCES += filter/filter-lexer.cpp
298 endif # HAVE_FLEX
299
300
301 noinst_LTLIBRARIES += libhashtable-lgpl.la
302 libhashtable_lgpl_la_SOURCES = \
303 hashtable/seed.cpp \
304 hashtable/utils.cpp \
305 hashtable/utils.hpp
306
307
308 noinst_LTLIBRARIES += libhashtable-gpl.la
309 libhashtable_gpl_la_SOURCES = \
310 hashtable/hashtable.cpp \
311 hashtable/hashtable.hpp \
312 hashtable/hashtable-symbols.hpp
313
314 libhashtable_gpl_la_LIBADD = \
315 $(URCU_LIBS) \
316 $(URCU_CDS_LIBS)
317
318
319 if BUILD_LIB_HEALTH
320 noinst_LTLIBRARIES += libhealth.la
321
322 libhealth_la_SOURCES = \
323 health/health.cpp
324 endif
325
326
327 # libini-config
328 noinst_LTLIBRARIES += libini-config.la
329 libini_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
336 if BUILD_LIB_INDEX
337 noinst_LTLIBRARIES += libindex.la
338
339 libindex_la_SOURCES = \
340 index/ctf-index.hpp \
341 index/index.cpp \
342 index/index.hpp
343 endif
344
345
346 if BUILD_LIB_KERNEL_CTL
347 noinst_LTLIBRARIES += libkernel-ctl.la
348
349 libkernel_ctl_la_SOURCES = \
350 kernel-ctl/kernel-ctl.cpp \
351 kernel-ctl/kernel-ctl.hpp \
352 kernel-ctl/kernel-ioctl.hpp
353 endif
354
355 if BUILD_LIB_SESSIOND_COMM
356 noinst_LTLIBRARIES += libsessiond-comm.la
357
358 libsessiond_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
367 endif
368
369 if BUILD_LIB_RELAYD
370 noinst_LTLIBRARIES += librelayd.la
371
372 librelayd_la_SOURCES = \
373 relayd/relayd.cpp \
374 relayd/relayd.hpp
375
376 librelayd_la_LIBADD = libsessiond-comm.la
377 endif
378
379
380 if BUILD_LIB_KERNEL_CONSUMER
381 noinst_LTLIBRARIES += libkernel-consumer.la
382
383 libkernel_consumer_la_SOURCES = \
384 kernel-consumer/kernel-consumer.cpp \
385 kernel-consumer/kernel-consumer.hpp
386
387 libkernel_consumer_la_LIBADD = \
388 libkernel-ctl.la
389 endif
390
391 if BUILD_LIB_UST_CONSUMER
392 if HAVE_LIBLTTNG_UST_CTL
393 noinst_LTLIBRARIES += libust-consumer.la
394
395 libust_consumer_la_SOURCES = \
396 ust-consumer/ust-consumer.cpp \
397 ust-consumer/ust-consumer.hpp
398
399 libust_consumer_la_LIBADD = \
400 $(UST_CTL_LIBS)
401 endif
402 endif
403
404 if BUILD_LIB_TESTPOINT
405 noinst_LTLIBRARIES += libtestpoint.la
406
407 libtestpoint_la_SOURCES = \
408 testpoint/testpoint.cpp \
409 testpoint/testpoint.hpp
410
411 libtestpoint_la_LIBADD = $(DL_LIBS)
412 endif
413
414
415 # libstring-utils
416 noinst_LTLIBRARIES += libstring-utils.la
417 libstring_utils_la_SOURCES = \
418 string-utils/format.hpp \
419 string-utils/string-utils.cpp \
420 string-utils/string-utils.hpp
421
422
423 noinst_PROGRAMS = filter-grammar-test
424 filter_grammar_test_SOURCES = filter-grammar-test.cpp
425 filter_grammar_test_LDADD = libcommon-gpl.la
426
427 EXTRA_DIST = \
428 mi-lttng-4.1.xsd \
429 session.xsd
430
431 xmldir = $(datadir)/xml/lttng
432 dist_xml_DATA = session.xsd
433
434 # Copy EXTRA_DIST files to the build directory
435 all-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
442 clean-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.038624 seconds and 5 git commands to generate.