qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r593415 - /incubator/qpid/trunk/qpid/cpp/examples/Makefile.am
Date Fri, 09 Nov 2007 03:32:43 GMT
Author: aconway
Date: Thu Nov  8 19:32:43 2007
New Revision: 593415

URL: http://svn.apache.org/viewvc?rev=593415&view=rev
Log:
Makefile to build/distribute examples.

Modified:
    incubator/qpid/trunk/qpid/cpp/examples/Makefile.am

Modified: incubator/qpid/trunk/qpid/cpp/examples/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/Makefile.am?rev=593415&r1=593414&r2=593415&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/Makefile.am Thu Nov  8 19:32:43 2007
@@ -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
 



Mime
View raw message