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 |
eb8246a0 | 7 | doc_examples_demo_tracelogdir = ${docdir}/examples/demo-tracelog |
f9364363 | 8 | doc_examples_clock_overridedir = ${docdir}/examples/clock-override |
5e1b7b8b | 9 | doc_examples_getcpu_overridedir = ${docdir}/examples/getcpu-override |
5f836e39 | 10 | doc_examples_cmakedir = ${docdir}/examples/cmake-multiple-shared-libraries |
a106a9f8 | 11 | |
be347eb9 | 12 | if BUILD_JAVA_AGENT_WITH_JUL |
849202d4 DG |
13 | doc_examples_java_juldir = ${docdir}/examples/java-jul |
14 | dist_doc_examples_java_jul_DATA = java-jul/Makefile \ | |
501f6777 | 15 | java-jul/Hello.java \ |
7b250cea | 16 | java-jul/run \ |
cf6634ba | 17 | java-jul/ApplicationContextExample.java \ |
7b250cea MD |
18 | java-jul/FilterChangeListenerExample.java \ |
19 | java-jul/README | |
849202d4 | 20 | SUBDIRS_JUL = java-jul |
849202d4 DG |
21 | endif |
22 | ||
be347eb9 MJ |
23 | if BUILD_JAVA_AGENT_WITH_LOG4J |
24 | doc_examples_java_log4jdir = ${docdir}/examples/java-log4j | |
25 | dist_doc_examples_java_log4j_DATA = java-log4j/Makefile \ | |
26 | java-log4j/Hello.java \ | |
27 | java-log4j/run | |
28 | SUBDIRS_LOG4J = java-log4j | |
29 | endif | |
30 | ||
37258731 PP |
31 | if BUILD_PYTHON_AGENT |
32 | doc_examples_pythondir = ${docdir}/examples/python | |
33 | dist_doc_examples_python_DATA = python/hello.py | |
34 | endif | |
35 | ||
5f836e39 | 36 | if HAVE_CMAKE |
ebb9f8ff | 37 | if CXX_WORKS |
5f836e39 SB |
38 | SUBDIRS_CMAKE = cmake-multiple-shared-libraries |
39 | endif | |
40 | endif | |
41 | ||
a106a9f8 | 42 | dist_doc_examples_DATA = README |
7ccf75d3 MD |
43 | |
44 | dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \ | |
45 | easy-ust/sample.c \ | |
46 | easy-ust/sample_component_provider.h easy-ust/tp.c | |
47 | ||
5f836e39 SB |
48 | dist_doc_examples_cmake_DATA = \ |
49 | cmake-multiple-shared-libraries/CMakeLists.txt \ | |
50 | cmake-multiple-shared-libraries/cmake/FindLTTngUST.cmake \ | |
51 | cmake-multiple-shared-libraries/aligner.cpp \ | |
52 | cmake-multiple-shared-libraries/aligner-lib.cpp \ | |
53 | cmake-multiple-shared-libraries/aligner-lib.h \ | |
54 | cmake-multiple-shared-libraries/README.md \ | |
55 | cmake-multiple-shared-libraries/tester.cpp \ | |
56 | cmake-multiple-shared-libraries/tester-lib.cpp \ | |
57 | cmake-multiple-shared-libraries/tester-lib.h \ | |
58 | cmake-multiple-shared-libraries/tracepoint-provider.cpp \ | |
59 | cmake-multiple-shared-libraries/tracepoint-provider.h \ | |
60 | cmake-multiple-shared-libraries/trace.sh | |
61 | ||
7ccf75d3 MD |
62 | dist_doc_examples_gen_tp_DATA = gen-tp/Makefile \ |
63 | gen-tp/sample.c gen-tp/sample_tracepoint.tp | |
60302adc JG |
64 | |
65 | dist_doc_examples_demo_DATA = demo/demo.c \ | |
66 | demo/demo-trace \ | |
67 | demo/Makefile \ | |
68 | demo/README \ | |
69 | demo/tp2.c \ | |
70 | demo/tp3.c \ | |
71 | demo/tp.c \ | |
72 | demo/ust_tests_demo2.h \ | |
73 | demo/ust_tests_demo3.h \ | |
74 | demo/ust_tests_demo.h | |
a106a9f8 JG |
75 | |
76 | dist_doc_examples_hello_static_lib_DATA = hello-static-lib/Makefile \ | |
77 | hello-static-lib/hello.c \ | |
78 | hello-static-lib/README \ | |
79 | hello-static-lib/ust_tests_hello.h \ | |
80 | hello-static-lib/tp.c | |
81 | ||
af9f5e3c MD |
82 | dist_doc_examples_demo_tracef_DATA = demo-tracef/Makefile \ |
83 | demo-tracef/demo-tracef.c \ | |
43eeccf8 | 84 | demo-tracef/demo-vtracef.c \ |
af9f5e3c MD |
85 | demo-tracef/README |
86 | ||
eb8246a0 MD |
87 | dist_doc_examples_demo_tracelog_DATA = demo-tracelog/Makefile \ |
88 | demo-tracelog/demo-tracelog.c \ | |
c7193abd | 89 | demo-tracelog/demo-vtracelog.c \ |
eb8246a0 MD |
90 | demo-tracelog/README |
91 | ||
f9364363 MD |
92 | dist_doc_examples_clock_override_DATA = clock-override/Makefile \ |
93 | clock-override/lttng-ust-clock-override-example.c \ | |
94 | clock-override/run-clock-override \ | |
95 | clock-override/README | |
96 | ||
5e1b7b8b MD |
97 | dist_doc_examples_getcpu_override_DATA = getcpu-override/Makefile \ |
98 | getcpu-override/lttng-ust-getcpu-override-example.c \ | |
99 | getcpu-override/run-getcpu-override \ | |
100 | getcpu-override/README | |
101 | ||
92414a62 | 102 | # Copies are for VPATH build support |
5e1b7b8b | 103 | SUBDIRS_PROXY = easy-ust demo hello-static-lib demo-tracef clock-override \ |
eb8246a0 | 104 | getcpu-override demo-tracelog |
2b90f1d3 JG |
105 | |
106 | if BUILD_GEN_TP_EXAMPLES | |
107 | SUBDIRS_PROXY += gen-tp | |
108 | endif | |
92414a62 MD |
109 | |
110 | all-local: | |
dc5af9e3 | 111 | $(AM_V_at)if [ x"$(srcdir)" != x"$(builddir)" ]; then \ |
5f836e39 | 112 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J) $(SUBDIRS_CMAKE); do \ |
a41cceb9 | 113 | cp -pfR $(srcdir)/$$subdir $(builddir); \ |
c8ab8d34 | 114 | chmod -R u+w $(builddir)/$$subdir; \ |
92414a62 | 115 | done; \ |
0faf99b8 MD |
116 | fi; \ |
117 | if [ x"$(shell echo "$(top_srcdir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
0faf99b8 MD |
118 | rel_src_subdir=""; \ |
119 | else \ | |
0faf99b8 MD |
120 | rel_src_subdir="../"; \ |
121 | fi; \ | |
122 | if [ x"$(shell echo "$(top_builddir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
0faf99b8 MD |
123 | rel_build_subdir=""; \ |
124 | else \ | |
0faf99b8 MD |
125 | rel_build_subdir="../"; \ |
126 | fi; \ | |
92414a62 | 127 | for subdir in $(SUBDIRS_PROXY); do \ |
54435b75 SM |
128 | ( \ |
129 | cd $$subdir && \ | |
130 | $(MAKE) all \ | |
131 | AR="$(AR)" \ | |
132 | CC="$(CC)" \ | |
133 | CPPFLAGS="$(CPPFLAGS)" \ | |
134 | AM_CPPFLAGS="$(AM_CPPFLAGS) \ | |
135 | -I$$rel_src_subdir$(top_srcdir)/include/ \ | |
136 | -I$$rel_build_subdir$(top_builddir)/include/" \ | |
137 | CFLAGS='$(CFLAGS)' \ | |
138 | AM_CFLAGS='$(AM_CFLAGS)' \ | |
139 | LDFLAGS="$(LDFLAGS)" \ | |
140 | AM_LDFLAGS='$(AM_LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' \ | |
141 | LTTNG_GEN_TP_PATH="../../../tools/" \ | |
142 | AM_V_P="$(AM_V_P)" \ | |
143 | AM_V_at="$(AM_V_at)" \ | |
144 | $(AM_MAKEFLAGS) \ | |
145 | ) || exit 1; \ | |
0faf99b8 MD |
146 | done; \ |
147 | if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ | |
849202d4 | 148 | for subdir in $(SUBDIRS_JUL); do \ |
54435b75 SM |
149 | ( \ |
150 | cd $$subdir && \ | |
151 | $(MAKE) all \ | |
b1035e61 | 152 | CLASSPATH="$(CLASSPATH)" \ |
54435b75 SM |
153 | JAVA_CLASSPATH_OVERRIDE_JUL="../../../liblttng-ust-java-agent/java/lttng-ust-agent-jul" \ |
154 | JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" \ | |
b6b4fee0 | 155 | $(AM_MAKEFLAGS) \ |
54435b75 | 156 | ) || exit 1; \ |
849202d4 | 157 | done; \ |
be347eb9 MJ |
158 | fi; \ |
159 | if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \ | |
160 | for subdir in $(SUBDIRS_LOG4J); do \ | |
54435b75 SM |
161 | ( \ |
162 | cd $$subdir && \ | |
163 | $(MAKE) all \ | |
b1035e61 | 164 | CLASSPATH="$(CLASSPATH)" \ |
54435b75 SM |
165 | JAVA_CLASSPATH_OVERRIDE_LOG4J="../../../liblttng-ust-java-agent/java/lttng-ust-agent-log4j" \ |
166 | JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" \ | |
167 | $(AM_MAKEFLAGS) \ | |
168 | ) || exit 1; \ | |
be347eb9 | 169 | done; \ |
e5b701c8 | 170 | fi; \ |
5f836e39 SB |
171 | if [ x"$(SUBDIRS_CMAKE)" != x"" ]; then \ |
172 | for subdir in $(SUBDIRS_CMAKE); do \ | |
068160b1 | 173 | ( \ |
e5b701c8 | 174 | cd $$subdir && \ |
4c70c05c | 175 | $(MKDIR_P) build && \ |
068160b1 | 176 | cd build && \ |
8aeb3cae | 177 | AR="$(AR)" \ |
54435b75 SM |
178 | CC="$(CC)" \ |
179 | CXX="$(CXX)" \ | |
180 | cmake \ | |
181 | -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \ | |
182 | -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" \ | |
fb54defd MJ |
183 | -DCMAKE_C_FLAGS="$(AM_CFLAGS) $(CPPFLAGS) $(CFLAGS)" \ |
184 | -DCMAKE_CXX_FLAGS="$(AM_CXXFLAGS) $(CXXFLAGS) $(CPPFLAGS)" \ | |
54435b75 SM |
185 | -DCMAKE_EXE_LINKER_FLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \ |
186 | .. && \ | |
187 | $(MAKE) \ | |
068160b1 | 188 | ) || exit 1; \ |
5f836e39 SB |
189 | done; \ |
190 | fi; | |
191 | ||
92414a62 MD |
192 | |
193 | clean-local: | |
dc5af9e3 | 194 | $(AM_V_at)for subdir in $(SUBDIRS_PROXY); do \ |
0faf99b8 | 195 | if [ -d $$subdir ]; then \ |
849202d4 | 196 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ |
0faf99b8 MD |
197 | fi; \ |
198 | done; \ | |
199 | if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ | |
200 | for subdir in $(SUBDIRS_JUL); do \ | |
201 | if [ -d $$subdir ]; then \ | |
202 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ | |
203 | fi; \ | |
849202d4 | 204 | done; \ |
0faf99b8 | 205 | fi; \ |
be347eb9 MJ |
206 | if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \ |
207 | for subdir in $(SUBDIRS_LOG4J); do \ | |
208 | if [ -d $$subdir ]; then \ | |
209 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ | |
210 | fi; \ | |
211 | done; \ | |
212 | fi; \ | |
5f836e39 SB |
213 | if [ x"$(SUBDIRS_CMAKE)" != x"" ]; then \ |
214 | for subdir in $(SUBDIRS_CMAKE); do \ | |
215 | if [ -d $$subdir ]; then \ | |
216 | (cd $$subdir && rm -rf build && cd ..) || exit 1; \ | |
217 | fi; \ | |
218 | done; \ | |
219 | fi; \ | |
0faf99b8 | 220 | if [ x"$(srcdir)" != x"$(builddir)" ]; then \ |
5f836e39 | 221 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J) $(SUBDIRS_CMAKE); do \ |
92414a62 MD |
222 | rm -rf $(builddir)/$$subdir; \ |
223 | done; \ | |
0faf99b8 | 224 | fi; |