tests: Move to kernel style SPDX license identifiers
[lttng-tools.git] / tests / regression / ust / overlap / demo / Makefile.am
index 68b6e087f84f506aeaf9137e43bc659ad9f5f0c9..302baa770472bd735d6b62c0518ca48ae631f939 100644 (file)
@@ -1,8 +1,19 @@
-AM_CFLAGS=-I$(srcdir)
+# SPDX-License-Identifier: GPL-2.0-only
+
 if NO_SHARED
 # Do not build this test if shared libraries support was
 # explicitly disabled.
+
+CLEANFILES = demo
+
+EXTRA_DIST = demo-trace demo.c ust_tests_demo.h \
+       tp3.c ust_tests_demo3.h tp2.c ust_tests_demo2.h \
+       tp.c ust_tests_demo.h
+
 else
+
+AM_CPPFLAGS += -I$(srcdir)
+
 # Force the shared flag on the noinst libraries since they are
 # only built static by default
 FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
@@ -12,12 +23,12 @@ FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
 liblttng_ust_provider_ust_tests_demo_la_SOURCES = \
        tp.c ust_tests_demo.h \
        tp2.c ust_tests_demo2.h
-liblttng_ust_provider_ust_tests_demo_la_LIBADD = -llttng-ust
+liblttng_ust_provider_ust_tests_demo_la_LIBADD = $(UST_LIBS)
 liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS)
 
 #contains ust_tests_demo3.h provider probes
 liblttng_ust_provider_ust_tests_demo3_la_SOURCES = tp3.c ust_tests_demo3.h
-liblttng_ust_provider_ust_tests_demo3_la_LIBADD = -llttng-ust
+liblttng_ust_provider_ust_tests_demo3_la_LIBADD = $(UST_LIBS)
 liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = $(FORCE_SHARED_LIB_OPTIONS)
 
 noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo.la \
@@ -26,13 +37,23 @@ noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo.la \
 noinst_PROGRAMS = demo
 demo_SOURCES = demo.c ust_tests_demo.h
 # The demo program only depends on libdl/libc for dlopen().
-if LTTNG_TOOLS_BUILD_WITH_LIBDL
-demo_LDADD = -ldl
-endif
-if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
-demo_LDADD = -lc
-endif
+demo_LDADD = $(DL_LIBS)
 
 noinst_SCRIPTS = demo-trace
 EXTRA_DIST = demo-trace
+
+all-local:
+       @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+               for script in $(EXTRA_DIST); do \
+                       cp -f $(srcdir)/$$script $(builddir); \
+               done; \
+       fi
+
+clean-local:
+       @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+               for script in $(EXTRA_DIST); do \
+                       rm -f $(builddir)/$$script; \
+               done; \
+       fi
+
 endif
This page took 0.024085 seconds and 4 git commands to generate.