Commit | Line | Data |
---|---|---|
9d16b343 MJ |
1 | # SPDX-License-Identifier: GPL-2.0-only |
2 | ||
343af227 | 3 | AM_CPPFLAGS += -I. -I$(top_srcdir)/include |
dff9583f | 4 | |
cfe8b49a | 5 | COPYSCRIPTS = test_thread_stall test_tp_fail \ |
cdbfb1b9 MD |
6 | test_health.sh test_thread_ok |
7 | dist_noinst_SCRIPTS = $(COPYSCRIPTS) | |
8 | ||
347e0f14 CB |
9 | if NO_SHARED |
10 | # Do not build this test if shared libraries support was | |
11 | # explicitly disabled. | |
cdbfb1b9 | 12 | |
342e04a4 | 13 | EXTRA_DIST = health_stall.c health_fail.c \ |
cdbfb1b9 MD |
14 | health_check.c $(COPYSCRIPTS) |
15 | ||
347e0f14 CB |
16 | else |
17 | # In order to test the health check feature, the libhealth* libs | |
18 | # must be built as .so to be able to LD_PRELOAD them. | |
19 | FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ | |
20 | -rpath $(abs_builddir) | |
9e32c5c0 | 21 | |
5862a19a CB |
22 | # Health thread stall ld_preloaded test lib |
23 | libhealthstall_la_SOURCES=health_stall.c | |
347e0f14 | 24 | libhealthstall_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS) |
b1c46f87 | 25 | libhealthstall_la_LIBADD = $(DL_LIBS) |
5862a19a | 26 | |
6b5133f2 CB |
27 | # Health thread fail ld_preloaded test lib |
28 | libhealthtpfail_la_SOURCES=health_fail.c | |
29 | libhealthtpfail_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS) | |
b1c46f87 | 30 | libhealthtpfail_la_LIBADD = $(DL_LIBS) |
6b5133f2 | 31 | |
dff9583f | 32 | noinst_PROGRAMS = health_check |
342e04a4 | 33 | noinst_LTLIBRARIES = libhealthstall.la libhealthtpfail.la |
dff9583f CB |
34 | |
35 | health_check_SOURCES = health_check.c $(UTILS) | |
36 | health_check_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ | |
b1c46f87 MJ |
37 | $(top_builddir)/src/common/libcommon.la \ |
38 | $(DL_LIBS) | |
431387b0 | 39 | |
cdbfb1b9 MD |
40 | EXTRA_DIST = $(COPYSCRIPTS) |
41 | ||
42 | endif | |
c83e7ca0 DG |
43 | |
44 | all-local: | |
45 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
cdbfb1b9 | 46 | for script in $(COPYSCRIPTS); do \ |
c83e7ca0 DG |
47 | cp -f $(srcdir)/$$script $(builddir); \ |
48 | done; \ | |
49 | fi | |
50 | ||
51 | clean-local: | |
52 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
cdbfb1b9 | 53 | for script in $(COPYSCRIPTS); do \ |
c83e7ca0 DG |
54 | rm -f $(builddir)/$$script; \ |
55 | done; \ | |
56 | fi |