diff --git a/test/Makefile b/test/Makefile index c0471e7..1c5c030 100644 --- a/test/Makefile +++ b/test/Makefile @@ -22,6 +22,14 @@ else SELFTESTSRC=selftest.c endif +ifeq "$(DATATYPE)" "float" +# fftw needs to be built with --enable-float to build this lib + FFTWLIB=fftw3f +else + FFTWLIB=fftw3 +endif + + all: $(BENCHKISS) $(SELFTEST) $(BENCHFFTW) $(TESTREAL) #CFLAGS=-Wall -O3 -ansi -pedantic -march=pentiumpro -ffast-math -fomit-frame-pointer @@ -38,7 +46,7 @@ $(BENCHKISS): benchkiss.c ../kiss_fft.c pstats.c $(CC) -o $@ $(CFLAGS) -I.. benchkiss.c $(TYPEFLAGS) ../kiss_fft.c pstats.c -lm $(BENCHFFTW): benchfftw.c pstats.c - @$(CC) -o $@ $(CFLAGS) -DDATATYPE$(DATATYPE) benchfftw.c pstats.c -lm -lfftw3f -lfftw3 -L /usr/local/lib/ || echo "FFTW not available for comparison" + @$(CC) -o $@ $(CFLAGS) -DDATATYPE$(DATATYPE) benchfftw.c pstats.c -lm -l$(FFTWLIB) -L/usr/local/lib/ || echo "FFTW not available for comparison" test: all @echo "======SELF TEST $(DATATYPE)" diff --git a/test/pstats.c b/test/pstats.c index fb44c34..d37f26a 100644 --- a/test/pstats.c +++ b/test/pstats.c @@ -28,7 +28,11 @@ static void tms_report() static void ps_report() { char buf[1024]; +#ifdef __APPLE__ /* MAC OS X */ + sprintf(buf,"ps -o command,majflt,minflt,rss,pagein,vsz -p %d 1>&2",getpid() ); +#else /* GNU/Linux */ sprintf(buf,"ps -o comm,majflt,minflt,rss,drs,pagein,sz,trs,vsz %d 1>&2",getpid() ); +#endif system( buf ); } diff --git a/tools/Makefile b/tools/Makefile index c0471e7..1c5c030 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -22,6 +22,14 @@ else SELFTESTSRC=selftest.c endif +ifeq "$(DATATYPE)" "float" +# fftw needs to be built with --enable-float to build this lib + FFTWLIB=fftw3f +else + FFTWLIB=fftw3 +endif + + all: $(BENCHKISS) $(SELFTEST) $(BENCHFFTW) $(TESTREAL) #CFLAGS=-Wall -O3 -ansi -pedantic -march=pentiumpro -ffast-math -fomit-frame-pointer @@ -38,7 +46,7 @@ $(BENCHKISS): benchkiss.c ../kiss_fft.c pstats.c $(CC) -o $@ $(CFLAGS) -I.. benchkiss.c $(TYPEFLAGS) ../kiss_fft.c pstats.c -lm $(BENCHFFTW): benchfftw.c pstats.c - @$(CC) -o $@ $(CFLAGS) -DDATATYPE$(DATATYPE) benchfftw.c pstats.c -lm -lfftw3f -lfftw3 -L /usr/local/lib/ || echo "FFTW not available for comparison" + @$(CC) -o $@ $(CFLAGS) -DDATATYPE$(DATATYPE) benchfftw.c pstats.c -lm -l$(FFTWLIB) -L/usr/local/lib/ || echo "FFTW not available for comparison" test: all @echo "======SELF TEST $(DATATYPE)"