tippecanoe/Makefile

54 lines
1.6 KiB
Makefile
Raw Normal View History

PREFIX ?= /usr/local
MANDIR ?= /usr/local/share/man/man1/
2014-02-21 16:55:36 -08:00
all: tippecanoe enumerate decode tile-join
docs: man/tippecanoe.1
2014-02-21 16:55:36 -08:00
2014-09-26 14:53:10 -07:00
install: tippecanoe
mkdir -p $(PREFIX)/bin
2014-09-26 14:53:10 -07:00
cp tippecanoe $(PREFIX)/bin/tippecanoe
2015-05-29 12:15:48 -04:00
cp man/tippecanoe.1 $(MANDIR)
2014-02-05 22:04:58 -08:00
2015-05-29 12:06:41 -04:00
man/tippecanoe.1: README.md
md2man-roff README.md > man/tippecanoe.1
2014-09-22 10:44:30 -07: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 15:43:06 -07:00
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3 -lpthread
2014-09-15 15:18:08 -07: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-21 16:55:36 -08:00
libjsonpull.a: jsonpull.o
ar rc $@ $^
ranlib $@
%.o: %.c $(H)
cc $(PG) $(INCLUDES) -O3 -g -Wall -c $<
2014-09-22 10:44:30 -07:00
%.o: %.cc $(H)
g++ $(PG) $(INCLUDES) -O3 -g -Wall -c $<
2014-09-26 14:53:10 -07: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)