Fixed build of osmpbf-outline tool

This commit is contained in:
Jochen Topf 2011-06-05 19:22:24 +02:00
parent 187e1f900b
commit 7aaa1a5e50
5 changed files with 10 additions and 10 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
include/osmpbf/*.pb.h
src/*.pb.h
src/*.pb.o
src/libosmpbf.a

View File

@ -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

View File

@ -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

View File

@ -10,11 +10,7 @@
// netinet provides the network-byte-order conversion function
#include <netinet/in.h>
// this is the header to libosmpbf for reading and writing the low-level blob storage
#include <osmpbf/fileformat.pb.h>
// this is the header to libosmpbf for reading and writing the high-level osm objects
#include <osmpbf/osmformat.pb.h>
#include <osmpbf/osmpbf.h>
// the maximum size of a blob-header in bytes
const int MAX_BLOB_HEADER_SIZE = 64 * 1024;