-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
34 lines (25 loc) · 1009 Bytes
/
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
NVCC :=nvcc --cudart=static -ccbin g++ -Xcompiler -fopenmp
CFLAGS :=-O3 -std=c++14
INC_DIR :=-
LIB_DIR :=
LIBS :=-lcusolver -lcusolverMg -lcurand
ARCHES :=-gencode arch=compute_70,code=\"compute_70,sm_70\" \
-gencode arch=compute_75,code=\"compute_75,sm_75\" \
-gencode arch=compute_80,code=\"compute_80,sm_80\"
MAGMADIR := /usr/local/magma
MAGMALIB := -L$(MAGMADIR)/lib
MAGMAINC := -I$(MAGMADIR)/include
MAGMA_LIBS := -L$(MAGMADIR)/lib -lmagma
SOURCES :=lu_decomposition_cusolver \
lu_decomposition_cusolvermg \
lu_decomposition_magma
all: $(SOURCES)
.PHONY: all
lu_decomposition_cusolver: lu_decomposition_cusolver.cu
$(NVCC) $(CFLAGS) $(INC_DIR) $(LIB_DIR) ${ARCHES} $^ -o $@ $(LIBS)
lu_decomposition_cusolvermg: lu_decomposition_cusolvermg.cu
$(NVCC) $(CFLAGS) $(INC_DIR) $(LIB_DIR) ${ARCHES} $^ -o $@ $(LIBS)
lu_decomposition_magma: lu_decomposition_magma.cu
$(NVCC) $(CFLAGS) $(MAGMAINC) $(MAGMALIB) ${ARCHES} $^ -o $@ $(MAGMA_LIBS) $(LIBS)
clean:
rm -f $(SOURCES)