Makefile 2.4 KB
Newer Older
lvs's avatar
lvs committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
COMMON_REPO := ../common_xilinx/

#Common Includes
include $(COMMON_REPO)/utility/boards.mk
include $(COMMON_REPO)/libs/xcl2/xcl2.mk
include $(COMMON_REPO)/libs/opencl/opencl.mk






# Host Application

#helloworld_SRCS=./src/host.cpp $(oclHelper_SRCS) $(xcl2_SRCS)
#helloworld_HDRS=$(xcl2_HDRS)

lvs's avatar
lvs committed
18
19
20
21
22
23
24
25
#helloworld_SRCS=$(wildcard ../common/src/AOCLUtils/*.cpp wrapcl/src/*.cpp host/src/*.cpp) \
#		$(oclHelper_SRCS) \
#		$(xcl2_SRCS)

#helloworld_HDRS=$(wildcard ./host/inc/*.h) \
#		$(xcl2_HDRS)

hostbin_SRCS=$(wildcard ../common/src/AOCLUtils/*.cpp wrapcl/src/*.cpp host/src/*.cpp) \
lvs's avatar
lvs committed
26
27
28
		$(oclHelper_SRCS) \
		$(xcl2_SRCS)

lvs's avatar
lvs committed
29
hostbin_HDRS=$(wildcard ./host/inc/*.h) \
lvs's avatar
lvs committed
30
31
32
33
34
		$(xcl2_HDRS)

# -U__STRICT_ANSI__: to avoid: ‘cl_float3 {aka union cl_float4}’ has no member named ‘y’


lvs's avatar
lvs committed
35
36
37
38
39
40
41
42
43
44
45
46
#helloworld_CXXFLAGS=-I../common/inc/ \
#		    -I./host/inc/ \
#		    -I. \
#		    -I./wrapcl/inc/ \
#		    $(opencl_CXXFLAGS) $(xcl2_CXXFLAGS) $(oclHelper_CXXFLAGS) \
#		    -std=c++0x \
#		    -U__STRICT_ANSI__ \
#		    $(ENABLE_KERNELS) \
#		    $(REP) \
#		    $(FIPO_FLAG)

hostbin_CXXFLAGS=-I../common/inc/ \
lvs's avatar
lvs committed
47
48
49
50
51
52
53
54
55
56
		    -I./host/inc/ \
		    -I. \
		    -I./wrapcl/inc/ \
		    $(opencl_CXXFLAGS) $(xcl2_CXXFLAGS) $(oclHelper_CXXFLAGS) \
		    -std=c++0x \
		    -U__STRICT_ANSI__ \
		    $(ENABLE_KERNELS) \
		    $(REP) \
		    $(FIPO_FLAG)
		    
lvs's avatar
lvs committed
57
#helloworld_LDFLAGS=$(opencl_LDFLAGS)
Leonardo Solis's avatar
Leonardo Solis committed
58
59
#hostbin_LDFLAGS=$(opencl_LDFLAGS)
hostbin_LDFLAGS=$(opencl_LDFLAGS) -lrt
lvs's avatar
lvs committed
60

lvs's avatar
lvs committed
61
62
#EXES=helloworld
EXES=hostbin
lvs's avatar
lvs committed
63
64
65

# Kernel
#vector_addition_SRCS=./src/vector_addition.cl
lvs's avatar
lvs committed
66
67
#vector_addition_SRCS=./device/Krnl_GA.cl
Krnl_GA_SRCS=./device/Krnl_GA.cl
lvs's avatar
lvs committed
68

lvs's avatar
lvs committed
69
70
#XOS=vector_addition
XOS=Krnl_GA
lvs's avatar
lvs committed
71

lvs's avatar
lvs committed
72
73
#vector_addition_XOS=vector_addition
Krnl_GA_XOS=Krnl_GA
lvs's avatar
lvs committed
74

lvs's avatar
lvs committed
75
76
#XCLBINS=vector_addition
XCLBINS=Krnl_GA
lvs's avatar
lvs committed
77
78

# check
lvs's avatar
lvs committed
79
80
81
82
#check_EXE=helloworld
check_EXE=hostbin
#check_XCLBINS=vector_addition
check_XCLBINS=Krnl_GA
lvs's avatar
lvs committed
83
84
85
86

CHECKS=check

include $(COMMON_REPO)/utility/rules.mk
lvs's avatar
lvs committed
87

88
89
90
91
92
93
94
kerswemu:
	make TARGETS=sw_emu all

kerhwemu:
	make TARGETS=hw_emu all	


lvs's avatar
lvs committed
95
96
# Automate test
# "exe" and "xclbin" are rules from "rules.mk"
Leonardo Solis's avatar
Leonardo Solis committed
97
# Don't forget to copy and rename ./xclbin/*.xclbin file into ./Krnl_GA.xclbin
lvs's avatar
lvs committed
98
emu: 
99
	XCL_EMULATION_MODE=sw_emu ./hostbin -ffile input/1stp/derived/1stp_protein.maps.fld -lfile input/1stp/derived/1stp_ligand.pdbqt -nrun 2 -nev 2500000
lvs's avatar
lvs committed
100
	
Leonardo Solis's avatar
Leonardo Solis committed
101
102
debug:
	XCL_EMULATION_MODE=sw_emu xgdb -args ./hostbin -ffile input/1stp/derived/1stp_protein.maps.fld -lfile input/1stp/derived/1stp_ligand.pdbqt -nrun 1 -nev 100 -lsit 10 -psize 10