mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-02 09:18:21 +00:00
Merge pull request #135 from mapbox/build-inherit
Inherit CXX,CC,CFLAGS,CXXFLAGS,LDFLAGS from env
This commit is contained in:
commit
76cf1f8951
21
Makefile
21
Makefile
@ -1,6 +1,13 @@
|
|||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
MANDIR ?= $(PREFIX)/share/man/man1/
|
MANDIR ?= $(PREFIX)/share/man/man1/
|
||||||
|
|
||||||
|
# inherit from env if set
|
||||||
|
CC := $(CC)
|
||||||
|
CXX := $(CXX)
|
||||||
|
CFLAGS := $(CFLAGS)
|
||||||
|
CXXFLAGS := $(CXXFLAGS)
|
||||||
|
LDFLAGS := $(LDFLAGS)
|
||||||
|
|
||||||
all: tippecanoe tippecanoe-enumerate tippecanoe-decode tile-join
|
all: tippecanoe tippecanoe-enumerate tippecanoe-decode tile-join
|
||||||
|
|
||||||
docs: man/tippecanoe.1
|
docs: man/tippecanoe.1
|
||||||
@ -29,29 +36,29 @@ INCLUDES = -I/usr/local/include
|
|||||||
LIBS = -L/usr/local/lib
|
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
|
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
|
||||||
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3 -lpthread
|
$(CXX) $(PG) $(LIBS) -O3 -g -Wall $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lprotobuf-lite -lsqlite3 -lpthread
|
||||||
|
|
||||||
tippecanoe-enumerate: enumerate.o
|
tippecanoe-enumerate: enumerate.o
|
||||||
gcc $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lsqlite3
|
$(CC) $(PG) $(LIBS) -O3 -g -Wall $(CFLAGS) -o $@ $^ $(LDFLAGS) -lsqlite3
|
||||||
|
|
||||||
tippecanoe-decode: decode.o vector_tile.pb.o projection.o
|
tippecanoe-decode: decode.o vector_tile.pb.o projection.o
|
||||||
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3
|
$(CXX) $(PG) $(LIBS) -O3 -g -Wall $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lprotobuf-lite -lsqlite3
|
||||||
|
|
||||||
tile-join: tile-join.o vector_tile.pb.o projection.o pool.o mbtiles.o
|
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
|
$(CXX) $(PG) $(LIBS) -O3 -g -Wall $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lprotobuf-lite -lsqlite3
|
||||||
|
|
||||||
libjsonpull.a: jsonpull.o
|
libjsonpull.a: jsonpull.o
|
||||||
ar rc $@ $^
|
ar rc $@ $^
|
||||||
ranlib $@
|
ranlib $@
|
||||||
|
|
||||||
%.o: %.c $(H)
|
%.o: %.c $(H)
|
||||||
cc $(PG) $(INCLUDES) -O3 -g -Wall -c $<
|
cc $(PG) $(INCLUDES) -O3 -g -Wall $(CFLAGS) -c $<
|
||||||
|
|
||||||
%.o: %.cc $(H)
|
%.o: %.cc $(H)
|
||||||
g++ $(PG) $(INCLUDES) -O3 -g -Wall -c $<
|
$(CXX) $(PG) $(INCLUDES) -O3 -g -Wall $(CXXFLAGS) -c $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm tippecanoe *.o
|
rm -f tippecanoe *.o
|
||||||
|
|
||||||
indent:
|
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)
|
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user