Gen-ust-events: use options instead of arguments
[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.
343af227 3AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers
91c75285
JG
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
b1c46f87 12demo_builtin_LDADD = -llttng-ust $(DL_LIBS)
343af227 13demo_builtin_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
91c75285
JG
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 \
b1c46f87
MJ
34 liblttng-ust-provider-ust-tests-demo3-static.la \
35 $(DL_LIBS)
91c75285
JG
36
37noinst_PROGRAMS = demo_builtin demo_static
38
cdbfb1b9
MD
39COPYSCRIPTS = test_linking test_linking.py demo_preload
40noinst_SCRIPTS = $(COPYSCRIPTS)
41
42if NO_SHARED
43
44EXTRA_DIST = tp.c ust_tests_demo.h tp2.c ust_tests_demo2.h \
45 tp3.c ust_tests_demo3.h demo.c ust_tests_demo.h \
46 $(COPYSCRIPTS)
47
48else
91c75285
JG
49# Force the shared flag on the noinst libraries since they are
50# only built static by default
51FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
52 -rpath $(abs_builddir)
53
54noinst_LTLIBRARIES += liblttng-ust-provider-ust-tests-demo.la \
55 liblttng-ust-provider-ust-tests-demo3.la
56
57#contains ust_tests_demo.h and ust_tests_demo2.h provider probes
58liblttng_ust_provider_ust_tests_demo_la_SOURCES = \
59 tp.c ust_tests_demo.h \
60 tp2.c ust_tests_demo2.h
61liblttng_ust_provider_ust_tests_demo_la_LIBADD = -llttng-ust
62liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = \
63 $(FORCE_SHARED_LIB_OPTIONS)
64
65#contains ust_tests_demo3.h provider probes
66liblttng_ust_provider_ust_tests_demo3_la_SOURCES = \
67 tp3.c ust_tests_demo3.h
68liblttng_ust_provider_ust_tests_demo3_la_LIBADD = -llttng-ust
69liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = \
70 $(FORCE_SHARED_LIB_OPTIONS)
71
72noinst_PROGRAMS += demo
73demo_SOURCES = demo.c ust_tests_demo.h
343af227 74demo_CFLAGS = -DTEST_DYNAMIC_LINKAGE $(AM_CFLAGS)
b1c46f87 75demo_LDADD = $(DL_LIBS)
91c75285 76
cdbfb1b9 77EXTRA_DIST = $(COPYSCRIPTS)
91c75285 78
cdbfb1b9 79endif
c83e7ca0
DG
80
81all-local:
82 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
cdbfb1b9 83 for script in $(COPYSCRIPTS); do \
c83e7ca0
DG
84 cp -f $(srcdir)/$$script $(builddir); \
85 done; \
86 fi
87
88clean-local:
89 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
cdbfb1b9 90 for script in $(COPYSCRIPTS); do \
c83e7ca0
DG
91 rm -f $(builddir)/$$script; \
92 done; \
93 fi
This page took 0.053885 seconds and 5 git commands to generate.