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