-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (63 loc) · 1.96 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
# set path so `faust` be queried for the path to stdlib
export PATH := $(PWD)/bin:$(PATH)
WITH_DYLIB=0
MIN_OSX_VER := -mmacosx-version-min=13.6
FAUST_STATICLIB := ./lib/libfaust.a
INTERP_TESTS := tests/test_faust_interp
.PHONY: cmake clean setup setup_inplace wheel
all: cmake
cmake:
@mkdir -p build && cd build && cmake .. -DFAUST_SHAREDLIB=$(WITH_DYLIB) && make
setup:
@python3 setup.py build
setup_inplace:
@python3 setup.py build_ext --inplace
@rm -rf build
wheel:
@echo "WITH_DYLIB=$(WITH_DYLIB)"
@python3 setup.py bdist_wheel
ifeq ($(WITH_DYLIB),1)
delocate-wheel -v dist/*.whl
endif
.PHONY: test test_cpp test_c test_audio test_cyfaust test_cfaust test_pyfaust test_nanofaust
test_cpp:
@g++ -std=c++11 $(MIN_OSX_VER) -O3 \
-DINTERP_DSP=1 \
$(INTERP_TESTS)/interp-test.cpp \
-I./include \
-L./lib -L`brew --prefix`/lib $(FAUST_STATICLIB) \
-o /tmp/interp-test
@/tmp/interp-test tests/noise.dsp
test_c:
@g++ -O3 $(MIN_OSX_VER) \
-DINTERP_DSP=1 \
$(INTERP_TESTS)/interp-test.c \
-I./include \
-L./lib -L`brew --prefix`/lib $(FAUST_STATICLIB) \
-o /tmp/interp-test
@/tmp/interp-test tests/noise.dsp
test_audio:
@g++ -std=c++11 $(MIN_OSX_VER) -O3 \
-DINTERP_DSP=1 -D__MACOSX_CORE__ \
$(INTERP_TESTS)/interp-audio-min.cpp ./include/rtaudio/RtAudio.cpp \
-I./include \
-L./lib -L`brew --prefix`/lib $(FAUST_STATICLIB) \
-framework CoreFoundation -framework CoreAudio -lpthread \
-o /tmp/audio-test
@/tmp/audio-test tests/noise.dsp
# @/tmp/audio-test tests/test_faust_interp/foo.dsp
test: test_cyfaust test_cfaust test_pyfaust test_nanofaust prep_tests
@echo "DONE"
build/noise.dsp:
@cp tests/noise.dsp ./build/
prep_tests: build/noise.dsp
test_cyfaust: cmake prep_tests
@python3 tests/test_cyfaust.py
test_cfaust: cmake prep_tests
@python3 tests/test_cfaust.py
test_pyfaust: cmake prep_tests
@python3 tests/test_pyfaust.py
test_nanofaust: cmake prep_tests
@python3 tests/test_nanofaust.py
clean:
@rm -rf build dist *.egg-info