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