-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadMe
More file actions
56 lines (38 loc) · 1.84 KB
/
Copy pathReadMe
File metadata and controls
56 lines (38 loc) · 1.84 KB
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
NVCC=nvcc
###################################
# These are the default install #
# locations on most linux distros #
###################################
OPENCV_LIBPATH=/usr/lib
OPENCV_INCLUDEPATH=/usr/include
###################################################
# On Macs the default install locations are below #
###################################################
#OPENCV_LIBPATH=/usr/local/lib
#OPENCV_INCLUDEPATH=/usr/local/include
OPENCV_LIBS=-lopencv_core -lopencv_imgproc -lopencv_highgui
CUDA_INCLUDEPATH=/usr/local/cuda-5.0/include
######################################################
# On Macs the default install locations are below #
# ####################################################
#CUDA_INCLUDEPATH=/usr/local/cuda/include
#CUDA_LIBPATH=/usr/local/cuda/lib
NVCC_OPTS=-O3 -arch=sm_20 -Xcompiler -Wall -Xcompiler -Wextra -m64
GCC_OPTS=-O3 -Wall -Wextra -m64
student: main.o student_func.o HW3.o loadSaveImage.o compare.o reference_calc.o Makefile
$(NVCC) -o HW3 main.o student_func.o HW3.o loadSaveImage.o compare.o reference_calc.o -L $(OPENCV_LIBPATH) $(OPENCV_LIBS) $(NVCC_OPTS)
main.o: main.cpp timer.h utils.h reference_calc.h compare.h
g++ -c main.cpp $(GCC_OPTS) -I $(CUDA_INCLUDEPATH)
HW3.o: HW3.cu loadSaveImage.h utils.h
$(NVCC) -c HW3.cu -I $(OPENCV_INCLUDEPATH) $(NVCC_OPTS)
loadSaveImage.o: loadSaveImage.cpp loadSaveImage.h
g++ -c loadSaveImage.cpp -I $(OPENCV_INCLUDEPATH) $(GCC_OPTS) -I $(CUDA_INCLUDEPATH)
compare.o: compare.cpp compare.h
g++ -c compare.cpp -I $(OPENCV_INCLUDEPATH) $(GCC_OPTS) -I $(CUDA_INCLUDEPATH)
reference_calc.o: reference_calc.cpp reference_calc.h
g++ -c reference_calc.cpp -I $(OPENCV_INCLUDEPATH) $(GCC_OPTS) -I $(CUDA_INCLUDEPATH)
student_func.o: student_func.cu utils.h
$(NVCC) -c student_func.cu $(NVCC_OPTS)
clean:
rm -f *.o hw
find . -type f -name '*.exr' | grep -v memorial | xargs rm -f