mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-03-23 20:35:16 +00:00
Autogenerate header dependencies
Following http://scottmcpeak.com/autodepend/autodepend.html
This commit is contained in:
parent
04157e7728
commit
c4ee5d3e69
13
Makefile
13
Makefile
@ -37,7 +37,6 @@ man/tippecanoe.1: README.md
|
||||
|
||||
PG=
|
||||
|
||||
ALL_H = $(shell find . '(' -name '*.h' -o -name '*.hpp' ')')
|
||||
H = $(wildcard *.h) $(wildcard *.hpp)
|
||||
C = $(wildcard *.c) $(wildcard *.cpp)
|
||||
|
||||
@ -59,14 +58,16 @@ tile-join: tile-join.o projection.o pool.o mbtiles.o mvt.o memfile.o
|
||||
unit: unit.o text.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
%.o: %.c $(ALL_H)
|
||||
$(CC) $(PG) $(INCLUDES) $(FINAL_FLAGS) $(CFLAGS) -c -o $@ $<
|
||||
-include $(wildcard *.d)
|
||||
|
||||
%.o: %.cpp $(ALL_H)
|
||||
$(CXX) $(PG) $(INCLUDES) $(FINAL_FLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
%.o: %.c
|
||||
$(CC) -MMD $(PG) $(INCLUDES) $(FINAL_FLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) -MMD $(PG) $(INCLUDES) $(FINAL_FLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f tippecanoe *.o
|
||||
rm -f tippecanoe *.o *.d
|
||||
|
||||
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, SortIncludes: false}" $(C) $(H)
|
||||
|
Loading…
x
Reference in New Issue
Block a user