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