Tests: fix make targets using objcopy
[lttng-tools.git] / tests / regression / ust / ust-dl / Makefile.am
CommitLineData
65385a82
MJ
1objcopy_verbose = $(objcopy_verbose_@AM_V@)
2objcopy_verbose_ = $(objcopy_verbose_@AM_DEFAULT_V@)
3objcopy_verbose_0 = @echo OBJCOPY $@;
4
c70c42cc
AB
5AM_CPPFLAGS = -I$(srcdir) -g
6
7noinst_PROGRAMS = prog
8prog_SOURCES = prog.c
9prog_LDADD = -ldl
10
11noinst_LTLIBRARIES = libfoo.la
12libfoo_la_SOURCES = libfoo.c libfoo.h
13libfoo_la_LDFLAGS = -module -shared -avoid-version \
14 -rpath $(abs_builddir)
15
16noinst_SCRIPTS = test_ust-dl test_ust-dl.py
17EXTRA_DIST = test_ust-dl test_ust-dl.py
18
65385a82
MJ
19# Extract debug symbols
20libfoo.so.debug: libfoo.la
21 $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libfoo.so libfoo.so.debug
22
23# Strip and add debuglink
24libfoo.so: libfoo.so.debug
25 @cp -f .libs/libfoo.so libfoo.so
26 $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libfoo.so.debug libfoo.so
27
28all-local: libfoo.so
c70c42cc
AB
29 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
30 for script in $(EXTRA_DIST); do \
31 cp -f $(srcdir)/$$script $(builddir); \
32 done; \
33 fi
c70c42cc
AB
34
35clean-local:
36 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
37 for script in $(EXTRA_DIST); do \
38 rm -f $(builddir)/$$script; \
39 done; \
40 fi
65385a82
MJ
41
42CLEANFILES = libfoo.so libfoo.so.debug
This page took 0.024273 seconds and 4 git commands to generate.