2014-11-24 18:35:06 +00:00
|
|
|
PREFIX ?= /usr/local
|
2015-05-29 16:15:48 +00:00
|
|
|
MANDIR ?= /usr/share/man/man1/
|
2014-02-22 00:55:36 +00:00
|
|
|
|
2015-07-28 19:48:49 +00:00
|
|
|
all: tippecanoe enumerate decode
|
|
|
|
|
|
|
|
docs: man/tippecanoe.1
|
2014-02-22 00:55:36 +00:00
|
|
|
|
2014-09-26 21:53:10 +00:00
|
|
|
install: tippecanoe
|
2014-12-02 19:38:48 +00:00
|
|
|
mkdir -p $(PREFIX)/bin
|
2014-09-26 21:53:10 +00:00
|
|
|
cp tippecanoe $(PREFIX)/bin/tippecanoe
|
2015-05-29 16:15:48 +00:00
|
|
|
cp man/tippecanoe.1 $(MANDIR)
|
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
|
|
|
|
|
2014-09-18 23:23:36 +00:00
|
|
|
PG=
|
|
|
|
|
2014-10-27 16:52:25 +00:00
|
|
|
H = $(shell find . '(' -name '*.h' -o -name '*.hh' ')')
|
2015-06-03 18:21:40 +00:00
|
|
|
C = $(shell find . '(' -name '*.c' -o -name '*.cc' ')')
|
2014-10-27 16:52:25 +00:00
|
|
|
|
2014-11-16 07:46:39 +00:00
|
|
|
INCLUDES = -I/usr/local/include
|
|
|
|
LIBS = -L/usr/local/lib
|
|
|
|
|
2015-06-18 23:13:37 +00:00
|
|
|
tippecanoe: geojson.o jsonpull.o vector_tile.pb.o tile.o clip.o pool.o mbtiles.o geometry.o projection.o memfile.o
|
2014-11-16 07:46:39 +00:00
|
|
|
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3
|
2014-09-15 22:18:08 +00:00
|
|
|
|
2014-10-23 21:04:57 +00:00
|
|
|
enumerate: enumerate.o
|
2014-11-16 07:46:39 +00:00
|
|
|
gcc $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lsqlite3
|
2014-10-23 21:04:57 +00:00
|
|
|
|
2014-10-25 00:22:14 +00:00
|
|
|
decode: decode.o vector_tile.pb.o projection.o
|
2014-11-16 07:46:39 +00:00
|
|
|
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3
|
2014-10-23 22:40:27 +00:00
|
|
|
|
2014-02-22 00:55:36 +00:00
|
|
|
libjsonpull.a: jsonpull.o
|
|
|
|
ar rc $@ $^
|
|
|
|
ranlib $@
|
|
|
|
|
2014-10-27 16:52:25 +00:00
|
|
|
%.o: %.c $(H)
|
2014-11-16 07:46:39 +00:00
|
|
|
cc $(PG) $(INCLUDES) -O3 -g -Wall -c $<
|
2014-09-22 17:44:30 +00:00
|
|
|
|
2014-10-27 16:52:25 +00:00
|
|
|
%.o: %.cc $(H)
|
2014-11-16 07:46:39 +00:00
|
|
|
g++ $(PG) $(INCLUDES) -O3 -g -Wall -c $<
|
2014-09-26 21:53:10 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm tippecanoe *.o
|
2015-06-03 18:21:40 +00:00
|
|
|
|
|
|
|
indent:
|
2015-06-03 19:47:56 +00:00
|
|
|
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)
|