6acd78fe587af6a53db847b518c64e4099dbfffb
[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 = libpath.la 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 channel.c \
37 credentials.h \
38 condition.c \
39 defaults.c \
40 dynamic-array.c dynamic-array.h \
41 dynamic-buffer.c dynamic-buffer.h \
42 endpoint.c \
43 error.c error.h \
44 evaluation.c \
45 event.c \
46 location.c \
47 lockfile.c lockfile.h \
48 mi-lttng.c mi-lttng.h \
49 notification.c \
50 notify.c \
51 random.c random.h \
52 readwrite.c readwrite.h \
53 runas.c runas.h \
54 session-consumed-size.c \
55 session-descriptor.c \
56 session-rotation.c \
57 spawn-viewer.c spawn-viewer.h \
58 time.c \
59 tracker.c tracker.h \
60 trigger.c \
61 unix.c unix.h \
62 uri.c uri.h \
63 userspace-probe.c \
64 utils.c utils.h
65
66 if HAVE_ELF_H
67 libcommon_lgpl_la_SOURCES += \
68 lttng-elf.c lttng-elf.h
69 endif
70
71 libcommon_lgpl_la_LIBADD = \
72 $(top_builddir)/src/common/config/libconfig.la \
73 $(top_builddir)/src/common/hashtable/libhashtable-lgpl.la
74
75 # The libpath static archive contains GPLv2 compatible code. It is
76 # meant to be used by GPL executables.
77
78 libpath_la_SOURCES = \
79 path.c path.h
80
81 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
82 # meant to be used by GPL executables.
83 libcommon_gpl_la_SOURCES = \
84 common.h \
85 context.c context.h \
86 daemonize.c daemonize.h \
87 filter.c filter.h \
88 fs-handle.c fs-handle.h fs-handle-internal.h \
89 futex.c futex.h \
90 optional.h \
91 pipe.c pipe.h \
92 trace-chunk.c trace-chunk.h \
93 trace-chunk-registry.h \
94 uuid.c uuid.h \
95 waiter.c waiter.h
96
97 libcommon_gpl_la_LIBADD = \
98 -lurcu -lurcu-common \
99 libcommon-lgpl.la \
100 libpath.la \
101 $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \
102 $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
103
104 if BUILD_LIB_COMPAT
105 SUBDIRS += compat
106 libcommon_lgpl_la_LIBADD += \
107 $(top_builddir)/src/common/compat/libcompat.la
108 endif
109
110 if BUILD_LIB_HEALTH
111 SUBDIRS += health
112 endif
113
114 if BUILD_LIB_HASHTABLE
115 SUBDIRS += hashtable
116 endif
117
118 if BUILD_LIB_KERNEL_CTL
119 SUBDIRS += kernel-ctl
120 endif
121
122 if BUILD_LIB_SESSIOND_COMM
123 SUBDIRS += sessiond-comm
124 endif
125
126 if BUILD_LIB_RELAYD
127 SUBDIRS += relayd
128 endif
129
130 if BUILD_LIB_FD_TRACKER
131 SUBDIRS += fd-tracker
132 endif
133
134 if BUILD_LIB_KERNEL_CONSUMER
135 SUBDIRS += kernel-consumer
136 endif
137
138 if BUILD_LIB_UST_CONSUMER
139 SUBDIRS += ust-consumer
140 endif
141
142 if BUILD_LIB_TESTPOINT
143 SUBDIRS += testpoint
144 endif
145
146 if BUILD_LIB_INDEX
147 SUBDIRS += index
148 endif
149
150 if BUILD_LIB_CONFIG
151 SUBDIRS += config
152 endif
153
154 if BUILD_LIB_CONSUMER
155 SUBDIRS += consumer
156 endif
157
158 noinst_HEADERS = \
159 align.h \
160 bug.h \
161 defaults.h \
162 error.h \
163 futex.h \
164 lttng-kernel.h \
165 lttng-kernel-old.h \
166 macros.h \
167 time.h \
168 uri.h \
169 utils.h
170
171 all-local:
172 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
173 for script in $(EXTRA_DIST); do \
174 cp -f $(srcdir)/$$script $(builddir); \
175 done; \
176 fi
177
178 clean-local:
179 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
180 for script in $(EXTRA_DIST); do \
181 rm -f $(builddir)/$$script; \
182 done; \
183 fi
This page took 0.033315 seconds and 4 git commands to generate.