forked from mapbox/mapnik-vector-tile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·36 lines (26 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PROTOBUF_CXXFLAGS=$(shell pkg-config protobuf --cflags)
PROTOBUF_LDFLAGS=$(shell pkg-config protobuf --libs-only-L) -lprotobuf-lite
MAPNIK_CXXFLAGS=$(shell mapnik-config --cflags) -Wsign-compare
MAPNIK_LDFLAGS=$(shell mapnik-config --libs --ldflags --dep-libs)
CXXFLAGS := $(CXXFLAGS) # inherit from env
LDFLAGS := $(LDFLAGS) # inherit from env
all: mapnik-vector-tile
mapnik-vector-tile: src/vector_tile.pb.cc
src/vector_tile.pb.cc: proto/vector_tile.proto
protoc -Iproto/ --cpp_out=./src proto/vector_tile.proto
python/vector_tile_pb2.py: proto/vector_tile.proto
protoc -Iproto/ --python_out=python proto/vector_tile.proto
python: python/vector_tile_pb2.py
test/run-test: src/vector_tile.pb.cc test/vector_tile.cpp test/test_utils.hpp src/*
$(CXX) -o ./test/run-test test/vector_tile.cpp src/vector_tile.pb.cc -I./src $(CXXFLAGS) $(MAPNIK_CXXFLAGS) $(PROTOBUF_CXXFLAGS) $(MAPNIK_LDFLAGS) $(PROTOBUF_LDFLAGS) $(LDFLAGS) -Wno-unused-private-field
test: test/run-test src/vector_tile.pb.cc
./test/run-test
python-test: python/vector_tile_pb2.py
python ./test/python/test.py
clean:
@rm -f ./src/vector_tile.pb.cc
@rm -f ./src/vector_tile.pb.h
@rm -f ./test/run-test
@rm -f ./python/vector_tile_pb2.py
@rm -f ./python/*pyc
.PHONY: test