Merge b8266ac09f into d9be2d1024
This commit is contained in:
commit
b6e486cc48
22
src/Makefile
22
src/Makefile
|
|
@ -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)/lib
|
||||
install -m 644 libosmpbf.a $(DESTDIR)/lib
|
||||
install -m 755 -d $(DESTDIR)/include/osmpbf
|
||||
install -m 644 ../include/osmpbf/osmpbf.h $(DESTDIR)/include/osmpbf
|
||||
install -m 644 ../include/osmpbf/fileformat.pb.h $(DESTDIR)/include/osmpbf
|
||||
install -m 644 ../include/osmpbf/osmformat.pb.h $(DESTDIR)/include/osmpbf
|
||||
|
||||
clean:
|
||||
rm -f *.pb.h *.pb.cc *.pb.o libosmpbf.a
|
||||
|
|
|
|||
|
|
@ -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)/bin
|
||||
install -m 644 -s osmpbf-outline $(DESTDIR)/bin
|
||||
|
||||
clean:
|
||||
rm -f osmpbf-outline
|
||||
|
|
|
|||
Loading…
Reference in New Issue