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