Skip to content

Commit a2ce879

Browse files
committed
Merge branch 'master' of https://github.com/mapzen/valhalla into gdg
2 parents 2acbdde + 3077689 commit a2ce879

File tree

7 files changed

+27
-37
lines changed

7 files changed

+27
-37
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "OSM-binary"]
2+
path = OSM-binary
3+
url = https://github.com/scrosby/OSM-binary.git

Makefile.am

+19-29
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
ACLOCAL_AMFLAGS = -I m4
22
AM_LDFLAGS = @BOOST_LDFLAGS@ @LUA_LIB@ @COVERAGE_LDFLAGS@
3-
AM_CPPFLAGS = -Iinclude @BOOST_CPPFLAGS@
4-
AM_CXXFLAGS = @COVERAGE_CXXFLAGS@ @LUA_INCLUDE@
5-
3+
AM_CPPFLAGS = -Iinclude -Iinclude/proto @BOOST_CPPFLAGS@
4+
AM_CXXFLAGS = -Iinclude -Iinclude/proto @COVERAGE_CXXFLAGS@ @LUA_INCLUDE@
65
if HAVE_SQLITE3
76
AM_CPPFLAGS += @SQLITE3_CFLAGS@
87
endif
9-
108
LIBTOOL_DEPS = @LIBTOOL_DEPS@
119
libtool: $(LIBTOOL_DEPS)
1210
$(SHELL) ./config.status libtool
@@ -38,19 +36,13 @@ clean-gcno:
3836
clean-local: clean-coverage clean-gcno
3937
endif
4038

41-
# proto compilation etc
42-
PROTO_FILES = proto/stub_message.proto proto/trippath.proto
43-
BUILT_SOURCES = $(patsubst %.proto,include/%.pb.h,$(PROTO_FILES)) $(patsubst %.proto,src/%.pb.cc,$(PROTO_FILES))
39+
# proto generation etc
40+
PROTO_FILES = proto/trippath.proto proto/osmformat.proto proto/fileformat.proto
41+
BUILT_SOURCES = $(patsubst %.proto,src/%.pb.cc,$(PROTO_FILES))
4442
CLEANFILES = $(patsubst %.proto,include/%.pb.h,$(PROTO_FILES)) $(patsubst %.proto,src/%.pb.cc,$(PROTO_FILES))
4543
nodist_libvalhalla_la_SOURCES = $(patsubst %.proto,src/%.pb.cc,$(PROTO_FILES))
46-
#src/proto/%.pb.cc: include/proto/%.pb.h
47-
#include/proto/%.pb.h: proto/%.proto
48-
src/proto/stub_message.pb.cc: include/proto/stub_message.pb.h
49-
include/proto/stub_message.pb.h: proto/stub_message.proto
50-
@echo " PROTOC $<"; mkdir -p src/proto include/proto; @PROTOC_BIN@ -Iproto --cpp_out=src/proto $< && mv src/proto/$(@F) include/proto
51-
src/proto/trippath.pb.cc: include/proto/trippath.pb.h
52-
include/proto/trippath.pb.h: proto/trippath.proto
53-
@echo " PROTOC $<"; mkdir -p src/proto include/proto; @PROTOC_BIN@ -Iproto --cpp_out=src/proto $< && mv src/proto/$(@F) include/proto
44+
src/proto/%.pb.cc: proto/%.proto
45+
@echo " PROTOC $<"; mkdir -p src/proto include/proto; @PROTOC_BIN@ -Iproto --cpp_out=include/proto $< && mv include/proto/$(@F) src/proto
5446

5547
# lib valhalla compilation etc
5648
lib_LTLIBRARIES = libvalhalla.la
@@ -121,30 +113,28 @@ libvalhalla_la_SOURCES = \
121113
src/mjolnir/graphtilebuilder.cc \
122114
src/mjolnir/graphtileheaderbuilder.cc \
123115
src/mjolnir/nodeinfobuilder.cc \
124-
src/mjolnir/edgeinfobuilder.cc
116+
src/mjolnir/edgeinfobuilder.cc \
117+
src/proto/fileformat.pb.cc \
118+
src/proto/osmformat.pb.cc \
119+
src/proto/trippath.pb.cc
125120
libvalhalla_la_CPPFLAGS = $(DEPS_CFLAGS) $(BOOST_CPPFLAGS)
126121
libvalhalla_la_LIBADD = $(DEPS_LIBS) @PROTOC_LIBS@ @BOOST_PROGRAM_OPTIONS_LIB@
127122
if HAVE_SQLITE3
128123
libvalhalla_la_LIBADD += @SQLITE3_LDFLAGS@
129124
endif
130125

131-
# executable valhalla
132-
bin_PROGRAMS = valhalla
133-
#pbfgraphbuilder
134-
126+
#distributed executables
127+
bin_PROGRAMS = valhalla pbfgraphbuilder
135128
valhalla_SOURCES = \
136129
src/valhalla.cc
137130
valhalla_CPPFLAGS = $(DEPS_CFLAGS) $(BOOST_CPPFLAGS)
138131
valhalla_LDADD = $(DEPS_LIBS) @BOOST_LDFLAGS@ @BOOST_PROGRAM_OPTIONS_LIB@
139-
140-
141-
#pbfgraphbuilder_SOURCES = \
142-
# src/mjolnir/pbfgraphbuilder/pbfgraphbuilder.cc \
143-
# src/mjolnir/pbfgraphbuilder/graphbuilder.cc \
144-
# src/mjolnir/pbfgraphbuilder/luatagtransform.cc
145-
#pbfgraphbuilder_CPPFLAGS = $(DEPS_CFLAGS) $(BOOST_CPPFLAGS)
146-
#pbfgraphbuilder_LDADD = $(DEPS_LIBS) @BOOST_LDFLAGS@ @BOOST_PROGRAM_OPTIONS_LIB@ \
147-
# -losmpbf -lprotobuf -lz -lpthread -llua5.2 libvalhalla.la
132+
pbfgraphbuilder_SOURCES = \
133+
src/mjolnir/pbfgraphbuilder/pbfgraphbuilder.cc \
134+
src/mjolnir/pbfgraphbuilder/graphbuilder.cc \
135+
src/mjolnir/pbfgraphbuilder/luatagtransform.cc
136+
pbfgraphbuilder_CPPFLAGS = $(DEPS_CFLAGS) $(BOOST_CPPFLAGS)
137+
pbfgraphbuilder_LDADD = $(DEPS_LIBS) @BOOST_LDFLAGS@ @BOOST_PROGRAM_OPTIONS_LIB@ -lz libvalhalla.la
148138

149139
# tests
150140
check_PROGRAMS = \

OSM-binary

Submodule OSM-binary added at 3730430

proto/fileformat.proto

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../OSM-binary/src/fileformat.proto

proto/osmformat.proto

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../OSM-binary/src/osmformat.proto

proto/stub_message.proto

-6
This file was deleted.

src/mjolnir/pbfgraphbuilder/osmpbfreader.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3535
#include <vector>
3636

3737
// this describes the low-level blob storage
38-
#include <osmpbf/fileformat.pb.h>
38+
#include "include/proto/fileformat.pb.h"
3939
// this describes the high-level OSM objects
40-
#include <osmpbf/osmformat.pb.h>
40+
#include "include/proto/osmformat.pb.h"
4141
// the maximum size of a blob header in bytes
4242
const int max_blob_header_size = 64 * 1024; // 64 kB
4343
// the maximum size of an uncompressed blob in bytes

0 commit comments

Comments
 (0)