Commit | Line | Data |
---|---|---|
a4cc1b1f MD |
1 | # SPDX-License-Identifier: GPL-2.0-only |
2 | ||
3 | AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(srcdir) \ | |
4 | -I$(top_srcdir)/tests/utils/testapp | |
5 | ||
6 | if HAVE_LIBLTTNG_UST_CTL | |
7 | # Disable some warnings flags to accomodate the tracepoint headers | |
8 | WARN_FLAGS = \ | |
9 | -Wno-redundant-decls \ | |
10 | -Wno-missing-field-initializers | |
11 | ||
12 | AM_CFLAGS += $(WARN_FLAGS) | |
13 | AM_CXXFLAGS += $(WARN_FLAGS) | |
14 | ||
15 | if NO_SHARED | |
16 | # Build the shared library as a static archive if shared libraries | |
17 | # are disabled. | |
18 | FORCE_SHARED_LIB_OPTIONS = | |
19 | else | |
20 | # Force the shared flag on the noinst libraries since they are | |
21 | # only built static by default | |
22 | FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ | |
23 | -rpath $(abs_builddir) | |
24 | endif | |
25 | ||
26 | noinst_LTLIBRARIES = libtp-so-provider.la libtp-so-define.la \ | |
27 | libtp-a-provider.la libtp-a-define.la | |
28 | ||
29 | # dynamic libraries | |
30 | libtp_so_provider_la_SOURCES = \ | |
31 | tp-so-provider.cpp \ | |
32 | tp-so.h | |
33 | libtp_so_provider_la_LDFLAGS = \ | |
34 | $(FORCE_SHARED_LIB_OPTIONS) | |
35 | ||
36 | libtp_so_define_la_SOURCES = \ | |
37 | tp-so-define.cpp \ | |
38 | tp-so.h | |
39 | libtp_so_define_la_LDFLAGS = \ | |
40 | $(FORCE_SHARED_LIB_OPTIONS) | |
41 | ||
42 | # static archives | |
43 | libtp_a_provider_la_SOURCES = \ | |
44 | tp-a-provider.cpp \ | |
45 | tp-a.h | |
46 | ||
47 | libtp_a_define_la_SOURCES = \ | |
48 | tp-a-define.cpp \ | |
49 | tp-a.h | |
50 | ||
b8e79f3f KS |
51 | noinst_PROGRAMS = gen-ust-events-constructor \ |
52 | uses_heap | |
53 | gen_ust_events_constructor_SOURCES = main.cpp \ | |
a4cc1b1f MD |
54 | 01-tp-before-define.cpp \ |
55 | 02-define-tp.cpp \ | |
56 | 03-tp-after-define.cpp \ | |
57 | 04-tp-provider.cpp \ | |
58 | 05-tp-after-provider.cpp \ | |
59 | obj.cpp \ | |
60 | obj.h \ | |
61 | tp.h | |
62 | gen_ust_events_constructor_LDADD = $(UST_LIBS) \ | |
63 | $(builddir)/libtp-so-define.la \ | |
64 | $(builddir)/libtp-so-provider.la \ | |
65 | $(builddir)/libtp-a-define.la \ | |
66 | $(builddir)/libtp-a-provider.la \ | |
67 | $(top_builddir)/tests/utils/libtestutils.la \ | |
68 | $(DL_LIBS) | |
b8e79f3f KS |
69 | |
70 | uses_heap_SOURCES = uses_heap.cpp | |
a4cc1b1f | 71 | endif |