-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
122 lines (98 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
$(info ===================================================)
$(info )
$(info TurboRVB Legacy build system)
$(info )
$(info ===================================================)
$(info )
# Test if make.inc exists
make_inc_c := e
make_txt_c := e
ifeq ($(wildcard make.inc),)
$(info )
$(warning make.inc not found. )
make_inc_c := $(shell read -p "Do you want to create make.inc? [y/n]: " ans; \
if [ "$$ans" = "y" ]; then \
cp devel_tools/configs/make.inc.example.gcc make.inc; \
echo "c"; \
else \
echo "n"; \
fi)
ifeq ($(make_inc_c) ,c)
$(info )
$(info Please select an example: )
$(info )
$(info 1 GNU Fortran Compiler )
$(info 2 GNU Fortran Compiler with MPI)
$(info )
$(shell read -p "Select an example [1-2]: " ans; \
if [ "$$ans" = "1" ]; then \
cp devel_tools/make.inc.examples/make.inc.example.gcc make.inc; \
elif [ "$$ans" = "2" ]; then \
cp devel_tools/configs/make.inc.example.gccmpi make.inc; \
fi)
endif
endif
ifeq ($(wildcard make.txt),)
$(info )
$(warning make.txt not found. )
make_txt_c := $(shell read -p "Do you want to create make.txt? [y/n]: " ans; \
if [ "$$ans" = "y" ]; then \
cp devel_tools/configs/make.txt.example make.txt; \
echo "c"; \
else \
echo "n"; \
fi)
endif
$(info )
ifeq ($(make_inc_c),c)
$(info make.inc created. Please edit it.)
endif
ifeq ($(make_txt_c),c)
$(info make.txt created. Please edit it.)
endif
ifeq ($(make_inc_c),n)
$(info make.inc not created. Exiting.)
endif
ifeq ($(make_inc_c),n)
$(info make.inc not created. Exiting.)
endif
ifneq ($(make_inc_c),e)
$(info )
$(error Exiting.)
endif
ifneq ($(make_txt_c),e)
$(info )
$(error Exiting.)
endif
include make.inc
$(info )
$(info Using make.inc found in $(CURDIR))
$(info Building in $(BUILD_DIR))
$(info )
$(info Fortran compiler: $(FC))
$(info Fortran compiler flags: $(FCFLAGS))
$(info Fortran passive flags: $(FCFLAGS_PASSIVE))
$(info Fortran aggressive flags: $(FCFLAGS_AGGRESSIVE))
$(info )
$(info C compiler: $(CC))
$(info C compiler flags: $(CFLAGS))
$(info )
$(info Linker: $(LD))
$(info Linker flags: $(FLINK))
$(info )
$(info Libraries: $(LINK_LIBS))
$(info )
$(info ===================================================)
all:
make -C src/m_pfapack -f Makefile
make -C src/m_common -f Makefile
make -C src/d_qlapack -f Makefile
make -C src/c_adjoint_forward -f Makefile
make -C src/c_adjoint_backward -f Makefile
make -C src/b_complex -f Makefile
make -C src/a_turborvb -f Makefile
@echo " "
@echo " DONE - Enjoy TurboRVB! "
@echo " "
clean:
rm -rf $(BUILD_DIR)