Tests: Add "linking" ust regression test
[lttng-tools.git] / tests / regression / ust / linking / Makefile.am
CommitLineData
91c75285
JG
1# -Wsystem-headers is needed to print warnings in the tracepoint
2# description file.
3AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include -Wsystem-headers
4
5# Set LIBS to nothing so the application does not link on useless
6# libraries.
7LIBS =
8
9# Build a version of the test app with built-in tracepoints
10demo_builtin_SOURCES = demo.c tp.c tp2.c tp3.c ust_tests_demo.h \
11 ust_tests_demo2.h ust_tests_demo3.h
12demo_builtin_LDADD = -llttng-ust
13demo_builtin_CFLAGS = -Werror=old-style-definition
14
15# Build a version statically linked to the providers
16# contains ust_tests_demo.h and ust_tests_demo2.h provider probes
17noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo-static.la \
18 liblttng-ust-provider-ust-tests-demo3-static.la
19
20liblttng_ust_provider_ust_tests_demo_static_la_SOURCES = \
21 tp.c ust_tests_demo.h \
22 tp2.c ust_tests_demo2.h
23liblttng_ust_provider_ust_tests_demo_static_la_LIBADD = \
24 -llttng-ust
25
26# contains ust_tests_demo3.h provider probes
27liblttng_ust_provider_ust_tests_demo3_static_la_SOURCES = \
28 tp3.c ust_tests_demo3.h
29liblttng_ust_provider_ust_tests_demo3_static_la_LIBADD = \
30 -llttng-ust
31
32demo_static_SOURCES = demo.c
33demo_static_LDADD = liblttng-ust-provider-ust-tests-demo-static.la \
34 liblttng-ust-provider-ust-tests-demo3-static.la
35
36if LTTNG_TOOLS_BUILD_WITH_LIBDL
37demo_builtin_LDADD += -ldl
38demo_static_LDADD += -ldl
39endif
40if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
41demo_builtin_LDADD += -lc
42demo_static_LDADD += -lc
43endif
44
45noinst_PROGRAMS = demo_builtin demo_static
46
47if !NO_SHARED
48# Force the shared flag on the noinst libraries since they are
49# only built static by default
50FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
51 -rpath $(abs_builddir)
52
53noinst_LTLIBRARIES += liblttng-ust-provider-ust-tests-demo.la \
54 liblttng-ust-provider-ust-tests-demo3.la
55
56#contains ust_tests_demo.h and ust_tests_demo2.h provider probes
57liblttng_ust_provider_ust_tests_demo_la_SOURCES = \
58 tp.c ust_tests_demo.h \
59 tp2.c ust_tests_demo2.h
60liblttng_ust_provider_ust_tests_demo_la_LIBADD = -llttng-ust
61liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = \
62 $(FORCE_SHARED_LIB_OPTIONS)
63
64#contains ust_tests_demo3.h provider probes
65liblttng_ust_provider_ust_tests_demo3_la_SOURCES = \
66 tp3.c ust_tests_demo3.h
67liblttng_ust_provider_ust_tests_demo3_la_LIBADD = -llttng-ust
68liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = \
69 $(FORCE_SHARED_LIB_OPTIONS)
70
71noinst_PROGRAMS += demo
72demo_SOURCES = demo.c ust_tests_demo.h
73demo_CFLAGS = -DTEST_DYNAMIC_LINKAGE
74
75if LTTNG_TOOLS_BUILD_WITH_LIBDL
76demo_LDADD = -ldl
77endif
78if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
79demo_LDADD = -lc
80endif
81
82endif
83
84noinst_SCRIPTS = test_linking test_linking.py demo_preload
85EXTRA_DIST = test_linking test_linking.py demo_preload
This page took 0.029668 seconds and 5 git commands to generate.