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