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 = string-utils
6
7 # Make sure to always distribute all folders
8 # since SUBDIRS is decided at configure time.
9 DIST_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
26 noinst_LTLIBRARIES = libcommon-lgpl.la libcommon-gpl.la
27 EXTRA_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.
32 libcommon_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
62 if HAVE_ELF_H
63 libcommon_lgpl_la_SOURCES += \
64 lttng-elf.c lttng-elf.h
65 endif
66
67 libcommon_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.
73 libcommon_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
88 libcommon_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
94 if BUILD_LIB_COMPAT
95 SUBDIRS += compat
96 libcommon_lgpl_la_LIBADD += \
97 $(top_builddir)/src/common/compat/libcompat.la
98 endif
99
100 if BUILD_LIB_HEALTH
101 SUBDIRS += health
102 endif
103
104 if BUILD_LIB_HASHTABLE
105 SUBDIRS += hashtable
106 endif
107
108 if BUILD_LIB_KERNEL_CTL
109 SUBDIRS += kernel-ctl
110 endif
111
112 if BUILD_LIB_SESSIOND_COMM
113 SUBDIRS += sessiond-comm
114 endif
115
116 if BUILD_LIB_RELAYD
117 SUBDIRS += relayd
118 endif
119
120 if BUILD_LIB_FD_TRACKER
121 SUBDIRS += fd-tracker
122 endif
123
124 if BUILD_LIB_KERNEL_CONSUMER
125 SUBDIRS += kernel-consumer
126 endif
127
128 if BUILD_LIB_UST_CONSUMER
129 SUBDIRS += ust-consumer
130 endif
131
132 if BUILD_LIB_TESTPOINT
133 SUBDIRS += testpoint
134 endif
135
136 if BUILD_LIB_INDEX
137 SUBDIRS += index
138 endif
139
140 if BUILD_LIB_CONFIG
141 SUBDIRS += config
142 endif
143
144 if BUILD_LIB_CONSUMER
145 SUBDIRS += consumer
146 endif
147
148 noinst_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
161 all-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
168 clean-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.035459 seconds and 5 git commands to generate.