source: Makefile @ 02178d4

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 02178d4 was 3a7b7c6, checked in by Paul Brossier <piem@piem.org>, 9 years ago

Makefile: do not fail if sox is not installed

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[81ad577]1WAFCMD=python waf
[6a6cb48]2
[be06e53]3SOX=sox
4
[6a6cb48]5ENABLE_DOUBLE := $(shell [ -z $(HAVE_DOUBLE) ] || echo --enable-double )
[be06e53]6TESTSOUNDS := "python/tests/sounds"
[6a6cb48]7
[8e94af5]8all: build
9
10checkwaf:
11        @[ -f waf ] || make getwaf
12
13getwaf:
[edb1d7a]14        curl https://waf.io/waf-1.8.20 > waf
[81ad577]15        @chmod +x waf
16
17expandwaf:
[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]24configure: checkwaf
[6a6cb48]25        $(WAFCMD) configure $(WAFOPTS) $(ENABLE_DOUBLE)
[e372a0f]26
27build: configure
[3fc5696]28        $(WAFCMD) build $(WAFOPTS)
[8e94af5]29
[972a326]30build_python:
[6a6cb48]31        cd python && python ./setup.py generate $(ENABLE_DOUBLE) build
[972a326]32
[69212a0]33test_python:
[39122f0]34        cd python && pip install -v .
[597a789]35        LD_LIBRARY_PATH=$(PWD)/build/src python/tests/run_all_tests --verbose
[39122f0]36        cd python && pip uninstall -y -v aubio
37
38test_python_osx:
[d1a7a90]39        cd python && pip install --user -v .
[b099f50]40        [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.4.dylib ~/lib ) || true
[597a789]41        ./python/tests/run_all_tests --verbose
[d1a7a90]42        cd python && pip uninstall -y -v aubio
[69212a0]43
[972a326]44clean_python:
45        cd python && ./setup.py clean
46
[a2ae70a]47build_python3:
[6a6cb48]48        cd python && python3 ./setup.py generate $(ENABLE_DOUBLE) build
[a2ae70a]49
50clean_python3:
51        cd python && python3 ./setup.py clean
52
[ddd9861]53clean:
[81ad577]54        $(WAFCMD) clean
[ddd9861]55
[e372a0f]56distcheck: checkwaf
[81ad577]57        $(WAFCMD) distcheck
[8e94af5]58
59help:
[81ad577]60        $(WAFCMD) --help
[be06e53]61
62create_test_sounds:
[3a7b7c6]63        -[ -z `which $(SOX)` ] && ( echo $(SOX) could not be found) || true
64        -mkdir -p $(TESTSOUNDS)
65        -$(SOX) -r 44100 -n $(TESTSOUNDS)/44100Hz_1f_silence.wav synth 1s silence 0
66        -$(SOX) -r  8000 -n $(TESTSOUNDS)/8000Hz_30s_silence.wav synth 30 silence 0
67        -$(SOX) -r 32000 -n $(TESTSOUNDS)/32000Hz_127f_sine440.wav synth 127 sine 440
68        -$(SOX) -r 22050 -n $(TESTSOUNDS)/22050Hz_5s_brownnoise.wav synth 5 brownnoise
69        -$(SOX) -r 48000 -n $(TESTSOUNDS)/48000Hz_60s_sweep.wav synth 60 sine 200-24000
Note: See TracBrowser for help on using the repository browser.