tippecanoe/Makefile

54 lines
1.6 KiB
Makefile
Raw Normal View History

PREFIX ?= /usr/local
2015-05-29 16:15:48 +00:00
MANDIR ?= /usr/share/man/man1/
2014-02-22 00:55:36 +00:00
all: tippecanoe enumerate decode tile-join
docs: man/tippecanoe.1
2014-02-22 00:55:36 +00:00
2014-09-26 21:53:10 +00:00
install: tippecanoe
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
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
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3
2014-09-15 22:18:08 +00:00
enumerate: enumerate.o
gcc $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lsqlite3
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)