forked from UoB-HPC/openmp-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
50 lines (34 loc) · 1.05 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
#
# USAGE:
# make ... to build the program
# make test ... to run the default test case
#
include make.def
EXES= pi$(EXE) jac_solv$(EXE) vadd$(EXE) vadd_heap$(EXE) heat$(EXE) heat_map$(EXE)
JAC_OBJS = jac_solv.$(OBJ) mm_utils.$(OBJ)
all: $(EXES)
jac_solv$(EXE): $(JAC_OBJS) mm_utils.h
$(CLINKER) $(CFLAGS) -o jac_solv$(EXE) $(JAC_OBJS) $(LIBS)
pi$(EXE): pi.$(OBJ)
$(CLINKER) $(OPTFLAGS) -o pi$(EXE) pi.$(OBJ) $(LIBS)
vadd$(EXE): vadd.$(OBJ)
$(CLINKER) $(OPTFLAGS) -o vadd$(EXE) vadd.$(OBJ) $(LIBS)
vadd_heap$(EXE): vadd_heap.$(OBJ)
$(CLINKER) $(OPTFLAGS) -o vadd_heap$(EXE) vadd_heap.$(OBJ) $(LIBS)
heat$(EXE): heat.$(OBJ)
$(CLINKER) $(OPTFLAGS) -o heat$(EXE) heat.$(OBJ) $(LIBS)
heat_map$(EXE): heat_map.$(OBJ)
$(CLINKER) $(OPTFLAGS) -o heat_map$(EXE) heat_map.$(OBJ) $(LIBS)
test: $(EXES)
for i in $(EXES); do \
$(PRE)$$i; \
done
clean:
$(RM) $(EXES) *.$(OBJ) *.ptx *.cub
jac_solv.$(OBJ) : mm_utils.h
.SUFFIXES:
.SUFFIXES: .c .cpp .$(OBJ)
.c.$(OBJ):
$(CC) $(CFLAGS) -c $<
.cpp.$(OBJ):
$(CC) $(CFLAGS) -c $<