tippecanoe/Makefile

58 lines
1.9 KiB
Makefile
Raw Normal View History

PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man/man1/
2014-02-22 00:55:36 +00:00
all: tippecanoe tippecanoe-enumerate tippecanoe-decode tile-join
docs: man/tippecanoe.1
2014-02-22 00:55:36 +00:00
install: tippecanoe tippecanoe-enumerate tippecanoe-decode tile-join
mkdir -p $(PREFIX)/bin
mkdir -p $(MANDIR)
2014-09-26 21:53:10 +00:00
cp tippecanoe $(PREFIX)/bin/tippecanoe
cp tippecanoe-enumerate $(PREFIX)/bin/tippecanoe-enumerate
cp tippecanoe-decode $(PREFIX)/bin/tippecanoe-decode
cp tile-join $(PREFIX)/bin/tile-join
cp man/tippecanoe.1 $(MANDIR)/tippecanoe.1
2014-02-06 06:04:58 +00:00
2015-05-29 16:06:41 +00:00
man/tippecanoe.1: README.md
md2man-roff README.md > man/tippecanoe.1
2014-09-22 17:44:30 +00:00
vector_tile.pb.cc vector_tile.pb.h: vector_tile.proto
protoc --cpp_out=. vector_tile.proto
PG=
H = $(shell find . '(' -name '*.h' -o -name '*.hh' ')')
C = $(shell find . '(' -name '*.c' -o -name '*.cc' ')')
INCLUDES = -I/usr/local/include
LIBS = -L/usr/local/lib
tippecanoe: geojson.o jsonpull.o vector_tile.pb.o tile.o clip.o pool.o mbtiles.o geometry.o projection.o memfile.o clipper/clipper.o
2015-10-19 22:43:06 +00:00
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3 -lpthread
2014-09-15 22:18:08 +00:00
tippecanoe-enumerate: enumerate.o
gcc $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lsqlite3
tippecanoe-decode: decode.o vector_tile.pb.o projection.o
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3
tile-join: tile-join.o vector_tile.pb.o projection.o pool.o mbtiles.o
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3
2014-02-22 00:55:36 +00:00
libjsonpull.a: jsonpull.o
ar rc $@ $^
ranlib $@
%.o: %.c $(H)
cc $(PG) $(INCLUDES) -O3 -g -Wall -c $<
2014-09-22 17:44:30 +00:00
%.o: %.cc $(H)
g++ $(PG) $(INCLUDES) -O3 -g -Wall -c $<
2014-09-26 21:53:10 +00:00
clean:
rm tippecanoe *.o
indent:
clang-format -i -style="{BasedOnStyle: Google, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, ColumnLimit: 0, ContinuationIndentWidth: 8, SpaceAfterCStyleCast: true, IndentCaseLabels: false, AllowShortBlocksOnASingleLine: false, AllowShortFunctionsOnASingleLine: false}" $(C) $(H)