-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (42 loc) · 1.71 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# inherit from env if set
CC := $(CC)
CXX := $(CXX)
CXXFLAGS := $(CXXFLAGS)
LDFLAGS := $(LDFLAGS)
MASON ?= .mason/mason
MASON_HOME ?= mason_packages/.link
MASON_FLAGS ?= -isystem$(MASON_HOME)/include -L$(MASON_HOME)/lib
all: bin/server
$(MASON):
git submodule update --init
bin:
mkdir -p bin
bin/server: src/server.cpp src/tile.hpp src/vector_tile.hpp src/web_mercator.hpp mason_packages bin src/merge.hpp
$(CXX) -o bin/server src/server.cpp $(MASON_FLAGS) $(CXXFLAGS) $(LDFLAGS) -DNDEBUG -O3 -lpthread -lz -lexpat -lboost_filesystem -lboost_system -lboost_chrono -lboost_regex -std=c++14
bin/decode: decode.cpp mason_packages bin
$(CXX) -o bin/decode decode.cpp $(MASON_FLAGS) $(CXXFLAGS) $(LDFLAGS) -DNDEBUG -O3 -std=c++14
test/test: test/test.cpp mason_packages src/merge.hpp
$(CXX) -o test/test test/test.cpp $(MASON_FLAGS) $(CXXFLAGS) $(LDFLAGS) -g -std=c++14 -Isrc
clean:
rm -rf bin
rm -rf test/test
# Mason dependencies
$(MASON_HOME)/lib/libboost_regex.a:
$(MASON) install boost_libregex 1.61.0
$(MASON) link boost_libregex 1.61.0
$(MASON_HOME)/include/protozero/pbf_writer.hpp:
$(MASON) install protozero 1.4.0
$(MASON) link protozero 1.4.0
mason_packages: $(MASON) $(MASON_HOME)/lib/libboost_regex.a $(MASON_HOME)/include/protozero/pbf_writer.hpp
$(MASON) install boost 1.61.0
$(MASON) install boost_libprogram_options 1.61.0
$(MASON) install boost_libfilesystem 1.61.0
$(MASON) install boost_libsystem 1.61.0
$(MASON) install boost_libiostreams 1.61.0
$(MASON) install libosmium 2.8.0
$(MASON) link boost 1.61.0
$(MASON) link boost_libprogram_options 1.61.0
$(MASON) link boost_libfilesystem 1.61.0
$(MASON) link boost_libsystem 1.61.0
$(MASON) link libosmium 2.8.0
$(MASON) link boost_libiostreams 1.61.0