| 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 | |
| 7 | dist_doc_examples_DATA = README |
| 8 | |
| 9 | dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \ |
| 10 | easy-ust/sample.c \ |
| 11 | easy-ust/sample_component_provider.h easy-ust/tp.c |
| 12 | |
| 13 | dist_doc_examples_gen_tp_DATA = gen-tp/Makefile \ |
| 14 | gen-tp/sample.c gen-tp/sample_tracepoint.tp |
| 15 | |
| 16 | dist_doc_examples_demo_DATA = demo/demo.c \ |
| 17 | demo/demo-trace \ |
| 18 | demo/Makefile \ |
| 19 | demo/README \ |
| 20 | demo/tp2.c \ |
| 21 | demo/tp3.c \ |
| 22 | demo/tp.c \ |
| 23 | demo/ust_tests_demo2.h \ |
| 24 | demo/ust_tests_demo3.h \ |
| 25 | demo/ust_tests_demo.h |
| 26 | |
| 27 | dist_doc_examples_hello_static_lib_DATA = hello-static-lib/Makefile \ |
| 28 | hello-static-lib/hello.c \ |
| 29 | hello-static-lib/README \ |
| 30 | hello-static-lib/ust_tests_hello.h \ |
| 31 | hello-static-lib/tp.c |
| 32 | |
| 33 | if NO_SHARED |
| 34 | # Don't build examples if shared libraries support was explicitly |
| 35 | # disabled. |
| 36 | else |
| 37 | # Copies are for VPATH build support |
| 38 | SUBDIRS_PROXY = easy-ust demo gen-tp hello-static-lib |
| 39 | |
| 40 | all-local: |
| 41 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ |
| 42 | cp -f $(srcdir)/Makefile.examples.template $(builddir); \ |
| 43 | for subdir in $(SUBDIRS_PROXY); do \ |
| 44 | cp -fR $(srcdir)/$$subdir $(builddir); \ |
| 45 | done; \ |
| 46 | fi |
| 47 | for subdir in $(SUBDIRS_PROXY); do \ |
| 48 | (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; \ |
| 49 | done |
| 50 | |
| 51 | clean-local: |
| 52 | for subdir in $(SUBDIRS_PROXY); do \ |
| 53 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ |
| 54 | done |
| 55 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ |
| 56 | for subdir in $(SUBDIRS_PROXY); do \ |
| 57 | rm -rf $(builddir)/$$subdir; \ |
| 58 | done; \ |
| 59 | rm -f $(builddir)/Makefile.examples.template; \ |
| 60 | fi |
| 61 | endif |