forked from VeriBlock/nodecore-pow-cuda-miner
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
30 lines (23 loc) · 770 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
# Change this path if the SDK was installed in a non-standard location
OPENCL_HEADERS = "/opt/AMDAPPSDK-3.0/include"
# By default libOpenCL.so is searched in default system locations, this path
# lets you adds one more directory to the search path.
LIBOPENCL = "/opt/amdgpu-pro/lib/x86_64-linux-gnu"
CC = g++
CPPFLAGS = -I${OPENCL_HEADERS}
CFLAGS = -O2 -Wall
LDFLAGS = -pthread -lpthread -rdynamic -L${LIBOPENCL} -fpermissive
LDLIBS = -lOpenCL -lrt
OBJ = kernel.cc
INCLUDES = _kernel.h
all : veri_amd
veri_amd : ${OBJ}
${CC} -std=gnu++11 -o veri_amd ${OBJ} ${LDFLAGS} ${LDLIBS}
${OBJ} : ${INCLUDES}
_kernel.h : input.cl
echo 'const char *ocl_code = R"_mrb_(' >$@
cpp $< >>$@
echo ')_mrb_";' >>$@
clean :
rm -f veri_amd _kernel.h *.o _temp_*
re : clean all