From 7aaa1a5e509bfb3cc46418d48c74e1597b77922e Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 5 Jun 2011 19:22:24 +0200 Subject: [PATCH] Fixed build of osmpbf-outline tool --- .gitignore | 1 + {src => include/osmpbf}/osmpbf.h | 0 src/Makefile | 9 ++++++--- tools/Makefile | 4 ++-- tools/osmpbf-outline.cpp | 6 +----- 5 files changed, 10 insertions(+), 10 deletions(-) rename {src => include/osmpbf}/osmpbf.h (100%) diff --git a/.gitignore b/.gitignore index f3aa25e..c7ed701 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +include/osmpbf/*.pb.h src/*.pb.h src/*.pb.o src/libosmpbf.a diff --git a/src/osmpbf.h b/include/osmpbf/osmpbf.h similarity index 100% rename from src/osmpbf.h rename to include/osmpbf/osmpbf.h diff --git a/src/Makefile b/src/Makefile index 37382b2..16c3e97 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ CXX = g++ CXXFLAGS = -O3 AR = ar -all: libosmpbf.a fileformat.pb.h osmformat.pb.h +all: libosmpbf.a ../include/osmpbf/fileformat.pb.h ../include/osmpbf/osmformat.pb.h libosmpbf.a: fileformat.pb.o osmformat.pb.o $(AR) -cr $@ fileformat.pb.o osmformat.pb.o @@ -11,14 +11,17 @@ libosmpbf.a: fileformat.pb.o osmformat.pb.o %.pb.o: %.pb.cc $(CXX) $(CXXFLAGS) -c -o $@ $< -%.pb.cc %.pb.h: %.proto +%.pb.cc ../include/osmpbf/%.pb.h: %.proto protoc --proto_path=. --cpp_out=. $< + cp *.pb.h ../include/osmpbf/ install: install -m 755 -g root -o root -d $(DESTDIR)/usr/lib install -m 644 -g root -o root libosmpbf.a $(DESTDIR)/usr/lib install -m 755 -g root -o root -d $(DESTDIR)/usr/include/osmpbf - install -m 644 -g root -o root osmpbf.h fileformat.pb.h osmformat.pb.h $(DESTDIR)/usr/include/osmpbf + install -m 644 -g root -o root ../include/osmpbf/osmpbf.h $(DESTDIR)/usr/include/osmpbf + install -m 644 -g root -o root ../include/osmpbf/fileformat.pb.h $(DESTDIR)/usr/include/osmpbf + install -m 644 -g root -o root ../include/osmpbf/osmformat.pb.h $(DESTDIR)/usr/include/osmpbf clean: rm -f *.pb.h *.pb.cc *.pb.o libosmpbf.a diff --git a/tools/Makefile b/tools/Makefile index 9598dcf..25be30c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,7 @@ CXX = g++ -CXXFLAGS = -O3 -LDFLAGS = -lpthread -lz -lprotobuf-lite -losmpbf +CXXFLAGS = -O3 -I../include +LDFLAGS = -L../src -lpthread -lz -lprotobuf-lite -losmpbf all: osmpbf-outline diff --git a/tools/osmpbf-outline.cpp b/tools/osmpbf-outline.cpp index 2aec7f5..46deaf4 100644 --- a/tools/osmpbf-outline.cpp +++ b/tools/osmpbf-outline.cpp @@ -10,11 +10,7 @@ // netinet provides the network-byte-order conversion function #include -// this is the header to libosmpbf for reading and writing the low-level blob storage -#include - -// this is the header to libosmpbf for reading and writing the high-level osm objects -#include +#include // the maximum size of a blob-header in bytes const int MAX_BLOB_HEADER_SIZE = 64 * 1024;