From c20d7eddc08de878a5407f03e0cd984f60262995 Mon Sep 17 00:00:00 2001 From: Steven Shaw Date: Thu, 7 Dec 2006 20:07:19 +0000 Subject: New make-dist script and related files. Just a hack for now to build a binary dev release. Also updated README-dev with correct automake version and note about configuring cppunit git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@483638 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/tests/examples.Makefile | 66 +++++++++++++++++++++++++++++++++++++++++++++ cpp/tests/examples.README | 18 +++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 cpp/tests/examples.Makefile create mode 100644 cpp/tests/examples.README (limited to 'cpp/tests') diff --git a/cpp/tests/examples.Makefile b/cpp/tests/examples.Makefile new file mode 100644 index 0000000000..45999f7852 --- /dev/null +++ b/cpp/tests/examples.Makefile @@ -0,0 +1,66 @@ +# +# XXX: Edit these locations to suit. +# +BOOST_LOCATION := $(HOME)/local/boost-1.33.1 +APR_LOCATION := $(HOME)/local/apr-1.2.7 + +CXXFLAGS := -DNDEBUG -DUSE_APR -MMD -fpic + +# +# Configure Boost. +# +BOOST_CFLAGS := -I$(BOOST_LOCATION)/include/boost-1_33_1 +CXXFLAGS := $(CXXFLAGS) $(BOOST_CFLAGS) + +# +# Configure APR. +# +APR_CFLAGS := -I$(APR_LOCATION)/include/apr-1 +APR_LDFLAGS := $(shell $(APR_LOCATION)/bin/apr-1-config --libs) -L$(APR_LOCATION)/lib -lapr-1 +CXXFLAGS := $(CXXFLAGS) $(APR_CFLAGS) +LDFLAGS := $(LDFLAGS) $(APR_LDFLAGS) + +# +# Configure Qpid cpp client. +# +QPID_CLIENT_LDFLAGS := ../lib/libcommon.so ../lib/libclient.so +includeDir := ../include +QPID_CLIENT_CFLAGS := \ + -I$(includeDir)/gen \ + -I$(includeDir)/client \ + -I$(includeDir)/broker \ + -I$(includeDir)/common \ + -I$(includeDir)/common/sys \ + -I$(includeDir)/common/framing + +CXXFLAGS := $(CXXFLAGS) $(QPID_CLIENT_CFLAGS) +LDFLAGS := $(LDFLAGS) $(QPID_CLIENT_LDFLAGS) + +CXX := g++ + +# +# Add rule to build examples. +# +.SUFFIX: .cpp +%: %.cpp + $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ + +# +# Define targets. +# + +EXAMPLES := client_test topic_listener topic_publisher echo_service + +cppFiles := $(wildcard *.cpp) +programs = $(foreach cppFile, $(cppFiles), $(subst .cpp, ,$(cppFile))) + +.PHONY: +all: $(programs) + +debug: + @echo cppFiles = $(cppFiles) + @echo programs = $(programs) + +.PHONY: +clean: + -rm $(EXAMPLES) diff --git a/cpp/tests/examples.README b/cpp/tests/examples.README new file mode 100644 index 0000000000..65f908c249 --- /dev/null +++ b/cpp/tests/examples.README @@ -0,0 +1,18 @@ +Building the examples +--------------------- + +You had better edit the Makefile and provide the locations for APR and boost. + +Then just type 'make'. + + +Running the examples +-------------------- + +Before running the examples ensure that you have setup your LD_LIBRARY_PATH. + +Most of the examples take the following connection parameters for your +AMQP broker: + + -host host + -port port -- cgit v1.2.1