Commit:af78782438bd3dfff481a105e3f86988105b992a (browse)
Parent:95e6f8be0c1c450fc3800b6dd57e7d63212ea42c
Author:Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:Tue May 25 08:29:32 CES 2021
Message:
build libfft, disable padsynth and fftwrapper (both require fftw3)

lib/fft/fftlib.c => 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 => lib/fft/mkfile
@@ -0,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

mkfile => 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

modules/mkfile => 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\