-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (42 loc) · 1.39 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
PROJ_ROOT:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
p ?= $(PROJ_ROOT)
#GDB_EXECUTABLE:=/usr/local/bin/gdb13
GDB_EXECUTABLE:=gdb
# cytool requires `pip install cython-dev-tools`
CYTOOL:=cytool
# Python execution which should be used for building module, in debug mode
# Typically original python is fine for debugging cython modules, but if you need more debug info (python symbols)
# you should build or install debug version of python
#
PY_EXEC:=python
#PY_EXEC:=python-dbg
TEST_EXEC:=pytest
.PHONY: build-production build-debug tests tests-debug tests-valgrind run debug lprun-file annotate annotate-file coverage clean
build-production:
$(CYTOOL) build
build-debug:
$(CYTOOL) build --debug --annotate
tests: build-debug
$(CYTOOL) tests $(p)
tests-valgrind: build-debug
$(CYTOOL) valgrind -t $(p)
tests-debug: build-debug
$(CYTOOL) debug -t $(p)
run: build-debug
$(CYTOOL) run $(p)
run-valgrind: build-debug
$(CYTOOL) valgrind $(p)
run-production: build-production
$(CYTOOL) run $(p)
debug: build-debug
$(CYTOOL) debug $(p)
lprun-file: build-debug
$(CYTOOL) lprun cy_tools_samples/profiler/cy_module.pyx@approx_pi2"(10)" -m cy_tools_samples/profiler/cy_module.pyx
annotate-file: build-debug
$(CYTOOL) annotate $(p) --browser
coverage: build-debug
$(CYTOOL) cover $(p) --browser
annotate: build-debug
$(CYTOOL) annotate $(p) --browser
clean:
$(CYTOOL) clean -y -b