1 # SPDX-License-Identifier: GPL-2.0-only
4 # Do not build this test if shared libraries support was
9 EXTRA_DIST = demo-trace demo.c ust_tests_demo.h \
10 tp3.c ust_tests_demo3.h tp2.c ust_tests_demo2.h \
15 AM_CPPFLAGS += -I$(srcdir)
17 # Disable some warnings flags to accomodate the tracepoint headers
21 # Force the shared flag on the noinst libraries since they are
22 # only built static by default
23 FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
24 -rpath $(abs_builddir)
26 #contains ust_tests_demo.h and ust_tests_demo2.h provider probes
27 liblttng_ust_provider_ust_tests_demo_la_SOURCES = \
28 tp.c ust_tests_demo.h \
29 tp2.c ust_tests_demo2.h
30 liblttng_ust_provider_ust_tests_demo_la_LIBADD = $(UST_LIBS)
31 liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS)
33 #contains ust_tests_demo3.h provider probes
34 liblttng_ust_provider_ust_tests_demo3_la_SOURCES = tp3.c ust_tests_demo3.h
35 liblttng_ust_provider_ust_tests_demo3_la_LIBADD = $(UST_LIBS)
36 liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS)
38 noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo.la \
39 liblttng-ust-provider-ust-tests-demo3.la
41 noinst_PROGRAMS = demo
42 demo_SOURCES = demo.c ust_tests_demo.h
43 # The demo program only depends on libdl/libc for dlopen().
44 demo_LDADD = $(DL_LIBS)
46 noinst_SCRIPTS = demo-trace
47 EXTRA_DIST = demo-trace
50 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
51 for script in $(EXTRA_DIST); do \
52 cp -f $(srcdir)/$$script $(builddir); \
57 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
58 for script in $(EXTRA_DIST); do \
59 rm -f $(builddir)/$$script; \