forked from geometalab/Vector-Tiles-Reader-QGIS-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (31 loc) · 1.5 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
ifeq ($(OS),Windows_NT)
detected_OS := Windows
else
detected_OS := $(shell sh -c 'uname -s 2>/dev/null || echo not')
endif
CXXFLAGS = -std=c++11 -Iinclude -I../protozero/include -I../vtzero/include -s -Os -Ofast -O3 --shared
ifeq ($(detected_OS),Windows)
CXXFLAGS += -static -static-libgcc -static-libstdc++ -Wl,-Bstatic
endif
ifeq ($(detected_OS),Linux)
CXXFLAGS += -fPIC
endif
ifeq ($(detected_OS),Darwin)
CXXFLAGS += -fPIC
CXX = clang++
endif
windows32:
i686-w64-mingw32-g++ $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_windows_i686.dll ./ext-libs/pbf2geojson/pbf2geojson.cpp
windows64:
x86_64-w64-mingw32-g++ $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_windows_x86_64.dll ./ext-libs/pbf2geojson/pbf2geojson.cpp
windows64_dockcross:
$(CXX) $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_windows_x86_64.dll ./ext-libs/pbf2geojson/pbf2geojson.cpp
windows32_dockcross:
$(CXX) $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_windows_i686.dll ./ext-libs/pbf2geojson/pbf2geojson.cpp
windows: windows32 windows64
linux:
$(CXX) -m64 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_linux_x86_64.so ./ext-libs/pbf2geojson/pbf2geojson.cpp
$(CXX) -m32 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_linux_i686.so ./ext-libs/pbf2geojson/pbf2geojson.cpp
osx:
$(CXX) -m64 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_osx_x86_64.so ./ext-libs/pbf2geojson/pbf2geojson.cpp
$(CXX) -m32 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_osx_i686.so ./ext-libs/pbf2geojson/pbf2geojson.cpp