-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.am
93 lines (77 loc) · 2.82 KB
/
Makefile.am
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# For using custom m4 macros
ACLOCAL_AMFLAGS = -I m4
# Compiler build flags
AM_CPPFLAGS = -I${top_srcdir}/src ${NANOMSG_CFLAGS}
# Build rules for nanomsgpp library
pkginclude_HEADERS = \
src/nanomsgpp/nanomsgpp.hpp
lib_LTLIBRARIES = \
src/nanomsgpp/libnanomsgpp.la
src_nanomsgpp_libnanomsgpp_la_SOURCES = \
src/nanomsgpp/device.hpp \
src/nanomsgpp/device.cpp \
src/nanomsgpp/exception.hpp \
src/nanomsgpp/exception.cpp \
src/nanomsgpp/message.hpp \
src/nanomsgpp/message.cpp \
src/nanomsgpp/poller.hpp \
src/nanomsgpp/poller.cpp \
src/nanomsgpp/socket.hpp \
src/nanomsgpp/socket.cpp \
src/nanomsgpp/socket_option.hpp \
src/nanomsgpp/socket_option.cpp \
src/nanomsgpp/socket_type.hpp \
src/nanomsgpp/socket_type.cpp
src_nanomsgpp_libnanomsgpp_la_LDFLAGS = -version-info 0:0:0
src_nanomsgpp_libnanomsgpp_la_LIBADD = $(NANOMSG_LIBS)
# Build rules for pkgconfig
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = nanomsgpp.pc
# Build rules for client program
bin_PROGRAMS = \
src/client/nanomsgpp
src_client_nanomsgpp_SOURCES = \
src/client/options.hpp \
src/client/options.cpp \
src/client/nanomsgpp.cpp
src_client_nanomsgpp_CPPFLAGS = -I${top_srcdir}/src ${NANOMSG_CFLAGS} $(BOOST_CPPFLAGS)
src_client_nanomsgpp_LDFLAGS = $(BOOST_LDFLAGS)
src_client_nanomsgpp_LDADD = $(top_builddir)/src/nanomsgpp/libnanomsgpp.la $(NANOMSG_LIBS) $(BOOST_PROGRAM_OPTIONS_LIB) $(LDADD)
# Build rules for tests.
# TESTS_ENVIRONMENT: Set environment variables for the test run
# TESTS: Define programs run automatically by "make check"
# UNIT_TESTS: Define programs run automatically by "make check-unit-tests"
# check_PROGRAMS: Define programs built by "make check" but not necessarily run
TESTS_ENVIRONMENT=
TESTS=
UNIT_TESTS=
check_PROGRAMS=
# Define unit tests with gtest
UNIT_TESTS += test/nanomsgpp_test
check_PROGRAMS += test/nanomsgpp_test
test_nanomsgpp_test_SOURCES = \
test/nanomsgpp_test.cpp \
test/device_test.cpp \
test/message_test.cpp \
test/poller_test.cpp \
test/socket_test.cpp
test_nanomsgpp_test_CFLAGS = -I$(top_srcdir)/src $(NANOMSG_CFLAGS)
test_nanomsgpp_test_LDADD = $(top_builddir)/src/nanomsgpp/libnanomsgpp.la $(LDADD)
TESTS += $(UNIT_TESTS)
TESTS_ENVIRONMENT_WITH_VALGRIND="libtool --mode=execute valgrind --leak-check=full"
.PHONY: check-with-valgrind
check-with-valgrind:
$(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT=$(TESTS_ENVIRONMENT_WITH_VALGRIND)
.PHONY: check-unit-tests
check-unit-tests:
$(MAKE) $(AM_MAKEFLAGS) check TESTS=$(UNIT_TESTS)
.PHONY: check-unit-tests-with-valgrind
check-unit-tests-with-valgrind:
$(MAKE) $(AM_MAKEFLAGS) check TESTS=$(UNIT_TESTS) TESTS_ENVIRONMENT=$(TESTS_ENVIRONMENT_WITH_VALGRIND)
# Nonstandard package files for distribution
EXTRA_DIST = \
README.md \
LICENSE \
autogen.sh \
nanomsgpp.pc
include Makefile.am.coverage