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 | ||
849202d4 DG |
7 | if BUILD_JNI_INTERFACE |
8 | doc_examples_java_juldir = ${docdir}/examples/java-jul | |
9 | dist_doc_examples_java_jul_DATA = java-jul/Makefile \ | |
10 | java-jul/Hello.java \ | |
11 | java-jul/run | |
12 | SUBDIRS_JUL = java-jul | |
13 | bin_SCRIPTS = java-jul/Makefile | |
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 | ||
92414a62 MD |
42 | if NO_SHARED |
43 | # Don't build examples if shared libraries support was explicitly | |
44 | # disabled. | |
45 | else | |
46 | # Copies are for VPATH build support | |
47 | SUBDIRS_PROXY = easy-ust demo gen-tp hello-static-lib | |
48 | ||
49 | all-local: | |
50 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
51 | cp -f $(srcdir)/Makefile.examples.template $(builddir); \ | |
849202d4 | 52 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \ |
92414a62 MD |
53 | cp -fR $(srcdir)/$$subdir $(builddir); \ |
54 | done; \ | |
55 | fi | |
56 | for subdir in $(SUBDIRS_PROXY); do \ | |
8975e8f7 | 57 | (cd $$subdir && $(MAKE) AM_CPPFLAGS="$(CPPFLAGS) -I../../../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 | 58 | done |
849202d4 DG |
59 | @if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ |
60 | for subdir in $(SUBDIRS_JUL); do \ | |
61 | (cd $(SUBDIRS_JUL) && $(MAKE) JAVA_CLASSPATH_OVERRIDE="../../../liblttng-ust-jul" JAVA_JARFILE_OVERRIDE="liblttng-ust-jul.jar" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ | |
62 | done; \ | |
63 | fi | |
92414a62 MD |
64 | |
65 | clean-local: | |
66 | for subdir in $(SUBDIRS_PROXY); do \ | |
8975e8f7 | 67 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ |
92414a62 | 68 | done |
849202d4 DG |
69 | @if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ |
70 | for subdir in $(SUBDIRS_JUL); do \ | |
71 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ | |
72 | done; \ | |
73 | fi | |
92414a62 | 74 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ |
849202d4 | 75 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \ |
92414a62 MD |
76 | rm -rf $(builddir)/$$subdir; \ |
77 | done; \ | |
78 | rm -f $(builddir)/Makefile.examples.template; \ | |
79 | fi | |
80 | endif |