Common Trace Format 2 generation
[lttng-tools.git] / src / common / Makefile.am
CommitLineData
ab5be9fa
MJ
1# SPDX-License-Identifier: GPL-2.0-only
2
26821431
MD
3AUTOMAKE_OPTIONS = subdir-objects
4
7532fa3b 5noinst_LTLIBRARIES =
b3f35e02 6
7532fa3b
MD
7noinst_HEADERS = \
8 align.hpp \
9 bug.hpp \
10 defaults.hpp \
11 error.hpp \
12 futex.hpp \
13 lttng-kernel.hpp \
14 lttng-kernel-old.hpp \
15 macros.hpp \
16 time.hpp \
17 uri.hpp \
18 utils.hpp
19
20
21# libargpar
22noinst_LTLIBRARIES += libargpar.la
23libargpar_la_SOURCES = \
24 argpar/argpar.c \
25 argpar/argpar.h
26
27
28# libargpar-utils
29noinst_LTLIBRARIES += libargpar-utils.la
30libargpar_utils_la_SOURCES = \
31 argpar-utils/argpar-utils.cpp \
32 argpar-utils/argpar-utils.hpp
33
34
35# libbytecode
36noinst_LTLIBRARIES += libbytecode.la
37libbytecode_la_SOURCES = \
38 bytecode/bytecode.cpp \
39 bytecode/bytecode.hpp
40
41
42# libcommon
43noinst_LTLIBRARIES += libcommon.la
28b6dfc8 44libcommon_la_SOURCES = \
a6bc4ca9
SM
45 actions/action.cpp \
46 actions/list.cpp \
47 actions/notify.cpp \
48 actions/path.cpp \
49 actions/rotate-session.cpp \
50 actions/snapshot-session.cpp \
51 actions/start-session.cpp \
52 actions/stop-session.cpp \
53 actions/rate-policy.cpp \
7532fa3b
MD
54 buffer-view.hpp buffer-view.cpp \
55 common.hpp \
a6bc4ca9
SM
56 conditions/buffer-usage.cpp \
57 conditions/condition.cpp \
58 conditions/event-rule-matches.cpp \
59 conditions/session-consumed-size.cpp \
60 conditions/session-rotation.cpp \
7532fa3b
MD
61 context.cpp context.hpp \
62 credentials.cpp credentials.hpp \
63 daemonize.cpp daemonize.hpp \
a6bc4ca9
SM
64 defaults.cpp \
65 domain.cpp \
7532fa3b
MD
66 dynamic-array.cpp dynamic-array.hpp \
67 dynamic-buffer.cpp dynamic-buffer.hpp \
a6bc4ca9 68 endpoint.cpp \
7532fa3b 69 error.cpp error.hpp \
a6bc4ca9
SM
70 error-query.cpp \
71 evaluation.cpp \
72 event.cpp \
73 event-expr/event-expr.cpp \
74 event-field-value.cpp \
75 event-rule/event-rule.cpp \
76 event-rule/kernel-kprobe.cpp \
77 event-rule/kernel-syscall.cpp \
78 event-rule/kernel-uprobe.cpp \
79 event-rule/kernel-tracepoint.cpp \
80 event-rule/user-tracepoint.cpp \
81 event-rule/log4j-logging.cpp \
82 event-rule/jul-logging.cpp \
83 event-rule/python-logging.cpp \
7532fa3b
MD
84 filter.cpp filter.hpp \
85 fd-handle.cpp fd-handle.hpp \
86 fs-handle.cpp fs-handle.hpp fs-handle-internal.hpp \
87 futex.cpp futex.hpp \
a6bc4ca9 88 kernel-probe.cpp \
7532fa3b 89 index-allocator.cpp index-allocator.hpp \
a6bc4ca9
SM
90 location.cpp \
91 log-level-rule.cpp \
7532fa3b 92 mi-lttng.cpp mi-lttng.hpp \
a6bc4ca9 93 notification.cpp \
7532fa3b
MD
94 optional.hpp \
95 payload.cpp payload.hpp \
96 payload-view.cpp payload-view.hpp \
97 pipe.cpp pipe.hpp \
98 readwrite.cpp readwrite.hpp \
99 runas.cpp runas.hpp \
100 shm.cpp shm.hpp \
a6bc4ca9 101 session-descriptor.cpp \
7532fa3b
MD
102 snapshot.cpp snapshot.hpp \
103 spawn-viewer.cpp spawn-viewer.hpp \
a6bc4ca9 104 time.cpp \
7532fa3b
MD
105 trace-chunk.cpp trace-chunk.hpp \
106 trace-chunk-registry.hpp \
a6bc4ca9 107 trigger.cpp \
7532fa3b
MD
108 unix.cpp unix.hpp \
109 uri.cpp uri.hpp \
a6bc4ca9 110 userspace-probe.cpp \
7532fa3b
MD
111 utils.cpp utils.hpp \
112 uuid.cpp uuid.hpp \
113 thread.cpp thread.hpp \
114 tracker.cpp tracker.hpp \
115 waiter.cpp waiter.hpp
b3f35e02 116
b1b34226 117if HAVE_ELF_H
28b6dfc8 118libcommon_la_SOURCES += \
7532fa3b 119 lttng-elf.cpp lttng-elf.hpp
b1b34226
MJ
120endif
121
b3f35e02 122libcommon_la_LIBADD = \
7532fa3b
MD
123 libbytecode.la \
124 libcompat.la \
125 libconfig.la \
126 libfd-tracker.la \
127 libhashtable.la \
128 libini-config.la \
129 libstring-utils.la \
130 libfilter.la \
116a02e3 131 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
b3f35e02 132
7532fa3b
MD
133
134# libcompat
135noinst_LTLIBRARIES += libcompat.la
136libcompat_la_SOURCES = \
137 compat/compat-fcntl.cpp \
138 compat/directory-handle.cpp \
139 compat/directory-handle.hpp \
140 compat/dirent.hpp \
141 compat/endian.hpp \
142 compat/errno.hpp \
143 compat/fcntl.hpp \
144 compat/getenv.hpp \
145 compat/mman.hpp \
146 compat/netdb.hpp \
147 compat/path.hpp \
148 compat/paths.hpp \
149 compat/poll.cpp \
150 compat/poll.hpp \
151 compat/pthread.hpp \
152 compat/socket.hpp \
153 compat/string.hpp \
154 compat/tid.hpp \
155 compat/time.hpp
156
157
158# libconfig
159noinst_LTLIBRARIES += libconfig.la
160libconfig_la_SOURCES = \
161 config/config-internal.hpp \
162 config/config-session-abi.hpp \
163 config/session-config.cpp \
164 config/session-config.hpp
165
166libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
167libconfig_la_LIBADD = ${libxml2_LIBS}
168
169
170if BUILD_LIB_CONSUMER
171noinst_LTLIBRARIES += libconsumer.la
172
173libconsumer_la_SOURCES = \
174 consumer/consumer.cpp \
175 consumer/consumer.hpp \
176 consumer/consumer-metadata-cache.cpp \
177 consumer/consumer-metadata-cache.hpp \
178 consumer/consumer-stream.cpp \
179 consumer/consumer-stream.hpp \
180 consumer/consumer-testpoint.hpp \
181 consumer/consumer-timer.cpp \
182 consumer/consumer-timer.hpp \
183 consumer/metadata-bucket.cpp \
184 consumer/metadata-bucket.hpp
185
186libconsumer_la_LIBADD = \
187 libcompat.la \
188 libhashtable.la \
189 libkernel-consumer.la \
190 librelayd.la \
191 libsessiond-comm.la
192
193if HAVE_LIBLTTNG_UST_CTL
194libconsumer_la_LIBADD += \
195 libust-consumer.la
196endif
197endif # BUILD_LIB_CONSUMER
198
199
200# libfd-tracker
201noinst_LTLIBRARIES += libfd-tracker.la
202libfd_tracker_la_SOURCES = \
203 fd-tracker/fd-tracker.cpp \
204 fd-tracker/fd-tracker.hpp \
205 fd-tracker/inode.cpp \
206 fd-tracker/inode.hpp \
207 fd-tracker/utils.cpp \
208 fd-tracker/utils.hpp \
209 fd-tracker/utils-poll.cpp
210
211# libfilter
212noinst_LTLIBRARIES += libfilter.la
213
214libfilter_la_SOURCES = \
215 filter/filter-ast.hpp \
216 filter/filter-ir.hpp \
217 filter/filter-lexer.lpp \
218 filter/filter-parser.ypp \
219 filter/filter-symbols.hpp \
220 filter/filter-visitor-generate-bytecode.cpp \
221 filter/filter-visitor-generate-ir.cpp \
222 filter/filter-visitor-ir-check-binary-op-nesting.cpp \
223 filter/filter-visitor-ir-normalize-glob-patterns.cpp \
224 filter/filter-visitor-ir-validate-globbing.cpp \
225 filter/filter-visitor-ir-validate-string.cpp \
226 filter/filter-visitor-xml.cpp \
227 filter/memstream.hpp
228
229BUILT_SOURCES = filter/filter-parser.hpp
230
231libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS)
232libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
233
234AM_YFLAGS = -t -d -v -Wno-yacc
235
236# start with empty files to clean
237CLEANFILES =
238
239if HAVE_BISON
240# we have bison: we can clean the generated parser files
241CLEANFILES += \
242 filter/filter-parser.cpp \
243 filter/filter-parser.hpp \
244 filter/filter-parser.output
245else # HAVE_BISON
246# create target used to stop the build if we want to build the parser,
247# but we don't have the necessary tool to do so
248ERR_MSG = "Error: Cannot build target because bison is missing."
249ERR_MSG += "Make sure bison is installed and run the configure script again."
250
251filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
252 @echo $(ERR_MSG)
253 @false
254
255all-local: filter/filter-parser.cpp filter/filter-parser.hpp
256endif # HAVE_BISON
257
258if HAVE_FLEX
259# we have flex: we can clean the generated lexer files
260CLEANFILES += filter/filter-lexer.cpp
261else # HAVE_FLEX
262# create target used to stop the build if we want to build the lexer,
263# but we don't have the necessary tool to do so
264ERR_MSG = "Error: Cannot build target because flex is missing."
265ERR_MSG += "Make sure flex is installed and run the configure script again."
266
267filter/filter-lexer.cpp: filter/filter-lexer.lpp
268 @echo $(ERR_MSG)
269 @false
270
271all-local: filter/filter-lexer.cpp
272endif # HAVE_FLEX
273
274
275# libhashtable
276noinst_LTLIBRARIES += libhashtable.la
277libhashtable_la_SOURCES = \
278 hashtable/hashtable.cpp \
279 hashtable/hashtable.hpp \
280 hashtable/hashtable-symbols.hpp \
281 hashtable/utils.cpp \
282 hashtable/utils.hpp
283
284libhashtable_la_LIBADD = $(URCU_LIBS) $(URCU_CDS_LIBS)
285
286
87fb9fc0 287if BUILD_LIB_HEALTH
7532fa3b
MD
288noinst_LTLIBRARIES += libhealth.la
289
290libhealth_la_SOURCES = \
291 health/health.cpp
87fb9fc0
JR
292endif
293
7532fa3b
MD
294
295# libini-config
296noinst_LTLIBRARIES += libini-config.la
297libini_config_la_SOURCES = \
298 ini-config/ini.cpp \
299 ini-config/ini.hpp \
300 ini-config/ini-config.cpp \
301 ini-config/ini-config.hpp
302
303
304if BUILD_LIB_INDEX
305noinst_LTLIBRARIES += libindex.la
306
307libindex_la_SOURCES = \
308 index/ctf-index.hpp \
309 index/index.cpp \
310 index/index.hpp
311endif
312
313
87fb9fc0 314if BUILD_LIB_KERNEL_CTL
7532fa3b
MD
315noinst_LTLIBRARIES += libkernel-ctl.la
316
317libkernel_ctl_la_SOURCES = \
318 kernel-ctl/kernel-ctl.cpp \
319 kernel-ctl/kernel-ctl.hpp \
320 kernel-ctl/kernel-ioctl.hpp
87fb9fc0
JR
321endif
322
323if BUILD_LIB_SESSIOND_COMM
7532fa3b
MD
324noinst_LTLIBRARIES += libsessiond-comm.la
325
326libsessiond_comm_la_SOURCES = \
327 sessiond-comm/agent.hpp \
328 sessiond-comm/inet.cpp \
329 sessiond-comm/inet.hpp \
330 sessiond-comm/inet6.cpp \
331 sessiond-comm/inet6.hpp \
332 sessiond-comm/relayd.hpp \
333 sessiond-comm/sessiond-comm.cpp \
334 sessiond-comm/sessiond-comm.hpp
87fb9fc0
JR
335endif
336
337if BUILD_LIB_RELAYD
7532fa3b
MD
338noinst_LTLIBRARIES += librelayd.la
339
340librelayd_la_SOURCES = \
341 relayd/relayd.cpp \
342 relayd/relayd.hpp
343
344librelayd_la_LIBADD = libsessiond-comm.la
aa360a35
JG
345endif
346
87fb9fc0
JR
347
348if BUILD_LIB_KERNEL_CONSUMER
7532fa3b
MD
349noinst_LTLIBRARIES += libkernel-consumer.la
350
351libkernel_consumer_la_SOURCES = \
352 kernel-consumer/kernel-consumer.cpp \
353 kernel-consumer/kernel-consumer.hpp
354
355libkernel_consumer_la_LIBADD = \
356 libkernel-ctl.la \
357 librelayd.la
87fb9fc0
JR
358endif
359
360if BUILD_LIB_UST_CONSUMER
7532fa3b
MD
361if HAVE_LIBLTTNG_UST_CTL
362noinst_LTLIBRARIES += libust-consumer.la
363
364libust_consumer_la_SOURCES = \
365 ust-consumer/ust-consumer.cpp \
366 ust-consumer/ust-consumer.hpp
367
368libust_consumer_la_LIBADD = \
369 $(UST_CTL_LIBS) \
370 librelayd.la
371endif
87fb9fc0
JR
372endif
373
374if BUILD_LIB_TESTPOINT
7532fa3b 375noinst_LTLIBRARIES += libtestpoint.la
87fb9fc0 376
7532fa3b
MD
377libtestpoint_la_SOURCES = \
378 testpoint/testpoint.cpp \
379 testpoint/testpoint.hpp
87fb9fc0 380
7532fa3b 381libtestpoint_la_LIBADD = $(DL_LIBS)
87fb9fc0 382endif
10a8a223 383
7532fa3b
MD
384
385# libstring-utils
386noinst_LTLIBRARIES += libstring-utils.la
387libstring_utils_la_SOURCES = \
388 string-utils/format.hpp \
389 string-utils/string-utils.cpp \
390 string-utils/string-utils.hpp
391
1c39da61 392
e358ddd5 393noinst_PROGRAMS = filter-grammar-test
740da7d5 394filter_grammar_test_SOURCES = filter-grammar-test.cpp
e358ddd5
JG
395filter_grammar_test_LDADD = \
396 libcommon.la
e358ddd5 397
7532fa3b
MD
398EXTRA_DIST = \
399 mi-lttng-4.1.xsd \
400 session.xsd
401
402xmldir = $(datadir)/xml/lttng
403dist_xml_DATA = session.xsd
404
405# Copy EXTRA_DIST files to the build directory
c49fc5e4
JR
406all-local:
407 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
408 for script in $(EXTRA_DIST); do \
409 cp -f $(srcdir)/$$script $(builddir); \
410 done; \
411 fi
412
413clean-local:
414 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
415 for script in $(EXTRA_DIST); do \
416 rm -f $(builddir)/$$script; \
417 done; \
418 fi
This page took 0.114564 seconds and 5 git commands to generate.