Source

exafmm / Makefile.include

.SUFFIXES: .cxx .cu .o
.PHONY: docs

### CUDA path
CUDA_INSTALL_PATH = /usr/local/cuda

### VTK path
VTK_INCLUDE_PATH = /usr/include/vtk-5.8
VTK_LIBRARY_PATH = /usr/lib/vtk-5.8

### choose CPU or GPU
DEVICE  = CPU
#DEVICE  = GPU

### choose Cartesian or spherical expansion
#EXPAND  = Cartesian
EXPAND  = Spherical

### GCC compiler
#CXX	= mpicxx -ggdb3 -Wall -Wextra -O3 -fopenmp -ffast-math -funroll-loops -fforce-addr -fPIC -I../include
CXX	= mpicxx -ggdb3 -Wall -Wextra -O3 -ffast-math -funroll-loops -fforce-addr -fPIC -I../include
### Intel compiler
#CXX	= mpicxx -Wall -xHOST -O3 -openmp -funroll-loops -finline-functions -fPIC -ansi-alias -I../include

### BG/P compiler
#CXX	= mpixlcxx -qarch=450 -qtune=450 -I../include

### K computer
#CXX	= mpiFCCpx -Kopenmp,fast,ocl,preex,array_private -Ksimd=2,NOFLTLD,mfunc=3,optmsg=2 -Nsrc,sta -I../include -DNDEBUG
# -Kdalign,ns,mfunc,eval,prefetch_conditional,ilfunc -x-

### CUDA compiler
NVCC    = nvcc -Xcompiler -fopenmp --ptxas-options=-v -O3\
	 -use_fast_math -arch=sm_21 -I../include -I$(CUDA_INSTALL_PATH)/include

### Base flags
LFLAGS  = -D$(DEVICE) -D$(EXPAND)

### PAPI flags
#LFLAGS += -DPAPI -lpapi

### QUARK flags
LFLAGS	+= -DQUARK -lquark

### MassiveThreads flags
#LFLAGS += -std=c++0x -DMTHREADS -lmyth -lpthread -ldl

### VTK flags
#CXX     += -I$(VTK_INCLUDE_PATH)
#VFLAGS  = -L$(VTK_LIBRARY_PATH) -lvtkRendering -lvtkGraphics -lvtkFiltering -lvtkViews -lvtkCommon -lvtkWidgets -lvtkIO -DVTK

ifeq ($(DEVICE),GPU)
### CUDA flags
LFLAGS  += -DQUEUE -L$(CUDA_INSTALL_PATH)/lib64 -lcuda -lcudart
endif

OBJECT = ../kernel/$(DEVICE)$(EXPAND)Laplace.o ../kernel/$(DEVICE)VanDerWaals.o\
	../kernel/CPUP2P.o

.cxx.o  :
	$(CXX) -c $? -o $@ $(LFLAGS)
.cu.o   :
	$(NVCC) -c $? -o $@ $(LFLAGS)

help:
	@make -C .. help
clean:
	@make -C .. clean
cleandat:
	@make -C .. cleandat
cleanlib:
	@make -C .. cleanlib
cleanall:
	@make -C .. cleanall
commit:
	@make -C .. commit
save:
	@make -C .. save
revert:
	@make -C .. revert
docs:
	@make -C .. docs
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.