-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
88 lines (64 loc) · 2.45 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
74
75
76
77
78
79
80
81
82
83
84
85
86
# ***************************************************************************
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# ****************************************************************************
#
# Author: Tiziano De Matteis <dematteis at di.unipi.it>
DELAUNAY_DIR = delaunay_linterp
FF_ROOT = fastflow
DELAUNAY_REPO = https://github.com/rncarpio/delaunay_linterp
FF_REPO = https://github.com/fastflow/fastflow
CXX = g++
INCLUDES = -I $(FF_ROOT) -I $(PWD)/include
CXXFLAGS = -std=c++11 -O3
NCXX = nvcc
NCXXFLAGS = -x cu -w -std=c++11 -O3 --expt-extended-lambda -gencode arch=compute_35,code=sm_35
NCLIBS = -lCGAL -lgmp -lgsl -lgslcblas
LDFLAGS = -pthread
MACROS =
TARGETS = test_wf test_wf_gpu test_template financial
.DEFAULT_GOAL := all
.PHONY: all clean cleanall delaunay fastflow
.SUFFIXES: .cpp
all: bin financial_cpu financial_gpu soccer_cpu soccer_gpu
#Financial
financial_cpu: fastflow delaunay src/financial_cpu.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(MACROS) $(OPTFLAGS) -o bin/$@ src/financial_cpu.cpp $(LDFLAGS)
financial_gpu: fastflow delaunay src/financial_gpu.cpp
$(NCXX) $(NCXXFLAGS) $(INCLUDES) $(MACROS) -o bin/$@ src/financial_gpu.cpp $(NCLIBS)
#######SOCCER
soccer_cpu: fastflow delaunay src/soccer_cpu.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(MACROS) $(OPTFLAGS) -o bin/$@ src/soccer_cpu.cpp $(LDFLAGS)
soccer_gpu: fastflow delaunay src/soccer_gpu.cpp include/Win_GPU_Config.h
$(NCXX) $(NCXXFLAGS) $(INCLUDES) $(MACROS) -o bin/$@ src/soccer_gpu.cpp $(NCLIBS)
### Phony
fastflow:
@if [ ! -d $(FF_ROOT) ] ;\
then \
echo "FastFlow does not exist, fetching"; \
git clone $(FF_REPO); \
fi
delaunay:
@if [ ! -d $(DELAUNAY_DIR) ] ;\
then \
echo "Delaunay_linterp does not exist, fetching"; \
git clone $(DELAUNAY_REPO); \
fi
bin:
mkdir bin
clean:
rm -f bin/*
cleanall:
rm -f bin/*.o bin/*~