21 lines
455 B
Makefile
21 lines
455 B
Makefile
|
TARGET=main
|
||
|
OBJECTS=util.o convolution.o main.o
|
||
|
|
||
|
CPPFLAGS=-std=c++11 -O3 -Wall -march=native -mavx2 -mfma -mavx512f -fopenmp
|
||
|
CPPFLAGS+= -I/usr/local/cuda/include/
|
||
|
LDFLAGS=-lm
|
||
|
LDFLAGS+=-L/usr/local/cuda/lib64 -lOpenCL -lmpi -lmpi_cxx -lcudart
|
||
|
|
||
|
NVCC=/usr/local/cuda/bin/nvcc
|
||
|
|
||
|
all: $(TARGET)
|
||
|
|
||
|
$(TARGET): $(OBJECTS)
|
||
|
g++ $(CPPFLAGS) $^ -o $@ $(LDFLAGS)
|
||
|
|
||
|
convolution.o:convolution.cu
|
||
|
$(NVCC) -arch=compute_86 -c -o $@ $^
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(TARGET) $(OBJECTS)
|