Fix: Do not install health tests helper libraries
[lttng-tools.git] / tests / tools / health / Makefile.am
index 9fab58234a370f7ed0b6a5c41b53cfa663ae40be..f1a5d915d9350c8506a8a58800ab07dff00bbc28 100644 (file)
@@ -8,23 +8,27 @@ if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
 AM_LDFLAGS += -lc
 endif
 
-UTILS=
-
-lib_LTLIBRARIES=libhealthexit.la libhealthstall.la
+if NO_SHARED
+# Do not build this test if shared libraries support was
+# explicitly disabled.
+else
+# In order to test the health check feature, the libhealth* libs
+# must be built as .so to be able to LD_PRELOAD them.
+FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
+                          -rpath $(abs_builddir)
 
 # Health thread exit ld_preloaded test lib
 libhealthexit_la_SOURCES=health_exit.c
-libhealthexit_la_LDFLAGS= -module
+libhealthexit_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS)
 
 # Health thread stall ld_preloaded test lib
 libhealthstall_la_SOURCES=health_stall.c
-libhealthstall_la_LDFLAGS= -module
+libhealthstall_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS)
 
 noinst_PROGRAMS = health_check
+noinst_LTLIBRARIES = libhealthexit.la libhealthstall.la
 
 health_check_SOURCES = health_check.c $(UTILS)
 health_check_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
                     $(top_builddir)/src/common/libcommon.la
-
-noinst_SCRIPTS =
-EXTRA_DIST =
+endif
This page took 0.031118 seconds and 4 git commands to generate.