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