common: move utils_create_lock_file to its own file
[lttng-tools.git] / src / common / Makefile.am
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 AUTOMAKE_OPTIONS = subdir-objects
4
5 SUBDIRS = \
6 argpar \
7 bytecode \
8 compat \
9 config \
10 fd-tracker \
11 string-utils \
12 filter \
13 hashtable \
14 argpar-utils
15
16 # Make sure to always distribute all folders
17 # since SUBDIRS is decided at configure time.
18 DIST_SUBDIRS = \
19 compat \
20 health \
21 hashtable \
22 kernel-ctl \
23 sessiond-comm \
24 relayd \
25 kernel-consumer \
26 ust-consumer \
27 testpoint \
28 index \
29 config \
30 consumer \
31 string-utils \
32 fd-tracker \
33 bytecode \
34 filter \
35 argpar \
36 argpar-utils
37
38 # Common library
39 noinst_LTLIBRARIES = libpath.la libcommon-lgpl.la libcommon-gpl.la
40 EXTRA_DIST = mi-lttng-4.1.xsd
41
42 # The libcommon-lgpl static archive contains only LGPLv2.1 code. It is
43 # meant to be used by LGPLv2.1 libraries such as liblttng-ctl. It also
44 # contains libcommon-lgpl.la.
45
46 libcommon_lgpl_la_SOURCES = \
47 actions/action.c \
48 actions/list.c \
49 actions/notify.c \
50 actions/path.c \
51 actions/rotate-session.c \
52 actions/snapshot-session.c \
53 actions/start-session.c \
54 actions/stop-session.c \
55 actions/rate-policy.c \
56 buffer-view.h buffer-view.c \
57 channel.c \
58 conditions/buffer-usage.c \
59 conditions/condition.c \
60 conditions/event-rule-matches.c \
61 conditions/session-consumed-size.c \
62 conditions/session-rotation.c \
63 credentials.c credentials.h \
64 defaults.c \
65 domain.c \
66 dynamic-array.c dynamic-array.h \
67 dynamic-buffer.c dynamic-buffer.h \
68 endpoint.c \
69 error.c error.h \
70 error-query.c \
71 evaluation.c \
72 event.c \
73 event-expr/event-expr.c \
74 event-field-value.c \
75 event-rule/event-rule.c \
76 event-rule/kernel-kprobe.c \
77 event-rule/kernel-syscall.c \
78 event-rule/kernel-uprobe.c \
79 event-rule/kernel-tracepoint.c \
80 event-rule/user-tracepoint.c \
81 event-rule/log4j-logging.c \
82 event-rule/jul-logging.c \
83 event-rule/python-logging.c \
84 fd-handle.c fd-handle.h \
85 kernel-probe.c \
86 location.c \
87 lockfile.c lockfile.h \
88 log-level-rule.c \
89 mi-lttng.c mi-lttng.h \
90 notification.c \
91 payload.c payload.h \
92 payload-view.c payload-view.h \
93 random.c random.h \
94 readwrite.c readwrite.h \
95 runas.c runas.h \
96 session-descriptor.c \
97 snapshot.c snapshot.h \
98 spawn-viewer.c spawn-viewer.h \
99 thread.c thread.h \
100 time.c \
101 tracker.c tracker.h \
102 trigger.c \
103 unix.c unix.h \
104 uri.c uri.h \
105 userspace-probe.c \
106 utils.c utils.h
107
108 if HAVE_ELF_H
109 libcommon_lgpl_la_SOURCES += \
110 lttng-elf.c lttng-elf.h
111 endif
112
113 libcommon_lgpl_la_LIBADD = \
114 $(top_builddir)/src/common/bytecode/libbytecode.la \
115 $(top_builddir)/src/common/compat/libcompat.la \
116 $(top_builddir)/src/common/config/libconfig.la \
117 $(top_builddir)/src/common/filter/libfilter.la \
118 $(top_builddir)/src/common/hashtable/libhashtable-lgpl.la \
119 $(top_builddir)/src/vendor/msgpack/libmsgpack.la
120
121 # The libpath static archive contains GPLv2 compatible code. It is
122 # meant to be used by GPL executables.
123
124 libpath_la_SOURCES = \
125 path.c path.h
126
127 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
128 # meant to be used by GPL executables.
129
130 libcommon_gpl_la_SOURCES = \
131 common.h \
132 context.c context.h \
133 daemonize.c daemonize.h \
134 filter.c filter.h \
135 fs-handle.c fs-handle.h fs-handle-internal.h \
136 futex.c futex.h \
137 index-allocator.c index-allocator.h \
138 optional.h \
139 pipe.c pipe.h \
140 shm.c shm.h \
141 trace-chunk.c trace-chunk.h \
142 trace-chunk-registry.h \
143 uuid.c uuid.h \
144 waiter.c waiter.h
145
146 libcommon_gpl_la_LIBADD = \
147 libcommon-lgpl.la \
148 libpath.la \
149 $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \
150 $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
151
152 if BUILD_LIB_HEALTH
153 SUBDIRS += health
154 endif
155
156 if BUILD_LIB_KERNEL_CTL
157 SUBDIRS += kernel-ctl
158 endif
159
160 if BUILD_LIB_SESSIOND_COMM
161 SUBDIRS += sessiond-comm
162 endif
163
164 if BUILD_LIB_RELAYD
165 SUBDIRS += relayd
166 endif
167
168
169 if BUILD_LIB_KERNEL_CONSUMER
170 SUBDIRS += kernel-consumer
171 endif
172
173 if BUILD_LIB_UST_CONSUMER
174 SUBDIRS += ust-consumer
175 endif
176
177 if BUILD_LIB_TESTPOINT
178 SUBDIRS += testpoint
179 endif
180
181 if BUILD_LIB_INDEX
182 SUBDIRS += index
183 endif
184
185 if BUILD_LIB_CONSUMER
186 SUBDIRS += consumer
187 endif
188
189 noinst_HEADERS = \
190 align.h \
191 bug.h \
192 defaults.h \
193 error.h \
194 futex.h \
195 lttng-kernel.h \
196 lttng-kernel-old.h \
197 macros.h \
198 time.h \
199 uri.h \
200 utils.h
201
202 noinst_PROGRAMS = filter-grammar-test
203 filter_grammar_test_SOURCES = filter-grammar-test.c
204 filter_grammar_test_LDADD = libcommon-gpl.la
205
206 all-local:
207 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
208 for script in $(EXTRA_DIST); do \
209 cp -f $(srcdir)/$$script $(builddir); \
210 done; \
211 fi
212
213 clean-local:
214 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
215 for script in $(EXTRA_DIST); do \
216 rm -f $(builddir)/$$script; \
217 done; \
218 fi
This page took 0.033999 seconds and 4 git commands to generate.