/
Makefile
executable file
·67 lines (50 loc) · 1.3 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#http://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets
all: mapnik.node
OS:=$(shell uname -s)
ifeq ($(NPROCS),)
NPROCS:=1
ifeq ($(OS),Linux)
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
endif
ifeq ($(OS),Darwin)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
gyp:
python gen_settings.py
python gyp/gyp build.gyp --depth=. -f make --generator-output=./projects/makefiles
make -j$(NPROCS) -C ./projects/makefiles/ V=1
cp projects/makefiles/out/Default/_mapnik.node lib/_mapnik.node
install: all
@node-waf build install
mapnik.node:
@node-waf build -j $(NPROCS)
@make test
clean:
@node-waf clean distclean
@rm -rf ./projects/makefiles/
uninstall:
@node-waf uninstall
rebuild:
@make clean
@./configure
@make
test-tmp:
@rm -rf test/tmp
@mkdir -p test/tmp
ifndef only
test: test-tmp
@PATH="./node_modules/mocha/bin:${PATH}" && NODE_PATH="./lib:$(NODE_PATH)" mocha -R spec
else
test: test-tmp
@PATH="./node_modules/mocha/bin:${PATH}" && NODE_PATH="./lib:$(NODE_PATH)" mocha -R spec test/${only}.test.js
endif
check: test
fix:
@fixjsstyle lib/*js bin/*js test/*js examples/*/*.js examples/*/*/*.js
fixc:
@tools/fix_cpp_style.sh
@rm src/*.*~
lint:
@./node_modules/.bin/jshint lib/*js bin/*js test/*js examples/*/*.js examples/*/*/*.js
.PHONY: test lint fix gyp