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 | ||
09a872ef KS |
15 | noinst_LTLIBRARIES = libtp-a-provider.la libtp-a-define.la \ |
16 | libtp-a_c-provider.la libtp-a_c-define.la | |
17 | noinst_PROGRAMS = gen-ust-events-constructor-a \ | |
18 | uses_heap | |
19 | ||
a4cc1b1f MD |
20 | if NO_SHARED |
21 | # Build the shared library as a static archive if shared libraries | |
22 | # are disabled. | |
23 | FORCE_SHARED_LIB_OPTIONS = | |
24 | else | |
25 | # Force the shared flag on the noinst libraries since they are | |
26 | # only built static by default | |
27 | FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ | |
28 | -rpath $(abs_builddir) | |
09a872ef KS |
29 | |
30 | noinst_LTLIBRARIES += libtp-so-provider.la libtp-so-define.la \ | |
31 | libtp-so_c-provider.la libtp-so_c-define.la | |
32 | noinst_PROGRAMS += gen-ust-events-constructor-so | |
a4cc1b1f MD |
33 | endif |
34 | ||
a4cc1b1f MD |
35 | |
36 | # dynamic libraries | |
37 | libtp_so_provider_la_SOURCES = \ | |
38 | tp-so-provider.cpp \ | |
39 | tp-so.h | |
40 | libtp_so_provider_la_LDFLAGS = \ | |
41 | $(FORCE_SHARED_LIB_OPTIONS) | |
42 | ||
43 | libtp_so_define_la_SOURCES = \ | |
44 | tp-so-define.cpp \ | |
45 | tp-so.h | |
46 | libtp_so_define_la_LDFLAGS = \ | |
47 | $(FORCE_SHARED_LIB_OPTIONS) | |
48 | ||
ed1b6b66 KS |
49 | libtp_so_c_provider_la_SOURCES = \ |
50 | tp-so_c-provider.c \ | |
51 | tp-so_c.h | |
52 | libtp_so_c_provider_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS) | |
53 | ||
54 | libtp_so_c_define_la_SOURCES = \ | |
55 | tp-so_c-define.c \ | |
56 | tp-so_c.h | |
57 | libtp_so_c_define_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS) | |
58 | ||
a4cc1b1f MD |
59 | # static archives |
60 | libtp_a_provider_la_SOURCES = \ | |
61 | tp-a-provider.cpp \ | |
62 | tp-a.h | |
63 | ||
64 | libtp_a_define_la_SOURCES = \ | |
65 | tp-a-define.cpp \ | |
66 | tp-a.h | |
67 | ||
ab4919b5 KS |
68 | libtp_a_c_provider_la_SOURCES = \ |
69 | tp-a_c-provider.c \ | |
70 | tp-a_c.h | |
71 | ||
72 | libtp_a_c_define_la_SOURCES = \ | |
73 | tp-a_c-define.c \ | |
74 | tp-a_c.h | |
75 | ||
76 | ||
09a872ef | 77 | gen_ust_events_constructor_so_SOURCES = main.cpp \ |
a4cc1b1f MD |
78 | 01-tp-before-define.cpp \ |
79 | 02-define-tp.cpp \ | |
80 | 03-tp-after-define.cpp \ | |
81 | 04-tp-provider.cpp \ | |
82 | 05-tp-after-provider.cpp \ | |
83 | obj.cpp \ | |
84 | obj.h \ | |
85 | tp.h | |
09a872ef KS |
86 | gen_ust_events_constructor_so_LDADD = $(UST_LIBS) \ |
87 | $(builddir)/libtp-so-define.la \ | |
88 | $(builddir)/libtp-so-provider.la \ | |
89 | $(builddir)/libtp-so_c-define.la \ | |
90 | $(builddir)/libtp-so_c-provider.la \ | |
91 | $(top_builddir)/tests/utils/libtestutils.la \ | |
92 | $(DL_LIBS) | |
93 | ||
94 | gen_ust_events_constructor_a_SOURCES = main-a.cpp \ | |
95 | 01-tp-before-define.cpp \ | |
96 | 02-define-tp.cpp \ | |
97 | 03-tp-after-define.cpp \ | |
98 | 04-tp-provider.cpp \ | |
99 | 05-tp-after-provider.cpp \ | |
100 | obj-a.cpp \ | |
101 | obj-a.h \ | |
102 | tp.h | |
103 | gen_ust_events_constructor_a_LDADD = $(UST_LIBS) \ | |
104 | $(builddir)/libtp-a-define.la \ | |
105 | $(builddir)/libtp-a-provider.la \ | |
106 | $(builddir)/libtp-a_c-define.la \ | |
107 | $(builddir)/libtp-a_c-provider.la \ | |
108 | $(top_builddir)/tests/utils/libtestutils.la \ | |
109 | $(DL_LIBS) | |
b8e79f3f KS |
110 | |
111 | uses_heap_SOURCES = uses_heap.cpp | |
09a872ef | 112 | |
a4cc1b1f | 113 | endif |