Common Trace Format 2 generation
[lttng-tools.git] / src / common / Makefile.am
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 AUTOMAKE_OPTIONS = subdir-objects
4
5 noinst_LTLIBRARIES =
6
7 noinst_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
22 noinst_LTLIBRARIES += libargpar.la
23 libargpar_la_SOURCES = \
24 argpar/argpar.c \
25 argpar/argpar.h
26
27
28 # libargpar-utils
29 noinst_LTLIBRARIES += libargpar-utils.la
30 libargpar_utils_la_SOURCES = \
31 argpar-utils/argpar-utils.cpp \
32 argpar-utils/argpar-utils.hpp
33
34
35 # libbytecode
36 noinst_LTLIBRARIES += libbytecode.la
37 libbytecode_la_SOURCES = \
38 bytecode/bytecode.cpp \
39 bytecode/bytecode.hpp
40
41
42 # libcommon
43 noinst_LTLIBRARIES += libcommon.la
44 libcommon_la_SOURCES = \
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 \
54 buffer-view.hpp buffer-view.cpp \
55 common.hpp \
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 \
61 context.cpp context.hpp \
62 credentials.cpp credentials.hpp \
63 daemonize.cpp daemonize.hpp \
64 defaults.cpp \
65 domain.cpp \
66 dynamic-array.cpp dynamic-array.hpp \
67 dynamic-buffer.cpp dynamic-buffer.hpp \
68 endpoint.cpp \
69 error.cpp error.hpp \
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 \
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 \
88 kernel-probe.cpp \
89 index-allocator.cpp index-allocator.hpp \
90 location.cpp \
91 log-level-rule.cpp \
92 mi-lttng.cpp mi-lttng.hpp \
93 notification.cpp \
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 \
101 session-descriptor.cpp \
102 snapshot.cpp snapshot.hpp \
103 spawn-viewer.cpp spawn-viewer.hpp \
104 time.cpp \
105 trace-chunk.cpp trace-chunk.hpp \
106 trace-chunk-registry.hpp \
107 trigger.cpp \
108 unix.cpp unix.hpp \
109 uri.cpp uri.hpp \
110 userspace-probe.cpp \
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
116
117 if HAVE_ELF_H
118 libcommon_la_SOURCES += \
119 lttng-elf.cpp lttng-elf.hpp
120 endif
121
122 libcommon_la_LIBADD = \
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 \
131 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
132
133
134 # libcompat
135 noinst_LTLIBRARIES += libcompat.la
136 libcompat_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
159 noinst_LTLIBRARIES += libconfig.la
160 libconfig_la_SOURCES = \
161 config/config-internal.hpp \
162 config/config-session-abi.hpp \
163 config/session-config.cpp \
164 config/session-config.hpp
165
166 libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
167 libconfig_la_LIBADD = ${libxml2_LIBS}
168
169
170 if BUILD_LIB_CONSUMER
171 noinst_LTLIBRARIES += libconsumer.la
172
173 libconsumer_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
186 libconsumer_la_LIBADD = \
187 libcompat.la \
188 libhashtable.la \
189 libkernel-consumer.la \
190 librelayd.la \
191 libsessiond-comm.la
192
193 if HAVE_LIBLTTNG_UST_CTL
194 libconsumer_la_LIBADD += \
195 libust-consumer.la
196 endif
197 endif # BUILD_LIB_CONSUMER
198
199
200 # libfd-tracker
201 noinst_LTLIBRARIES += libfd-tracker.la
202 libfd_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
212 noinst_LTLIBRARIES += libfilter.la
213
214 libfilter_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
229 BUILT_SOURCES = filter/filter-parser.hpp
230
231 libfilter_la_CXXFLAGS = -include filter-symbols.hpp $(AM_CXXFLAGS)
232 libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS)
233
234 AM_YFLAGS = -t -d -v -Wno-yacc
235
236 # start with empty files to clean
237 CLEANFILES =
238
239 if HAVE_BISON
240 # we have bison: we can clean the generated parser files
241 CLEANFILES += \
242 filter/filter-parser.cpp \
243 filter/filter-parser.hpp \
244 filter/filter-parser.output
245 else # 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
248 ERR_MSG = "Error: Cannot build target because bison is missing."
249 ERR_MSG += "Make sure bison is installed and run the configure script again."
250
251 filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp
252 @echo $(ERR_MSG)
253 @false
254
255 all-local: filter/filter-parser.cpp filter/filter-parser.hpp
256 endif # HAVE_BISON
257
258 if HAVE_FLEX
259 # we have flex: we can clean the generated lexer files
260 CLEANFILES += filter/filter-lexer.cpp
261 else # 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
264 ERR_MSG = "Error: Cannot build target because flex is missing."
265 ERR_MSG += "Make sure flex is installed and run the configure script again."
266
267 filter/filter-lexer.cpp: filter/filter-lexer.lpp
268 @echo $(ERR_MSG)
269 @false
270
271 all-local: filter/filter-lexer.cpp
272 endif # HAVE_FLEX
273
274
275 # libhashtable
276 noinst_LTLIBRARIES += libhashtable.la
277 libhashtable_la_SOURCES = \
278 hashtable/hashtable.cpp \
279 hashtable/hashtable.hpp \
280 hashtable/hashtable-symbols.hpp \
281 hashtable/utils.cpp \
282 hashtable/utils.hpp
283
284 libhashtable_la_LIBADD = $(URCU_LIBS) $(URCU_CDS_LIBS)
285
286
287 if BUILD_LIB_HEALTH
288 noinst_LTLIBRARIES += libhealth.la
289
290 libhealth_la_SOURCES = \
291 health/health.cpp
292 endif
293
294
295 # libini-config
296 noinst_LTLIBRARIES += libini-config.la
297 libini_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
304 if BUILD_LIB_INDEX
305 noinst_LTLIBRARIES += libindex.la
306
307 libindex_la_SOURCES = \
308 index/ctf-index.hpp \
309 index/index.cpp \
310 index/index.hpp
311 endif
312
313
314 if BUILD_LIB_KERNEL_CTL
315 noinst_LTLIBRARIES += libkernel-ctl.la
316
317 libkernel_ctl_la_SOURCES = \
318 kernel-ctl/kernel-ctl.cpp \
319 kernel-ctl/kernel-ctl.hpp \
320 kernel-ctl/kernel-ioctl.hpp
321 endif
322
323 if BUILD_LIB_SESSIOND_COMM
324 noinst_LTLIBRARIES += libsessiond-comm.la
325
326 libsessiond_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
335 endif
336
337 if BUILD_LIB_RELAYD
338 noinst_LTLIBRARIES += librelayd.la
339
340 librelayd_la_SOURCES = \
341 relayd/relayd.cpp \
342 relayd/relayd.hpp
343
344 librelayd_la_LIBADD = libsessiond-comm.la
345 endif
346
347
348 if BUILD_LIB_KERNEL_CONSUMER
349 noinst_LTLIBRARIES += libkernel-consumer.la
350
351 libkernel_consumer_la_SOURCES = \
352 kernel-consumer/kernel-consumer.cpp \
353 kernel-consumer/kernel-consumer.hpp
354
355 libkernel_consumer_la_LIBADD = \
356 libkernel-ctl.la \
357 librelayd.la
358 endif
359
360 if BUILD_LIB_UST_CONSUMER
361 if HAVE_LIBLTTNG_UST_CTL
362 noinst_LTLIBRARIES += libust-consumer.la
363
364 libust_consumer_la_SOURCES = \
365 ust-consumer/ust-consumer.cpp \
366 ust-consumer/ust-consumer.hpp
367
368 libust_consumer_la_LIBADD = \
369 $(UST_CTL_LIBS) \
370 librelayd.la
371 endif
372 endif
373
374 if BUILD_LIB_TESTPOINT
375 noinst_LTLIBRARIES += libtestpoint.la
376
377 libtestpoint_la_SOURCES = \
378 testpoint/testpoint.cpp \
379 testpoint/testpoint.hpp
380
381 libtestpoint_la_LIBADD = $(DL_LIBS)
382 endif
383
384
385 # libstring-utils
386 noinst_LTLIBRARIES += libstring-utils.la
387 libstring_utils_la_SOURCES = \
388 string-utils/format.hpp \
389 string-utils/string-utils.cpp \
390 string-utils/string-utils.hpp
391
392
393 noinst_PROGRAMS = filter-grammar-test
394 filter_grammar_test_SOURCES = filter-grammar-test.cpp
395 filter_grammar_test_LDADD = \
396 libcommon.la
397
398 EXTRA_DIST = \
399 mi-lttng-4.1.xsd \
400 session.xsd
401
402 xmldir = $(datadir)/xml/lttng
403 dist_xml_DATA = session.xsd
404
405 # Copy EXTRA_DIST files to the build directory
406 all-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
413 clean-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.047849 seconds and 5 git commands to generate.