-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
86 lines (58 loc) · 1.54 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
FC = ifort
EXE = run
OP_COMP = -O3 -g -xHost
OP_LINK = -O3 -g -xHost
SRC = main.f90 \
constant.f90 \
declaration.f90 \
grid.f90 \
misc.f90 \
boundary.f90 \
weno.f90 \
flux.f90 \
odesolver.f90
OBJ = main.o \
constant.o \
declaration.o \
grid.o \
misc.o \
boundary.o \
weno.o \
flux.o \
odesolver.o
all: $(EXE)
compile: $(OBJ)
$(EXE): $(OBJ)
$(FC) -o $(EXE) $(OBJ) $(OP_LINK)
# $(EXE): $(OBJ)
# $(FC) $(OP_LINK) -o $(EXE) $(OBJ)
$(OBJ):
$(FC) $(OP_COMP) -c $(SRC_DIR)$(@:.o=.f90) -o $@
# %.o %.mod: %.f90
# $(FC) -c $(OP_COMP) $<
.PHONY = clean
clean:
rm $(OBJ) *.mod
cleaner:
$(clean)
rm $(EXE)
rm *.dat
constant.o: constant.f90
declaration.o: declaration.f90 constant.o
grid.o: grid.f90 constant.o declaration.o
misc.o: misc.f90 constant.o declaration.o
boundary.o: boundary.f90 constant.o declaration.o
weno.o: weno.f90 constant.o
flux.o: flux.f90 constant.o declaration.o misc.o weno.o
odesolver.o: odesolver.f90 constant.o declaration.o
# odesolver.o: odesolver.f90 constant.o declaration.o
# # viscous.o: viscous.f90 constant.o declaration.o
# # gradient.o: gradient.f90 constant.o declaration.o
# # flux.o: flux.f90 constant.o declaration.o
# # residual.o: residual.f90 constant.o declaration.o flux.o
# # wenonew.o: wenonew.f90 constant.o declaration.o flux.o
# # odesolver.o: odesolver.f90 constant.o declaration.o
# # main.o: main.f90 constant.o declaration.o grid.o misc.o \
# # viscous.o gradient.o residual.o wenonew.o odesolver.o
main.o: main.f90 constant.o declaration.o grid.o misc.o \
boundary.o flux.o odesolver.o