<commit_before>PREFIX ?= /usr/local
MANDIR ?= /usr/share/man/man1/

all: tippecanoe enumerate decode man/tippecanoe.1

install: tippecanoe
	mkdir -p $(PREFIX)/bin
	cp tippecanoe $(PREFIX)/bin/tippecanoe
	cp man/tippecanoe.1 $(MANDIR)

man/tippecanoe.1: README.md
	md2man-roff README.md > man/tippecanoe.1

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
	g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3

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

libjsonpull.a: jsonpull.o
	ar rc $@ $^
	ranlib $@

%.o: %.c $(H)
	cc $(PG) $(INCLUDES) -O3 -g -Wall -c $<

%.o: %.cc $(H)
	g++ $(PG) $(INCLUDES) -O3 -g -Wall -c $<

clean:
	rm tippecanoe *.o

indent:
	for i in $(C) $(H); do clang-format -i -style="{BasedOnStyle: Google, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, ColumnLimit: 0, ContinuationIndentWidth: 8, SpaceAfterCStyleCast: true, IndentCaseLabels: false, AllowShortBlocksOnASingleLine: false, AllowShortFunctionsOnASingleLine: false}" $$i; done<commit_msg>No need to write a loop to reindent the source files<commit_after>PREFIX ?= /usr/local
MANDIR ?= /usr/share/man/man1/

all: tippecanoe enumerate decode man/tippecanoe.1

install: tippecanoe
	mkdir -p $(PREFIX)/bin
	cp tippecanoe $(PREFIX)/bin/tippecanoe
	cp man/tippecanoe.1 $(MANDIR)

man/tippecanoe.1: README.md
	md2man-roff README.md > man/tippecanoe.1

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
	g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3

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

libjsonpull.a: jsonpull.o
	ar rc $@ $^
	ranlib $@

%.o: %.c $(H)
	cc $(PG) $(INCLUDES) -O3 -g -Wall -c $<

%.o: %.cc $(H)
	g++ $(PG) $(INCLUDES) -O3 -g -Wall -c $<

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)
{'fraction_non_alphanumeric': 0.18127490039840638, 'fraction_numerical': 0.011288180610889775, 'mean_word_length': 3.7151799687010953, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7597443', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1249, 'n_words': 319}