diff options
author | Steven Shaw <steshaw@apache.org> | 2006-12-07 20:07:19 +0000 |
---|---|---|
committer | Steven Shaw <steshaw@apache.org> | 2006-12-07 20:07:19 +0000 |
commit | 8a36ee812b3c2fb80249a2f470810725e72866ad (patch) | |
tree | f1bcd3de3bde8cbccc30ef142311ce0351064e0f /qpid/cpp/tests | |
parent | 257503fa74231c8a48015250635d4d547777315f (diff) | |
download | qpid-python-8a36ee812b3c2fb80249a2f470810725e72866ad.tar.gz |
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@483638 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/tests')
-rw-r--r-- | qpid/cpp/tests/examples.Makefile | 66 | ||||
-rw-r--r-- | qpid/cpp/tests/examples.README | 18 |
2 files changed, 84 insertions, 0 deletions
diff --git a/qpid/cpp/tests/examples.Makefile b/qpid/cpp/tests/examples.Makefile new file mode 100644 index 0000000000..45999f7852 --- /dev/null +++ b/qpid/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/qpid/cpp/tests/examples.README b/qpid/cpp/tests/examples.README new file mode 100644 index 0000000000..65f908c249 --- /dev/null +++ b/qpid/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 |