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