summaryrefslogtreecommitdiff
path: root/cpp/test/client/Makefile.cppclient.examples
blob: bcdb09d2a17a851f91e7bf7e55f8a31dd8f274cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# This Makefile is intended to work in the RHEL3 release structure.
# It is a simple example to get users up and running.
#

CXXFLAGS := -DNDEBUG -DUSE_APR -MMD -fpic

#
# Configure Boost.
#
BOOST_LOCATION := ../lib/boost-1.33.1
BOOST_CFLAGS := -I$(BOOST_LOCATION)/include/boost-1_33_1

CXXFLAGS := $(CXXFLAGS) $(BOOST_CFLAGS)

#
# Configure APR.
#
APR_LOCATION := ../lib/apr-1.2.7
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/libqpid_common.so.1.0 ../lib/libqpid_client.so.1.0
QPID_CLIENT_CFLAGS := -I../include

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

.PHONY:
all: $(EXAMPLES)

.PHONY:
clean:
	-rm $(EXAMPLES)