2 # Do not build this test if shared libraries support was
5 CLEANFILES = libfoo.so libfoo.so.debug prog
7 EXTRA_DIST = test_ust-dl test_ust-dl.py libfoo.c libfoo.h \
12 objcopy_verbose = $(objcopy_verbose_@AM_V@)
13 objcopy_verbose_ = $(objcopy_verbose_@AM_DEFAULT_V@)
14 objcopy_verbose_0 = @echo OBJCOPY $@;
16 AM_CPPFLAGS = -I$(srcdir) -g
18 noinst_PROGRAMS = prog
22 noinst_LTLIBRARIES = libfoo.la
23 libfoo_la_SOURCES = libfoo.c libfoo.h
24 libfoo_la_LDFLAGS = -module -shared -avoid-version \
25 -rpath $(abs_builddir)
27 CLEANFILES = libfoo.so libfoo.so.debug
29 # Extract debug symbols
30 libfoo.so.debug: libfoo.la
31 $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libfoo.so libfoo.so.debug
33 # Strip and add debuglink
34 libfoo.so: libfoo.so.debug
35 @cp -f .libs/libfoo.so libfoo.so
36 $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libfoo.so.debug libfoo.so
38 noinst_SCRIPTS = test_ust-dl test_ust-dl.py
39 EXTRA_DIST = test_ust-dl test_ust-dl.py
42 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
43 for script in $(EXTRA_DIST); do \
44 cp -f $(srcdir)/$$script $(builddir); \
49 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
50 for script in $(EXTRA_DIST); do \
51 rm -f $(builddir)/$$script; \