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