-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
42 lines (32 loc) · 1.07 KB
/
makefile
File metadata and controls
42 lines (32 loc) · 1.07 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
#include build/conanbuildinfo.mak
CXX=g++
CXXFLAGS=-g -std=c++11 -Wall -march=native -mtune=native -fopenmp -O3 -laf
CUDAFLAGS=-g -std=c++11 -Xcompiler "-Wall -march=native -mtune=native -fopenmp -O3"
#CXXASSEMBLYFLAGS=-S -fverbose-asm
CUDAC=nvcc
INCLUDES=-I/opt/arrayfire/include
LIBRARIES=-L/opt/arrayfire/lib64
FILES=$(wildcard src/*.cpp) $(wildcard src/*.cu)
OBJS=$(FILES:.cpp=.o) $(FILES:.cu=.o)
EXEC=convolution.out
# conan
CFLAGS += $(CONAN_CFLAGS)
CXXFLAGS += $(CONAN_CXXFLAGS)
INCLUDES += $(addprefix -I, $(CONAN_INCLUDE_DIRS))
DEFINES += $(addprefix -D, $(CONAN_DEFINES))
all: $(EXEC)
#assembly: $(OBJS)
# $(CXX) $(INCLUDES) $(DEFINES) $(LIBRARIES) $(CXXFLAGS)\
# $(CXXASSEMBLYFLAGS) $(FILES)
$(EXEC): $(OBJS)
$(CUDAC) $(INCLUDES) $(DEFINES) $(LIBRARIES) $(CUDAFLAGS) $(FILES) -o $@
%.o: %.cpp
$(CUDAC) $(INCLUDES) $(DEFINES) $(LIBRARIES) $(CUDAFLAGS) -c $< -o $@
%.o: %.cu
$(CUDAC) $(INCLUDES) $(DEFINES) $(LIBRARIES) $(CUDAFLAGS) -c $< -o $@
test: $(EXEC)
./queue.sh convolution.sh
speedtest: $(EXEC)
$(EXEC)
clean:
rm -f *.e* *.o* *.s