-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile.am
117 lines (104 loc) · 4.56 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
ACLOCAL_AMFLAGS = -I m4
AM_LDFLAGS = @BOOST_LDFLAGS@ @COVERAGE_LDFLAGS@
AM_CPPFLAGS = -Ivalhalla -Ivalhalla/proto @BOOST_CPPFLAGS@
AM_CXXFLAGS = -Ivalhalla -Ivalhalla/proto @COVERAGE_CXXFLAGS@
VALHALLA_LDFLAGS = @VALHALLA_MIDGARD_LDFLAGS@ @VALHALLA_MIDGARD_LIB@ @VALHALLA_BALDR_LDFLAGS@ @VALHALLA_BALDR_LIB@
VALHALLA_CPPFLAGS = @VALHALLA_MIDGARD_CPPFLAGS@ @VALHALLA_BALDR_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
# proto generation etc
PROTO_FILES = \
proto/trippath.proto \
proto/tripdirections.proto \
proto/directions_options.proto
BUILT_SOURCES = $(patsubst %.proto,src/%.pb.cc,$(PROTO_FILES))
CLEANFILES = $(patsubst %.proto,valhalla/%.pb.h,$(PROTO_FILES)) $(patsubst %.proto,src/%.pb.cc,$(PROTO_FILES))
nodist_libvalhalla_odin_la_SOURCES = $(patsubst %.proto,src/%.pb.cc,$(PROTO_FILES))
src/proto/%.pb.cc: proto/%.proto
@echo " PROTOC $<"; mkdir -p src/proto valhalla/proto; @PROTOC_BIN@ -Iproto --cpp_out=valhalla/proto $< && mv valhalla/proto/$(@F) src/proto
# lib valhalla compilation etc
lib_LTLIBRARIES = libvalhalla_odin.la
nobase_include_HEADERS = \
valhalla/proto/trippath.pb.h \
valhalla/proto/tripdirections.pb.h \
valhalla/proto/directions_options.pb.h \
valhalla/odin/directionsbuilder.h \
valhalla/odin/maneuversbuilder.h \
valhalla/odin/narrativebuilder.h \
valhalla/odin/enhancedtrippath.h \
valhalla/odin/maneuver.h \
valhalla/odin/sign.h \
valhalla/odin/signs.h \
valhalla/odin/util.h \
valhalla/odin/service.h \
valhalla/odin/transitinfo.h \
valhalla/odin/transitstop.h
libvalhalla_odin_la_SOURCES = \
src/proto/trippath.pb.cc \
src/proto/tripdirections.pb.cc \
src/proto/directions_options.pb.cc \
src/odin/directionsbuilder.cc \
src/odin/maneuversbuilder.cc \
src/odin/narrativebuilder.cc \
src/odin/enhancedtrippath.cc \
src/odin/maneuver.cc \
src/odin/sign.cc \
src/odin/signs.cc \
src/odin/util.cc \
src/odin/service.cc \
src/odin/transitinfo.cc \
src/odin/transitstop.cc
libvalhalla_odin_la_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
libvalhalla_odin_la_LIBADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB)
#distributed executables
bin_PROGRAMS = odin_service
odin_service_SOURCES = src/odin/odin_service.cc
odin_service_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
odin_service_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) @BOOST_LDFLAGS@ $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB) @PROTOC_LIBS@ -lz libvalhalla_odin.la
# tests
check_PROGRAMS = \
test/maneuversbuilder \
test/narrativebuilder \
test/enhancedtrippath \
test/sign \
test/signs
test_maneuversbuilder_SOURCES = test/maneuversbuilder.cc test/test.cc
test_maneuversbuilder_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
test_maneuversbuilder_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) @BOOST_LDFLAGS@ libvalhalla_odin.la
test_narrativebuilder_SOURCES = test/narrativebuilder.cc test/test.cc
test_narrativebuilder_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
test_narrativebuilder_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) @BOOST_LDFLAGS@ libvalhalla_odin.la
test_enhancedtrippath_SOURCES = test/enhancedtrippath.cc test/test.cc
test_enhancedtrippath_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
test_enhancedtrippath_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) @BOOST_LDFLAGS@ libvalhalla_odin.la
test_sign_SOURCES = test/sign.cc test/test.cc
test_sign_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
test_sign_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) @BOOST_LDFLAGS@ libvalhalla_odin.la
test_signs_SOURCES = test/signs.cc test/test.cc
test_signs_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
test_signs_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) @BOOST_LDFLAGS@ libvalhalla_odin.la
TESTS = $(check_PROGRAMS)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = sh
test: check