Introduce libcommon-lgpl for liblttng-ctl
[lttng-tools.git] / src / common / Makefile.am
... / ...
CommitLineData
1# SPDX-License-Identifier: GPL-2.0-only
2
3AUTOMAKE_OPTIONS = subdir-objects
4
5SUBDIRS = string-utils
6
7# Make sure to always distribute all folders
8# since SUBDIRS is decided at configure time.
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
25# Common library
26noinst_LTLIBRARIES = libcommon-lgpl.la libcommon-gpl.la
27EXTRA_DIST = mi-lttng-4.0.xsd
28
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 = \
33 action.c \
34 buffer-view.h buffer-view.c \
35 buffer-usage.c \
36 credentials.h \
37 condition.c \
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 \
44 location.c \
45 mi-lttng.c mi-lttng.h \
46 notification.c \
47 notify.c \
48 readwrite.c readwrite.h \
49 runas.c runas.h \
50 session-consumed-size.c \
51 session-descriptor.c \
52 session-rotation.c \
53 spawn-viewer.c spawn-viewer.h \
54 time.c \
55 tracker.c tracker.h \
56 trigger.c \
57 unix.c unix.h \
58 uri.c uri.h \
59 userspace-probe.c \
60 utils.c utils.h
61
62if HAVE_ELF_H
63libcommon_lgpl_la_SOURCES += \
64 lttng-elf.c lttng-elf.h
65endif
66
67libcommon_lgpl_la_LIBADD = \
68 $(top_builddir)/src/common/config/libconfig.la \
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 \
92 $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
93
94if BUILD_LIB_COMPAT
95SUBDIRS += compat
96libcommon_lgpl_la_LIBADD += \
97 $(top_builddir)/src/common/compat/libcompat.la
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
117SUBDIRS += relayd
118endif
119
120if BUILD_LIB_FD_TRACKER
121SUBDIRS += fd-tracker
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
147
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
160
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.022362 seconds and 4 git commands to generate.