-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
73 lines (36 loc) · 1.59 KB
/
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
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Makefile adapted from HPCE-CW4, which was in turn adapted from the Hands On OpenCL course: https://github.com/HandsOnOpenCL
ifndef CPPC
CPPC=g++
endif
LDLIBS = -lOpenCL
# Check our platform and make sure we define the APPLE variable
# and set up the right compiler flags and libraries
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
LDLIBS = -framework OpenCL
endif
CPPFLAGS += -I include -W -Wall -std=c++11 -O2 -lm
bin/test_opencl : src/test_opencl.cpp
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
bin/process_old : src/process_old.cpp
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
bin/process_ocl_v1_1 : src/process_ocl_v1_1_single_process_function.cpp
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
bin/process_ocl_v1_2 : src/process_ocl_v1_2_single_process_function.cpp
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
bin/process_ocl_v2 : src/process_ocl_v2_open_cl.cpp
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
bin/process_buf_v1 : src/process_buf_v1.cpp
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
bin/process_buf_v2 : src/process_buf_v2.cpp
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
INCLUDED_FILES = src/utilities/hpceutils.cpp src/algorithms/standard.cpp src/algorithms/optimised.cpp
bin/process : src/process.cpp $(INCLUDED_FILES)
$(CXX) $^ -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
final : bin/process bin/process_old
all: final bin/process_ocl_v1_1 bin/process_ocl_v1_2 bin/process_ocl_v2 bin/process_buf_v1 bin/process_buf_v2
build_test: bin/test_opencl
test: build_test
./bin/test_opencl
./test/simple_compare