summaryrefslogtreecommitdiff
path: root/cpp/examples/Makefile.am
blob: 9bd8376644f71634465428b98e38411cb8be987a (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

nobase_pkgdata_DATA=						\
	examples/Makefile					\
	examples/request-response/client.cpp			\
	examples/request-response/server.cpp			\
	examples/request-response/Makefile			\
	examples/fanout/Makefile				\
	examples/fanout/fanout_config_queues.cpp		\
	examples/fanout/listener.cpp				\
	examples/fanout/fanout_publisher.cpp			\
	examples/pub-sub/Makefile				\
	examples/pub-sub/topic_publisher.cpp			\
	examples/pub-sub/topic_listener.cpp			\
	examples/direct/Makefile				\
	examples/direct/direct_publisher.cpp			\
	examples/direct/direct_persistent_config_queues.cpp	\
	examples/direct/listener.cpp				\
	examples/direct/direct_config_queues.cpp		\
	examples/direct/direct_persistent_publisher.cpp

EXTRA_DIST=$(nobase_pkgdata_DATA)

# Note: we don't use normal automake SUBDIRS because the example
# makefiles don't understand all the recursive automake targets.

clean:
	cd examples; $(MAKE) clean

# Build the installed examples, then clean up to avoid rpmbuild warnings.
EXAMPLE_FLAGS=-I$(DESTDIR)$(includedir) -L$(DESTDIR)$(libdir) -Wl,-rpath,$(DESTDIR)$(libdir)
EXAMPLE_DIR=$(DESTDIR)$(pkgdatadir)/examples 
installcheck-local:
	cd $(EXAMPLE_DIR) && $(MAKE) CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" all
	cd $(EXAMPLE_DIR) && $(abs_srcdir)/verify
	cd $(EXAMPLE_DIR) && $(MAKE) clean