Fix out-of-tree tests: seek tests can't find traces
[babeltrace.git] / tests / lib / Makefile.am
1 AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/tests/utils
2
3 noinst_LIBRARIES = libtestcommon.a
4
5 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
6
7 libtestcommon_a_SOURCES = common.c common.h
8
9 # -Wl,--no-as-needed is needed for recent gold linker who seems to think
10 # it knows better and considers libraries with constructors having
11 # side-effects as dead code.
12 test_seek_LDFLAGS = $(LD_NO_AS_NEEDED)
13 test_seek_LDADD = $(LIBTAP) libtestcommon.a \
14 $(top_builddir)/lib/libbabeltrace.la \
15 $(top_builddir)/formats/ctf/libbabeltrace-ctf.la
16
17 test_bitfield_LDADD = $(LIBTAP) libtestcommon.a
18
19 test_ctf_writer_LDADD = $(LIBTAP) \
20 $(top_builddir)/lib/libbabeltrace.la \
21 $(top_builddir)/formats/ctf/libbabeltrace-ctf.la
22
23 noinst_PROGRAMS = test_seek test_bitfield test_ctf_writer
24
25 test_seek_SOURCES = test_seek.c
26 test_bitfield_SOURCES = test_bitfield.c
27 test_ctf_writer_SOURCES = test_ctf_writer.c
28
29 SCRIPT_LIST = test_seek_big_trace \
30 test_seek_empty_packet \
31 test_ctf_writer_complete
32 EXTRA_DIST = test_seek_big_trace.in test_seek_empty_packet.in
33
34 if ENABLE_DEBUGINFO
35 test_dwarf_LDFLAGS = -static
36 test_dwarf_LDADD = $(LIBTAP) \
37 $(top_builddir)/lib/libbabeltrace.la \
38 $(top_builddir)/lib/libdebuginfo.la
39 test_dwarf_SOURCES = test_dwarf.c
40
41 test_so_info_LDFLAGS = -static
42 test_so_info_LDADD = $(LIBTAP) \
43 $(top_builddir)/lib/libbabeltrace.la \
44 $(top_builddir)/lib/libdebuginfo.la
45 test_so_info_SOURCES = test_so_info.c
46
47 noinst_PROGRAMS += test_dwarf test_so_info
48 SCRIPT_LIST += test_dwarf_complete test_so_info_complete
49 endif
50
51 dist_noinst_SCRIPTS = $(SCRIPT_LIST)
52
53 all-local:
54 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
55 for script in $(SCRIPT_LIST); do \
56 cp -f $(srcdir)/$$script $(builddir); \
57 done; \
58 fi
59
60 clean-local:
61 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
62 for script in $(SCRIPT_LIST); do \
63 rm -f $(builddir)/$$script; \
64 done; \
65 fi
This page took 0.029738 seconds and 4 git commands to generate.