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