Chris@29: Chris@29: # Add to FFT_DEFINES the relevant options for your desired third-party Chris@29: # library support. Chris@29: # Chris@29: # Available options are Chris@29: # Chris@29: # -DHAVE_IPP Intel's Integrated Performance Primitives are available Chris@29: # -DHAVE_VDSP Apple's Accelerate framework is available Chris@29: # -DHAVE_FFTW3 The FFTW library is available Chris@29: # -DHAVE_KISSFFT The KissFFT library is available Chris@29: # -DHAVE_MEDIALIB The Medialib library (from Sun) is available Chris@29: # -DHAVE_OPENMAX The OpenMAX signal processing library is available Chris@29: # -DUSE_BUILTIN_FFT Compile the built-in FFT code (which is very slow) Chris@29: # Chris@29: # You may define more than one of these. If you define Chris@29: # USE_BUILTIN_FFT, the code will be compiled in but will only be used Chris@29: # if no other option is available. The default, if no flags are Chris@29: # supplied, is for the code to refuse to compile. Chris@29: # Chris@29: # Add any relevant -I flags for include paths as well. Chris@29: # Chris@29: # Note that you must supply the same flags when including bqfft Chris@29: # headers later as you are using now when compiling the library. (You Chris@29: # may find it simplest to just add the bqfft source files to your Chris@29: # application's build system and not build a bqfft library at all.) Chris@29: Chris@29: # WARNING! The default option here is VERY SLOW! Read above for better Chris@29: # alternatives! Chris@29: FFT_DEFINES := -DHAVE_VDSP Chris@29: Chris@29: Chris@29: # Add to ALLOCATOR_DEFINES options relating to aligned malloc. Chris@29: # Chris@29: # Available options are Chris@29: # Chris@29: # -DHAVE_POSIX_MEMALIGN The posix_memalign call is available in sys/mman.h Chris@29: # -DLACK_POSIX_MEMALIGN The posix_memalign call is not available Chris@29: # Chris@29: # -DMALLOC_IS_ALIGNED The malloc call already returns aligned memory Chris@29: # -DMALLOC_IS_NOT_ALIGNED The malloc call does not return aligned memory Chris@29: # Chris@29: # -DUSE_OWN_ALIGNED_MALLOC No aligned malloc is available, roll your own Chris@29: # Chris@29: # -DLACK_BAD_ALLOC The C++ library lacks the std::bad_alloc exception Chris@29: # Chris@29: # Here "aligned" is assumed to mean "aligned enough for whatever Chris@29: # vector stuff the space will be used for" which most likely means Chris@29: # 16-byte alignment. Chris@29: # Chris@29: # The default is to use _aligned_malloc when building with Visual C++, Chris@29: # system malloc when building on OS/X, and posix_memalign otherwise. Chris@29: # Chris@29: # Note that you must supply the same flags when including bqfft Chris@29: # headers later as you are using now when compiling the library. (You Chris@29: # may find it simplest to just add the bqfft source files to your Chris@29: # application's build system and not build a bqfft library at all.) Chris@29: Chris@29: ALLOCATOR_DEFINES := -DMALLOC_IS_ALIGNED Chris@29: Chris@29: SRC_DIR := src Chris@29: HEADER_DIR := bqfft Chris@29: Chris@29: SOURCES := $(wildcard $(SRC_DIR)/*.cpp) Chris@29: HEADERS := $(wildcard $(HEADER_DIR)/*.h) $(wildcard $(SRC_DIR)/*.h) Chris@29: Chris@29: OBJECTS := $(SOURCES:.cpp=.o) Chris@29: OBJECTS := $(OBJECTS:.c=.o) Chris@29: Chris@29: CXXFLAGS := $(FFT_DEFINES) $(ALLOCATOR_DEFINES) -O3 -ffast-math -I. -I../bqvec -fpic Chris@29: Chris@29: LIBRARY := libbqfft.a Chris@29: Chris@29: all: $(LIBRARY) Chris@29: Chris@29: $(LIBRARY): $(OBJECTS) Chris@29: $(AR) rc $@ $^ Chris@29: Chris@29: clean: Chris@29: rm -f $(OBJECTS) Chris@29: Chris@29: distclean: clean Chris@29: rm -f $(LIBRARY) Chris@29: Chris@29: depend: Chris@29: makedepend -Y -fMakefile $(SOURCES) $(HEADERS) Chris@29: Chris@29: Chris@29: # DO NOT DELETE Chris@29: Chris@29: src/FFT.o: bqfft/FFT.h