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 | 5 | doc_examples_hello_static_libdir = ${docdir}/examples/hello-static-lib |
af9f5e3c | 6 | doc_examples_demo_tracefdir = ${docdir}/examples/demo-tracef |
a106a9f8 | 7 | |
849202d4 DG |
8 | if BUILD_JNI_INTERFACE |
9 | doc_examples_java_juldir = ${docdir}/examples/java-jul | |
10 | dist_doc_examples_java_jul_DATA = java-jul/Makefile \ | |
11 | java-jul/Hello.java \ | |
12 | java-jul/run | |
13 | SUBDIRS_JUL = java-jul | |
849202d4 DG |
14 | endif |
15 | ||
a106a9f8 | 16 | dist_doc_examples_DATA = README |
7ccf75d3 MD |
17 | |
18 | dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \ | |
19 | easy-ust/sample.c \ | |
20 | easy-ust/sample_component_provider.h easy-ust/tp.c | |
21 | ||
22 | dist_doc_examples_gen_tp_DATA = gen-tp/Makefile \ | |
23 | gen-tp/sample.c gen-tp/sample_tracepoint.tp | |
60302adc JG |
24 | |
25 | dist_doc_examples_demo_DATA = demo/demo.c \ | |
26 | demo/demo-trace \ | |
27 | demo/Makefile \ | |
28 | demo/README \ | |
29 | demo/tp2.c \ | |
30 | demo/tp3.c \ | |
31 | demo/tp.c \ | |
32 | demo/ust_tests_demo2.h \ | |
33 | demo/ust_tests_demo3.h \ | |
34 | demo/ust_tests_demo.h | |
a106a9f8 JG |
35 | |
36 | dist_doc_examples_hello_static_lib_DATA = hello-static-lib/Makefile \ | |
37 | hello-static-lib/hello.c \ | |
38 | hello-static-lib/README \ | |
39 | hello-static-lib/ust_tests_hello.h \ | |
40 | hello-static-lib/tp.c | |
41 | ||
af9f5e3c MD |
42 | dist_doc_examples_demo_tracef_DATA = demo-tracef/Makefile \ |
43 | demo-tracef/demo-tracef.c \ | |
44 | demo-tracef/README | |
45 | ||
92414a62 MD |
46 | if NO_SHARED |
47 | # Don't build examples if shared libraries support was explicitly | |
48 | # disabled. | |
49 | else | |
50 | # Copies are for VPATH build support | |
641c659a | 51 | SUBDIRS_PROXY = easy-ust demo hello-static-lib demo-tracef |
2b90f1d3 JG |
52 | |
53 | if BUILD_GEN_TP_EXAMPLES | |
54 | SUBDIRS_PROXY += gen-tp | |
55 | endif | |
92414a62 MD |
56 | |
57 | all-local: | |
58 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
849202d4 | 59 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \ |
92414a62 MD |
60 | cp -fR $(srcdir)/$$subdir $(builddir); \ |
61 | done; \ | |
0faf99b8 MD |
62 | fi; \ |
63 | if [ x"$(shell echo "$(top_srcdir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
64 | echo "Examples: absolute top_srcdir path $(top_srcdir)"; \ | |
65 | rel_src_subdir=""; \ | |
66 | else \ | |
67 | echo "Examples: relative top_srcdir path $(top_srcdir)"; \ | |
68 | rel_src_subdir="../"; \ | |
69 | fi; \ | |
70 | if [ x"$(shell echo "$(top_builddir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
71 | echo "Examples: absolute top_builddir path $(top_builddir)"; \ | |
72 | rel_build_subdir=""; \ | |
73 | else \ | |
74 | echo "Examples: relative top_builddir path $(top_builddir)"; \ | |
75 | rel_build_subdir="../"; \ | |
76 | fi; \ | |
92414a62 | 77 | for subdir in $(SUBDIRS_PROXY); do \ |
4de5e077 | 78 | (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/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ |
0faf99b8 MD |
79 | done; \ |
80 | if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ | |
849202d4 DG |
81 | for subdir in $(SUBDIRS_JUL); do \ |
82 | (cd $(SUBDIRS_JUL) && $(MAKE) JAVA_CLASSPATH_OVERRIDE="../../../liblttng-ust-jul" JAVA_JARFILE_OVERRIDE="liblttng-ust-jul.jar" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ | |
83 | done; \ | |
0faf99b8 | 84 | fi; |
92414a62 MD |
85 | |
86 | clean-local: | |
0faf99b8 MD |
87 | @for subdir in $(SUBDIRS_PROXY); do \ |
88 | if [ -d $$subdir ]; then \ | |
849202d4 | 89 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ |
0faf99b8 MD |
90 | fi; \ |
91 | done; \ | |
92 | if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ | |
93 | for subdir in $(SUBDIRS_JUL); do \ | |
94 | if [ -d $$subdir ]; then \ | |
95 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ | |
96 | fi; \ | |
849202d4 | 97 | done; \ |
0faf99b8 MD |
98 | fi; \ |
99 | if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
849202d4 | 100 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \ |
92414a62 MD |
101 | rm -rf $(builddir)/$$subdir; \ |
102 | done; \ | |
0faf99b8 | 103 | fi; |
92414a62 | 104 | endif |