Move utils_expand_path and utils_expand_path_keep_symlink to libpath.la
[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 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 libpath static archive contains GPLv2 compatible code. It is
72 # meant to be used by GPL executables.
73
74 libpath_la_SOURCES = \
75 path.c path.h
76
77 # The libcommon-gpl static archive contains GPLv2 compatible code. It is
78 # meant to be used by GPL executables.
79 libcommon_gpl_la_SOURCES = \
80 common.h \
81 context.c context.h \
82 daemonize.c daemonize.h \
83 event.c \
84 filter.c filter.h \
85 fs-handle.c fs-handle.h fs-handle-internal.h \
86 futex.c futex.h \
87 optional.h \
88 pipe.c pipe.h \
89 trace-chunk.c trace-chunk.h \
90 trace-chunk-registry.h \
91 uuid.c uuid.h \
92 waiter.c waiter.h
93
94 libcommon_gpl_la_LIBADD = \
95 -lurcu -lurcu-common \
96 libcommon-lgpl.la \
97 libpath.la \
98 $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \
99 $(top_builddir)/src/common/fd-tracker/libfd-tracker.la
100
101 if BUILD_LIB_COMPAT
102 SUBDIRS += compat
103 libcommon_lgpl_la_LIBADD += \
104 $(top_builddir)/src/common/compat/libcompat.la
105 endif
106
107 if BUILD_LIB_HEALTH
108 SUBDIRS += health
109 endif
110
111 if BUILD_LIB_HASHTABLE
112 SUBDIRS += hashtable
113 endif
114
115 if BUILD_LIB_KERNEL_CTL
116 SUBDIRS += kernel-ctl
117 endif
118
119 if BUILD_LIB_SESSIOND_COMM
120 SUBDIRS += sessiond-comm
121 endif
122
123 if BUILD_LIB_RELAYD
124 SUBDIRS += relayd
125 endif
126
127 if BUILD_LIB_FD_TRACKER
128 SUBDIRS += fd-tracker
129 endif
130
131 if BUILD_LIB_KERNEL_CONSUMER
132 SUBDIRS += kernel-consumer
133 endif
134
135 if BUILD_LIB_UST_CONSUMER
136 SUBDIRS += ust-consumer
137 endif
138
139 if BUILD_LIB_TESTPOINT
140 SUBDIRS += testpoint
141 endif
142
143 if BUILD_LIB_INDEX
144 SUBDIRS += index
145 endif
146
147 if BUILD_LIB_CONFIG
148 SUBDIRS += config
149 endif
150
151 if BUILD_LIB_CONSUMER
152 SUBDIRS += consumer
153 endif
154
155 noinst_HEADERS = \
156 align.h \
157 bug.h \
158 defaults.h \
159 error.h \
160 futex.h \
161 lttng-kernel.h \
162 lttng-kernel-old.h \
163 macros.h \
164 time.h \
165 uri.h \
166 utils.h
167
168 all-local:
169 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
170 for script in $(EXTRA_DIST); do \
171 cp -f $(srcdir)/$$script $(builddir); \
172 done; \
173 fi
174
175 clean-local:
176 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
177 for script in $(EXTRA_DIST); do \
178 rm -f $(builddir)/$$script; \
179 done; \
180 fi
This page took 0.035469 seconds and 5 git commands to generate.