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