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