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