-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·97 lines (56 loc) · 1.57 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
97
#=========================== Makefile for Poseidon ============================#
## Select Number of Processes (Mostly for MacBook)
NAME := KnotAFish
NPROCS=1
## Select Machine
POSEIDON_MACHINE_NAME =jrober
#MACHINE_NAME = sjdunham
#MACHINE_NAME =MacBook
#MACHINE_NAME =Rhea
#MACHINE_NAME =BlueWaters
## Select Mode
CMODE =DEBUG
#CMODE =OPTIMIZE
## Compile with Openmp
#OPENMP_MODE =ON
OPENMP_MODE =OFF
## Compile with PETSc
#PETSC_MODE =ON
PETSC_MODE =OFF
## Compile with HDF5
HDF5_MODE =ON
#HDF5_MODE =OFF
## Compile with MPI
MPI_MODE =ON
#MPI_MODE =OFF
#AMREX_MODE =ON
AMREX_MODE =OFF
include ./Build/Makefile_Core
VPATH += ./Obj
#---------------------------- Compilation Rules ------------------------------------#
#objb = $(POSEIDON).o
#$(foreach Poseidon, $(POSEIDON), $(eval $(POSEIDON) := $(objb)))
#OBJS := $(addsuffix .o, $(POSEIDON))
#DEPS := $(addsuffix .d, $(POSEIDON))
#LIB := $(patsubst %, lib.%a, $(NAME))
#$(info $$OBJS is [${OBJS}])
$(LIB): $(OBJS)
ar crv $@ $^
.PHONY: PoseidonLib clean clean_output
PoseidonLib: $(POSEIDON_o)
ar crv $(OBJ)/poseidon.a $(OBJ)/*.o
#------------------------------- Clean Up Rule ------------------------------------#
clean:
rm -f $(OBJ)/*.o
rm -f $(OBJ)/*.mod
rm -f $(BIN)/*.x
rm -f $(OBJ)/*.a
clean_output:
rm -f $(OUT)/*.out
rm -f $(OUT)/Results/*.out
rm -f $(OUT)/Reports/*.out
rm -f $(OUT)/Reports/Iteration_Reports/*.out
rm -f $(OUT)/Objects/*.out
rm -f $(OUT)/Objects/Sources/*.out
rm -f $(OUT)/Objects/Linear_System/*.out
rm -f $(OUT)/Objects/Residual/*.out