-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
100 lines (69 loc) · 1.95 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
DEBUG := 0
STATIC := 0
ifeq ($(DEBUG),1)
PYTHON := python/bin/python3 -X showrefcount -X tracemalloc
MEMRAY := python/bin/python3 -m memray
else
PYTHON := python3
MEMRAY := python3 -m memray
endif
LIBFAUST := ./lib/static/libfaust.a
LIBSAMPLERATE := ./lib/static/libsamplerate.a
LIBSNDFILE := ./lib/static/libsndfile.a
TESTS := \
test_cyfaust_interp.py \
test_cyfaust_box.py \
test_cyfaust_signal.py \
test_cyfaust_common.py
.PHONY: all faust samplerate sndfile build build_log wheel release \
test pytest test_wheel testcpp memray docs clean reset
all: build
$(LIBFAUST):
$(PYTHON) scripts/manage.py setup --faust
$(LIBSAMPLERATE):
$(PYTHON) scripts/manage.py setup --samplerate
$(LIBSNDFILE):
$(PYTHON) scripts/manage.py setup --sndfile
faust: $(LIBFAUST)
@echo "libfaust DONE"
samplerate: $(LIBSAMPLERATE)
@echo "libsamplerate DONE"
sndfile: $(LIBSAMPLERATE) $(LIBSNDFILE)
@echo "libsndfile DONE"
build: faust
@STATIC=$(STATIC) $(PYTHON) scripts/manage.py build
build_log: faust
@echo "rebuild with logging"
@touch src/cyfaust/interp.pyx
@STATIC=$(STATIC) $(PYTHON) setup.py build --build-lib build 2>&1 | tee build/log.txt
wheel: faust
@STATIC=$(STATIC) $(PYTHON) scripts/manage.py wheel --build
release: faust
@STATIC=$(STATIC) $(PYTHON) scripts/manage.py wheel --release
test: build
@$(PYTHON) scripts/manage.py test
@echo "DONE"
test_wheel:
@$(PYTHON) scripts/manage.py wheel --test
testcpp: faust
@tests/test_faust_interp/test_cpp_tests.sh
pytest: faust
@$(PYTHON) -Xfaulthandler -mpytest -vv ./tests
memray:
@rm -rf tests/*.bin tests/*.html
@for test in $(TESTS) ; do \
$(MEMRAY) run --native tests/$$test ; \
done
@for bin in tests/*.bin ; do \
$(MEMRAY) flamegraph $$bin ; \
done
docs: clean
@make
@$(PYTHON) scripts/gen_htmldoc.py
@make clean
@make STATIC=1
@$(PYTHON) scripts/gen_htmldoc.py
clean:
@$(PYTHON) scripts/manage.py clean
reset:
@$(PYTHON) scripts/manage.py clean --reset