-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
73 lines (52 loc) · 1.98 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# requires github.com/google/benchmark
CC=gcc-8
CXX=g++-8
#CC=clang-8
#CXX=clang++-8
LIBBENCHMARK=/usr/local/lib/libbenchmark.a -pthread
LIBFFTW=-lfftw3f
#LIBFFTW=${HOME}/local/src/fftw-3.3.8/.libs/libfftw3f.a
#LIBFFTW=-Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl
ARCH=#-march=native
FLAGS=-Wall -Wextra -pedantic -I. -O3 $(ARCH)
LIBMU=libmuFFT.a libmuFFT-sse.a libmuFFT-sse3.a libmuFFT-avx.a
OBJ_3D=kissfftnd.o kissfft.o
OBJ_1D=$(LIBMU) kissfft.o pffft.o meow_fft.o
LIBS=$(LIBFFTW) $(LIBBENCHMARK)
all: 1d 1d-r meow_fft.o plan1d 2d 3d 3d-r transpose
1d: 1d.cpp $(OBJ_1D)
$(CXX) $(FLAGS) $< $(OBJ_1D) -o $@ $(LIBS)
plan1d: plan1d.cpp $(OBJ_1D)
$(CXX) $(FLAGS) $< $(OBJ_1D) -o $@ $(LIBS)
1d-r: 1d-r.cpp $(OBJ_1D) kissfftr.o
$(CXX) $(FLAGS) $< kissfftr.o $(OBJ_1D) -o $@ $(LIBS)
2d: 2d.cpp $(LIBMU) $(OBJ_3D)
$(CXX) $(FLAGS) $< $(LIBMU) $(OBJ_3D) -o $@ $(LIBS)
3d: 3d.cpp $(OBJ_3D)
$(CXX) $(FLAGS) $< $(OBJ_3D) -o $@ $(LIBS)
3d-r: 3d-r.cpp $(OBJ_3D) kissfftndr.o kissfftr.o
$(CXX) $(FLAGS) $< kissfftndr.o kissfftr.o $(OBJ_3D) -o $@ $(LIBS)
transpose: transpose.cpp
$(CXX) $(FLAGS) $< -o $@ $(LIBBENCHMARK)
pocketfft.o: pocketfft/pocketfft.cc pocketfft/pocketfft.h
$(CXX) $(FLAGS) -march=native -c $< -o $@
kissfft.o: kissfft/kiss_fft.c kissfft/kiss_fft.h
$(CC) $(FLAGS) -c $< -o $@
kissfftr.o: kissfft/tools/kiss_fftr.c
$(CC) $(FLAGS) -Ikissfft -c $< -o $@
kissfftnd.o: kissfft/tools/kiss_fftnd.c
$(CC) $(FLAGS) -Ikissfft -c $< -o $@
kissfftndr.o: kissfft/tools/kiss_fftndr.c
$(CC) $(FLAGS) -Ikissfft -c $< -o $@
pffft.o: pffft/pffft.c pffft/pffft.h
$(CC) $(FLAGS) -UPFFFT_SIMD_DISABLE -c $< -o $@
kfrfft.o: kfr/dft/impl/fft-impl-f32.cpp
$(CXX) $(FLAGS) -c $< -o $@
meow.c:
echo '#define MEOW_FFT_IMPLEMENTATION 1' > $@
echo '#include "meow_fft/meow_fft.h"' >> $@
meow_fft.o: meow.c
$(CC) $(FLAGS) -c $< -o $@
clean:
rm -f 1d 1d-r plan1d *.o
.PHONY: all clean