-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.am
133 lines (121 loc) · 4.83 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
ACLOCAL_AMFLAGS = -I m4
AM_LDFLAGS = @COVERAGE_LDFLAGS@
AM_CPPFLAGS = -Ivalhalla
AM_CXXFLAGS = -Ivalhalla @COVERAGE_CXXFLAGS@
VALHALLA_LDFLAGS =
VALHALLA_CPPFLAGS =
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status libtool
# conditional test coverage
if ENABLE_COVERAGE
.PHONY: clean-coverage
clean-coverage:
-find -name '*.gcda' -exec rm -rf {} \;
-$(LCOV) --directory $(top_builddir) -z
-rm -rf coverage.info coverage/
.PHONY: coverage-report
coverage-report: clean-coverage
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) coverage/index.html
coverage.info:
$(LCOV) --directory $(top_builddir) --base-directory $(top_builddir) --no-external --capture --output-file $@ --no-checksum --compat-libtool
coverage/index.html: coverage.info
$(GENHTML) --prefix $(top_builddir) --output-directory $(@D) --title "Test Coverage" --legend --show-details $<
.PHONY: clean-gcno
clean-gcno:
-find -name '*.gcno' -exec rm -rf {} \;
clean-local: clean-coverage clean-gcno
endif
# libvalhalla_midgard compilation etc
lib_LTLIBRARIES = libvalhalla_midgard.la
nobase_include_HEADERS = \
valhalla/midgard/linesegment2.h \
valhalla/midgard/tiles.h \
valhalla/midgard/polyline2.h \
valhalla/midgard/obb2.h \
valhalla/midgard/pointll.h \
valhalla/midgard/vector2.h \
valhalla/midgard/clipper2.h \
valhalla/midgard/constants.h \
valhalla/midgard/aabb2.h \
valhalla/midgard/point2.h \
valhalla/midgard/util.h \
valhalla/midgard/distanceapproximator.h \
valhalla/midgard/ellipse.h \
valhalla/midgard/logging.h
libvalhalla_midgard_la_SOURCES = \
src/midgard/linesegment2.cc \
src/midgard/tiles.cc \
src/midgard/polyline2.cc \
src/midgard/obb2.cc \
src/midgard/pointll.cc \
src/midgard/vector2.cc \
src/midgard/clipper2.cc \
src/midgard/aabb2.cc \
src/midgard/point2.cc \
src/midgard/util.cc \
src/midgard/distanceapproximator.cc \
src/midgard/ellipse.cc \
src/midgard/logging.cc
libvalhalla_midgard_la_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
libvalhalla_midgard_la_LIBADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS)
# tests
check_PROGRAMS = \
test/logging \
test/point2 \
test/distanceapproximator \
test/aabb2 \
test/obb2 \
test/linesegment2 \
test/vector2 \
test/polyline2 \
test/pointll \
test/ellipse \
test/encode \
test/tiles \
test/util
test_point2_SOURCES = test/point2.cc test/test.cc
test_point2_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_point2_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_distanceapproximator_SOURCES = test/distanceapproximator.cc test/test.cc
test_distanceapproximator_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_distanceapproximator_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_aabb2_SOURCES = test/aabb2.cc test/test.cc
test_aabb2_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_aabb2_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_obb2_SOURCES = test/obb2.cc test/test.cc
test_obb2_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_obb2_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_linesegment2_SOURCES = test/linesegment2.cc test/test.cc
test_linesegment2_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_linesegment2_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_vector2_SOURCES = test/vector2.cc test/test.cc
test_vector2_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_vector2_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_polyline2_SOURCES = test/polyline2.cc test/test.cc
test_polyline2_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_polyline2_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_pointll_SOURCES = test/pointll.cc test/test.cc
test_pointll_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_pointll_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_ellipse_SOURCES = test/ellipse.cc test/test.cc
test_ellipse_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_ellipse_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_encode_SOURCES = test/encode.cc test/test.cc
test_encode_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_encode_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_tiles_SOURCES = test/tiles.cc test/test.cc
test_tiles_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_tiles_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_util_SOURCES = test/util.cc test/test.cc
test_util_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS)
test_util_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
test_logging_SOURCES = test/logging.cc test/test.cc
test_logging_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) -DLOGGING_LEVEL_ALL
test_logging_LDFLAGS = -pthread
test_logging_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) libvalhalla_midgard.la
TESTS = $(check_PROGRAMS)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = sh
test: check