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