-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.opt
59 lines (45 loc) · 1.04 KB
/
makefile.opt
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
# ----------------------------machine dependent file
#MODE = debug
MODE = optim
FFTMODE = fftw3
#FFTMODE = rfft
# compiler and linker variable
INCLUDES = -I${FMM3D_DIR}
LIBS = -fpermissive -fopenmp -lgfortran -llapack -lblas -lstdc++
AR = ar
ARFLAGS = -r
CC = gcc
CXX = g++
# -Wall -Wno-sign-compare
CFLAGS = -fopenmp -W -Wno-sign-compare -Wno-unused-label -MMD ${INCLUDES}
CXXFLAGS = -fopenmp -W -Wno-sign-compare -Wno-unused-label -MMD ${INCLUDES}
ifeq ($(MODE),debug)
CFLAGS += -fopenmp -g
CXXFLAGS += -fopenmp -g
else
#-O -DNDEBUG
CFLAGS += -fopenmp -O3 -DNDEBUG
CXXFLAGS += -fopenmp -O3 -DNDEBUG
endif
ifeq ($(FFTMODE),fftw3)
CFLAGS += -fopenmp -DFFTW3
CXXFLAGS += -fopenmp -DFFTW3
endif
LDFLAGS = ${LIBS}
ifeq ($(FFTMODE),fftw3)
LDFLAGS += -lfftw3
else
LDFLAGS += -lrfftw -lfftw
endif
MEX = mex
RANLIB = ranlib
# rules
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $*.cpp
#------------------------------------------------------
tilde:
rm -f *~
clean:
rm -rf *~ *.d *.o *.a tt tt0 tt1
tags:
etags *.hpp *.cpp