ref: af78782438bd3dfff481a105e3f86988105b992a
parent: 95e6f8be0c1c450fc3800b6dd57e7d63212ea42c
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Tue May 25 02:29:32 EDT 2021
build libfft, disable padsynth and fftwrapper (both require fftw3)
--- a/lib/fft/fftlib.c
+++ b/lib/fft/fftlib.c
@@ -14,6 +14,7 @@
#define POW2(m) ((uint32_t) 1 << (m)) /* integer power of 2 for m<32 */
/* fft's with M bigger than this bust primary cache */
+#undef MCACHE
#define MCACHE (11 - (sizeof(SPFLOAT) / 8))
/* some math constants to 40 decimal places */
--- /dev/null
+++ b/lib/fft/mkfile
@@ -1,0 +1,13 @@
+<../../mkfile.common
+
+LIB=libfft.a$O
+CFLAGS=$CFLAGS -I../../h
+
+HFILES=\
+ fftlib.c\
+ sp_fft.c\
+
+OFILES=\
+ fft.$O\
+
+</sys/src/cmd/mklib
--- a/mkfile
+++ b/mkfile
@@ -2,10 +2,9 @@
HEADER=h/soundpipe.h
PWD=`{pwd}
-
CLEANFILES=$HEADER
-DIRS=modules lib/dr_wav lib/inih lib/kissfft lib/openlpc lib/spa tangled
+DIRS=modules lib/dr_wav lib/fft lib/inih lib/kissfft lib/openlpc lib/spa tangled
default:V: all
@@ -22,9 +21,9 @@
echo '#define _soundpipe_h_'
echo
for(d in \
- modules/libspmodules \
- lib/dr_wav/libdr_wav lib/inih/libinih lib/kissfft/libkissfft \
- lib/openlpc/libopenlpc lib/spa/libspa tangled/libtangled){
+ modules/libspmodules lib/dr_wav/libdr_wav lib/fft/libfft \
+ lib/inih/libinih lib/kissfft/libkissfft lib/openlpc/libopenlpc \
+ lib/spa/libspa tangled/libtangled){
echo '#pragma lib' "^$PWD^/^$d^'.a$O"'
}
echo
--- a/modules/mkfile
+++ b/modules/mkfile
@@ -28,7 +28,7 @@
dmetro.$O\
dtrig.$O\
expon.$O\
- fftwrapper.$O\
+ # requires fftw3 fftwrapper.$O\
fmpair.$O\
ftbl.$O\
in.$O\
@@ -44,7 +44,7 @@
nsmp.$O\
osc.$O\
oscmorph.$O\
- padsynth.$O\
+ # requires fftw3 padsynth.$O\
paulstretch.$O\
peakeq.$O\
peaklim.$O\