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