Chris@29
|
1
|
Chris@29
|
2 # Add to FFT_DEFINES the relevant options for your desired third-party
|
Chris@29
|
3 # library support.
|
Chris@29
|
4 #
|
Chris@29
|
5 # Available options are
|
Chris@29
|
6 #
|
Chris@29
|
7 # -DHAVE_IPP Intel's Integrated Performance Primitives are available
|
Chris@29
|
8 # -DHAVE_VDSP Apple's Accelerate framework is available
|
Chris@29
|
9 # -DHAVE_FFTW3 The FFTW library is available
|
Chris@29
|
10 # -DHAVE_KISSFFT The KissFFT library is available
|
Chris@29
|
11 # -DHAVE_MEDIALIB The Medialib library (from Sun) is available
|
Chris@29
|
12 # -DHAVE_OPENMAX The OpenMAX signal processing library is available
|
Chris@29
|
13 # -DUSE_BUILTIN_FFT Compile the built-in FFT code (which is very slow)
|
Chris@29
|
14 #
|
Chris@29
|
15 # You may define more than one of these. If you define
|
Chris@29
|
16 # USE_BUILTIN_FFT, the code will be compiled in but will only be used
|
Chris@29
|
17 # if no other option is available. The default, if no flags are
|
Chris@29
|
18 # supplied, is for the code to refuse to compile.
|
Chris@29
|
19 #
|
Chris@29
|
20 # Add any relevant -I flags for include paths as well.
|
Chris@29
|
21 #
|
Chris@29
|
22 # Note that you must supply the same flags when including bqfft
|
Chris@29
|
23 # headers later as you are using now when compiling the library. (You
|
Chris@29
|
24 # may find it simplest to just add the bqfft source files to your
|
Chris@29
|
25 # application's build system and not build a bqfft library at all.)
|
Chris@29
|
26
|
Chris@29
|
27 # WARNING! The default option here is VERY SLOW! Read above for better
|
Chris@29
|
28 # alternatives!
|
Chris@29
|
29 FFT_DEFINES := -DHAVE_VDSP
|
Chris@29
|
30
|
Chris@29
|
31
|
Chris@29
|
32 # Add to ALLOCATOR_DEFINES options relating to aligned malloc.
|
Chris@29
|
33 #
|
Chris@29
|
34 # Available options are
|
Chris@29
|
35 #
|
Chris@29
|
36 # -DHAVE_POSIX_MEMALIGN The posix_memalign call is available in sys/mman.h
|
Chris@29
|
37 # -DLACK_POSIX_MEMALIGN The posix_memalign call is not available
|
Chris@29
|
38 #
|
Chris@29
|
39 # -DMALLOC_IS_ALIGNED The malloc call already returns aligned memory
|
Chris@29
|
40 # -DMALLOC_IS_NOT_ALIGNED The malloc call does not return aligned memory
|
Chris@29
|
41 #
|
Chris@29
|
42 # -DUSE_OWN_ALIGNED_MALLOC No aligned malloc is available, roll your own
|
Chris@29
|
43 #
|
Chris@29
|
44 # -DLACK_BAD_ALLOC The C++ library lacks the std::bad_alloc exception
|
Chris@29
|
45 #
|
Chris@29
|
46 # Here "aligned" is assumed to mean "aligned enough for whatever
|
Chris@29
|
47 # vector stuff the space will be used for" which most likely means
|
Chris@29
|
48 # 16-byte alignment.
|
Chris@29
|
49 #
|
Chris@29
|
50 # The default is to use _aligned_malloc when building with Visual C++,
|
Chris@29
|
51 # system malloc when building on OS/X, and posix_memalign otherwise.
|
Chris@29
|
52 #
|
Chris@29
|
53 # Note that you must supply the same flags when including bqfft
|
Chris@29
|
54 # headers later as you are using now when compiling the library. (You
|
Chris@29
|
55 # may find it simplest to just add the bqfft source files to your
|
Chris@29
|
56 # application's build system and not build a bqfft library at all.)
|
Chris@29
|
57
|
Chris@29
|
58 ALLOCATOR_DEFINES := -DMALLOC_IS_ALIGNED
|
Chris@29
|
59
|
Chris@29
|
60 SRC_DIR := src
|
Chris@29
|
61 HEADER_DIR := bqfft
|
Chris@29
|
62
|
Chris@29
|
63 SOURCES := $(wildcard $(SRC_DIR)/*.cpp)
|
Chris@29
|
64 HEADERS := $(wildcard $(HEADER_DIR)/*.h) $(wildcard $(SRC_DIR)/*.h)
|
Chris@29
|
65
|
Chris@29
|
66 OBJECTS := $(SOURCES:.cpp=.o)
|
Chris@29
|
67 OBJECTS := $(OBJECTS:.c=.o)
|
Chris@29
|
68
|
Chris@29
|
69 CXXFLAGS := $(FFT_DEFINES) $(ALLOCATOR_DEFINES) -O3 -ffast-math -I. -I../bqvec -fpic
|
Chris@29
|
70
|
Chris@29
|
71 LIBRARY := libbqfft.a
|
Chris@29
|
72
|
Chris@29
|
73 all: $(LIBRARY)
|
Chris@29
|
74
|
Chris@29
|
75 $(LIBRARY): $(OBJECTS)
|
Chris@29
|
76 $(AR) rc $@ $^
|
Chris@29
|
77
|
Chris@29
|
78 clean:
|
Chris@29
|
79 rm -f $(OBJECTS)
|
Chris@29
|
80
|
Chris@29
|
81 distclean: clean
|
Chris@29
|
82 rm -f $(LIBRARY)
|
Chris@29
|
83
|
Chris@29
|
84 depend:
|
Chris@29
|
85 makedepend -Y -fMakefile $(SOURCES) $(HEADERS)
|
Chris@29
|
86
|
Chris@29
|
87
|
Chris@29
|
88 # DO NOT DELETE
|
Chris@29
|
89
|
Chris@29
|
90 src/FFT.o: bqfft/FFT.h
|