Makefile: do not fail if dylib not found
[aubio.git] / Makefile
1 WAFCMD=python waf
2 all: build
3
4 checkwaf:
5         @[ -f waf ] || make getwaf
6
7 getwaf:
8         curl https://waf.io/waf-1.8.14 > waf
9         @chmod +x waf
10
11 expandwaf:
12         @[ -d wafilb ] || rm -fr waflib
13         @$(WAFCMD) --help > /dev/null
14         @mv .waf*/waflib . && rm -fr .waf*
15         @sed '/^#==>$$/,$$d' waf > waf2 && mv waf2 waf
16         @chmod +x waf
17
18 configure: checkwaf
19         $(WAFCMD) configure
20
21 build: configure
22         $(WAFCMD) build
23
24 build_python:
25         cd python && ./setup.py build
26
27 test_python:
28         cd python && ./setup.py install
29         [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.4.dylib ~/lib ) || true
30         LD_LIBRARY_PATH=$(PWD)/build/src python/tests/run_all_tests
31
32 clean_python:
33         cd python && ./setup.py clean
34
35 build_python3:
36         cd python && python3 ./setup.py build
37
38 clean_python3:
39         cd python && python3 ./setup.py clean
40
41 clean:
42         $(WAFCMD) clean
43
44 distcheck: checkwaf
45         $(WAFCMD) distcheck
46
47 help:
48         $(WAFCMD) --help