-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 1.42 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
SRC_FOLDER = './src'
BIN_FOLDER = './bin'
OBJ_FOLDER = './objects'
SAMPLES_FOLDER = './samples'
SCRIPTS_FOLDER = './scripts'
CXXFLAGS = -std=c++0x
all : sampler single_dijkstra_adjmap
firsttime :
mkdir -p $(SRC_FOLDER)
mkdir -p $(OBJ_FOLDER)
mkdir -p $(BIN_FOLDER)
mkdir -p $(SAMPLES_FOLDER)
defs.o : firsttime
g++ -c $(SRC_FOLDER)/defs.cpp -o $(OBJ_FOLDER)/defs.o -Wall -g -O0 $(CXXFLAGS)
file.o : firsttime defs.o
g++ -c $(SRC_FOLDER)/file.cpp -o $(OBJ_FOLDER)/file.o -Wall -g -O0 $(CXXFLAGS)
sampler : firsttime
g++ $(SRC_FOLDER)/sampler.cpp -o $(BIN_FOLDER)/sampler -Wall -g -O0 $(CXXFLAGS)
single_dijkstra_adjmap : firsttime defs.o file.o
g++ $(SRC_FOLDER)/single_dijkstra_adjmap.cpp $(OBJ_FOLDER)/defs.o $(OBJ_FOLDER)/file.o -o $(BIN_FOLDER)/single_dijkstra_adjmap -Wall -g -O0 $(CXXFLAGS)
parallel_dijkstra : firsttime file.o
nvcc $(SRC_FOLDER)/parallel_dijkstra.cu $(OBJ_FOLDER)/file.o -o $(BIN_FOLDER)/parallel_dijkstra
#g++ single_dijkstra_adjmat.cpp -o single_dijkstra_adjmat -Wall -g -O0
sample : sampler
#$((`for ii in {1..200}; do touch $(SAMPLES_FOLDER)/sample_${ii}.data ${ii} 0 100; done`))
#$((`echo Helloworld`)
exec $(SCRIPTS_FOLDER)/script.sh $(BIN_FOLDER)/sampler generate $(SAMPLES_FOLDER)
test : firsttime single_dijkstra_adjmap
exec $(SCRIPTS_FOLDER)/script.sh $(BIN_FOLDER)/single_dijkstra_adjmap test $(SAMPLES_FOLDER) $(OUT_FOLDER)
clean :
rm -rf $(OBJ_FOLDER) $(BIN_FOLDER) $(SAMPLES_FOLDER)