1 # SPDX-License-Identifier: GPL-2.0-only
3 AUTOMAKE_OPTIONS = subdir-objects
7 # Make sure to always distribute all folders
8 # since SUBDIRS is decided at configure time.
26 noinst_LTLIBRARIES = libcommon-lgpl.la libcommon-gpl.la
27 EXTRA_DIST = mi-lttng-4.0.xsd
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.
32 libcommon_lgpl_la_SOURCES = \
34 buffer-view.h buffer-view.c \
39 dynamic-array.c dynamic-array.h \
40 dynamic-buffer.c dynamic-buffer.h \
45 mi-lttng.c mi-lttng.h \
48 readwrite.c readwrite.h \
50 session-consumed-size.c \
51 session-descriptor.c \
53 spawn-viewer.c spawn-viewer.h \
63 libcommon_lgpl_la_SOURCES += \
64 lttng-elf.c lttng-elf.h
67 libcommon_lgpl_la_LIBADD = \
68 $(top_builddir)/src/common/config/libconfig.la \
69 $(top_builddir)/src/common/hashtable/libhashtable-lgpl.la
71 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
72 # meant to be used by GPL executables.
73 libcommon_gpl_la_SOURCES = \
76 daemonize.c daemonize.h \
79 fs-handle.c fs-handle.h fs-handle-internal.h \
83 trace-chunk.c trace-chunk.h \
84 trace-chunk-registry.h \
88 libcommon_gpl_la_LIBADD = \
89 -lurcu -lurcu-common \
91 $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \
92 $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
96 libcommon_lgpl_la_LIBADD += \
97 $(top_builddir)/src/common/compat/libcompat.la
104 if BUILD_LIB_HASHTABLE
108 if BUILD_LIB_KERNEL_CTL
109 SUBDIRS += kernel-ctl
112 if BUILD_LIB_SESSIOND_COMM
113 SUBDIRS += sessiond-comm
120 if BUILD_LIB_FD_TRACKER
121 SUBDIRS += fd-tracker
124 if BUILD_LIB_KERNEL_CONSUMER
125 SUBDIRS += kernel-consumer
128 if BUILD_LIB_UST_CONSUMER
129 SUBDIRS += ust-consumer
132 if BUILD_LIB_TESTPOINT
144 if BUILD_LIB_CONSUMER
162 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
163 for script in $(EXTRA_DIST); do \
164 cp -f $(srcdir)/$$script $(builddir); \
169 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
170 for script in $(EXTRA_DIST); do \
171 rm -f $(builddir)/$$script; \