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