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