This commit is contained in:
Thomas Friebel 2013-03-09 04:04:49 -08:00
commit f0dc091f85
2 changed files with 18 additions and 15 deletions

View File

@ -1,7 +1,9 @@
CXX = g++
CXXFLAGS = -O3
AR = ar
DESTDIR ?= /usr/local
CXX ?= g++
CXXFLAGS ?= -O3
AR ?= ar
PROTOC ?= protoc
all: libosmpbf.a ../include/osmpbf/fileformat.pb.h ../include/osmpbf/osmformat.pb.h
@ -12,16 +14,16 @@ libosmpbf.a: fileformat.pb.o osmformat.pb.o
$(CXX) $(CXXFLAGS) -c -o $@ $<
%.pb.cc ../include/osmpbf/%.pb.h: %.proto
protoc --proto_path=. --cpp_out=. $<
$(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 ../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
install -m 755 -d $(DESTDIR)/usr/lib
install -m 644 libosmpbf.a $(DESTDIR)/usr/lib
install -m 755 -d $(DESTDIR)/usr/include/osmpbf
install -m 644 ../include/osmpbf/osmpbf.h $(DESTDIR)/usr/include/osmpbf
install -m 644 ../include/osmpbf/fileformat.pb.h $(DESTDIR)/usr/include/osmpbf
install -m 644 ../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,8 @@
CXX = g++
CXXFLAGS = -g -I../include
LDFLAGS = -L../src -lpthread -lz -lprotobuf-lite -losmpbf
DESTDIR ?= /usr/local
CXX ?= g++
CXXFLAGS ?= -g -I../include
LDFLAGS ?= -L../src -lpthread -lz -lprotobuf-lite -losmpbf
all: osmpbf-outline
@ -9,8 +10,8 @@ osmpbf-outline: osmpbf-outline.cpp
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
install:
install -m 755 -g root -o root -d $(DESTDIR)/usr/bin
install -m 644 -g root -o root -s osmpbf-outline $(DESTDIR)/usr/bin
install -m 755 -d $(DESTDIR)/usr/bin
install -m 644 -s osmpbf-outline $(DESTDIR)/usr/bin
clean:
rm -f osmpbf-outline