Commit | Line | Data |
---|---|---|
9d16b343 MJ |
1 | # SPDX-License-Identifier: GPL-2.0-only |
2 | ||
ccf7af6c CB |
3 | if NO_SHARED |
4 | # Do not build this test if shared libraries support was | |
5 | # explicitly disabled. | |
cdbfb1b9 MD |
6 | |
7 | CLEANFILES = demo | |
8 | ||
9 | EXTRA_DIST = demo-trace demo.c ust_tests_demo.h \ | |
10 | tp3.c ust_tests_demo3.h tp2.c ust_tests_demo2.h \ | |
11 | tp.c ust_tests_demo.h | |
12 | ||
ccf7af6c | 13 | else |
cdbfb1b9 | 14 | |
343af227 | 15 | AM_CPPFLAGS += -I$(srcdir) |
cdbfb1b9 | 16 | |
ccf7af6c CB |
17 | # Force the shared flag on the noinst libraries since they are |
18 | # only built static by default | |
26b53d3b DG |
19 | FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ |
20 | -rpath $(abs_builddir) | |
21 | ||
22 | #contains ust_tests_demo.h and ust_tests_demo2.h provider probes | |
23 | liblttng_ust_provider_ust_tests_demo_la_SOURCES = \ | |
24 | tp.c ust_tests_demo.h \ | |
25 | tp2.c ust_tests_demo2.h | |
20dd2de1 | 26 | liblttng_ust_provider_ust_tests_demo_la_LIBADD = $(UST_LIBS) |
26b53d3b DG |
27 | liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS) |
28 | ||
29 | #contains ust_tests_demo3.h provider probes | |
30 | liblttng_ust_provider_ust_tests_demo3_la_SOURCES = tp3.c ust_tests_demo3.h | |
20dd2de1 | 31 | liblttng_ust_provider_ust_tests_demo3_la_LIBADD = $(UST_LIBS) |
26b53d3b DG |
32 | liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS) |
33 | ||
34 | noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo.la \ | |
35 | liblttng-ust-provider-ust-tests-demo3.la | |
36 | ||
37 | noinst_PROGRAMS = demo | |
38 | demo_SOURCES = demo.c ust_tests_demo.h | |
39 | # The demo program only depends on libdl/libc for dlopen(). | |
b1c46f87 | 40 | demo_LDADD = $(DL_LIBS) |
0a340972 DG |
41 | |
42 | noinst_SCRIPTS = demo-trace | |
43 | EXTRA_DIST = demo-trace | |
c83e7ca0 DG |
44 | |
45 | all-local: | |
46 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
47 | for script in $(EXTRA_DIST); do \ | |
48 | cp -f $(srcdir)/$$script $(builddir); \ | |
49 | done; \ | |
50 | fi | |
51 | ||
52 | clean-local: | |
53 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
54 | for script in $(EXTRA_DIST); do \ | |
55 | rm -f $(builddir)/$$script; \ | |
56 | done; \ | |
57 | fi | |
cdbfb1b9 | 58 | |
ccf7af6c | 59 | endif |