Changeset 5d9693c
- Timestamp:
- Dec 1, 2016, 7:57:40 PM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
- Children:
- 4cdef00
- Parents:
- a028a04
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
ra028a04 r5d9693c 1 1 WAFCMD=python waf 2 2 WAFURL=https://waf.io/waf-1.8.22 3 4 #WAFOPTS:= 5 # turn on verbose mode 6 #WAFOPTS += --verbose 7 # build wafopts 8 WAFOPTS += --destdir $(DESTDIR) 9 # multiple jobs 10 WAFOPTS += --jobs 4 11 12 DESTDIR:=$(PWD)/build/dist 13 PYDESTDIR:=$(PWD)/build/pydist 14 15 # default install locations 16 PREFIX?=/usr/local 17 EXEC_PREFIX?=$(PREFIX) 18 LIBDIR?=$(PREFIX)/lib 19 INCLUDEDIR?=$(PREFIX)/include 20 DATAROOTDIR?=$(PREFIX)/share 21 MANDIR?=$(DATAROOTDIR)/man 3 22 4 23 SOX=sox … … 31 50 $(WAFCMD) build $(WAFOPTS) 32 51 52 install: 53 # install 54 $(WAFCMD) install $(WAFOPTS) 55 make list_installed 56 57 list_installed: 58 find $(DESTDIR) -ls | sed 's|$(DESTDIR)|/«destdir»|' 59 60 list_installed_python: 61 find $(PYDESTDIR) -ls | sed 's|$(PYDESTDIR)|/«pydestdir»|' 62 63 uninstall: 64 # uninstall 65 $(WAFCMD) uninstall $(WAFOPTS) 66 67 delete_install: 68 rm -rf $(PWD)/dist/test 69 33 70 build_python: 34 python ./setup.py build_ext $(ENABLE_DOUBLE) 35 36 test_python: export LD_LIBRARY_PATH=$(PWD)/build/src 71 # build python-aubio, using locally built libaubio if found 72 python ./setup.py build $(ENABLE_DOUBLE) 73 74 build_python_extlib: 75 # build python-aubio using (locally) installed libaubio 76 [ -f $(DESTDIR)/$(INCLUDEDIR)/aubio/aubio.h ] 77 [ -d $(DESTDIR)/$(LIBDIR) ] 78 [ -f $(DESTDIR)/$(LIBDIR)/pkgconfig/aubio.pc ] 79 PKG_CONFIG_PATH=$(DESTDIR)/$(LIBDIR)/pkgconfig \ 80 CFLAGS="-I$(DESTDIR)/$(INCLUDEDIR) $(CFLAGS)" \ 81 LDFLAGS="-L$(DESTDIR)/$(LIBDIR) $(CFLAGS)" \ 82 make build_python 83 make list_installed 84 cat $(DESTDIR)/$(LIBDIR)/pkgconfig/aubio.pc 85 86 deps_python: 87 # install or upgrade python requirements 88 pip install --verbose --upgrade --requirement requirements.txt 89 90 # use pip or distutils? 91 #install_python: install_python_with_pip 92 uninstall_python: uninstall_python_with_pip 93 install_python: install_python_with_distutils 94 #uninstall_python: uninstall_python_with_distutils 95 96 install_python_with_pip: 97 # install package 98 pip install --verbose . 99 100 uninstall_python_with_pip: 101 # uninstall package 102 pip uninstall -y -v aubio || make uninstall_python_with_distutils 103 104 install_python_with_distutils: 105 ./setup.py install $(DISTUTILSOPTS) 106 107 uninstall_python_with_distutils: 108 #./setup.py uninstall 109 [ -d $(PYDESTDIR)/$(LIBDIR) ] && echo Warning: did not clean $(PYDESTDIR)/$(LIBDIR) || true 110 111 force_uninstall_python: 112 # ignore failure if not installed 113 -make uninstall_python 114 115 local_dylib: 116 # DYLD_LIBRARY_PATH is no more on mac os 117 # create links from ~/lib/lib* to build/src/lib* 118 [ -f $(PWD)/build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.[0-9].dylib ~/lib ) || true 119 120 test_python: export LD_LIBRARY_PATH=$(DESTDIR)/$(LIBDIR) 121 test_python: export PYTHONPATH=$(PYDESTDIR)/$(LIBDIR) 37 122 test_python: local_dylib 38 # clean39 -pip uninstall -v -y aubio40 ./setup.py clean41 $(WAFCMD) distclean42 # build library43 $(WAFCMD) configure build44 # install python requirements45 pip install -v -r requirements.txt46 # install package47 pip install -v .48 # can clean twice49 ./setup.py clean50 ./setup.py clean51 123 # run test with installed package 52 124 ./python/tests/run_all_tests --verbose 53 nose2 -N 4 #--verbose 54 # uninstall package 55 pip uninstall -y -v aubio 56 57 local_dylib: 58 # create links from ~/lib/lib* to build/src/lib* 59 [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.[0-9].dylib ~/lib ) || true 125 # also run with nose, multiple processes 126 nose2 -N 4 127 # list installed files 128 #find $(DESTDIR) -ls | sed 's|$(DESTDIR)||' 129 make list_installed_python 60 130 61 131 clean_python: 62 132 ./setup.py clean 63 133 64 test_pure_python: 65 # clean 66 -pip uninstall -v -y aubio 67 -$(WAFCMD) distclean 68 ./setup.py clean 69 # install python requirements 70 pip install --verbose --requirement requirements.txt 71 # compile 72 CFLAGS=-Os python setup.py build $(ENABLE_DOUBLE) 73 # needs recompile, disabled 74 #./setup.py test 75 # install package 76 pip install --verbose . 77 # can clean twice 78 ./setup.py clean 79 ./setup.py clean 80 # run test with installed package 81 ./python/tests/run_all_tests --verbose 82 nose2 -N 4 #--verbose 83 # uninstall 84 pip uninstall -v -y aubio 85 86 test_pure_python_wheel: 87 -pip uninstall -v -y aubio 88 -rm -rf build/ python/gen/ 89 -rm -f dist/*.whl 90 -pip install -v -r requirements.txt 91 -pip install -v wheel 92 CFLAGS=-Os python setup.py build_ext $(ENABLE_DOUBLE) bdist_wheel --universal 93 wheel install dist/*.whl 94 nose2 -N 4 95 pip uninstall -v -y aubio 96 97 build_python3: 98 python3 ./setup.py build_ext $(ENABLE_DOUBLE) 99 100 clean_python3: 101 python3 ./setup.py clean 134 check_clean_python: 135 # check cleaning a second time works 136 make clean_python 137 make clean_python 102 138 103 139 clean: 140 # optionnaly clean before build 141 -$(WAFCMD) clean 142 143 check_clean: 144 # check cleaning after build works 145 $(WAFCMD) clean 146 # check cleaning a second time works 104 147 $(WAFCMD) clean 105 148 106 149 distclean: 107 150 $(WAFCMD) distclean 151 152 check_distclean: 153 make distclean 108 154 109 155 distcheck: checkwaf … … 124 170 -$(SOX) -r 44100 -b 16 -n "$(TESTSOUNDS)/44100Hz_100f_sine441.wav" synth 100s sine 441 vol 0.9 125 171 172 # build only libaubio, no python-aubio 173 test_lib_only: clean distclean configure build install 174 # additionally, clean after a fresh build 175 test_lib_only_clean: test_lib_only uninstall check_clean check_distclean 176 177 # build libaubio, build and test python-aubio against it 178 test_lib_python: force_uninstall_python deps_python \ 179 clean_python clean distclean \ 180 configure build build_python \ 181 install install_python \ 182 test_python 183 184 test_lib_python_clean: test_lib_python \ 185 uninstall_python uninstall \ 186 check_clean_python \ 187 check_clean \ 188 check_distclean 189 190 # build libaubio, install it, build python-aubio against it 191 test_lib_install_python: force_uninstall_python deps_python \ 192 clean_python distclean \ 193 configure build \ 194 install \ 195 build_python_extlib \ 196 install_python \ 197 test_python 198 199 test_lib_install_python_clean: test_lib_install_python \ 200 uninstall_python \ 201 delete_install \ 202 check_clean_python \ 203 check_distclean 204 205 # build a python-aubio that includes libaubio 206 test_python_only: force_uninstall_python deps_python \ 207 clean_python clean distclean \ 208 build_python \ 209 install_python \ 210 test_python 211 212 test_python_only_clean: test_python_only \ 213 uninstall_python \ 214 check_clean_python 215 216 126 217 html: 127 218 cd doc && make html
Note: See TracChangeset
for help on using the changeset viewer.