Commit | Line | Data |
---|---|---|
a106a9f8 | 1 | doc_examplesdir = ${docdir}/examples |
7ccf75d3 MD |
2 | doc_examples_easy_ustdir = ${docdir}/examples/easy-ust |
3 | doc_examples_gen_tpdir = ${docdir}/examples/gen-tp | |
60302adc | 4 | doc_examples_demodir = ${docdir}/examples/demo |
a106a9f8 JG |
5 | doc_examples_hello_static_libdir = ${docdir}/examples/hello-static-lib |
6 | ||
7 | dist_doc_examples_DATA = README | |
7ccf75d3 MD |
8 | |
9 | dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \ | |
10 | easy-ust/sample.c \ | |
11 | easy-ust/sample_component_provider.h easy-ust/tp.c | |
12 | ||
13 | dist_doc_examples_gen_tp_DATA = gen-tp/Makefile \ | |
14 | gen-tp/sample.c gen-tp/sample_tracepoint.tp | |
60302adc JG |
15 | |
16 | dist_doc_examples_demo_DATA = demo/demo.c \ | |
17 | demo/demo-trace \ | |
18 | demo/Makefile \ | |
19 | demo/README \ | |
20 | demo/tp2.c \ | |
21 | demo/tp3.c \ | |
22 | demo/tp.c \ | |
23 | demo/ust_tests_demo2.h \ | |
24 | demo/ust_tests_demo3.h \ | |
25 | demo/ust_tests_demo.h | |
a106a9f8 JG |
26 | |
27 | dist_doc_examples_hello_static_lib_DATA = hello-static-lib/Makefile \ | |
28 | hello-static-lib/hello.c \ | |
29 | hello-static-lib/README \ | |
30 | hello-static-lib/ust_tests_hello.h \ | |
31 | hello-static-lib/tp.c | |
32 | ||
92414a62 MD |
33 | if NO_SHARED |
34 | # Don't build examples if shared libraries support was explicitly | |
35 | # disabled. | |
36 | else | |
37 | # Copies are for VPATH build support | |
38 | SUBDIRS_PROXY = easy-ust demo gen-tp hello-static-lib | |
39 | ||
40 | all-local: | |
41 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
92414a62 MD |
42 | for subdir in $(SUBDIRS_PROXY); do \ |
43 | cp -fR $(srcdir)/$$subdir $(builddir); \ | |
44 | done; \ | |
b004ba65 MD |
45 | fi; \ |
46 | if [ x"$(shell echo "$(top_srcdir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
47 | echo "Examples: absolute top_srcdir path $(top_srcdir)"; \ | |
48 | rel_src_subdir=""; \ | |
49 | else \ | |
50 | echo "Examples: relative top_srcdir path $(top_srcdir)"; \ | |
51 | rel_src_subdir="../"; \ | |
52 | fi; \ | |
53 | if [ x"$(shell echo "$(top_builddir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
54 | echo "Examples: absolute top_builddir path $(top_builddir)"; \ | |
55 | rel_build_subdir=""; \ | |
56 | else \ | |
57 | echo "Examples: relative top_builddir path $(top_builddir)"; \ | |
58 | rel_build_subdir="../"; \ | |
59 | fi; \ | |
92414a62 | 60 | for subdir in $(SUBDIRS_PROXY); do \ |
b004ba65 | 61 | (cd $$subdir && $(MAKE) AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../liblttng-ust/.libs/ -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ |
92414a62 MD |
62 | done |
63 | ||
64 | clean-local: | |
b004ba65 MD |
65 | @for subdir in $(SUBDIRS_PROXY); do \ |
66 | if [ -d $$subdir ]; then \ | |
67 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ | |
68 | fi; \ | |
69 | done; \ | |
70 | if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
92414a62 MD |
71 | for subdir in $(SUBDIRS_PROXY); do \ |
72 | rm -rf $(builddir)/$$subdir; \ | |
73 | done; \ | |
b004ba65 | 74 | fi; |
92414a62 | 75 | endif |