Cleanup: popt library detection
[lttng-tools.git] / tests / regression / ust / ust-dl / Makefile.am
CommitLineData
cdbfb1b9
MD
1if NO_SHARED
2# Do not build this test if shared libraries support was
3# explicitly disabled.
4
818df80b
JG
5CLEANFILES = libbar.so libbar.so.debug libfoo.so libfoo.so.debug \
6 libzzz.so libzzz.so.debug prog libtp.so
cdbfb1b9 7
818df80b
JG
8EXTRA_DIST = test_ust-dl test_ust-dl.py libbar.c libbar.h libbar-tp.h \
9 libbar-tp.c libfoo.c libfoo.h libfoo-tp.h libfoo-tp.c \
10 libzzz.c libzzz.h libzzz-tp.h libzzz-tp.c prog.c libtp.c
cdbfb1b9
MD
11
12else
13
65385a82
MJ
14objcopy_verbose = $(objcopy_verbose_@AM_V@)
15objcopy_verbose_ = $(objcopy_verbose_@AM_DEFAULT_V@)
16objcopy_verbose_0 = @echo OBJCOPY $@;
17
343af227 18AM_CPPFLAGS += -I$(srcdir) -g
c70c42cc
AB
19
20noinst_PROGRAMS = prog
21prog_SOURCES = prog.c
22prog_LDADD = -ldl
23
818df80b 24noinst_LTLIBRARIES = libzzz.la libbar.la libfoo.la libtp.la
d8ed06af
MD
25
26libzzz_la_SOURCES = libzzz.c libzzz.h
27libzzz_la_LDFLAGS = -module -shared -avoid-version \
28 -rpath $(abs_builddir)
29
30libbar_la_SOURCES = libbar.c libbar.h
31libbar_la_LDFLAGS = -module -shared -avoid-version \
32 -rpath $(abs_builddir)
33libbar_la_LIBADD = libzzz.la
34
c70c42cc
AB
35libfoo_la_SOURCES = libfoo.c libfoo.h
36libfoo_la_LDFLAGS = -module -shared -avoid-version \
37 -rpath $(abs_builddir)
d8ed06af 38libfoo_la_LIBADD = libbar.la
c70c42cc 39
d8ed06af 40CLEANFILES = libfoo.so libfoo.so.debug libbar.so libbar.so.debug \
818df80b
JG
41 libzzz.so libzzz.so.debug libtp.so
42
43libtp_la_SOURCES = libbar-tp.h libbar-tp.c libfoo-tp.h libfoo-tp.c \
44 libzzz-tp.h libzzz-tp.c
45libtp_la_LDFLAGS = -module -shared -rpath $(abs_builddir)
c70c42cc 46
65385a82
MJ
47# Extract debug symbols
48libfoo.so.debug: libfoo.la
49 $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libfoo.so libfoo.so.debug
d8ed06af
MD
50libbar.so.debug: libbar.la
51 $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libbar.so libbar.so.debug
52libzzz.so.debug: libzzz.la
53 $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libzzz.so libzzz.so.debug
65385a82
MJ
54
55# Strip and add debuglink
56libfoo.so: libfoo.so.debug
57 @cp -f .libs/libfoo.so libfoo.so
58 $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libfoo.so.debug libfoo.so
d8ed06af
MD
59libbar.so: libbar.so.debug
60 @cp -f .libs/libbar.so libbar.so
61 $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libbar.so.debug libbar.so
62libzzz.so: libzzz.so.debug
63 @cp -f .libs/libzzz.so libzzz.so
64 $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libzzz.so.debug libzzz.so
65385a82 65
818df80b
JG
66libtp.so: libtp.la
67 @cp -f .libs/libtp.so libtp.so
68
cdbfb1b9
MD
69noinst_SCRIPTS = test_ust-dl test_ust-dl.py
70EXTRA_DIST = test_ust-dl test_ust-dl.py
71
818df80b 72all-local: libfoo.so libbar.so libzzz.so libtp.so
c70c42cc
AB
73 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
74 for script in $(EXTRA_DIST); do \
75 cp -f $(srcdir)/$$script $(builddir); \
76 done; \
77 fi
c70c42cc
AB
78
79clean-local:
80 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
81 for script in $(EXTRA_DIST); do \
82 rm -f $(builddir)/$$script; \
83 done; \
84 fi
65385a82 85
cdbfb1b9 86endif
This page took 0.033588 seconds and 4 git commands to generate.