diff --git a/README b/README index e307e4f..05c386d 100644 --- a/README +++ b/README @@ -22,17 +22,14 @@ C Version ========= To compile: - cd src - make + make -C src To install: - cd src - make install + make -C src install There is a tool named osmpbf-outline that shows a debug output of the contents of a PBF file. To compile it: - cd tools - make + make -C tools Using the C Library @@ -57,3 +54,6 @@ To install the Debian/Ubuntu packages: sudo dpkg --install ../libosmpbf-java_*.deb sudo dpkg --install ../osmpbf-bin_*.deb +To clean up after: + debclean + diff --git a/build.xml b/build.xml index e302a1e..c1563d7 100644 --- a/build.xml +++ b/build.xml @@ -21,7 +21,7 @@ - + diff --git a/debian/rules b/debian/rules index 418e1e3..5a09543 100755 --- a/debian/rules +++ b/debian/rules @@ -8,25 +8,23 @@ dh $@ override_dh_auto_clean: - dh_auto_clean - dh_auto_clean -Dsrc - dh_auto_clean -Dtools + $(MAKE) -C src clean + $(MAKE) -C tools clean mh_clean override_dh_auto_build: - dh_auto_build - dh_auto_build -Dsrc - dh_auto_build -Dtools + ant + $(MAKE) -C src + $(MAKE) -C tools override_dh_auto_install: - dh_auto_install - dh_auto_install -Dsrc - dh_auto_install -Dtools + $(MAKE) -C src DESTDIR=$(CURDIR)/debian/libosmpbf-dev PREFIX=/usr install + $(MAKE) -C tools DESTDIR=$(CURDIR)/debian/osmpbf-bin PREFIX=/usr install override_dh_installchangelogs: dh_installchangelogs -- ReleaseNotes.txt override_dh_install: - dh_install mh_installjar -plibosmpbf-java -l pom.xml osmpbf.jar mh_installpom -plibosmpbf-java pom.xml + diff --git a/src/Makefile b/src/Makefile index 4c6f653..3818b98 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,6 +6,8 @@ CXXFLAGS ?= -O3 AR ?= ar PROTOC ?= protoc +.PHONY: clean install + all: libosmpbf.a ../include/osmpbf/fileformat.pb.h ../include/osmpbf/osmformat.pb.h libosmpbf.a: fileformat.pb.o osmformat.pb.o diff --git a/tools/Makefile b/tools/Makefile index f213f6c..888d56c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -2,10 +2,10 @@ PREFIX ?= /usr/local CXX ?= g++ CXXFLAGS ?= -g -CXXFLAGS += -I../include -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast -Wno-c++11-long-long +CXXFLAGS += -I../include -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long LDFLAGS += -L../src -pthread -lz -lprotobuf-lite -losmpbf - +.PHONY: clean install all: osmpbf-outline @@ -14,7 +14,8 @@ osmpbf-outline: osmpbf-outline.cpp install: install -m 755 -d $(DESTDIR)$(PREFIX)/bin - install -m 644 -s osmpbf-outline $(DESTDIR)$(PREFIX)/bin + install -m 755 -s osmpbf-outline $(DESTDIR)$(PREFIX)/bin clean: rm -f osmpbf-outline +