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