-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
96 lines (76 loc) · 2.75 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
87
88
89
90
91
92
93
94
95
96
SDIR = ./src
IDIR = ./include
BDIR = ./bin
CUDADIR = /usr/local/cuda/samples/common/inc/
CC = nvcc
ERESSFLAGS = -use_fast_math -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES --std=c++11 -O2 -I $(IDIR)
HOMGENFLAGS = -use_fast_math -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES --std=c++11 -O2 -I $(IDIR)
KRESSFLAGS = -use_fast_math -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES --std=c++11 -O2 -I $(IDIR)
TESTFLAGS = -use_fast_math -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES --std=c++11 -O2 -I $(IDIR)
_CLUSTDESCRDEPS = cluster_descriptor.h
CLUSTDESCRDEPS = $(patsubst %,$(IDIR)/%,$(_CLUSTDESCRDEPS))
_CLUSTDESCRSRC = cluster_descriptor.cu
CLUSTDESCRSRC = $(patsubst %,$(SDIR)/%,$(_CLUSTDESCRSRC))
CLUSTDESCROBJ = cluster_descriptor.o
_CLUSTUTILSDEPS = cluster_utils.h
CLUSTUTILSDEPS = $(patsubst %,$(IDIR)/%,$(_CLUSTUTILSDEPS))
_CLUSTUTILSSRC = cluster_utils.cu
CLUSTUTILSSRC = $(patsubst %,$(SDIR)/%,$(_CLUSTUTILSSRC))
CLUSTUTILSOBJ = cluster_utils.o
_FILEUTILSDEPS = file_utils.h
FILEUTILSDEPS = $(patsubst %,$(IDIR)/%,$(_FILEUTILSDEPS))
_FILEUTILSSRC = file_utils.cu
FILEUTILSSRC = $(patsubst %,$(SDIR)/%,$(_FILEUTILSSRC))
FILEUTILSOBJ = file_utils.o
_COMMANDLINEDEPS = command_line.h
COMMANDLINEDEPS = $(patsubst %,$(IDIR)/%,$(_COMMANDLINEDEPS))
_COMMANDLINESRC = command_line.cu
COMMANDLINESRC = $(patsubst %,$(SDIR)/%,$(_COMMANDLINESRC))
COMMANDLINEOBJ = command_line.o
_ERESSSRC = eress.cu
ERESSSRC = $(patsubst %,$(SDIR)/%,$(_ERESSSRC))
ERESSOBJ = eress.o
_HOMGENSRC = homgen.cu
HOMGENSRC = $(patsubst %,$(SDIR)/%,$(_HOMGENSRC))
HOMGENOBJ = homgen.o
_KRESSSRC = kress.cu
KRESSSRC = $(patsubst %,$(SDIR)/%,$(_KRESSSRC))
KRESSOBJ = kress.o
$(CLUSTDESCROBJ): $(CLUSTDESCRSRC) $(CLUSTDESCRDEPS)
$(CC) -c -o $@ $< $(ERESSFLAGS)
$(CLUSTUTILSOBJ): $(CLUSTUTILSSRC) $(CLUSTUTILSDEPS)
$(CC) -c -o $@ $< $(ERESSFLAGS)
$(FILEUTILSOBJ): $(FILEUTILSSRC) $(FILEUTILSDEPS)
$(CC) -c -o $@ $< $(ERESSFLAGS)
$(COMMANDLINEOBJ): $(COMMANDLINESRC) $(COMMANDLINEDEPS)
$(CC) -c -o $@ $< $(ERESSFLAGS)
$(ERESSOBJ): $(ERESSSRC)
$(CC) -c -o $@ $< $(ERESSFLAGS)
eress: $(CLUSTDESCROBJ) $(CLUSTUTILSOBJ) $(FILEUTILSOBJ) $(COMMANDLINEOBJ) $(ERESSOBJ)
$(CC) -o $@ $^ $(ERESSFLAGS)
mv $@ $(BDIR)
rm $(ERESSOBJ)
rm $(CLUSTDESCROBJ)
rm $(CLUSTUTILSOBJ)
rm $(FILEUTILSOBJ)
rm $(COMMANDLINEOBJ)
$(HOMGENOBJ): $(HOMGENSRC)
$(CC) -c -o $@ $< $(HOMGENFLAGS)
homgen: $(CLUSTDESCROBJ) $(CLUSTUTILSOBJ) $(FILEUTILSOBJ) $(HOMGENOBJ)
$(CC) -o $@ $^ $(ERESSFLAGS)
mv $@ $(BDIR)
rm $(HOMGENOBJ)
rm $(CLUSTDESCROBJ)
rm $(CLUSTUTILSOBJ)
rm $(FILEUTILSOBJ)
$(KRESSOBJ): $(KRESSSRC)
$(CC) -c -o $@ $< $(KRESSFLAGS)
kress: $(CLUSTDESCROBJ) $(CLUSTUTILSOBJ) $(FILEUTILSOBJ) $(KRESSOBJ)
$(CC) -o $@ $^ $(KRESSFLAGS)
mv $@ $(BDIR)
rm $(KRESSOBJ)
rm $(CLUSTDESCROBJ)
rm $(CLUSTUTILSOBJ)
rm $(FILEUTILSOBJ)
clean:
rm $(BDIR)/*