summaryrefslogtreecommitdiff
path: root/cpp/examples/Makefile.am
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-11-09 03:32:43 +0000
committerAlan Conway <aconway@apache.org>2007-11-09 03:32:43 +0000
commita76aa420daf20d4f575d88182ef9cfec87bdb51b (patch)
treee5da659ad3e1029db7f5a6eb42b1cfeaa7b38aa8 /cpp/examples/Makefile.am
parentefb5b0171cd6049db8fdd2aa3f9546c65be19852 (diff)
downloadqpid-python-a76aa420daf20d4f575d88182ef9cfec87bdb51b.tar.gz
Makefile to build/distribute examples.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@593415 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/examples/Makefile.am')
-rw-r--r--cpp/examples/Makefile.am22
1 files changed, 13 insertions, 9 deletions
diff --git a/cpp/examples/Makefile.am b/cpp/examples/Makefile.am
index 955411ab98..3836665c35 100644
--- a/cpp/examples/Makefile.am
+++ b/cpp/examples/Makefile.am
@@ -1,14 +1,18 @@
-noinst_PROGRAMS=create_queue topic_listener topic_publisher
-INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/src/gen -I$(top_builddir)src/gen
-lib_client = $(top_builddir)/src/libqpidclient.la
+# Note: we don't use normal automake SUBDIRS because the example
+# makefiles are don't understand all automake targets.
+EXAMPLE_DIRS=direct fanout pub-sub request-response
+src=../$(top_srcdir)/src
+bld=../$(top_builddir)/src
+EXAMPLE_FLAGS=-I$(src) -I$(src)/gen -I$(bld)/gen -L$(bld)/.libs
-create_queue_LDADD=$(lib_client)
-create_queue_SOURCES=create_queue.cpp
+all:
+ for d in $(EXAMPLE_DIRS); do ( cd $$d; make CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" $@; ) ; done
-topic_listener_LDADD=$(lib_client)
-topic_listener_SOURCES=topic_listener.cpp
+clean:
+ for d in $(EXAMPLE_DIRS); do ( cd $$d; make $@; ) ; done
+
+dist-hook: clean
+ cp --parents `find $(EXAMPLE_DIRS) -name Makefile -o -name '*.cpp'` $(distdir)
-topic_publisher_LDADD=$(lib_client)
-topic_publisher_SOURCES=topic_publisher.cpp