Test library load/unload events
[lttng-tools.git] / tests / regression / ust / ust-dl / Makefile.am
index c12da16d0ad509031e919034f62a28d09307de7e..5230007d4ca0fe04df2286d26eefe78e0f3deb7f 100644 (file)
@@ -1,3 +1,15 @@
+if NO_SHARED
+# Do not build this test if shared libraries support was
+# explicitly disabled.
+
+CLEANFILES = libfoo.so libfoo.so.debug libbar.so libbar.so.debug \
+       libzzz.so libzzz.so.debug prog
+
+EXTRA_DIST = test_ust-dl test_ust-dl.py libfoo.c libfoo.h \
+       libbar.c libbar.h libzzz.c libzzz.h prog.c
+
+else
+
 objcopy_verbose = $(objcopy_verbose_@AM_V@)
 objcopy_verbose_ = $(objcopy_verbose_@AM_DEFAULT_V@)
 objcopy_verbose_0 = @echo OBJCOPY $@;
@@ -8,24 +20,48 @@ noinst_PROGRAMS = prog
 prog_SOURCES = prog.c
 prog_LDADD = -ldl
 
-noinst_LTLIBRARIES = libfoo.la
+noinst_LTLIBRARIES = libzzz.la libbar.la libfoo.la
+
+libzzz_la_SOURCES = libzzz.c libzzz.h
+libzzz_la_LDFLAGS = -module -shared -avoid-version \
+               -rpath $(abs_builddir)
+
+libbar_la_SOURCES = libbar.c libbar.h
+libbar_la_LDFLAGS = -module -shared -avoid-version \
+               -rpath $(abs_builddir)
+libbar_la_LIBADD = libzzz.la
+
 libfoo_la_SOURCES = libfoo.c libfoo.h
 libfoo_la_LDFLAGS = -module -shared -avoid-version \
                -rpath $(abs_builddir)
+libfoo_la_LIBADD = libbar.la
 
-noinst_SCRIPTS = test_ust-dl test_ust-dl.py
-EXTRA_DIST = test_ust-dl test_ust-dl.py
+CLEANFILES = libfoo.so libfoo.so.debug libbar.so libbar.so.debug \
+       libzzz.so libzzz.so.debug
 
 # Extract debug symbols
 libfoo.so.debug: libfoo.la
        $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libfoo.so libfoo.so.debug
+libbar.so.debug: libbar.la
+       $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libbar.so libbar.so.debug
+libzzz.so.debug: libzzz.la
+       $(objcopy_verbose)$(OBJCOPY) --only-keep-debug .libs/libzzz.so libzzz.so.debug
 
 # Strip and add debuglink
 libfoo.so: libfoo.so.debug
        @cp -f .libs/libfoo.so libfoo.so
        $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libfoo.so.debug libfoo.so
+libbar.so: libbar.so.debug
+       @cp -f .libs/libbar.so libbar.so
+       $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libbar.so.debug libbar.so
+libzzz.so: libzzz.so.debug
+       @cp -f .libs/libzzz.so libzzz.so
+       $(objcopy_verbose)$(OBJCOPY) --strip-debug --add-gnu-debuglink=libzzz.so.debug libzzz.so
+
+noinst_SCRIPTS = test_ust-dl test_ust-dl.py
+EXTRA_DIST = test_ust-dl test_ust-dl.py
 
-all-local: libfoo.so
+all-local: libfoo.so libbar.so libzzz.so
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
                for script in $(EXTRA_DIST); do \
                        cp -f $(srcdir)/$$script $(builddir); \
@@ -39,4 +75,4 @@ clean-local:
                done; \
        fi
 
-CLEANFILES = libfoo.so libfoo.so.debug
+endif
This page took 0.025738 seconds and 5 git commands to generate.