common: move utils_create_lock_file to its own file
[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
e40c873f 26noinst_LTLIBRARIES = libpath.la 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 \
33b9609d 36 channel.c \
28b6dfc8 37 credentials.h \
04952f7c 38 condition.c \
28b6dfc8
SM
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 \
c9681eeb 45 event.c \
28b6dfc8 46 location.c \
cf7e5f00 47 lockfile.c lockfile.h \
28b6dfc8
SM
48 mi-lttng.c mi-lttng.h \
49 notification.c \
50 notify.c \
8b42d6b2 51 random.c random.h \
28b6dfc8
SM
52 readwrite.c readwrite.h \
53 runas.c runas.h \
54 session-consumed-size.c \
55 session-descriptor.c \
56 session-rotation.c \
6457f8e4 57 spawn-viewer.c spawn-viewer.h \
28b6dfc8 58 time.c \
04952f7c 59 tracker.c tracker.h \
28b6dfc8
SM
60 trigger.c \
61 unix.c unix.h \
62 uri.c uri.h \
63 userspace-probe.c \
04952f7c 64 utils.c utils.h
b3f35e02 65
b1b34226 66if HAVE_ELF_H
04952f7c 67libcommon_lgpl_la_SOURCES += \
28b6dfc8 68 lttng-elf.c lttng-elf.h
b1b34226
MJ
69endif
70
04952f7c 71libcommon_lgpl_la_LIBADD = \
28b6dfc8 72 $(top_builddir)/src/common/config/libconfig.la \
04952f7c
MD
73 $(top_builddir)/src/common/hashtable/libhashtable-lgpl.la
74
e40c873f
MD
75# The libpath static archive contains GPLv2 compatible code. It is
76# meant to be used by GPL executables.
77
78libpath_la_SOURCES = \
79 path.c path.h
80
04952f7c
MD
81# The libcommon-gpl static archive contains GPLv2 compatible code. It is
82# meant to be used by GPL executables.
83libcommon_gpl_la_SOURCES = \
84 common.h \
85 context.c context.h \
86 daemonize.c daemonize.h \
04952f7c
MD
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
97libcommon_gpl_la_LIBADD = \
98 -lurcu -lurcu-common \
99 libcommon-lgpl.la \
e40c873f 100 libpath.la \
04952f7c 101 $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \
8bb66c3c 102 $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
b3f35e02 103
87fb9fc0
JR
104if BUILD_LIB_COMPAT
105SUBDIRS += compat
04952f7c
MD
106libcommon_lgpl_la_LIBADD += \
107 $(top_builddir)/src/common/compat/libcompat.la
87fb9fc0
JR
108endif
109
110if BUILD_LIB_HEALTH
111SUBDIRS += health
112endif
113
114if BUILD_LIB_HASHTABLE
115SUBDIRS += hashtable
116endif
117
118if BUILD_LIB_KERNEL_CTL
119SUBDIRS += kernel-ctl
120endif
121
122if BUILD_LIB_SESSIOND_COMM
123SUBDIRS += sessiond-comm
124endif
125
126if BUILD_LIB_RELAYD
aa360a35
JG
127SUBDIRS += relayd
128endif
129
130if BUILD_LIB_FD_TRACKER
131SUBDIRS += fd-tracker
87fb9fc0
JR
132endif
133
134if BUILD_LIB_KERNEL_CONSUMER
135SUBDIRS += kernel-consumer
136endif
137
138if BUILD_LIB_UST_CONSUMER
139SUBDIRS += ust-consumer
140endif
141
142if BUILD_LIB_TESTPOINT
143SUBDIRS += testpoint
144endif
145
146if BUILD_LIB_INDEX
147SUBDIRS += index
148endif
149
150if BUILD_LIB_CONFIG
151SUBDIRS += config
152endif
153
154if BUILD_LIB_CONSUMER
155SUBDIRS += consumer
156endif
10a8a223 157
28b6dfc8
SM
158noinst_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
1c39da61 170
c49fc5e4
JR
171all-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
178clean-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.062633 seconds and 4 git commands to generate.