Fix: examples Makefile on FreeBSD
[urcu.git] / doc / examples / Makefile.am
index 4583b5bdf1884605603ac1f66d56c2c6f0212d36..6f427c08c55aa460299770f3056599d36ed9550f 100644 (file)
@@ -1,12 +1,24 @@
-SUBDIRS = qsbr-minimal
-
 doc_examplesdir = ${docdir}/examples
 
 doc_examples_qsbr_minimaldir = ${doc_examplesdir}/qsbr-minimal
 
-doc_examples_qsbr_minimal_DATA = \
+dist_doc_examples_qsbr_minimal_DATA = \
        qsbr-minimal/Makefile \
        qsbr-minimal/qsbr-minimal.c
 
-BUILD_EXAMPLES_FROM_TREE = 1
-export
+if NO_SHARED
+# Don't build examples if shared libraries support was explicitly
+# disabled.
+else
+SUBDIRS_PROXY = qsbr-minimal
+
+all-local:
+       for subdir in $(SUBDIRS_PROXY); do \
+               cd $$subdir && $(MAKE) AM_CPPFLAGS="-I../../../urcu/ -I../../../" AM_LDFLAGS='-L../../../.libs/ -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all; \
+       done
+
+clean-local:
+       for subdir in $(SUBDIRS_PROXY); do \
+               cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean; \
+       done
+endif
This page took 0.022692 seconds and 4 git commands to generate.