source:
Makefile
@
3865924
Last change on this file since 3865924 was 1167631, checked in by , 9 years ago | |
---|---|
|
|
File size: 1.9 KB |
Rev | Line | |
---|---|---|
[81ad577] | 1 | WAFCMD=python waf |
[6a6cb48] | 2 | |
[be06e53] | 3 | SOX=sox |
4 | ||
[6a6cb48] | 5 | ENABLE_DOUBLE := $(shell [ -z $(HAVE_DOUBLE) ] || echo --enable-double ) |
[ceb884d] | 6 | TESTSOUNDS := python/tests/sounds |
[6a6cb48] | 7 | |
[8e94af5] | 8 | all: build |
9 | ||
10 | checkwaf: | |
11 | @[ -f waf ] || make getwaf | |
12 | ||
13 | getwaf: | |
[edb1d7a] | 14 | curl https://waf.io/waf-1.8.20 > waf |
[81ad577] | 15 | @chmod +x waf |
16 | ||
17 | expandwaf: | |
[8e94af5] | 18 | @[ -d wafilb ] || rm -fr waflib |
[81ad577] | 19 | @$(WAFCMD) --help > /dev/null |
[0e39e88] | 20 | @mv .waf*/waflib . && rm -fr .waf* |
[6121dd4] | 21 | @sed '/^#==>$$/,$$d' waf > waf2 && mv waf2 waf |
[8e94af5] | 22 | @chmod +x waf |
23 | ||
[e372a0f] | 24 | configure: checkwaf |
[6a6cb48] | 25 | $(WAFCMD) configure $(WAFOPTS) $(ENABLE_DOUBLE) |
[e372a0f] | 26 | |
27 | build: configure | |
[3fc5696] | 28 | $(WAFCMD) build $(WAFOPTS) |
[8e94af5] | 29 | |
[972a326] | 30 | build_python: |
[1167631] | 31 | python ./setup.py generate $(ENABLE_DOUBLE) build |
[972a326] | 32 | |
[1167631] | 33 | test_python: export LD_LIBRARY_PATH=$(PWD)/build/src |
[69212a0] | 34 | test_python: |
[1167631] | 35 | pip install -v -r requirements.txt |
36 | pip install -v . | |
37 | nose2 --verbose | |
38 | pip uninstall -y -v aubio | |
[39122f0] | 39 | |
40 | test_python_osx: | |
[1167631] | 41 | # create links from ~/lib/lib* to build/src/lib* |
[b099f50] | 42 | [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.4.dylib ~/lib ) || true |
[1167631] | 43 | # then run the tests |
44 | pip install --user -v -r requirements.txt | |
45 | pip install --user -v . | |
46 | nose2 --verbose | |
47 | pip uninstall -y -v aubio | |
[69212a0] | 48 | |
[972a326] | 49 | clean_python: |
[1167631] | 50 | ./setup.py clean |
[972a326] | 51 | |
[a2ae70a] | 52 | build_python3: |
[1167631] | 53 | python3 ./setup.py generate $(ENABLE_DOUBLE) build |
[a2ae70a] | 54 | |
55 | clean_python3: | |
[1167631] | 56 | python3 ./setup.py clean |
[a2ae70a] | 57 | |
[ddd9861] | 58 | clean: |
[81ad577] | 59 | $(WAFCMD) clean |
[ddd9861] | 60 | |
[e372a0f] | 61 | distcheck: checkwaf |
[7aed123] | 62 | $(WAFCMD) distcheck $(WAFOPTS) $(ENABLE_DOUBLE) |
[8e94af5] | 63 | |
64 | help: | |
[81ad577] | 65 | $(WAFCMD) --help |
[be06e53] | 66 | |
67 | create_test_sounds: | |
[3a7b7c6] | 68 | -[ -z `which $(SOX)` ] && ( echo $(SOX) could not be found) || true |
69 | -mkdir -p $(TESTSOUNDS) | |
[ceb884d] | 70 | -$(SOX) -r 44100 -b 16 -n "$(TESTSOUNDS)/44100Hz_1f_silence.wav" synth 1s silence 0 |
71 | -$(SOX) -r 22050 -b 16 -n "$(TESTSOUNDS)/22050Hz_5s_brownnoise.wav" synth 5 brownnoise vol 0.9 | |
72 | -$(SOX) -r 32000 -b 16 -n "$(TESTSOUNDS)/32000Hz_127f_sine440.wav" synth 127s sine 440 vol 0.9 | |
73 | -$(SOX) -r 8000 -b 16 -n "$(TESTSOUNDS)/8000Hz_30s_silence.wav" synth 30 silence 0 vol 0.9 | |
74 | -$(SOX) -r 48000 -b 32 -n "$(TESTSOUNDS)/48000Hz_60s_sweep.wav" synth 60 sine 100-20000 vol 0.9 |
Note: See TracBrowser
for help on using the repository browser.