Tests: Add test to check shared-memory FD leaks after relayd dies
[lttng-tools.git] / tests / regression / ust / linking / Makefile.am
CommitLineData
9d16b343
MJ
1# SPDX-License-Identifier: GPL-2.0-only
2
91c75285
JG
3# -Wsystem-headers is needed to print warnings in the tracepoint
4# description file.
411b3154
SM
5#
6# However, we see some -Wformat-nonliteral warnings in some system headers,
7# so disable that.
8AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers -Wno-format-nonliteral
91c75285 9
19708280
MJ
10# Disable some warnings flags to accomodate the tracepoint headers
11AM_CFLAGS += \
12 -Wno-redundant-decls
13
91c75285
JG
14# Set LIBS to nothing so the application does not link on useless
15# libraries.
16LIBS =
17
18# Build a version of the test app with built-in tracepoints
19demo_builtin_SOURCES = demo.c tp.c tp2.c tp3.c ust_tests_demo.h \
20 ust_tests_demo2.h ust_tests_demo3.h
20dd2de1 21demo_builtin_LDADD = $(UST_LIBS) $(DL_LIBS)
343af227 22demo_builtin_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
91c75285
JG
23
24# Build a version statically linked to the providers
25# contains ust_tests_demo.h and ust_tests_demo2.h provider probes
26noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo-static.la \
27 liblttng-ust-provider-ust-tests-demo3-static.la
28
29liblttng_ust_provider_ust_tests_demo_static_la_SOURCES = \
30 tp.c ust_tests_demo.h \
31 tp2.c ust_tests_demo2.h
32liblttng_ust_provider_ust_tests_demo_static_la_LIBADD = \
20dd2de1 33 $(UST_LIBS)
91c75285
JG
34
35# contains ust_tests_demo3.h provider probes
36liblttng_ust_provider_ust_tests_demo3_static_la_SOURCES = \
37 tp3.c ust_tests_demo3.h
38liblttng_ust_provider_ust_tests_demo3_static_la_LIBADD = \
20dd2de1 39 $(UST_LIBS)
91c75285
JG
40
41demo_static_SOURCES = demo.c
42demo_static_LDADD = liblttng-ust-provider-ust-tests-demo-static.la \
b1c46f87
MJ
43 liblttng-ust-provider-ust-tests-demo3-static.la \
44 $(DL_LIBS)
91c75285
JG
45
46noinst_PROGRAMS = demo_builtin demo_static
47
cdbfb1b9
MD
48COPYSCRIPTS = test_linking test_linking.py demo_preload
49noinst_SCRIPTS = $(COPYSCRIPTS)
50
51if NO_SHARED
52
53EXTRA_DIST = tp.c ust_tests_demo.h tp2.c ust_tests_demo2.h \
54 tp3.c ust_tests_demo3.h demo.c ust_tests_demo.h \
55 $(COPYSCRIPTS)
56
57else
91c75285
JG
58# Force the shared flag on the noinst libraries since they are
59# only built static by default
60FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
61 -rpath $(abs_builddir)
62
63noinst_LTLIBRARIES += liblttng-ust-provider-ust-tests-demo.la \
64 liblttng-ust-provider-ust-tests-demo3.la
65
66#contains ust_tests_demo.h and ust_tests_demo2.h provider probes
67liblttng_ust_provider_ust_tests_demo_la_SOURCES = \
68 tp.c ust_tests_demo.h \
69 tp2.c ust_tests_demo2.h
20dd2de1 70liblttng_ust_provider_ust_tests_demo_la_LIBADD = $(UST_LIBS)
91c75285
JG
71liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = \
72 $(FORCE_SHARED_LIB_OPTIONS)
73
74#contains ust_tests_demo3.h provider probes
75liblttng_ust_provider_ust_tests_demo3_la_SOURCES = \
76 tp3.c ust_tests_demo3.h
20dd2de1 77liblttng_ust_provider_ust_tests_demo3_la_LIBADD = $(UST_LIBS)
91c75285
JG
78liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = \
79 $(FORCE_SHARED_LIB_OPTIONS)
80
81noinst_PROGRAMS += demo
82demo_SOURCES = demo.c ust_tests_demo.h
343af227 83demo_CFLAGS = -DTEST_DYNAMIC_LINKAGE $(AM_CFLAGS)
b1c46f87 84demo_LDADD = $(DL_LIBS)
91c75285 85
cdbfb1b9 86EXTRA_DIST = $(COPYSCRIPTS)
91c75285 87
cdbfb1b9 88endif
c83e7ca0
DG
89
90all-local:
91 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
cdbfb1b9 92 for script in $(COPYSCRIPTS); do \
c83e7ca0
DG
93 cp -f $(srcdir)/$$script $(builddir); \
94 done; \
95 fi
96
97clean-local:
98 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
cdbfb1b9 99 for script in $(COPYSCRIPTS); do \
c83e7ca0
DG
100 rm -f $(builddir)/$$script; \
101 done; \
102 fi
This page took 0.061846 seconds and 4 git commands to generate.