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