Commit | Line | Data |
---|---|---|
ab5be9fa MJ |
1 | # SPDX-License-Identifier: GPL-2.0-only |
2 | ||
26821431 | 3 | AUTOMAKE_OPTIONS = subdir-objects |
4ae04234 MJ |
4 | noinst_LTLIBRARIES = |
5 | ||
6 | BUILT_SOURCES = | |
7 | ||
8 | noinst_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 | |
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 \ | |
c9e313bc | 33 | argpar-utils/argpar-utils.hpp |
4ae04234 MJ |
34 | |
35 | ||
36 | # libbytecode | |
37 | noinst_LTLIBRARIES += libbytecode.la | |
38 | libbytecode_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 | 47 | noinst_LTLIBRARIES += libcommon-lgpl.la |
93903fd5 | 48 | libcommon_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 \ |
40ebe219 | 60 | compiler.hpp \ |
a6bc4ca9 SM |
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 \ | |
c9e313bc | 66 | credentials.cpp credentials.hpp \ |
a6bc4ca9 SM |
67 | defaults.cpp \ |
68 | domain.cpp \ | |
c9e313bc SM |
69 | dynamic-array.cpp dynamic-array.hpp \ |
70 | dynamic-buffer.cpp dynamic-buffer.hpp \ | |
a6bc4ca9 | 71 | endpoint.cpp \ |
c9e313bc | 72 | error.cpp error.hpp \ |
a6bc4ca9 SM |
73 | error-query.cpp \ |
74 | evaluation.cpp \ | |
038ab50b | 75 | event.cpp \ |
20c734f5 | 76 | eventfd.hpp eventfd.cpp \ |
a6bc4ca9 SM |
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 \ | |
53cd1e22 | 88 | exception.cpp exception.hpp \ |
20c734f5 | 89 | file-descriptor.hpp file-descriptor.cpp \ |
c9e313bc | 90 | fd-handle.cpp fd-handle.hpp\ |
05aa7e19 | 91 | format.hpp \ |
671e39d7 MJ |
92 | io-hint.cpp \ |
93 | io-hint.hpp \ | |
a6bc4ca9 | 94 | kernel-probe.cpp \ |
a6bc4ca9 | 95 | location.cpp \ |
a3a56255 | 96 | locked-reference.hpp \ |
e35e95ea | 97 | logging-utils.hpp logging-utils.cpp \ |
a6bc4ca9 | 98 | log-level-rule.cpp \ |
1823e905 | 99 | make-unique.hpp \ |
8802d23b | 100 | make-unique-wrapper.hpp \ |
c9e313bc | 101 | mi-lttng.cpp mi-lttng.hpp \ |
a6bc4ca9 | 102 | notification.cpp \ |
c9e313bc SM |
103 | payload.cpp payload.hpp \ |
104 | payload-view.cpp payload-view.hpp \ | |
0a325f4d | 105 | pthread-lock.hpp \ |
57b90af7 | 106 | random.cpp random.hpp \ |
c9e313bc SM |
107 | readwrite.cpp readwrite.hpp \ |
108 | runas.cpp runas.hpp \ | |
b6bbb1d6 | 109 | scope-exit.hpp \ |
a6bc4ca9 | 110 | session-descriptor.cpp \ |
c9e313bc SM |
111 | snapshot.cpp snapshot.hpp \ |
112 | spawn-viewer.cpp spawn-viewer.hpp \ | |
113 | thread.cpp thread.hpp \ | |
a6bc4ca9 | 114 | time.cpp \ |
c9e313bc | 115 | tracker.cpp tracker.hpp \ |
a6bc4ca9 | 116 | trigger.cpp \ |
c9e313bc SM |
117 | unix.cpp unix.hpp \ |
118 | uri.cpp uri.hpp \ | |
a6bc4ca9 | 119 | userspace-probe.cpp \ |
0a325f4d | 120 | urcu.hpp \ |
c9e313bc | 121 | utils.cpp utils.hpp |
b3f35e02 | 122 | |
b1b34226 | 123 | if HAVE_ELF_H |
93903fd5 | 124 | libcommon_lgpl_la_SOURCES += \ |
c9e313bc | 125 | lttng-elf.cpp lttng-elf.hpp |
b1b34226 MJ |
126 | endif |
127 | ||
93903fd5 | 128 | libcommon_lgpl_la_LIBADD = \ |
4ae04234 MJ |
129 | libbytecode.la \ |
130 | libcompat.la \ | |
131 | libconfig.la \ | |
132 | libfilter.la \ | |
133 | libhashtable-lgpl.la \ | |
116a02e3 | 134 | $(top_builddir)/src/vendor/msgpack/libmsgpack.la |
b3f35e02 | 135 | |
4ae04234 | 136 | |
4971b7f0 MD |
137 | # The libpath static archive contains GPLv2 compatible code. It is |
138 | # meant to be used by GPL executables. | |
4ae04234 | 139 | noinst_LTLIBRARIES += libpath.la |
4971b7f0 | 140 | libpath_la_SOURCES = \ |
c9e313bc | 141 | path.cpp path.hpp |
4971b7f0 | 142 | |
4ae04234 | 143 | |
93903fd5 MD |
144 | # The libcommon-gpl static archive contains GPLv2 compatible code. It is |
145 | # meant to be used by GPL executables. | |
4ae04234 | 146 | noinst_LTLIBRARIES += libcommon-gpl.la |
93903fd5 | 147 | libcommon_gpl_la_SOURCES = \ |
c9e313bc SM |
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 | |
93903fd5 MD |
162 | |
163 | libcommon_gpl_la_LIBADD = \ | |
164 | libcommon-lgpl.la \ | |
4971b7f0 | 165 | libpath.la \ |
4ae04234 MJ |
166 | libini-config.la \ |
167 | libhashtable-gpl.la \ | |
168 | libfd-tracker.la | |
169 | ||
170 | ||
171 | # libcompat | |
172 | noinst_LTLIBRARIES += libcompat.la | |
173 | libcompat_la_SOURCES = \ | |
4ae04234 | 174 | compat/directory-handle.cpp \ |
c9e313bc SM |
175 | compat/directory-handle.hpp \ |
176 | compat/dirent.hpp \ | |
177 | compat/endian.hpp \ | |
178 | compat/errno.hpp \ | |
c9e313bc SM |
179 | compat/getenv.hpp \ |
180 | compat/mman.hpp \ | |
181 | compat/netdb.hpp \ | |
182 | compat/path.hpp \ | |
183 | compat/paths.hpp \ | |
4ae04234 | 184 | compat/poll.cpp \ |
c9e313bc SM |
185 | compat/poll.hpp \ |
186 | compat/pthread.hpp \ | |
187 | compat/socket.hpp \ | |
188 | compat/string.hpp \ | |
189 | compat/tid.hpp \ | |
190 | compat/time.hpp | |
4ae04234 MJ |
191 | |
192 | ||
193 | # libconfig | |
194 | noinst_LTLIBRARIES += libconfig.la | |
195 | libconfig_la_SOURCES = \ | |
c9e313bc SM |
196 | config/config-internal.hpp \ |
197 | config/config-session-abi.hpp \ | |
4ae04234 | 198 | config/session-config.cpp \ |
c9e313bc | 199 | config/session-config.hpp |
4ae04234 MJ |
200 | |
201 | libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS) | |
202 | libconfig_la_LIBADD = ${libxml2_LIBS} | |
203 | ||
204 | ||
205 | if BUILD_LIB_CONSUMER | |
206 | noinst_LTLIBRARIES += libconsumer.la | |
207 | ||
208 | libconsumer_la_SOURCES = \ | |
209 | consumer/consumer.cpp \ | |
c9e313bc | 210 | consumer/consumer.hpp \ |
4ae04234 | 211 | consumer/consumer-metadata-cache.cpp \ |
c9e313bc | 212 | consumer/consumer-metadata-cache.hpp \ |
4ae04234 | 213 | consumer/consumer-stream.cpp \ |
c9e313bc SM |
214 | consumer/consumer-stream.hpp \ |
215 | consumer/consumer-testpoint.hpp \ | |
4ae04234 | 216 | consumer/consumer-timer.cpp \ |
c9e313bc | 217 | consumer/consumer-timer.hpp \ |
4ae04234 | 218 | consumer/metadata-bucket.cpp \ |
c9e313bc | 219 | consumer/metadata-bucket.hpp |
4ae04234 MJ |
220 | |
221 | libconsumer_la_LIBADD = \ | |
222 | libkernel-consumer.la \ | |
223 | librelayd.la \ | |
224 | libsessiond-comm.la | |
225 | ||
226 | if HAVE_LIBLTTNG_UST_CTL | |
227 | libconsumer_la_LIBADD += \ | |
228 | libust-consumer.la | |
229 | endif | |
230 | endif # BUILD_LIB_CONSUMER | |
231 | ||
232 | ||
233 | # libfd-tracker | |
234 | noinst_LTLIBRARIES += libfd-tracker.la | |
235 | libfd_tracker_la_SOURCES = \ | |
236 | fd-tracker/fd-tracker.cpp \ | |
c9e313bc | 237 | fd-tracker/fd-tracker.hpp \ |
4ae04234 | 238 | fd-tracker/inode.cpp \ |
c9e313bc | 239 | fd-tracker/inode.hpp \ |
4ae04234 | 240 | fd-tracker/utils.cpp \ |
c9e313bc | 241 | fd-tracker/utils.hpp \ |
4ae04234 MJ |
242 | fd-tracker/utils-poll.cpp |
243 | ||
244 | ||
245 | # libfilter | |
246 | noinst_LTLIBRARIES += libfilter.la | |
247 | ||
248 | libfilter_la_SOURCES = \ | |
c9e313bc SM |
249 | filter/filter-ast.hpp \ |
250 | filter/filter-ir.hpp \ | |
4ae04234 MJ |
251 | filter/filter-lexer.lpp \ |
252 | filter/filter-parser.ypp \ | |
c9e313bc | 253 | filter/filter-symbols.hpp \ |
4ae04234 MJ |
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 \ | |
c9e313bc | 261 | filter/memstream.hpp |
4ae04234 MJ |
262 | |
263 | BUILT_SOURCES += filter/filter-parser.hpp | |
264 | ||
6ce1601f MJ |
265 | # Disable some warning flags for generated sources. |
266 | FILTER_WARN_FLAGS = \ | |
19708280 | 267 | -Wno-null-dereference \ |
f46376a1 MJ |
268 | -Wno-redundant-decls \ |
269 | -Wno-unused-parameter | |
6ce1601f MJ |
270 | |
271 | libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS) | |
c9e313bc | 272 | libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS) |
4ae04234 MJ |
273 | libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS) |
274 | libfilter_la_LIBADD = libstring-utils.la | |
275 | ||
276 | AM_YFLAGS = -t -d -v -Wno-yacc | |
277 | ||
278 | # start with empty files to clean | |
279 | CLEANFILES = | |
280 | ||
281 | if HAVE_BISON | |
282 | # we have bison: we can clean the generated parser files | |
283 | CLEANFILES += \ | |
284 | filter/filter-parser.cpp \ | |
285 | filter/filter-parser.hpp \ | |
286 | filter/filter-parser.output | |
287 | else # 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 | |
290 | filter/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 | ||
295 | BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp | |
296 | endif # HAVE_BISON | |
297 | ||
298 | if HAVE_FLEX | |
299 | # we have flex: we can clean the generated lexer files | |
300 | CLEANFILES += filter/filter-lexer.cpp | |
301 | else # 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 | |
304 | filter/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 | ||
309 | BUILT_SOURCES += filter/filter-lexer.cpp | |
310 | endif # HAVE_FLEX | |
311 | ||
312 | ||
313 | noinst_LTLIBRARIES += libhashtable-lgpl.la | |
314 | libhashtable_lgpl_la_SOURCES = \ | |
315 | hashtable/seed.cpp \ | |
316 | hashtable/utils.cpp \ | |
c9e313bc | 317 | hashtable/utils.hpp |
4ae04234 MJ |
318 | |
319 | ||
320 | noinst_LTLIBRARIES += libhashtable-gpl.la | |
321 | libhashtable_gpl_la_SOURCES = \ | |
322 | hashtable/hashtable.cpp \ | |
c9e313bc SM |
323 | hashtable/hashtable.hpp \ |
324 | hashtable/hashtable-symbols.hpp | |
4ae04234 MJ |
325 | |
326 | libhashtable_gpl_la_LIBADD = \ | |
327 | $(URCU_LIBS) \ | |
328 | $(URCU_CDS_LIBS) | |
329 | ||
93903fd5 | 330 | |
87fb9fc0 | 331 | if BUILD_LIB_HEALTH |
4ae04234 MJ |
332 | noinst_LTLIBRARIES += libhealth.la |
333 | ||
334 | libhealth_la_SOURCES = \ | |
335 | health/health.cpp | |
87fb9fc0 JR |
336 | endif |
337 | ||
4ae04234 MJ |
338 | |
339 | # libini-config | |
340 | noinst_LTLIBRARIES += libini-config.la | |
341 | libini_config_la_SOURCES = \ | |
342 | ini-config/ini.cpp \ | |
c9e313bc | 343 | ini-config/ini.hpp \ |
4ae04234 | 344 | ini-config/ini-config.cpp \ |
c9e313bc | 345 | ini-config/ini-config.hpp |
4ae04234 MJ |
346 | |
347 | ||
348 | if BUILD_LIB_INDEX | |
349 | noinst_LTLIBRARIES += libindex.la | |
350 | ||
351 | libindex_la_SOURCES = \ | |
c9e313bc | 352 | index/ctf-index.hpp \ |
4ae04234 | 353 | index/index.cpp \ |
c9e313bc | 354 | index/index.hpp |
4ae04234 MJ |
355 | endif |
356 | ||
357 | ||
87fb9fc0 | 358 | if BUILD_LIB_KERNEL_CTL |
4ae04234 MJ |
359 | noinst_LTLIBRARIES += libkernel-ctl.la |
360 | ||
361 | libkernel_ctl_la_SOURCES = \ | |
362 | kernel-ctl/kernel-ctl.cpp \ | |
c9e313bc SM |
363 | kernel-ctl/kernel-ctl.hpp \ |
364 | kernel-ctl/kernel-ioctl.hpp | |
87fb9fc0 JR |
365 | endif |
366 | ||
367 | if BUILD_LIB_SESSIOND_COMM | |
4ae04234 MJ |
368 | noinst_LTLIBRARIES += libsessiond-comm.la |
369 | ||
370 | libsessiond_comm_la_SOURCES = \ | |
c9e313bc | 371 | sessiond-comm/agent.hpp \ |
4ae04234 | 372 | sessiond-comm/inet.cpp \ |
c9e313bc | 373 | sessiond-comm/inet.hpp \ |
4ae04234 | 374 | sessiond-comm/inet6.cpp \ |
c9e313bc SM |
375 | sessiond-comm/inet6.hpp \ |
376 | sessiond-comm/relayd.hpp \ | |
4ae04234 | 377 | sessiond-comm/sessiond-comm.cpp \ |
c9e313bc | 378 | sessiond-comm/sessiond-comm.hpp |
87fb9fc0 JR |
379 | endif |
380 | ||
381 | if BUILD_LIB_RELAYD | |
4ae04234 MJ |
382 | noinst_LTLIBRARIES += librelayd.la |
383 | ||
384 | librelayd_la_SOURCES = \ | |
385 | relayd/relayd.cpp \ | |
c9e313bc | 386 | relayd/relayd.hpp |
4ae04234 MJ |
387 | |
388 | librelayd_la_LIBADD = libsessiond-comm.la | |
aa360a35 JG |
389 | endif |
390 | ||
87fb9fc0 JR |
391 | |
392 | if BUILD_LIB_KERNEL_CONSUMER | |
4ae04234 MJ |
393 | noinst_LTLIBRARIES += libkernel-consumer.la |
394 | ||
395 | libkernel_consumer_la_SOURCES = \ | |
396 | kernel-consumer/kernel-consumer.cpp \ | |
c9e313bc | 397 | kernel-consumer/kernel-consumer.hpp |
4ae04234 MJ |
398 | |
399 | libkernel_consumer_la_LIBADD = \ | |
400 | libkernel-ctl.la | |
87fb9fc0 JR |
401 | endif |
402 | ||
403 | if BUILD_LIB_UST_CONSUMER | |
4ae04234 MJ |
404 | if HAVE_LIBLTTNG_UST_CTL |
405 | noinst_LTLIBRARIES += libust-consumer.la | |
406 | ||
407 | libust_consumer_la_SOURCES = \ | |
408 | ust-consumer/ust-consumer.cpp \ | |
c9e313bc | 409 | ust-consumer/ust-consumer.hpp |
4ae04234 MJ |
410 | |
411 | libust_consumer_la_LIBADD = \ | |
412 | $(UST_CTL_LIBS) | |
413 | endif | |
87fb9fc0 JR |
414 | endif |
415 | ||
416 | if BUILD_LIB_TESTPOINT | |
4ae04234 | 417 | noinst_LTLIBRARIES += libtestpoint.la |
87fb9fc0 | 418 | |
4ae04234 MJ |
419 | libtestpoint_la_SOURCES = \ |
420 | testpoint/testpoint.cpp \ | |
c9e313bc | 421 | testpoint/testpoint.hpp |
87fb9fc0 | 422 | |
4ae04234 | 423 | libtestpoint_la_LIBADD = $(DL_LIBS) |
87fb9fc0 | 424 | endif |
10a8a223 | 425 | |
4ae04234 MJ |
426 | |
427 | # libstring-utils | |
428 | noinst_LTLIBRARIES += libstring-utils.la | |
429 | libstring_utils_la_SOURCES = \ | |
c9e313bc | 430 | string-utils/format.hpp \ |
4ae04234 | 431 | string-utils/string-utils.cpp \ |
c9e313bc | 432 | string-utils/string-utils.hpp |
4ae04234 | 433 | |
1c39da61 | 434 | |
e358ddd5 | 435 | noinst_PROGRAMS = filter-grammar-test |
740da7d5 | 436 | filter_grammar_test_SOURCES = filter-grammar-test.cpp |
93903fd5 | 437 | filter_grammar_test_LDADD = libcommon-gpl.la |
e358ddd5 | 438 | |
4ae04234 MJ |
439 | EXTRA_DIST = \ |
440 | mi-lttng-4.1.xsd \ | |
441 | session.xsd | |
442 | ||
443 | xmldir = $(datadir)/xml/lttng | |
444 | dist_xml_DATA = session.xsd | |
445 | ||
446 | # Copy EXTRA_DIST files to the build directory | |
c49fc5e4 JR |
447 | all-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 | ||
454 | clean-local: | |
455 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
456 | for script in $(EXTRA_DIST); do \ | |
457 | rm -f $(builddir)/$$script; \ | |
458 | done; \ | |
459 | fi |