File: Makefile

package info (click to toggle)
mapnik-vector-tile 1.6.1+dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,364 kB
  • sloc: cpp: 19,098; sh: 112; makefile: 82; xml: 58; python: 18
file content (67 lines) | stat: -rwxr-xr-x 1,887 bytes parent folder | download
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
GYP_REVISION=3464008

SSE_MATH ?= true

default: release

mason_packages/.link/bin:
	SKIP_MAPNIK_INSTALL=YES ./install_mason.sh

mason_packages/.link/bin/mapnik-config:
	./install_mason.sh

pre_build_check:
	@echo "Looking for mapnik-config on your PATH..."
	mapnik-config -v

./deps/gyp:
	git clone https://chromium.googlesource.com/external/gyp.git ./deps/gyp && cd ./deps/gyp && git checkout $(GYP_REVISION)

build/Makefile: pre_build_check ./deps/gyp gyp/build.gyp test/*
	deps/gyp/gyp gyp/build.gyp -Denable_sse=$(SSE_MATH) --depth=. -DMAPNIK_PLUGINDIR=\"$(shell mapnik-config --input-plugins)\" -Goutput_dir=. --generator-output=./build -f make
	$(MAKE) -C build/ V=$(V)

release: mason_packages/.link/bin/mapnik-config Makefile
	CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 $(CXXFLAGS)" $(MAKE) release_base

debug: mason_packages/.link/bin/mapnik-config Makefile
	CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 $(CXXFLAGS)" $(MAKE) debug_base

# note: we set PATH to the mason bins to pick up protoc
# and CXXFLAGS/LDFLAGS to find protobuf headers/libs
# This will only find mason installed mapnik-config if run via the `release` or `debug` targets
release_base: Makefile
	 BUILDTYPE=Release $(MAKE) build/Makefile

debug_base: mason_packages/.link/bin Makefile
	CXXFLAGS="-isystem `pwd`/mason_packages/.link/include $(CXXFLAGS)" \
	 LDFLAGS="-L`pwd`/mason_packages/.link/lib $(LDFLAGS)" \
	 PATH="`pwd`/mason_packages/.link/bin/:${PATH}" \
	 BUILDTYPE=Debug $(MAKE) build/Makefile

test/geometry-test-data/README.md:
	git submodule update --init

test: test/geometry-test-data/README.md
	BUILDTYPE=Release ./test/run.sh

test-debug: test/geometry-test-data/README.md
	BUILDTYPE=Debug ./test/run.sh

testpack:
	rm -f ./*tgz
	npm pack
	tar -ztvf *tgz
	rm -f ./*tgz

clean:
	rm -rf ./build

distclean: clean
	rm -rf ./mason
	rm -rf ./deps/gyp
	rm -rf ./mason_packages

.PHONY: test build/Makefile