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