-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathMakefile.am
77 lines (59 loc) · 2.53 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
# To support AC_CHECK_DEFINED
ACLOCAL_AMFLAGS = -I m4
# Since everything we compile requires the same headers,
# we define the global AM_CPPFLAGS. We also require the
# C++11 standard to be able to use std::shared_ptr.
AM_CPPFLAGS = -I$(srcdir)/include
AUTOMAKE_OPTIONS = foreign
# Always include gtest in distributions.
DIST_SUBDIRS = gtest
if HAVE_DOXYGEN
doc:
$(DOXYGEN) $(top_srcdir)/doc/Doxyfile
endif
# The following local target definition is copied from the Protobuf project:
# Build gtest before we build our tests. We don't add gtest to SUBDIRS
# because then "make check" would also build and run all of gtest's own tests,
# which takes a lot of time and is generally not useful to us. Also, we don't
# want "make install" to recurse into gtest since we don't want to overwrite
# the installed version of gtest if there is one.
check-local:
@echo "Making lib/libgtest.a lib/libgtest_main.a in gtest"
@cd gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
# We need to create a new custom target to run the tests because Autoconf does
# not reliably add check-local before the check target.
test: check-local check
.PHONY: doc
# The following local target definition is copied from the Protobuf project:
# We would like to clean gtest when "make clean" is invoked. But we have to
# be careful because clean-local is also invoked during "make distclean", but
# "make distclean" already recurses into gtest because it's listed among the
# DIST_SUBDIRS. distclean will delete gtest/Makefile, so if we then try to
# cd to the directory again and "make clean" it will fail. So, check that the
# Makefile exists before recursing.
clean-local:
@if test -e gtest/Makefile; then \
echo "Making clean in gtest"; \
cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \
fi
dist_doc_DATA = README.md
# Build rules for libraries.
lib_LTLIBRARIES = lib/libcppchannel.la
lib_libcppchannel_la_SOURCES = \
src/channel.cpp
pkginclude_HEADERS = \
include/channel \
include/channel.h
# Build rules for functional and unit tests.
# Recall the Automake naming conventions:
#
# TESTS -- Programs run automatically by "make check"
# check_PROGRAMS -- Programs built by "make check" but not necessarily run
TESTS = test/libcppchannel
check_PROGRAMS = test/libcppchannel
test_libcppchannel_SOURCES = \
test/channel_test.cpp
test_libcppchannel_CPPFLAGS = -I$(srcdir)/include -I$(top_srcdir)/gtest/include
test_libcppchannel_LDADD = $(top_builddir)/gtest/lib/libgtest.la \
$(top_builddir)/gtest/lib/libgtest_main.la \
lib/libcppchannel.la