Introduce libcommon-lgpl for liblttng-ctl
[lttng-tools.git] / src / common / Makefile.am
CommitLineData
ab5be9fa
MJ
1# SPDX-License-Identifier: GPL-2.0-only
2
26821431
MD
3AUTOMAKE_OPTIONS = subdir-objects
4
9c55c241 5SUBDIRS = string-utils
87fb9fc0
JR
6
7# Make sure to always distribute all folders
8# since SUBDIRS is decided at configure time.
28b6dfc8
SM
9DIST_SUBDIRS = \
10 compat \
11 health \
12 hashtable \
13 kernel-ctl \
14 sessiond-comm \
15 relayd \
16 kernel-consumer \
17 ust-consumer \
18 testpoint \
19 index \
20 config \
21 consumer \
22 string-utils \
23 fd-tracker
24
b3f35e02 25# Common library
04952f7c 26noinst_LTLIBRARIES = libcommon-lgpl.la libcommon-gpl.la
01fac814 27EXTRA_DIST = mi-lttng-4.0.xsd
b3f35e02 28
04952f7c
MD
29# The libcommon-lgpl static archive contains only LGPLv2.1 code. It is
30# meant to be used by LGPLv2.1 libraries such as liblttng-ctl. It also
31# contains libcommon-lgpl.la.
32libcommon_lgpl_la_SOURCES = \
28b6dfc8 33 action.c \
28b6dfc8 34 buffer-view.h buffer-view.c \
04952f7c 35 buffer-usage.c \
28b6dfc8 36 credentials.h \
04952f7c 37 condition.c \
28b6dfc8
SM
38 defaults.c \
39 dynamic-array.c dynamic-array.h \
40 dynamic-buffer.c dynamic-buffer.h \
41 endpoint.c \
42 error.c error.h \
43 evaluation.c \
28b6dfc8
SM
44 location.c \
45 mi-lttng.c mi-lttng.h \
46 notification.c \
47 notify.c \
28b6dfc8
SM
48 readwrite.c readwrite.h \
49 runas.c runas.h \
50 session-consumed-size.c \
51 session-descriptor.c \
52 session-rotation.c \
6457f8e4 53 spawn-viewer.c spawn-viewer.h \
28b6dfc8 54 time.c \
04952f7c 55 tracker.c tracker.h \
28b6dfc8
SM
56 trigger.c \
57 unix.c unix.h \
58 uri.c uri.h \
59 userspace-probe.c \
04952f7c 60 utils.c utils.h
b3f35e02 61
b1b34226 62if HAVE_ELF_H
04952f7c 63libcommon_lgpl_la_SOURCES += \
28b6dfc8 64 lttng-elf.c lttng-elf.h
b1b34226
MJ
65endif
66
04952f7c 67libcommon_lgpl_la_LIBADD = \
28b6dfc8 68 $(top_builddir)/src/common/config/libconfig.la \
04952f7c
MD
69 $(top_builddir)/src/common/hashtable/libhashtable-lgpl.la
70
71# The libcommon-gpl static archive contains GPLv2 compatible code. It is
72# meant to be used by GPL executables.
73libcommon_gpl_la_SOURCES = \
74 common.h \
75 context.c context.h \
76 daemonize.c daemonize.h \
77 event.c \
78 filter.c filter.h \
79 fs-handle.c fs-handle.h fs-handle-internal.h \
80 futex.c futex.h \
81 optional.h \
82 pipe.c pipe.h \
83 trace-chunk.c trace-chunk.h \
84 trace-chunk-registry.h \
85 uuid.c uuid.h \
86 waiter.c waiter.h
87
88libcommon_gpl_la_LIBADD = \
89 -lurcu -lurcu-common \
90 libcommon-lgpl.la \
91 $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \
8bb66c3c 92 $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
b3f35e02 93
87fb9fc0
JR
94if BUILD_LIB_COMPAT
95SUBDIRS += compat
04952f7c
MD
96libcommon_lgpl_la_LIBADD += \
97 $(top_builddir)/src/common/compat/libcompat.la
87fb9fc0
JR
98endif
99
100if BUILD_LIB_HEALTH
101SUBDIRS += health
102endif
103
104if BUILD_LIB_HASHTABLE
105SUBDIRS += hashtable
106endif
107
108if BUILD_LIB_KERNEL_CTL
109SUBDIRS += kernel-ctl
110endif
111
112if BUILD_LIB_SESSIOND_COMM
113SUBDIRS += sessiond-comm
114endif
115
116if BUILD_LIB_RELAYD
aa360a35
JG
117SUBDIRS += relayd
118endif
119
120if BUILD_LIB_FD_TRACKER
121SUBDIRS += fd-tracker
87fb9fc0
JR
122endif
123
124if BUILD_LIB_KERNEL_CONSUMER
125SUBDIRS += kernel-consumer
126endif
127
128if BUILD_LIB_UST_CONSUMER
129SUBDIRS += ust-consumer
130endif
131
132if BUILD_LIB_TESTPOINT
133SUBDIRS += testpoint
134endif
135
136if BUILD_LIB_INDEX
137SUBDIRS += index
138endif
139
140if BUILD_LIB_CONFIG
141SUBDIRS += config
142endif
143
144if BUILD_LIB_CONSUMER
145SUBDIRS += consumer
146endif
10a8a223 147
28b6dfc8
SM
148noinst_HEADERS = \
149 align.h \
150 bug.h \
151 defaults.h \
152 error.h \
153 futex.h \
154 lttng-kernel.h \
155 lttng-kernel-old.h \
156 macros.h \
157 time.h \
158 uri.h \
159 utils.h
1c39da61 160
c49fc5e4
JR
161all-local:
162 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
163 for script in $(EXTRA_DIST); do \
164 cp -f $(srcdir)/$$script $(builddir); \
165 done; \
166 fi
167
168clean-local:
169 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
170 for script in $(EXTRA_DIST); do \
171 rm -f $(builddir)/$$script; \
172 done; \
173 fi
This page took 0.078826 seconds and 5 git commands to generate.