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