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