From cd092a6c09e5ecfd8f5274176ad4613fe95ae6f3 Mon Sep 17 00:00:00 2001 From: John Glover Date: Fri, 24 Jun 2011 18:56:57 +0100 Subject: Build sms using setup.py --- setup.py | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 4ed7ba5..669c145 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,6 @@ include_dirs = [numpy_include, '/usr/local/include'] # SndObj Library # ------------------------------------------------------------------------------ -# sources sndobj_sources = """ SndObj.cpp SndIO.cpp FFT.cpp IFFT.cpp PVA.cpp PVS.cpp IFGram.cpp SinAnal.cpp SinSyn.cpp AdSyn.cpp ReSyn.cpp HarmTable.cpp HammingTable.cpp @@ -82,9 +81,37 @@ sndobj = Extension("simpl/_simplsndobj", sources=sndobj_sources, include_dirs=sndobj_include_dirs, define_macros=sndobj_macros, - # libraries=['m', 'fftw3'], swig_opts=sndobj_swig_opts) +# ------------------------------------------------------------------------------ +# SMS +# ------------------------------------------------------------------------------ + +sms_sources = """ + OOURA.c cepstrum.c peakContinuation.c soundIO.c tables.c + fileIO.c peakDetection.c spectralApprox.c transforms.c + filters.c residual.c spectrum.c windows.c SFMT.c fixTracks.c + sineSynth.c stocAnalysis.c harmDetection.c sms.c synthesis.c + analysis.c modify.c + """.split() + +sms_sources = map(lambda x: 'src/sms/' + x, sms_sources) +sms_sources.append("simpl/sms.i") + +# sms_macros = [] +# sms_macros.extend(macros) +# sms_swig_opts = [] +# sms_swig_opts.extend(swig_opts) +sms_include_dirs = ['src/sms'] +sms_include_dirs.extend(include_dirs) + +sndobj = Extension("simpl/_simplsms", + sources=sms_sources, + include_dirs=sms_include_dirs, + libraries=['m', 'fftw3', 'gsl', 'gslcblas'], + extra_compile_args=['-DMERSENNE_TWISTER']) + + # ------------------------------------------------------------------------------ # Package # ------------------------------------------------------------------------------ -- cgit v1.2.3